refactor: Move inline Zod schemas from routes to validator files

Create ai-kurzy.validators.js and service.validators.js with schemas
extracted from their respective route files. Routes now import schemas
instead of defining them inline.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
richardtekula
2026-01-28 07:22:33 +01:00
parent f463467264
commit 4629f1903b
4 changed files with 115 additions and 95 deletions

View File

@@ -0,0 +1,22 @@
import { z } from 'zod';
export const serviceIdSchema = z.object({
serviceId: z.string().uuid(),
});
export const folderIdSchema = z.object({
folderId: z.string().uuid(),
});
export const folderDocumentIdSchema = z.object({
folderId: z.string().uuid(),
documentId: z.string().uuid(),
});
export const createFolderSchema = z.object({
name: z.string().min(1).max(255),
});
export const updateFolderSchema = z.object({
name: z.string().min(1).max(255),
});