Skip to content

ChainGraph API Documentation / @badaitech/chaingraph-types / SerializedFlowSchema

Variable: SerializedFlowSchema

const SerializedFlowSchema: ZodObject<{ edges: ZodArray<ZodObject<{ id: ZodString; metadata: ZodOptional<ZodRecord<ZodString, ZodAny>>; sourceNodeId: ZodString; sourcePortId: ZodString; status: ZodNativeEnum<typeof EdgeStatus>; targetNodeId: ZodString; targetPortId: ZodString; }, "strip", ZodTypeAny, { id: string; metadata?: Record<string, any>; sourceNodeId: string; sourcePortId: string; status: EdgeStatus; targetNodeId: string; targetPortId: string; }, { id: string; metadata?: Record<string, any>; sourceNodeId: string; sourcePortId: string; status: EdgeStatus; targetNodeId: string; targetPortId: string; }>, "many">; id: ZodString; metadata: ZodObject<{ canFork: ZodOptional<ZodBoolean>; createdAt: ZodDate; description: ZodOptional<ZodString>; forkRule: ZodOptional<ZodRecord<ZodString, ZodAny>>; id: ZodOptional<ZodString>; isPublic: ZodOptional<ZodBoolean>; metadata: ZodOptional<ZodRecord<ZodString, ZodAny>>; name: ZodString; ownerID: ZodOptional<ZodString>; parentId: ZodOptional<ZodString>; schemaVersion: ZodOptional<ZodString>; tags: ZodOptional<ZodArray<ZodString, "many">>; updatedAt: ZodDate; version: ZodOptional<ZodNumber>; }, "strip", ZodTypeAny, { canFork?: boolean; createdAt: Date; description?: string; forkRule?: Record<string, any>; id?: string; isPublic?: boolean; metadata?: Record<string, any>; name: string; ownerID?: string; parentId?: string; schemaVersion?: string; tags?: string[]; updatedAt: Date; version?: number; }, { canFork?: boolean; createdAt: Date; description?: string; forkRule?: Record<string, any>; id?: string; isPublic?: boolean; metadata?: Record<string, any>; name: string; ownerID?: string; parentId?: string; schemaVersion?: string; tags?: string[]; updatedAt: Date; version?: number; }>; nodes: ZodArray<ZodObject<{ connections: ZodOptional<ZodRecord<ZodString, ZodArray<ZodObject<{ nodeId: ZodString; portId: ZodString; }, "strip", ZodTypeAny, { nodeId: string; portId: string; }, { nodeId: string; portId: string; }>, "many">>>; id: ZodString; metadata: ZodLazy<ZodObject<{ author: ZodOptional<ZodString>; category: ZodOptional<ZodString>; description: ZodOptional<ZodString>; flowPorts: ZodOptional<ZodObject<{ disabledAutoExecution: ...; disabledError: ...; disabledFlowPorts: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>; icon: ZodOptional<ZodString>; id: ZodOptional<ZodString>; metadata: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; parentNodeId: ZodOptional<ZodString>; portsConfig: ZodOptional<ZodRecord<ZodString, ZodAny>>; tags: ZodOptional<ZodArray<ZodString, "many">>; title: ZodOptional<ZodString>; type: ZodString; ui: ZodOptional<ZodObject<{ dimensions: ...; position: ...; state: ...; style: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>; version: ZodOptional<ZodNumber>; }, "passthrough", ZodTypeAny, objectOutputType<{ author: ZodOptional<ZodString>; category: ZodOptional<ZodString>; description: ZodOptional<ZodString>; flowPorts: ZodOptional<ZodObject<..., ..., ..., ..., ...>>; icon: ZodOptional<ZodString>; id: ZodOptional<ZodString>; metadata: ZodOptional<ZodRecord<..., ...>>; parentNodeId: ZodOptional<ZodString>; portsConfig: ZodOptional<ZodRecord<..., ...>>; tags: ZodOptional<ZodArray<..., ...>>; title: ZodOptional<ZodString>; type: ZodString; ui: ZodOptional<ZodObject<..., ..., ..., ..., ...>>; version: ZodOptional<ZodNumber>; }, ZodTypeAny, "passthrough">, objectInputType<{ author: ZodOptional<ZodString>; category: ZodOptional<ZodString>; description: ZodOptional<ZodString>; flowPorts: ZodOptional<ZodObject<..., ..., ..., ..., ...>>; icon: ZodOptional<ZodString>; id: ZodOptional<ZodString>; metadata: ZodOptional<ZodRecord<..., ...>>; parentNodeId: ZodOptional<ZodString>; portsConfig: ZodOptional<ZodRecord<..., ...>>; tags: ZodOptional<ZodArray<..., ...>>; title: ZodOptional<ZodString>; type: ZodString; ui: ZodOptional<ZodObject<..., ..., ..., ..., ...>>; version: ZodOptional<ZodNumber>; }, ZodTypeAny, "passthrough">>>; ports: ZodArray<ZodObject<{ config: ZodType<IPortConfig, ZodTypeDef, IPortConfig>; value: ZodType<any, ZodTypeDef, any>; }, "passthrough", ZodTypeAny, objectOutputType<{ config: ZodType<IPortConfig, ZodTypeDef, IPortConfig>; value: ZodType<any, ZodTypeDef, any>; }, ZodTypeAny, "passthrough">, objectInputType<{ config: ZodType<IPortConfig, ZodTypeDef, IPortConfig>; value: ZodType<any, ZodTypeDef, any>; }, ZodTypeAny, "passthrough">>, "many">; schemaVersion: ZodLiteral<"v2">; status: ZodNativeEnum<typeof NodeStatus>; systemPorts: ZodOptional<ZodObject<{ error: ZodObject<{ id: ZodString; value: ZodOptional<...>; }, "strip", ZodTypeAny, { id: string; value?: ... | ... | ...; }, { id: string; value?: ... | ... | ...; }>; errorMessage: ZodObject<{ id: ZodString; value: ZodOptional<...>; }, "strip", ZodTypeAny, { id: string; value?: ... | ...; }, { id: string; value?: ... | ...; }>; execute: ZodObject<{ id: ZodString; value: ZodOptional<...>; }, "strip", ZodTypeAny, { id: string; value?: ... | ... | ...; }, { id: string; value?: ... | ... | ...; }>; success: ZodObject<{ id: ZodString; value: ZodOptional<...>; }, "strip", ZodTypeAny, { id: string; value?: ... | ... | ...; }, { id: string; value?: ... | ... | ...; }>; }, "strip", ZodTypeAny, { error: { id: string; value?: boolean; }; errorMessage: { id: string; value?: string; }; execute: { id: string; value?: boolean; }; success: { id: string; value?: boolean; }; }, { error: { id: string; value?: boolean; }; errorMessage: { id: string; value?: string; }; execute: { id: string; value?: boolean; }; success: { id: string; value?: boolean; }; }>>; type: ZodString; }, "strip", ZodTypeAny, { connections?: Record<string, object[]>; id: string; metadata: object & object; ports: objectOutputType<{ config: ZodType<IPortConfig, ZodTypeDef, IPortConfig>; value: ZodType<any, ZodTypeDef, any>; }, ZodTypeAny, "passthrough">[]; schemaVersion: "v2"; status: NodeStatus; systemPorts?: { error: { id: string; value?: boolean; }; errorMessage: { id: string; value?: string; }; execute: { id: string; value?: boolean; }; success: { id: string; value?: boolean; }; }; type: string; }, { connections?: Record<string, object[]>; id: string; metadata: object & object; ports: objectInputType<{ config: ZodType<IPortConfig, ZodTypeDef, IPortConfig>; value: ZodType<any, ZodTypeDef, any>; }, ZodTypeAny, "passthrough">[]; schemaVersion: "v2"; status: NodeStatus; systemPorts?: { error: { id: string; value?: boolean; }; errorMessage: { id: string; value?: string; }; execute: { id: string; value?: boolean; }; success: { id: string; value?: boolean; }; }; type: string; }>, "many">; }, "strip", ZodTypeAny, { edges: object[]; id: string; metadata: { canFork?: boolean; createdAt: Date; description?: string; forkRule?: Record<string, any>; id?: string; isPublic?: boolean; metadata?: Record<string, any>; name: string; ownerID?: string; parentId?: string; schemaVersion?: string; tags?: string[]; updatedAt: Date; version?: number; }; nodes: object[]; }, { edges: object[]; id: string; metadata: { canFork?: boolean; createdAt: Date; description?: string; forkRule?: Record<string, any>; id?: string; isPublic?: boolean; metadata?: Record<string, any>; name: string; ownerID?: string; parentId?: string; schemaVersion?: string; tags?: string[]; updatedAt: Date; version?: number; }; nodes: object[]; }>

Defined in: packages/chaingraph-types/src/flow/types.zod.ts:30

Licensed under BUSL-1.1