Skip to content

liveCanvasOpSchema

const liveCanvasOpSchema: ZodDiscriminatedUnion<"type", [ZodObject<{ shapes: ZodArray<ZodObject<{ color: ZodOptional<ZodString>; fill: ZodOptional<ZodString>; height: ZodOptional<ZodNumber>; id: ZodOptional<ZodString>; label: ZodOptional<ZodString>; type: ZodEnum<["rectangle", "ellipse", "diamond", "text"]>; width: ZodOptional<ZodNumber>; x: ZodNumber; y: ZodNumber; }, "strip", ZodTypeAny, { color?: string; fill?: string; height?: number; id?: string; label?: string; type: "text" | "rectangle" | "ellipse" | "diamond"; width?: number; x: number; y: number; }, { color?: string; fill?: string; height?: number; id?: string; label?: string; type: "text" | "rectangle" | "ellipse" | "diamond"; width?: number; 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<ZodString>; from: ZodString; id: ZodOptional<ZodString>; label: ZodOptional<ZodString>; to: ZodString; }, "strip", ZodTypeAny, { color?: string; from: string; id?: string; label?: string; to: string; }, { color?: string; from: string; id?: string; label?: string; 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<ZodString>; fill: ZodOptional<ZodString>; height: ZodOptional<ZodNumber>; id: ZodString; label: ZodOptional<ZodString>; width: ZodOptional<ZodNumber>; x: ZodOptional<ZodNumber>; y: ZodOptional<ZodNumber>; }, "strip", ZodTypeAny, { color?: string; fill?: string; height?: number; id: string; label?: string; width?: number; x?: number; y?: number; }, { color?: string; fill?: string; height?: number; id: string; label?: string; width?: number; x?: number; y?: number; }>, "many">; }, "strip", ZodTypeAny, { type: "update_shapes"; updates: object[]; }, { type: "update_shapes"; updates: object[]; }>]>

Defined in: tools/src/index.ts:243