feat: Add apps crud (#174)

* wip: add apps crud

* wip: add edit for apps

* feat: add apps crud

* fix: color of icon for no app results wrong

* ci: fix lint issues

* test: add unit tests for app crud

* ci: fix format issue

* fix: missing rename in edit form

* fix: missing callback deepsource issues
This commit is contained in:
Meier Lukas
2024-03-04 22:13:40 +01:00
committed by GitHub
parent 70f34efd53
commit 8d5984c58a
17 changed files with 1501 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { z } from "zod";
const manageAppSchema = z.object({
name: z.string().min(1).max(64),
description: z.string().max(512).nullable(),
iconUrl: z.string().min(1),
href: z.string().nullable(),
});
const editAppSchema = manageAppSchema.and(z.object({ id: z.string() }));
const byIdSchema = z.object({ id: z.string() });
export const appSchemas = {
manage: manageAppSchema,
edit: editAppSchema,
byId: byIdSchema,
};

View File

@@ -1,3 +1,4 @@
import { appSchemas } from "./app";
import { boardSchemas } from "./board";
import { integrationSchemas } from "./integration";
import { userSchemas } from "./user";
@@ -6,6 +7,7 @@ export const validation = {
user: userSchemas,
integration: integrationSchemas,
board: boardSchemas,
app: appSchemas,
};
export { createSectionSchema, sharedItemSchema } from "./shared";