n8n/packages/cli/src/evaluation/test-definition.schema.ts
Eugene e875bc5592
feat(core): Add internal API for test definitions (no-changelog) (#11591)
Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
2024-11-12 10:28:32 +01:00

18 lines
463 B
TypeScript

import { z } from 'zod';
export const testDefinitionCreateRequestBodySchema = z
.object({
name: z.string().min(1).max(255),
workflowId: z.string().min(1),
evaluationWorkflowId: z.string().min(1).optional(),
})
.strict();
export const testDefinitionPatchRequestBodySchema = z
.object({
name: z.string().min(1).max(255).optional(),
evaluationWorkflowId: z.string().min(1).optional(),
annotationTagId: z.string().min(1).optional(),
})
.strict();