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>
23 lines
471 B
JavaScript
23 lines
471 B
JavaScript
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),
|
|
});
|