Files
Homarr/packages/validation/src/app.ts
Meier Lukas 8d5984c58a 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
2024-03-04 22:13:40 +01:00

19 lines
434 B
TypeScript

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,
};