import { z } from "zod/v4"; import { InterventionTemplateInputSchema } from "../api/domain/intervention-template-values"; export type { InterventionStepInput, InterventionTemplateInput, } from "../api/domain/intervention-template-values"; export { InterventionStepInputSchema, InterventionTemplateInputSchema, } from "../api/domain/intervention-template-values"; export const SaveInterventionTemplateSchema = z.strictObject({ values: InterventionTemplateInputSchema, requestKey: z.uuid(), expectedRevisionId: z.uuid().nullable(), }); export const InterventionTemplateSchema = z.strictObject({ id: z.uuid(), companyId: z.uuid().nullable(), values: InterventionTemplateInputSchema, history: z .array( z.strictObject({ id: z.uuid(), values: InterventionTemplateInputSchema, actorId: z.uuid().nullable(), actorName: z.string().min(1), recordedAt: z.iso.datetime(), }) ) .min(1), }); export const InterventionTemplatesSchema = z.strictObject({ templates: z.array(InterventionTemplateSchema), }); export const InterventionTemplateResponseSchema = z.strictObject({ template: InterventionTemplateSchema, }); export type InterventionTemplateDTO = z.infer; export type SaveInterventionTemplateInput = z.infer;