1/** 2 * TASK-0126 — AI page-generation DTO (zod; validated by `ZodValidate`). 3 * 4 * Body: `{ prompt, parentId? }` — `prompt` is the natural-language page 5 * description (1–4000 chars); `parentId` is the (real) id of the page the 6 * generated page nests under (the endpoint's param, injected by the executor 7 * into the first plan step — NOT model-emitted). The `Idempotency-Key` header 8 * (a separate, optional field) memoizes the run's created page id so a retried 9 * cancelled generation does not double-create. 10 */ 11import { z } from "zod"; 12 13export const AiGenerateDto = z.object({ 14 /** The natural-language description of the page to generate. */ 15 prompt: z.string().trim().min(1, "prompt is required").max(4000), 16 /** The real id of the page the generated page nests under (optional). */ 17 parentId: z.string().min(1).nullable().optional(), 18}); 19export type AiGenerateInput = z.infer<typeof AiGenerateDto>; 20