Skip to content

canvasOpsRequestSchema

const canvasOpsRequestSchema: ZodObject<{ approver: ZodOptional<ZodString>; approverId: ZodOptional<ZodString>; mode: ZodDefault<ZodEnum<["edit", "suggest"]>>; ops: ZodArray<ZodDiscriminatedUnion<"type", [ZodObject<{ shapes: ZodArray<ZodObject<{ color: ZodOptional<…>; fill: ZodOptional<…>; height: ZodOptional<…>; id: ZodOptional<…>; label: ZodOptional<…>; type: ZodEnum<…>; width: ZodOptional<…>; x: ZodNumber; y: ZodNumber; }, "strip", ZodTypeAny, { color?: … | …; fill?: … | …; height?: … | …; id?: … | …; label?: … | …; type: … | … | … | …; width?: … | …; x: number; y: number; }, { color?: … | …; fill?: … | …; height?: … | …; id?: … | …; label?: … | …; type: … | … | … | …; width?: … | …; x: number; y: number; }>, "many">; type: ZodLiteral<"add_shapes">; }, "strip", ZodTypeAny, { shapes: object[]; type: "add_shapes"; }, { shapes: object[]; type: "add_shapes"; }>, ZodObject<{ arrows: ZodArray<ZodObject<{ color: ZodOptional<…>; from: ZodString; id: ZodOptional<…>; label: ZodOptional<…>; to: ZodString; }, "strip", ZodTypeAny, { color?: … | …; from: string; id?: … | …; label?: … | …; to: string; }, { color?: … | …; from: string; id?: … | …; label?: … | …; to: string; }>, "many">; type: ZodLiteral<"connect">; }, "strip", ZodTypeAny, { arrows: object[]; type: "connect"; }, { arrows: object[]; type: "connect"; }>, ZodObject<{ type: ZodLiteral<"update_shapes">; updates: ZodArray<ZodObject<{ color: ZodOptional<…>; fill: ZodOptional<…>; height: ZodOptional<…>; id: ZodString; label: ZodOptional<…>; width: ZodOptional<…>; x: ZodOptional<…>; y: ZodOptional<…>; }, "strip", ZodTypeAny, { color?: … | …; fill?: … | …; height?: … | …; id: string; label?: … | …; width?: … | …; x?: … | …; y?: … | …; }, { color?: … | …; fill?: … | …; height?: … | …; id: string; label?: … | …; width?: … | …; x?: … | …; y?: … | …; }>, "many">; }, "strip", ZodTypeAny, { type: "update_shapes"; updates: object[]; }, { type: "update_shapes"; updates: object[]; }>, ZodObject<{ ids: ZodArray<ZodString, "many">; type: ZodLiteral<"delete_shapes">; }, "strip", ZodTypeAny, { ids: string[]; type: "delete_shapes"; }, { ids: string[]; type: "delete_shapes"; }>]>, "many">; }, "strip", ZodTypeAny, { approver?: string; approverId?: string; mode: "suggest" | "edit"; ops: ({ shapes: object[]; type: "add_shapes"; } | { arrows: object[]; type: "connect"; } | { type: "update_shapes"; updates: object[]; } | { ids: string[]; type: "delete_shapes"; })[]; }, { approver?: string; approverId?: string; mode?: "suggest" | "edit"; ops: ({ shapes: object[]; type: "add_shapes"; } | { arrows: object[]; type: "connect"; } | { type: "update_shapes"; updates: object[]; } | { ids: string[]; type: "delete_shapes"; })[]; }>

Defined in: index.ts:273