Skip to content

SourceRuntimeSchema

const SourceRuntimeSchema: ZodObject<{ cache: ZodOptional<ZodObject<{ enabled: ZodDefault<ZodBoolean>; ttl: ZodOptional<ZodNumber>; }, "strip", ZodTypeAny, { enabled: boolean; ttl?: number; }, { enabled?: boolean; ttl?: number; }>>; fetchStrategy: ZodOptional<ZodEnum<["runtime", "build", "hybrid"]>>; loading: ZodOptional<ZodObject<{ enabled: ZodDefault<ZodBoolean>; message: ZodOptional<ZodString>; showErrorOverlay: ZodDefault<ZodBoolean>; }, "strip", ZodTypeAny, { enabled: boolean; message?: string; showErrorOverlay: boolean; }, { enabled?: boolean; message?: string; showErrorOverlay?: boolean; }>>; prefetchedData: ZodOptional<ZodAny>; refresh: ZodOptional<ZodEffects<ZodObject<{ refreshInterval: ZodOptional<ZodNumber>; timestampField: ZodOptional<ZodString>; updateKey: ZodOptional<ZodString>; updateStrategy: ZodDefault<ZodEnum<["replace", "merge", "append-window"]>>; windowDuration: ZodOptional<ZodNumber>; windowSize: ZodOptional<ZodNumber>; }, "strip", ZodTypeAny, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy?: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }>, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy?: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }>>; stream: ZodOptional<ZodObject<{ eventTypes: ZodOptional<ZodArray<ZodString, "many">>; protocols: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>; reconnect: ZodDefault<ZodBoolean>; reconnectDelay: ZodDefault<ZodNumber>; reconnectMaxAttempts: ZodDefault<ZodNumber>; reconnectMaxDelay: ZodDefault<ZodNumber>; type: ZodEnum<["websocket", "sse"]>; url: ZodOptional<ZodString>; }, "strip", ZodTypeAny, { eventTypes?: string[]; protocols?: string | string[]; reconnect: boolean; reconnectDelay: number; reconnectMaxAttempts: number; reconnectMaxDelay: number; type: "websocket" | "sse"; url?: string; }, { eventTypes?: string[]; protocols?: string | string[]; reconnect?: boolean; reconnectDelay?: number; reconnectMaxAttempts?: number; reconnectMaxDelay?: number; type: "websocket" | "sse"; url?: string; }>>; }, "passthrough", ZodTypeAny, objectOutputType<{ cache: ZodOptional<ZodObject<{ enabled: ZodDefault<ZodBoolean>; ttl: ZodOptional<ZodNumber>; }, "strip", ZodTypeAny, { enabled: boolean; ttl?: number; }, { enabled?: boolean; ttl?: number; }>>; fetchStrategy: ZodOptional<ZodEnum<["runtime", "build", "hybrid"]>>; loading: ZodOptional<ZodObject<{ enabled: ZodDefault<ZodBoolean>; message: ZodOptional<ZodString>; showErrorOverlay: ZodDefault<ZodBoolean>; }, "strip", ZodTypeAny, { enabled: boolean; message?: string; showErrorOverlay: boolean; }, { enabled?: boolean; message?: string; showErrorOverlay?: boolean; }>>; prefetchedData: ZodOptional<ZodAny>; refresh: ZodOptional<ZodEffects<ZodObject<{ refreshInterval: ZodOptional<ZodNumber>; timestampField: ZodOptional<ZodString>; updateKey: ZodOptional<ZodString>; updateStrategy: ZodDefault<ZodEnum<["replace", "merge", "append-window"]>>; windowDuration: ZodOptional<ZodNumber>; windowSize: ZodOptional<ZodNumber>; }, "strip", ZodTypeAny, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy?: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }>, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy?: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }>>; stream: ZodOptional<ZodObject<{ eventTypes: ZodOptional<ZodArray<ZodString, "many">>; protocols: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>; reconnect: ZodDefault<ZodBoolean>; reconnectDelay: ZodDefault<ZodNumber>; reconnectMaxAttempts: ZodDefault<ZodNumber>; reconnectMaxDelay: ZodDefault<ZodNumber>; type: ZodEnum<["websocket", "sse"]>; url: ZodOptional<ZodString>; }, "strip", ZodTypeAny, { eventTypes?: string[]; protocols?: string | string[]; reconnect: boolean; reconnectDelay: number; reconnectMaxAttempts: number; reconnectMaxDelay: number; type: "websocket" | "sse"; url?: string; }, { eventTypes?: string[]; protocols?: string | string[]; reconnect?: boolean; reconnectDelay?: number; reconnectMaxAttempts?: number; reconnectMaxDelay?: number; type: "websocket" | "sse"; url?: string; }>>; }, ZodTypeAny, "passthrough">, objectInputType<{ cache: ZodOptional<ZodObject<{ enabled: ZodDefault<ZodBoolean>; ttl: ZodOptional<ZodNumber>; }, "strip", ZodTypeAny, { enabled: boolean; ttl?: number; }, { enabled?: boolean; ttl?: number; }>>; fetchStrategy: ZodOptional<ZodEnum<["runtime", "build", "hybrid"]>>; loading: ZodOptional<ZodObject<{ enabled: ZodDefault<ZodBoolean>; message: ZodOptional<ZodString>; showErrorOverlay: ZodDefault<ZodBoolean>; }, "strip", ZodTypeAny, { enabled: boolean; message?: string; showErrorOverlay: boolean; }, { enabled?: boolean; message?: string; showErrorOverlay?: boolean; }>>; prefetchedData: ZodOptional<ZodAny>; refresh: ZodOptional<ZodEffects<ZodObject<{ refreshInterval: ZodOptional<ZodNumber>; timestampField: ZodOptional<ZodString>; updateKey: ZodOptional<ZodString>; updateStrategy: ZodDefault<ZodEnum<["replace", "merge", "append-window"]>>; windowDuration: ZodOptional<ZodNumber>; windowSize: ZodOptional<ZodNumber>; }, "strip", ZodTypeAny, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy?: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }>, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }, { refreshInterval?: number; timestampField?: string; updateKey?: string; updateStrategy?: "replace" | "merge" | "append-window"; windowDuration?: number; windowSize?: number; }>>; stream: ZodOptional<ZodObject<{ eventTypes: ZodOptional<ZodArray<ZodString, "many">>; protocols: ZodOptional<ZodUnion<[ZodString, ZodArray<ZodString, "many">]>>; reconnect: ZodDefault<ZodBoolean>; reconnectDelay: ZodDefault<ZodNumber>; reconnectMaxAttempts: ZodDefault<ZodNumber>; reconnectMaxDelay: ZodDefault<ZodNumber>; type: ZodEnum<["websocket", "sse"]>; url: ZodOptional<ZodString>; }, "strip", ZodTypeAny, { eventTypes?: string[]; protocols?: string | string[]; reconnect: boolean; reconnectDelay: number; reconnectMaxAttempts: number; reconnectMaxDelay: number; type: "websocket" | "sse"; url?: string; }, { eventTypes?: string[]; protocols?: string | string[]; reconnect?: boolean; reconnectDelay?: number; reconnectMaxAttempts?: number; reconnectMaxDelay?: number; type: "websocket" | "sse"; url?: string; }>>; }, ZodTypeAny, "passthrough">>

Defined in: packages/core/src/schemas/map-v2.schema.ts:120

Per-source runtime: — the live-data configuration.

In v1 these keys are inline on the source object; v2 nests them here, beside the source they act on. The config sub-shapes are reused from source.schema.ts verbatim.