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