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:
18
packages/validation/src/app.ts
Normal file
18
packages/validation/src/app.ts
Normal 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,
|
||||
};
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user