@republicroad/seal-editor 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2515 @@
1
+ import { default as default_2 } from 'react';
2
+ import { Dispatch } from 'react';
3
+ import { DragDropManager } from 'dnd-core';
4
+ import { EdgeChange } from '@xyflow/react';
5
+ import { editor } from 'monaco-editor';
6
+ import { EditorState } from '@codemirror/state';
7
+ import { EditorView } from '@codemirror/view';
8
+ import { Extension } from '@codemirror/state';
9
+ import { ForwardRefExoticComponent } from 'react';
10
+ import { HandleProps } from '@xyflow/react';
11
+ import { linter } from '@codemirror/lint';
12
+ import { Monaco } from '@monaco-editor/react';
13
+ import { MutableRefObject } from 'react';
14
+ import { Node as Node_2 } from '@xyflow/react';
15
+ import { NodeChange } from '@xyflow/react';
16
+ import { NodeProps } from '@xyflow/react';
17
+ import { ProOptions } from '@xyflow/react';
18
+ import * as React_2 from 'react';
19
+ import { ReactFlowInstance } from '@xyflow/react';
20
+ import { RefAttributes } from 'react';
21
+ import { RefObject } from 'react';
22
+ import { SetStateAction } from 'react';
23
+ import { StoreApi } from 'zustand';
24
+ import { UseBoundStore } from 'zustand';
25
+ import { useEdgesState } from '@xyflow/react';
26
+ import { useNodesState } from '@xyflow/react';
27
+ import { Variable } from '@gorules/zen-engine-wasm';
28
+ import { VariableType } from '@gorules/zen-engine-wasm';
29
+ import { WritableDraft } from 'immer';
30
+ import { XYPosition } from '@xyflow/react';
31
+ import { z } from 'zod';
32
+
33
+ export declare const addStrikethrough: (text?: string) => string;
34
+
35
+ export declare const anyNodeSchema: z.ZodObject<{
36
+ type: z.ZodString;
37
+ content: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
38
+ id: z.ZodDefault<z.ZodString>;
39
+ name: z.ZodString;
40
+ position: z.ZodDefault<z.ZodObject<{
41
+ x: z.ZodNumber;
42
+ y: z.ZodNumber;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>;
45
+
46
+ declare type Arrayable<T> = T | T[];
47
+
48
+ export declare const AUTO_SYNC_DEBOUNCE_MS = 700;
49
+
50
+ declare type AutosizeTextAreaProps = {
51
+ maxRows: number;
52
+ noStyle?: boolean;
53
+ value?: string;
54
+ onChange?: default_2.ChangeEventHandler<HTMLTextAreaElement>;
55
+ placeholder?: string;
56
+ disabled?: boolean;
57
+ readOnly?: boolean;
58
+ className?: string;
59
+ testId?: string;
60
+ } & Omit<default_2.DetailedHTMLProps<default_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange' | 'placeholder'>;
61
+
62
+ declare interface BaseItem {
63
+ id?: string;
64
+ _id?: string;
65
+ [key: string]: any;
66
+ }
67
+
68
+ declare type BaseNode<Component extends string, InputName extends string, Inputs extends InputSchema<InputName>[], NodeData extends object = CreateDynamicType<Inputs>> = {
69
+ kind: Component;
70
+ icon?: default_2.ReactNode;
71
+ color?: string;
72
+ displayName: string;
73
+ shortDescription?: string;
74
+ group?: string;
75
+ handleLeft?: boolean;
76
+ handleRight?: boolean;
77
+ inputs?: [...Inputs];
78
+ generateNode?: CustomNodeSpecification<NodeData, Component>['generateNode'];
79
+ renderNode?: CustomNodeSpecification<NodeData, Component>['renderNode'];
80
+ onNodeAdd?: CustomNodeSpecification<NodeData, Component>['onNodeAdd'];
81
+ };
82
+
83
+ declare type BoolInput = {
84
+ control: 'bool';
85
+ label?: string;
86
+ };
87
+
88
+ export declare const buildDiffString: (currentValue: string, previousValue: string) => string;
89
+
90
+ export declare const buildRequestExampleTemplateFromDefinitions: (definitions: Array<Pick<RequestDefinition, "name" | "path" | "type" | "defaultValue">>) => Record<string, unknown>;
91
+
92
+ export declare const buildRequestSchemaFromDefinitions: (schemaValue: unknown, definitions: Array<Pick<RequestDefinition, "name" | "path" | "type" | "description" | "format" | "order" | "parentPath">>) => string;
93
+
94
+ export declare const calculateDiffGraph: (currentGraph: DecisionGraphType, previousGraph: DecisionGraphType, options?: ProcessNodesOptions) => DecisionGraphType;
95
+
96
+ export declare const clusterToolbarItems: (items: ToolbarItem[]) => ToolbarItem[];
97
+
98
+ export declare const CodeEditor: default_2.ForwardRefExoticComponent<{
99
+ maxRows?: number;
100
+ value?: string;
101
+ onChange?: (value: string) => void;
102
+ onStateChange?: (state: EditorState) => void;
103
+ placeholder?: string;
104
+ disabled?: boolean;
105
+ type?: "unary" | "standard" | "template";
106
+ lint?: boolean;
107
+ strict?: boolean;
108
+ fullHeight?: boolean;
109
+ noStyle?: boolean;
110
+ extension?: (params: {
111
+ type?: "standard" | "unary" | "template";
112
+ }) => Extension;
113
+ livePreview?: {
114
+ input: unknown;
115
+ fromSimulation: boolean;
116
+ result?: unknown;
117
+ };
118
+ variableType?: any;
119
+ expectedVariableType?: any;
120
+ lazy?: boolean;
121
+ initialSelection?: {
122
+ anchor: number;
123
+ head?: number;
124
+ };
125
+ } & Omit<default_2.HTMLAttributes<HTMLDivElement>, "disabled" | "onChange"> & {
126
+ lazy?: boolean;
127
+ } & default_2.RefAttributes<CodeEditorBaseRef>>;
128
+
129
+ declare type CodeEditorBaseProps = {
130
+ maxRows?: number;
131
+ value?: string;
132
+ onChange?: (value: string) => void;
133
+ onStateChange?: (state: EditorState) => void;
134
+ placeholder?: string;
135
+ disabled?: boolean;
136
+ type?: 'unary' | 'standard' | 'template';
137
+ lint?: boolean;
138
+ strict?: boolean;
139
+ fullHeight?: boolean;
140
+ noStyle?: boolean;
141
+ extension?: (params: ExtensionParams) => Extension;
142
+ livePreview?: {
143
+ input: unknown;
144
+ fromSimulation: boolean;
145
+ result?: unknown;
146
+ };
147
+ variableType?: any;
148
+ expectedVariableType?: any;
149
+ lazy?: boolean;
150
+ initialSelection?: {
151
+ anchor: number;
152
+ head?: number;
153
+ };
154
+ } & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'disabled' | 'onChange'>;
155
+
156
+ declare type CodeEditorBaseRef = HTMLDivElement & {
157
+ codeMirror: EditorView | null;
158
+ };
159
+
160
+ export declare type CodeEditorProps = CodeEditorBaseProps & {
161
+ lazy?: boolean;
162
+ };
163
+
164
+ export declare type CodeEditorRef = CodeEditorBaseRef;
165
+
166
+ export declare const codemirror: {
167
+ linter: typeof linter;
168
+ };
169
+
170
+ export declare const COLUMN_FIELD_TYPE_OPTIONS: {
171
+ value: ColumnFieldType['type'];
172
+ label: string;
173
+ }[];
174
+
175
+ export declare type ColumnEnum = z.infer<typeof columnEnumSchema>;
176
+
177
+ export declare const columnEnumSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
178
+ type: z.ZodLiteral<"inline">;
179
+ values: z.ZodArray<z.ZodObject<{
180
+ label: z.ZodString;
181
+ value: z.ZodString;
182
+ }, z.core.$strip>>;
183
+ loose: z.ZodOptional<z.ZodBoolean>;
184
+ }, z.core.$strip>, z.ZodObject<{
185
+ type: z.ZodLiteral<"ref">;
186
+ ref: z.ZodString;
187
+ loose: z.ZodOptional<z.ZodBoolean>;
188
+ }, z.core.$strip>], "type">;
189
+
190
+ export declare type ColumnFieldType = z.infer<typeof columnFieldTypeSchema>;
191
+
192
+ export declare const columnFieldTypeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
193
+ type: z.ZodLiteral<"any">;
194
+ }, z.core.$strip>, z.ZodObject<{
195
+ type: z.ZodLiteral<"string">;
196
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
197
+ type: z.ZodLiteral<"inline">;
198
+ values: z.ZodArray<z.ZodObject<{
199
+ label: z.ZodString;
200
+ value: z.ZodString;
201
+ }, z.core.$strip>>;
202
+ loose: z.ZodOptional<z.ZodBoolean>;
203
+ }, z.core.$strip>, z.ZodObject<{
204
+ type: z.ZodLiteral<"ref">;
205
+ ref: z.ZodString;
206
+ loose: z.ZodOptional<z.ZodBoolean>;
207
+ }, z.core.$strip>], "type">>;
208
+ }, z.core.$strip>, z.ZodObject<{
209
+ type: z.ZodLiteral<"number">;
210
+ }, z.core.$strip>, z.ZodObject<{
211
+ type: z.ZodLiteral<"boolean">;
212
+ }, z.core.$strip>, z.ZodObject<{
213
+ type: z.ZodLiteral<"date">;
214
+ }, z.core.$strip>], "type">;
215
+
216
+ declare type ColumnType = 'inputs' | 'outputs';
217
+
218
+ export declare const compareAndUnifyLists: <T extends BaseItem>(newList: T[], oldList: T[], options?: DiffOptions<T>) => T[];
219
+
220
+ export declare const compareStringFields: (field1?: string | null, field2?: string | null) => boolean;
221
+
222
+ export declare const computeGraphDiff: (a: DecisionGraphType, b: DecisionGraphType) => GraphDiff;
223
+
224
+ declare type ControlToType<T> = T extends keyof InputTypeMap ? InputTypeMap[T] : never;
225
+
226
+ declare type CreateDynamicType<T extends ReadonlyArray<unknown>, Result = {}> = T extends readonly [infer First, ...infer Rest] ? First extends {
227
+ control: infer Control extends string;
228
+ name: infer Name extends string;
229
+ } ? CreateDynamicType<Rest, Result & SplitPath<Name, ControlToType<Control>>> : Result : Result;
230
+
231
+ export declare const createJdmNode: <Component extends string, InputName extends string, Inputs extends InputSchema<InputName>[]>(n: BaseNode<Component, InputName, Inputs>) => CustomNodeSpecification<any, Component>;
232
+
233
+ export declare const createT: (locale: string, overrides?: I18nMessages) => (key: string, params?: InterpolationParams) => string;
234
+
235
+ declare type CustomDecisionNode<T> = {
236
+ id: string;
237
+ name: string;
238
+ description?: string;
239
+ type?: string;
240
+ content?: T;
241
+ position: XYPosition;
242
+ };
243
+
244
+ export declare const CustomFunctionTable: default_2.FC<TabCustomFunctionProps>;
245
+
246
+ export declare const CustomKind = "customNode";
247
+
248
+ export declare const customNodeSchema: z.ZodObject<{
249
+ type: z.ZodLiteral<"customNode">;
250
+ content: z.ZodObject<{
251
+ kind: z.ZodString;
252
+ config: z.ZodAny;
253
+ }, z.core.$strip>;
254
+ id: z.ZodDefault<z.ZodString>;
255
+ name: z.ZodString;
256
+ position: z.ZodDefault<z.ZodObject<{
257
+ x: z.ZodNumber;
258
+ y: z.ZodNumber;
259
+ }, z.core.$strip>>;
260
+ }, z.core.$strip>;
261
+
262
+ export declare type CustomNodeSpecification<Data extends object, Component extends string> = {
263
+ kind: Component;
264
+ color?: string;
265
+ icon?: default_2.ReactNode;
266
+ displayName: string;
267
+ group?: string;
268
+ documentationUrl?: string;
269
+ shortDescription?: string;
270
+ renderTab?: (props: {
271
+ id: string;
272
+ user?: string;
273
+ customFunctions?: any;
274
+ }) => default_2.ReactNode;
275
+ calculateDiff?: (current: any, previous: any) => [any, any];
276
+ generateNode: (params: GenerateNodeParams_2) => Omit<DecisionNode, 'position' | 'id' | 'type' | 'content'> & {
277
+ config?: Data;
278
+ };
279
+ renderNode: default_2.FC<MinimalNodeProps & {
280
+ specification: MinimalNodeSpecification;
281
+ }>;
282
+ inferTypes?: {
283
+ needsUpdate: (state: InferTypeData<Data>, prevState: InferTypeData<Data>) => boolean;
284
+ determineOutputType: (state: InferTypeData<Data>) => VariableType;
285
+ };
286
+ onNodeAdd?: (node: CustomDecisionNode<{
287
+ kind: Component;
288
+ config: Data;
289
+ }>) => Promise<CustomDecisionNode<{
290
+ kind: Component;
291
+ config: Data;
292
+ }>>;
293
+ };
294
+
295
+ export declare const darkTokens: Record<string, string | number>;
296
+
297
+ export declare const DECISION_GRAPH_CONTENT_TYPE = "application/vnd.gorules.decision";
298
+
299
+ export declare type DecisionEdge = {
300
+ id: string;
301
+ name?: string;
302
+ sourceId: string;
303
+ targetId: string;
304
+ sourceHandle?: string | null;
305
+ targetHandle?: string | null;
306
+ type?: string;
307
+ _diff?: {
308
+ status: DiffStatus;
309
+ };
310
+ };
311
+
312
+ export declare const DecisionGraph: ForwardRefExoticComponent<DecisionGraphWrapperProps & DecisionGraphEmptyType & RefAttributes<GraphRef>>;
313
+
314
+ declare type DecisionGraphContextProps = {};
315
+
316
+ declare type DecisionGraphEmptyType = {
317
+ id?: string;
318
+ defaultValue?: DecisionGraphType;
319
+ value?: DecisionGraphType;
320
+ disabled?: boolean;
321
+ diffBaseline?: DecisionGraphType;
322
+ components?: DecisionGraphStoreType['state']['components'];
323
+ customNodes?: DecisionGraphStoreType['state']['customNodes'];
324
+ hideLeftToolbar?: DecisionGraphStoreType['state']['hideLeftToolbar'];
325
+ name?: DecisionGraphStoreType['state']['name'];
326
+ viewConfigCta?: DecisionGraphStoreType['state']['viewConfigCta'];
327
+ viewConfig?: DecisionGraphStoreType['state']['viewConfig'];
328
+ onViewConfigCta?: DecisionGraphStoreType['listeners']['onViewConfigCta'];
329
+ defaultActivePanel?: string;
330
+ panels?: DecisionGraphStoreType['state']['panels'];
331
+ onPanelsChange?: DecisionGraphStoreType['listeners']['onPanelsChange'];
332
+ simulate?: DecisionGraphStoreType['state']['simulate'];
333
+ dictionaries?: DictionaryMap;
334
+ mode?: JdmUiMode;
335
+ onChange?: DecisionGraphStoreType['listeners']['onChange'];
336
+ onReactFlowInit?: DecisionGraphStoreType['listeners']['onReactFlowInit'];
337
+ onCodeExtension?: DecisionGraphStoreType['listeners']['onCodeExtension'];
338
+ onFunctionReady?: DecisionGraphStoreType['listeners']['onFunctionReady'];
339
+ };
340
+
341
+ export declare type DecisionGraphProps = {} & DecisionGraphWrapperProps & DecisionGraphContextProps & DecisionGraphEmptyType;
342
+
343
+ export declare type DecisionGraphRef = GraphRef;
344
+
345
+ export declare type DecisionGraphSnapshot = {
346
+ graph?: Record<string, unknown>;
347
+ tabs?: Record<string, TabSnapshot>;
348
+ };
349
+
350
+ declare type DecisionGraphStoreType = {
351
+ state: {
352
+ id?: string;
353
+ hideLeftToolbar?: boolean;
354
+ components: NodeSpecification[];
355
+ disabled?: boolean;
356
+ decisionGraph: DecisionGraphType;
357
+ hoveredEdgeId: string | null;
358
+ openTabs: string[];
359
+ activeTab: string;
360
+ viewConfigCta?: string;
361
+ viewConfig?: ViewConfig;
362
+ name: string;
363
+ canUndo: boolean;
364
+ canRedo: boolean;
365
+ customNodes: CustomNodeSpecification<object, any>[];
366
+ panels?: PanelType[];
367
+ activePanel?: string;
368
+ onPanelsChange?: (val?: string) => void;
369
+ simulate?: Simulation;
370
+ user: string;
371
+ simulatorRequest?: string;
372
+ simulatorExampleBinding?: SimulatorExampleBinding;
373
+ compactMode?: boolean;
374
+ dictionaries?: DictionaryMap;
375
+ mode?: JdmUiMode;
376
+ nodeTypes: Record<string, Partial<Record<NodeTypeKind, VariableType>>>;
377
+ globalType: Record<string, VariableType>;
378
+ };
379
+ references: {
380
+ nodesState: MutableRefObject<ReturnType<typeof useNodesState>>;
381
+ edgesState: MutableRefObject<ReturnType<typeof useEdgesState>>;
382
+ reactFlowInstance: MutableRefObject<ReactFlowInstance | null>;
383
+ graphClipboard: MutableRefObject<ReturnType<typeof useGraphClipboard>>;
384
+ };
385
+ actions: {
386
+ setDecisionGraph: (val: Partial<DecisionGraphType>, options?: SetDecisionGraphOptions) => void;
387
+ undo: () => void;
388
+ redo: () => void;
389
+ commitUndo: () => void;
390
+ handleNodesChange: (nodesChange: NodeChange[]) => void;
391
+ handleEdgesChange: (edgesChange: EdgeChange[]) => void;
392
+ setNodes: (nodes: DecisionNode[]) => void;
393
+ addNodes: (nodes: DecisionNode[]) => void;
394
+ updateNode: (id: string, updater: DraftUpdateCallback<DecisionNode>) => void;
395
+ removeNodes: (ids: string[]) => void;
396
+ duplicateNodes: (ids: string[]) => void;
397
+ copyNodes: (ids: string[]) => void;
398
+ pasteNodes: () => void;
399
+ setEdges: (edges: DecisionEdge[]) => void;
400
+ addEdges: (edge: DecisionEdge[]) => void;
401
+ removeEdges: (ids: string[]) => void;
402
+ removeEdgeByHandleId: (handleId: string) => void;
403
+ setHoveredEdgeId: (edgeId: string | null) => void;
404
+ closeTab: (id: string, action?: string) => void;
405
+ openTab: (id: string) => void;
406
+ goToNode: (id: string) => void;
407
+ setActivePanel: (panel?: string) => void;
408
+ setCompactMode: (mode: boolean) => void;
409
+ toggleCompactMode: () => void;
410
+ setNodeType: (id: string, kind: NodeTypeKind, vt: VariableType) => void;
411
+ removeNodeType: (id: string, kind?: NodeTypeKind) => void;
412
+ setSimulatorRequest: (req: string) => void;
413
+ setSimulatorExampleBinding: (binding?: SimulatorExampleBinding) => void;
414
+ triggerNodeSelect: (id: string, mode: 'toggle' | 'only') => void;
415
+ };
416
+ listeners: {
417
+ onChange?: (val: DecisionGraphType) => void;
418
+ onPanelsChange?: (val?: string) => void;
419
+ onReactFlowInit?: (instance: ReactFlowInstance) => void;
420
+ onCodeExtension?: CodeEditorProps['extension'];
421
+ onFunctionReady?: (monaco: Monaco) => void;
422
+ onViewConfigCta?: () => void;
423
+ };
424
+ };
425
+
426
+ export declare type DecisionGraphType = {
427
+ nodes: DecisionNode[];
428
+ edges: DecisionEdge[];
429
+ };
430
+
431
+ declare type DecisionGraphWrapperProps = {
432
+ reactFlowProOptions?: ProOptions;
433
+ tabBarExtraContent?: GraphTabsProps['tabBarExtraContent'];
434
+ toolbarItems?: ToolbarItem[];
435
+ userResolver?: UserResolver;
436
+ customFunctions?: any;
437
+ };
438
+
439
+ export declare const decisionModelSchema: z.ZodObject<{
440
+ nodes: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
441
+ type: z.ZodLiteral<NodeKind.Decision>;
442
+ content: z.ZodObject<{
443
+ key: z.ZodString;
444
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
445
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
446
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
447
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
448
+ single: "single";
449
+ loop: "loop";
450
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
451
+ }, z.core.$strip>;
452
+ id: z.ZodDefault<z.ZodString>;
453
+ name: z.ZodString;
454
+ position: z.ZodDefault<z.ZodObject<{
455
+ x: z.ZodNumber;
456
+ y: z.ZodNumber;
457
+ }, z.core.$strip>>;
458
+ }, z.core.$strip>, z.ZodObject<{
459
+ type: z.ZodLiteral<NodeKind.Expression>;
460
+ content: z.ZodObject<{
461
+ expressions: z.ZodArray<z.ZodObject<{
462
+ id: z.ZodDefault<z.ZodString>;
463
+ key: z.ZodDefault<z.ZodString>;
464
+ value: z.ZodDefault<z.ZodString>;
465
+ }, z.core.$strip>>;
466
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
467
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
468
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
469
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
470
+ single: "single";
471
+ loop: "loop";
472
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
473
+ }, z.core.$strip>;
474
+ id: z.ZodDefault<z.ZodString>;
475
+ name: z.ZodString;
476
+ position: z.ZodDefault<z.ZodObject<{
477
+ x: z.ZodNumber;
478
+ y: z.ZodNumber;
479
+ }, z.core.$strip>>;
480
+ }, z.core.$strip>, z.ZodObject<{
481
+ type: z.ZodLiteral<NodeKind.Function>;
482
+ content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{
483
+ source: z.ZodDefault<z.ZodString>;
484
+ }, z.core.$strip>]>>>;
485
+ id: z.ZodDefault<z.ZodString>;
486
+ name: z.ZodString;
487
+ position: z.ZodDefault<z.ZodObject<{
488
+ x: z.ZodNumber;
489
+ y: z.ZodNumber;
490
+ }, z.core.$strip>>;
491
+ }, z.core.$strip>, z.ZodObject<{
492
+ type: z.ZodLiteral<NodeKind.DecisionTable>;
493
+ content: z.ZodObject<{
494
+ hitPolicy: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
495
+ first: "first";
496
+ collect: "collect";
497
+ }>>>, z.ZodTransform<"first" | "collect", "first" | "collect" | null | undefined>>;
498
+ rules: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>>>>;
499
+ inputs: z.ZodArray<z.ZodObject<{
500
+ id: z.ZodDefault<z.ZodString>;
501
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
502
+ field: z.ZodOptional<z.ZodNullable<z.ZodString>>;
503
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
504
+ fieldType: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
505
+ type: z.ZodLiteral<"any">;
506
+ }, z.core.$strip>, z.ZodObject<{
507
+ type: z.ZodLiteral<"string">;
508
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
509
+ type: z.ZodLiteral<"inline">;
510
+ values: z.ZodArray<z.ZodObject<{
511
+ label: z.ZodString;
512
+ value: z.ZodString;
513
+ }, z.core.$strip>>;
514
+ loose: z.ZodOptional<z.ZodBoolean>;
515
+ }, z.core.$strip>, z.ZodObject<{
516
+ type: z.ZodLiteral<"ref">;
517
+ ref: z.ZodString;
518
+ loose: z.ZodOptional<z.ZodBoolean>;
519
+ }, z.core.$strip>], "type">>;
520
+ }, z.core.$strip>, z.ZodObject<{
521
+ type: z.ZodLiteral<"number">;
522
+ }, z.core.$strip>, z.ZodObject<{
523
+ type: z.ZodLiteral<"boolean">;
524
+ }, z.core.$strip>, z.ZodObject<{
525
+ type: z.ZodLiteral<"date">;
526
+ }, z.core.$strip>], "type">>>;
527
+ }, z.core.$strip>>;
528
+ outputs: z.ZodArray<z.ZodObject<{
529
+ id: z.ZodDefault<z.ZodString>;
530
+ name: z.ZodString;
531
+ field: z.ZodString;
532
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
533
+ outputFieldType: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
534
+ type: z.ZodLiteral<"auto">;
535
+ }, z.core.$strip>, z.ZodObject<{
536
+ type: z.ZodLiteral<"string">;
537
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
538
+ type: z.ZodLiteral<"inline">;
539
+ values: z.ZodArray<z.ZodObject<{
540
+ label: z.ZodString;
541
+ value: z.ZodString;
542
+ }, z.core.$strip>>;
543
+ loose: z.ZodOptional<z.ZodBoolean>;
544
+ }, z.core.$strip>, z.ZodObject<{
545
+ type: z.ZodLiteral<"ref">;
546
+ ref: z.ZodString;
547
+ loose: z.ZodOptional<z.ZodBoolean>;
548
+ }, z.core.$strip>], "type">>;
549
+ }, z.core.$strip>, z.ZodObject<{
550
+ type: z.ZodLiteral<"string-array">;
551
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
552
+ type: z.ZodLiteral<"inline">;
553
+ values: z.ZodArray<z.ZodObject<{
554
+ label: z.ZodString;
555
+ value: z.ZodString;
556
+ }, z.core.$strip>>;
557
+ loose: z.ZodOptional<z.ZodBoolean>;
558
+ }, z.core.$strip>, z.ZodObject<{
559
+ type: z.ZodLiteral<"ref">;
560
+ ref: z.ZodString;
561
+ loose: z.ZodOptional<z.ZodBoolean>;
562
+ }, z.core.$strip>], "type">>;
563
+ }, z.core.$strip>, z.ZodObject<{
564
+ type: z.ZodLiteral<"number">;
565
+ }, z.core.$strip>, z.ZodObject<{
566
+ type: z.ZodLiteral<"boolean">;
567
+ }, z.core.$strip>, z.ZodObject<{
568
+ type: z.ZodLiteral<"date">;
569
+ }, z.core.$strip>], "type">>>;
570
+ }, z.core.$strip>>;
571
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
572
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
573
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
574
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
575
+ single: "single";
576
+ loop: "loop";
577
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
578
+ }, z.core.$strip>;
579
+ id: z.ZodDefault<z.ZodString>;
580
+ name: z.ZodString;
581
+ position: z.ZodDefault<z.ZodObject<{
582
+ x: z.ZodNumber;
583
+ y: z.ZodNumber;
584
+ }, z.core.$strip>>;
585
+ }, z.core.$strip>, z.ZodObject<{
586
+ type: z.ZodLiteral<NodeKind.Switch>;
587
+ content: z.ZodObject<{
588
+ hitPolicy: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
589
+ first: "first";
590
+ collect: "collect";
591
+ }>>>, z.ZodTransform<"first" | "collect", "first" | "collect" | null | undefined>>;
592
+ statements: z.ZodArray<z.ZodObject<{
593
+ id: z.ZodDefault<z.ZodString>;
594
+ condition: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
595
+ isDefault: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
596
+ }, z.core.$strip>>;
597
+ }, z.core.$strip>;
598
+ id: z.ZodDefault<z.ZodString>;
599
+ name: z.ZodString;
600
+ position: z.ZodDefault<z.ZodObject<{
601
+ x: z.ZodNumber;
602
+ y: z.ZodNumber;
603
+ }, z.core.$strip>>;
604
+ }, z.core.$strip>, z.ZodObject<{
605
+ type: z.ZodLiteral<"customNode">;
606
+ content: z.ZodObject<{
607
+ kind: z.ZodString;
608
+ config: z.ZodAny;
609
+ }, z.core.$strip>;
610
+ id: z.ZodDefault<z.ZodString>;
611
+ name: z.ZodString;
612
+ position: z.ZodDefault<z.ZodObject<{
613
+ x: z.ZodNumber;
614
+ y: z.ZodNumber;
615
+ }, z.core.$strip>>;
616
+ }, z.core.$strip>, z.ZodObject<{
617
+ type: z.ZodLiteral<NodeKind.Input>;
618
+ content: z.ZodDefault<z.ZodObject<{
619
+ schema: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>>, z.ZodTransform<string, string | Record<string, any> | null | undefined>>;
620
+ expressions: z.ZodDefault<z.ZodArray<z.ZodObject<{
621
+ id: z.ZodDefault<z.ZodString>;
622
+ key: z.ZodDefault<z.ZodString>;
623
+ value: z.ZodDefault<z.ZodAny>;
624
+ type: z.ZodOptional<z.ZodString>;
625
+ }, z.core.$strip>>>;
626
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
627
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
628
+ }, z.core.$strip>>;
629
+ id: z.ZodDefault<z.ZodString>;
630
+ name: z.ZodString;
631
+ position: z.ZodDefault<z.ZodObject<{
632
+ x: z.ZodNumber;
633
+ y: z.ZodNumber;
634
+ }, z.core.$strip>>;
635
+ }, z.core.$strip>, z.ZodObject<{
636
+ type: z.ZodLiteral<NodeKind.Output>;
637
+ content: z.ZodDefault<z.ZodObject<{
638
+ schema: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
639
+ }, z.core.$strip>>;
640
+ id: z.ZodDefault<z.ZodString>;
641
+ name: z.ZodString;
642
+ position: z.ZodDefault<z.ZodObject<{
643
+ x: z.ZodNumber;
644
+ y: z.ZodNumber;
645
+ }, z.core.$strip>>;
646
+ }, z.core.$strip>], "type">, z.ZodObject<{
647
+ type: z.ZodString;
648
+ content: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
649
+ id: z.ZodDefault<z.ZodString>;
650
+ name: z.ZodString;
651
+ position: z.ZodDefault<z.ZodObject<{
652
+ x: z.ZodNumber;
653
+ y: z.ZodNumber;
654
+ }, z.core.$strip>>;
655
+ }, z.core.$strip>]>>>;
656
+ edges: z.ZodDefault<z.ZodArray<z.ZodObject<{
657
+ id: z.ZodString;
658
+ sourceId: z.ZodString;
659
+ targetId: z.ZodString;
660
+ sourceHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
661
+ type: z.ZodEnum<{
662
+ edge: "edge";
663
+ }>;
664
+ }, z.core.$strip>>>;
665
+ }, z.core.$strip>;
666
+
667
+ export declare type DecisionNode<T = any> = {
668
+ id: string;
669
+ name: string;
670
+ description?: string;
671
+ type?: NodeSchema['type'] | string;
672
+ content?: T;
673
+ position: Position;
674
+ [privateSymbol]?: {
675
+ dimensions?: {
676
+ height?: number;
677
+ width?: number;
678
+ };
679
+ selected?: boolean;
680
+ };
681
+ _diff?: {
682
+ status: DiffStatus;
683
+ fields?: Record<string, DiffMetadata>;
684
+ };
685
+ };
686
+
687
+ export declare const decisionNodeSchema: z.ZodObject<{
688
+ type: z.ZodLiteral<NodeKind.Decision>;
689
+ content: z.ZodObject<{
690
+ key: z.ZodString;
691
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
692
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
693
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
694
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
695
+ single: "single";
696
+ loop: "loop";
697
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
698
+ }, z.core.$strip>;
699
+ id: z.ZodDefault<z.ZodString>;
700
+ name: z.ZodString;
701
+ position: z.ZodDefault<z.ZodObject<{
702
+ x: z.ZodNumber;
703
+ y: z.ZodNumber;
704
+ }, z.core.$strip>>;
705
+ }, z.core.$strip>;
706
+
707
+ export declare const DecisionTable: default_2.FC<DecisionTableProps>;
708
+
709
+ declare type DecisionTableContextProps = {};
710
+
711
+ declare type DecisionTableEmptyType = {
712
+ id?: string;
713
+ name?: string;
714
+ defaultValue?: DecisionTableType;
715
+ value?: DecisionTableType;
716
+ disabled?: boolean;
717
+ disableHitPolicy?: boolean;
718
+ cellRenderer?: (props: TableCellProps) => default_2.JSX.Element | null | undefined;
719
+ inputsSchema?: SchemaSelectProps[];
720
+ outputsSchema?: SchemaSelectProps[];
721
+ permission?: DecisionTableStoreType['state']['permission'];
722
+ mode?: JdmUiMode;
723
+ dictionaries?: DictionaryMap;
724
+ inputVariableType?: VariableType;
725
+ debug?: {
726
+ trace: SimulationTrace<SimulationTraceDataTable>;
727
+ inputData?: GetNodeDataResult;
728
+ snapshot: DecisionTableType;
729
+ };
730
+ minColWidth?: number;
731
+ colWidth?: number;
732
+ onChange?: (val: DecisionTableType) => void;
733
+ };
734
+
735
+ export declare type DecisionTableMode = JdmUiMode;
736
+
737
+ declare type DecisionTablePermission = 'edit:full' | 'edit:rules' | 'edit:values';
738
+
739
+ export declare type DecisionTableProps = {
740
+ id?: string;
741
+ tableHeight: string | number;
742
+ mountDialogsOnBody?: boolean;
743
+ scrollContainerRef?: default_2.MutableRefObject<HTMLDivElement | null>;
744
+ scrollApiRef?: default_2.MutableRefObject<TableScrollApi | null>;
745
+ } & DecisionTableContextProps & DecisionTableEmptyType;
746
+
747
+ export declare const decisionTableSchema: z.ZodObject<{
748
+ type: z.ZodLiteral<NodeKind.DecisionTable>;
749
+ content: z.ZodObject<{
750
+ hitPolicy: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
751
+ first: "first";
752
+ collect: "collect";
753
+ }>>>, z.ZodTransform<"first" | "collect", "first" | "collect" | null | undefined>>;
754
+ rules: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>>>>;
755
+ inputs: z.ZodArray<z.ZodObject<{
756
+ id: z.ZodDefault<z.ZodString>;
757
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
758
+ field: z.ZodOptional<z.ZodNullable<z.ZodString>>;
759
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
760
+ fieldType: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
761
+ type: z.ZodLiteral<"any">;
762
+ }, z.core.$strip>, z.ZodObject<{
763
+ type: z.ZodLiteral<"string">;
764
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
765
+ type: z.ZodLiteral<"inline">;
766
+ values: z.ZodArray<z.ZodObject<{
767
+ label: z.ZodString;
768
+ value: z.ZodString;
769
+ }, z.core.$strip>>;
770
+ loose: z.ZodOptional<z.ZodBoolean>;
771
+ }, z.core.$strip>, z.ZodObject<{
772
+ type: z.ZodLiteral<"ref">;
773
+ ref: z.ZodString;
774
+ loose: z.ZodOptional<z.ZodBoolean>;
775
+ }, z.core.$strip>], "type">>;
776
+ }, z.core.$strip>, z.ZodObject<{
777
+ type: z.ZodLiteral<"number">;
778
+ }, z.core.$strip>, z.ZodObject<{
779
+ type: z.ZodLiteral<"boolean">;
780
+ }, z.core.$strip>, z.ZodObject<{
781
+ type: z.ZodLiteral<"date">;
782
+ }, z.core.$strip>], "type">>>;
783
+ }, z.core.$strip>>;
784
+ outputs: z.ZodArray<z.ZodObject<{
785
+ id: z.ZodDefault<z.ZodString>;
786
+ name: z.ZodString;
787
+ field: z.ZodString;
788
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
789
+ outputFieldType: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
790
+ type: z.ZodLiteral<"auto">;
791
+ }, z.core.$strip>, z.ZodObject<{
792
+ type: z.ZodLiteral<"string">;
793
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
794
+ type: z.ZodLiteral<"inline">;
795
+ values: z.ZodArray<z.ZodObject<{
796
+ label: z.ZodString;
797
+ value: z.ZodString;
798
+ }, z.core.$strip>>;
799
+ loose: z.ZodOptional<z.ZodBoolean>;
800
+ }, z.core.$strip>, z.ZodObject<{
801
+ type: z.ZodLiteral<"ref">;
802
+ ref: z.ZodString;
803
+ loose: z.ZodOptional<z.ZodBoolean>;
804
+ }, z.core.$strip>], "type">>;
805
+ }, z.core.$strip>, z.ZodObject<{
806
+ type: z.ZodLiteral<"string-array">;
807
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
808
+ type: z.ZodLiteral<"inline">;
809
+ values: z.ZodArray<z.ZodObject<{
810
+ label: z.ZodString;
811
+ value: z.ZodString;
812
+ }, z.core.$strip>>;
813
+ loose: z.ZodOptional<z.ZodBoolean>;
814
+ }, z.core.$strip>, z.ZodObject<{
815
+ type: z.ZodLiteral<"ref">;
816
+ ref: z.ZodString;
817
+ loose: z.ZodOptional<z.ZodBoolean>;
818
+ }, z.core.$strip>], "type">>;
819
+ }, z.core.$strip>, z.ZodObject<{
820
+ type: z.ZodLiteral<"number">;
821
+ }, z.core.$strip>, z.ZodObject<{
822
+ type: z.ZodLiteral<"boolean">;
823
+ }, z.core.$strip>, z.ZodObject<{
824
+ type: z.ZodLiteral<"date">;
825
+ }, z.core.$strip>], "type">>>;
826
+ }, z.core.$strip>>;
827
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
828
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
829
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
830
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
831
+ single: "single";
832
+ loop: "loop";
833
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
834
+ }, z.core.$strip>;
835
+ id: z.ZodDefault<z.ZodString>;
836
+ name: z.ZodString;
837
+ position: z.ZodDefault<z.ZodObject<{
838
+ x: z.ZodNumber;
839
+ y: z.ZodNumber;
840
+ }, z.core.$strip>>;
841
+ }, z.core.$strip>;
842
+
843
+ declare type DecisionTableStoreType = {
844
+ state: {
845
+ id?: string;
846
+ name?: string;
847
+ decisionTable: DecisionTableType;
848
+ cursor: TableCursor | null;
849
+ disabled: boolean;
850
+ disableHitPolicy: boolean;
851
+ minColWidth: number;
852
+ colWidth: number;
853
+ permission?: DecisionTablePermission;
854
+ mode: JdmUiMode;
855
+ dictionaries?: DictionaryMap;
856
+ inputVariableType?: VariableType;
857
+ derivedVariableTypes: Record<string, VariableType>;
858
+ inputsSchema?: SchemaSelectProps[];
859
+ outputsSchema?: SchemaSelectProps[];
860
+ debugIndex: number;
861
+ calculatedInputData?: Variable;
862
+ debug?: {
863
+ snapshot: DecisionTableType;
864
+ trace: SimulationTrace<SimulationTraceDataTable>;
865
+ inputData?: GetNodeDataResult;
866
+ };
867
+ };
868
+ actions: {
869
+ setDecisionTable: (val: DecisionTableType) => void;
870
+ setCursor: (cursor: TableCursor | null) => void;
871
+ commitData: (data: string, cursor: TableCursor) => void;
872
+ swapRows: (source: number, target: number) => void;
873
+ addRowAbove: (target?: number) => void;
874
+ addRowBelow: (target?: number) => void;
875
+ removeRow: (target?: number) => void;
876
+ addColumn: (type: ColumnType, column: TableSchemaItem) => void;
877
+ updateColumn: (type: ColumnType, id: string, column: TableSchemaItem) => void;
878
+ removeColumn: (type: ColumnType, id: string) => void;
879
+ reorderColumns: (type: ColumnType, columns: TableSchemaItem[]) => void;
880
+ updateHitPolicy: (hitPolicy: HitPolicy) => void;
881
+ };
882
+ listeners: {
883
+ onChange?: (val: DecisionTableType) => void;
884
+ cellRenderer?: (props: TableCellProps) => default_2.ReactNode | null | undefined;
885
+ onColumnResize?: () => void;
886
+ };
887
+ };
888
+
889
+ export declare type DecisionTableType = {
890
+ hitPolicy: HitPolicy | string;
891
+ passThrough?: boolean;
892
+ inputField?: string;
893
+ outputPath?: string;
894
+ executionMode?: 'single' | 'loop';
895
+ inputs: TableSchemaItem[];
896
+ outputs: TableSchemaItem[];
897
+ rules: Record<string, string>[];
898
+ } & Diff;
899
+
900
+ export declare type DictionaryMap = Record<string, {
901
+ label: string;
902
+ value: string;
903
+ }[]>;
904
+
905
+ export declare const DictionaryProvider: default_2.FC<default_2.PropsWithChildren<{
906
+ value: DictionaryMap;
907
+ }>>;
908
+
909
+ export declare type Diff<T = any> = {
910
+ _diff?: DiffMetadata<T>;
911
+ };
912
+
913
+ export declare const DiffAutosizeTextArea: default_2.ForwardRefExoticComponent<Omit<DiffAutosizeTextAreaProps, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
914
+
915
+ export declare type DiffAutosizeTextAreaProps = AutosizeTextAreaProps & {
916
+ previousValue?: string;
917
+ displayDiff?: boolean;
918
+ noStyle?: boolean;
919
+ };
920
+
921
+ export declare const DiffCodeEditor: default_2.ForwardRefExoticComponent<{
922
+ maxRows?: number;
923
+ value?: string;
924
+ onChange?: (value: string) => void;
925
+ onStateChange?: (state: EditorState) => void;
926
+ placeholder?: string;
927
+ disabled?: boolean;
928
+ type?: "unary" | "standard" | "template";
929
+ lint?: boolean;
930
+ strict?: boolean;
931
+ fullHeight?: boolean;
932
+ noStyle?: boolean;
933
+ extension?: (params: {
934
+ type?: "standard" | "unary" | "template";
935
+ }) => Extension;
936
+ livePreview?: {
937
+ input: unknown;
938
+ fromSimulation: boolean;
939
+ result?: unknown;
940
+ };
941
+ variableType?: any;
942
+ expectedVariableType?: any;
943
+ lazy?: boolean;
944
+ initialSelection?: {
945
+ anchor: number;
946
+ head?: number;
947
+ };
948
+ } & Omit<default_2.HTMLAttributes<HTMLDivElement>, "disabled" | "onChange"> & {
949
+ lazy?: boolean;
950
+ } & {
951
+ displayDiff?: boolean;
952
+ previousValue?: string;
953
+ noStyle?: boolean;
954
+ } & default_2.RefAttributes< CodeEditorBaseRef>>;
955
+
956
+ export declare type DiffCodeEditorProps = CodeEditorProps & {
957
+ displayDiff?: boolean;
958
+ previousValue?: string;
959
+ noStyle?: boolean;
960
+ };
961
+
962
+ export declare const DiffIcon: default_2.FC<{
963
+ status?: DiffStatus;
964
+ style?: default_2.CSSProperties;
965
+ className?: string;
966
+ }>;
967
+
968
+ export declare const DiffInput: default_2.FC<DiffInputProps>;
969
+
970
+ export declare type DiffInputProps = InputProps & {
971
+ previousValue?: string;
972
+ displayDiff?: boolean;
973
+ };
974
+
975
+ export declare type DiffMetadata<T = any> = {
976
+ status?: DiffStatus;
977
+ previousValue?: T;
978
+ previousIndex?: number;
979
+ currentIndex?: number;
980
+ fields?: Record<string, DiffMetadata>;
981
+ };
982
+
983
+ declare interface DiffOptions<T extends BaseItem> {
984
+ idField?: 'id' | '_id';
985
+ compareFields?: (current: T, previous: T) => {
986
+ hasChanges: boolean;
987
+ fields?: Record<string, DiffMetadata>;
988
+ };
989
+ }
990
+
991
+ export declare const DiffRadio: default_2.FC<DiffRadioProps>;
992
+
993
+ export declare type DiffRadioProps = {
994
+ previousValue?: string;
995
+ displayDiff?: boolean;
996
+ } & RadioGroupProps;
997
+
998
+ export declare const DiffSelect: default_2.FC<DiffSelectProps>;
999
+
1000
+ export declare type DiffSelectProps = Omit<SelectProps, 'direction'> & {
1001
+ previousValue?: string;
1002
+ displayDiff?: boolean;
1003
+ direction?: SpaceProps['direction'];
1004
+ };
1005
+
1006
+ export declare type DiffStatus = 'added' | 'removed' | 'modified' | 'unchanged' | 'moved';
1007
+
1008
+ export declare const DiffSwitch: default_2.FC<DiffSwitchProps>;
1009
+
1010
+ export declare type DiffSwitchProps = {
1011
+ previousChecked?: boolean;
1012
+ displayDiff?: boolean;
1013
+ } & SwitchProps;
1014
+
1015
+ declare type DraftUpdateCallback<T> = (draft: WritableDraft<T>) => WritableDraft<T>;
1016
+
1017
+ export declare const edgeSchema: z.ZodObject<{
1018
+ id: z.ZodString;
1019
+ sourceId: z.ZodString;
1020
+ targetId: z.ZodString;
1021
+ sourceHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1022
+ type: z.ZodEnum<{
1023
+ edge: "edge";
1024
+ }>;
1025
+ }, z.core.$strip>;
1026
+
1027
+ declare const en: {
1028
+ readonly 'common.ok': "OK";
1029
+ readonly 'common.cancel': "Cancel";
1030
+ readonly 'common.remove': "Remove";
1031
+ readonly 'common.delete': "Delete";
1032
+ readonly 'common.retry': "Retry";
1033
+ readonly 'common.close': "Close";
1034
+ readonly 'common.update': "Update";
1035
+ readonly 'common.create': "Create";
1036
+ readonly 'common.convert': "Convert";
1037
+ readonly 'common.format': "Format";
1038
+ readonly 'common.recover': "Recover";
1039
+ readonly 'common.copy': "Copy";
1040
+ readonly 'dt.toolbar.import': "Import Excel";
1041
+ readonly 'dt.toolbar.export': "Export Excel";
1042
+ readonly 'dt.toolbar.addRowAbove': "Add row above";
1043
+ readonly 'dt.toolbar.addRowBelow': "Add row below";
1044
+ readonly 'dt.toolbar.removeRow': "Remove row";
1045
+ readonly 'dt.toolbar.removeRowConfirm': "Remove row?";
1046
+ readonly 'dt.table.column': "Table column";
1047
+ readonly 'dt.table.excelColumn': "Excel column";
1048
+ readonly 'dt.table.selectExcelColumn': "Select Excel column";
1049
+ readonly 'dt.table.description': "Description";
1050
+ readonly 'dt.table.selectDescription': "Select Excel column for description";
1051
+ readonly 'dt.table.reorderFields': "Reorder fields";
1052
+ readonly 'dt.field.input.add': "Add Input";
1053
+ readonly 'dt.field.input.label': "Input Field";
1054
+ readonly 'dt.field.output.add': "Add Output";
1055
+ readonly 'dt.field.output.label': "Output Field";
1056
+ readonly 'dt.field.label': "Field label";
1057
+ readonly 'dt.field.name': "Name";
1058
+ readonly 'dt.field.type': "Field Type";
1059
+ readonly 'dt.field.outputType': "Output Type";
1060
+ readonly 'dt.field.editColumn': "Edit column";
1061
+ readonly 'dt.field.removeColumn': "Remove column";
1062
+ readonly 'dt.field.removeConfirm': "Remove this column?";
1063
+ readonly 'dt.field.wrapQuotes': "Wrap values in quotes";
1064
+ readonly 'dt.field.selectDictionary': "Select dictionary...";
1065
+ readonly 'dt.field.allowCustomValues': "Allow custom values";
1066
+ readonly 'dt.toolbar.simulationIndex': "Simulation index:";
1067
+ readonly 'dt.excel.title': "Map Excel data";
1068
+ readonly 'dt.excel.input': "Input";
1069
+ readonly 'dt.excel.output': "Output";
1070
+ readonly 'dt.excel.enterFieldName': "Enter field name";
1071
+ readonly 'dg.node.decisionTables': "Decision Tables";
1072
+ readonly 'dg.node.expressions': "Expressions";
1073
+ readonly 'dg.node.functions': "Functions";
1074
+ readonly 'dg.node.editExpression': "Edit Expression";
1075
+ readonly 'vh.title': "Version history";
1076
+ readonly 'vh.description.some': "{{count}} version(s). Restoring loads that version as the current one.";
1077
+ readonly 'vh.description.none': "No versions yet. Each save creates one.";
1078
+ readonly 'vh.loading': "Loading…";
1079
+ readonly 'vh.filter.label': "Filter versions";
1080
+ readonly 'vh.filter.placeholder': "Filter by name or revision…";
1081
+ readonly 'vh.filter.noMatch': "No versions match \"{{query}}\".";
1082
+ readonly 'vh.noChanges': "No changes";
1083
+ readonly 'vh.changes': "changes";
1084
+ readonly 'vh.entry.current': "current";
1085
+ readonly 'vh.entry.auto': "auto";
1086
+ readonly 'vh.entry.pinned': "pinned";
1087
+ readonly 'vh.restore': "Restore";
1088
+ readonly 'vh.rename.title': "Rename version";
1089
+ readonly 'vh.rename.aria': "Rename version {{revision}}";
1090
+ readonly 'vh.name.aria': "Name version {{revision}}";
1091
+ readonly 'vh.name.placeholder': "Version name";
1092
+ readonly 'vh.name.button': "Name";
1093
+ readonly 'vh.pin.title': "Pin version";
1094
+ readonly 'vh.pin.aria': "Pin version {{revision}}";
1095
+ readonly 'vh.unpin.title': "Unpin version";
1096
+ readonly 'vh.unpin.aria': "Unpin version {{revision}}";
1097
+ readonly 'vh.compare.button': "Compare";
1098
+ readonly 'vh.compare.title': "Compare against this version on the canvas";
1099
+ readonly 'vh.compare.aria': "Compare against version {{revision}}";
1100
+ readonly 'vh.compare.exit.button': "Exit compare";
1101
+ readonly 'vh.compare.exit.title': "Exit compare mode";
1102
+ readonly 'vh.compare.exit.aria': "Exit compare (was against {{revision}})";
1103
+ readonly 'vh.compare.entry': "comparing";
1104
+ readonly 'dg.toolbar.uploadJson': "Upload JSON";
1105
+ readonly 'dg.toolbar.uploadExcel': "Upload Excel";
1106
+ readonly 'dg.toolbar.downloadJson': "Download JSON";
1107
+ readonly 'dg.toolbar.downloadExcel': "Download Excel";
1108
+ readonly 'dg.toolbar.searchNodes': "Search nodes";
1109
+ readonly 'dg.toolbar.closeClose': "Close panel";
1110
+ readonly 'dg.toolbar.schema': "JSON Schema";
1111
+ readonly 'dg.tabs.close': "Close";
1112
+ readonly 'dg.tabs.closeAll': "Close all Tabs";
1113
+ readonly 'dg.tabs.closeOthers': "Close other Tabs";
1114
+ readonly 'dg.tabs.closeRight': "Close Tabs to the right";
1115
+ readonly 'dg.tabs.closeLeft': "Close Tabs to the left";
1116
+ readonly 'dg.jsonSchema.title': "Convert to JSON Schema";
1117
+ readonly 'dg.jsonSchema.copyJson': "Copy JSON";
1118
+ readonly 'dg.node.documentation': "Documentation";
1119
+ readonly 'dg.node.duplicate': "Duplicate";
1120
+ readonly 'dg.node.deleteNode': "Delete node";
1121
+ readonly 'dg.schema.formatCode': "Format code";
1122
+ readonly 'dg.schema.importFromJson': "Import from JSON";
1123
+ readonly 'dg.excel.wrapQuotes': "Wrap value in quotes";
1124
+ readonly 'dg.excel.enterFieldName': "Enter field name";
1125
+ readonly 'dg.condition.removeConfirm': "Remove condition?";
1126
+ readonly 'expression.placeholder': "Expression";
1127
+ readonly 'expression.key': "Key";
1128
+ readonly 'expression.addRowAbove': "Add row above";
1129
+ readonly 'expression.addRowBelow': "Add row below";
1130
+ readonly 'func.debugger.copy': "Copy to clipboard";
1131
+ readonly 'func.debugger.copied': "Copied to clipboard";
1132
+ readonly 'func.debugger.formatCode': "Format code";
1133
+ readonly 'func.debugger.importLibrary': "Import library";
1134
+ readonly 'func.debugger.goToDocs': "Go to documentation";
1135
+ readonly 'func.debugger.msSinceRun': "Time since start of execution of script.";
1136
+ readonly 'misc.search': "Search...";
1137
+ readonly 'func.preview.noResults': "Run simulation to see the results";
1138
+ readonly 'safe.title': "Something went wrong";
1139
+ readonly 'safe.retry': "Retry";
1140
+ readonly request: "Request";
1141
+ readonly 'request.dataLabel': "Example data";
1142
+ readonly 'request.dataSourceSaved': "Data saved";
1143
+ readonly 'request.dataTypeMismatchWarning': "The current request data type does not match the definitions. To change the definition, update it in Definitions.";
1144
+ readonly 'request.downloadJsonNoData': "No data available to download";
1145
+ readonly 'request.jsonInvalidError': "Enter valid JSON or JSON5";
1146
+ readonly 'request.jsonObjectError': "Enter a JSON object";
1147
+ readonly 'request.saveDataSourceFailed': "Failed to save data";
1148
+ readonly 'request.selectDataSourceFirst': "Select a data first";
1149
+ readonly 'request.typeArray': "Array";
1150
+ readonly 'request.typeBoolean': "Boolean";
1151
+ readonly 'request.typeDatetime': "Datetime";
1152
+ readonly 'request.typeNumber': "Number";
1153
+ readonly 'request.typeObject': "Object";
1154
+ readonly 'request.typeString': "String";
1155
+ readonly 'request.uploadJsonFailed': "Failed to upload JSON";
1156
+ readonly 'request.uploadJsonObjectRequired': "Uploaded JSON must be an object";
1157
+ readonly 'request.uploadJsonSuccess': "JSON uploaded successfully";
1158
+ readonly 'request.key': "Key";
1159
+ readonly 'request.type': "Type";
1160
+ readonly 'request.description': "Description";
1161
+ readonly 'request.save': "Save";
1162
+ readonly 'request.schema': "Schema";
1163
+ readonly 'request.addChildField': "Add child field";
1164
+ readonly 'request.addDataSource': "Add data";
1165
+ readonly 'request.addField': "Add field";
1166
+ readonly 'request.childFieldNamePlaceholder': "Child field name";
1167
+ readonly 'request.createDataSource': "Create data";
1168
+ readonly 'request.definitionsTab': "Definitions";
1169
+ readonly 'request.deleteDataSourceConfirm': "Delete this data?";
1170
+ readonly 'request.deleteFieldConfirm': "Delete this field?";
1171
+ readonly 'request.downloadJsonTooltip': "Download JSON for the current data ";
1172
+ readonly 'request.exampleDescriptionPlaceholder': "Add example description...";
1173
+ readonly 'request.exampleFieldSummary': "Field summary";
1174
+ readonly 'request.exampleFieldSummaryAllMatch': "Fields match definitions";
1175
+ readonly 'request.exampleFieldSummaryConflicts': "Type conflicts";
1176
+ readonly 'request.exampleFieldSummaryDefinitions': "Defined fields";
1177
+ readonly 'request.exampleFieldSummaryExtra': "Extra fields";
1178
+ readonly 'request.exampleFieldSummaryMissing': "Missing fields";
1179
+ readonly 'request.examplesTab': "Data";
1180
+ readonly 'request.fieldDefaultValuePlaceholder': "Default value";
1181
+ readonly 'request.fieldDescriptionPlaceholder': "Field description";
1182
+ readonly 'request.fieldNamePlaceholder': "Field name";
1183
+ readonly 'request.formatSchema': "Format schema";
1184
+ readonly 'request.noDataSources': "No data";
1185
+ readonly 'request.noDefinitions': "No field definitions";
1186
+ readonly 'request.schemaPriorityTooltip': "Schema has the highest priority. Definitions and example data sync into schema, but schema remains the source of truth.";
1187
+ readonly 'request.simulateTooltip': "Open simulator";
1188
+ readonly 'request.toggleFieldDescriptionsTooltip': "Toggle field description hints";
1189
+ readonly 'request.uploadJsonTooltip': "Upload JSON for the current data";
1190
+ readonly 'cf.key': "Key";
1191
+ readonly 'cf.expression': "Expression";
1192
+ readonly 'cf.function': "Function";
1193
+ readonly 'cf.code': "Code";
1194
+ readonly 'cf.legacy': "Legacy";
1195
+ readonly 'cf.addRow': "Add Row";
1196
+ readonly 'simulator.boundRequestNodeNotFound': "Bound request node not found";
1197
+ readonly 'simulator.requestMustBeObjectToSave': "The current request must be a JSON object to save";
1198
+ readonly 'simulator.description': "Your business context that enters through the Request node, starting the decision process. Supply JSON or JSON5 format.";
1199
+ readonly 'simulator.currentBinding': "Current binding";
1200
+ readonly 'simulator.nodeRequired': "Request node is required to run the graph. Drag-and-drop it from the Components panel.";
1201
+ readonly 'simulator.run': "Run";
1202
+ readonly 'simulator.formatSuccess': "Formatted successfully!";
1203
+ readonly 'simulator.formatFailed': "Failed to format. Invalid JSON format.";
1204
+ readonly 'simulator.nothingToCopy': "Nothing to copy.";
1205
+ readonly 'simulator.copiedToClipboard': "Copied to clipboard!";
1206
+ readonly 'simulator.copyFailedInvalidJson': "Failed to copy. Invalid JSON format.";
1207
+ readonly 'simulator.dataRequiredBeforeRun': "The current request is empty. Please add example data first.";
1208
+ readonly 'simulator.invalidFormatTitle': "Invalid request format";
1209
+ readonly 'simulator.invalidFormatDescription': "Enter a valid JSON or JSON5 object before running.";
1210
+ readonly 'simulator.searchPlaceholder': "Search nodes...";
1211
+ readonly 'simulator.clear': "Clear";
1212
+ readonly 'simulator.readyTitle': "Ready to simulate!";
1213
+ readonly 'simulator.readyHint': "Run a request to see the node trace in action.";
1214
+ readonly 'simulator.learnMore': "Learn more";
1215
+ readonly 'common.clear': "Clear";
1216
+ readonly 'misc.delete': "Delete";
1217
+ };
1218
+
1219
+ export declare const ensureWasmLoaded: () => Promise<void>;
1220
+
1221
+ declare type ExposedStore<T> = UseBoundStore<StoreApi<T>> & {
1222
+ setState: (partial: Partial<T>) => void;
1223
+ };
1224
+
1225
+ export declare const Expression: default_2.FC<ExpressionProps>;
1226
+
1227
+ export declare const ExpressionBuilder: default_2.ForwardRefExoticComponent<ExpressionBuilderProps & default_2.RefAttributes<ExpressionBuilderRef>>;
1228
+
1229
+ export declare type ExpressionBuilderProps = {
1230
+ value: string;
1231
+ onChange: (value: string) => void;
1232
+ disabled?: boolean;
1233
+ fieldType?: ColumnFieldType;
1234
+ maxRows?: number;
1235
+ };
1236
+
1237
+ export declare type ExpressionBuilderRef = {
1238
+ focus: () => void;
1239
+ };
1240
+
1241
+ declare type ExpressionControllerProps = {
1242
+ disabled?: boolean;
1243
+ defaultValue?: ExpressionEntry[];
1244
+ permission?: ExpressionStore['permission'];
1245
+ value?: ExpressionEntry[];
1246
+ onChange?: (value: ExpressionEntry[]) => void;
1247
+ };
1248
+
1249
+ declare type ExpressionDebug = {
1250
+ snapshot: z.infer<typeof expressionNodeSchema>['content'];
1251
+ trace: SimulationTrace<SimulationTraceDataExpression>;
1252
+ inputData?: GetNodeDataResult;
1253
+ };
1254
+
1255
+ declare type ExpressionEntry = {
1256
+ id: string;
1257
+ key: string;
1258
+ value: string;
1259
+ _diff?: DiffMetadata;
1260
+ };
1261
+
1262
+ export declare const expressionNodeSchema: z.ZodObject<{
1263
+ type: z.ZodLiteral<NodeKind.Expression>;
1264
+ content: z.ZodObject<{
1265
+ expressions: z.ZodArray<z.ZodObject<{
1266
+ id: z.ZodDefault<z.ZodString>;
1267
+ key: z.ZodDefault<z.ZodString>;
1268
+ value: z.ZodDefault<z.ZodString>;
1269
+ }, z.core.$strip>>;
1270
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
1271
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1272
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1273
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1274
+ single: "single";
1275
+ loop: "loop";
1276
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
1277
+ }, z.core.$strip>;
1278
+ id: z.ZodDefault<z.ZodString>;
1279
+ name: z.ZodString;
1280
+ position: z.ZodDefault<z.ZodObject<{
1281
+ x: z.ZodNumber;
1282
+ y: z.ZodNumber;
1283
+ }, z.core.$strip>>;
1284
+ }, z.core.$strip>;
1285
+
1286
+ declare type ExpressionPermission = 'edit:full' | 'edit:values' | 'view';
1287
+
1288
+ export declare type ExpressionProps = {
1289
+ inputVariableType?: VariableType;
1290
+ debug?: ExpressionDebug;
1291
+ hideCommandBar?: boolean;
1292
+ } & ExpressionControllerProps;
1293
+
1294
+ declare type ExpressionStore = {
1295
+ disabled: boolean;
1296
+ permission?: ExpressionPermission;
1297
+ addRowAbove: (index?: number, data?: Partial<ExpressionEntry>) => void;
1298
+ addRowBelow: (index?: number, data?: Partial<ExpressionEntry>) => void;
1299
+ expressions: ExpressionEntry[];
1300
+ setExpressions: (expressions: ExpressionEntry[]) => void;
1301
+ swapRows: (sourceIndex: number, targetIndex: number) => void;
1302
+ updateRow: (index: number, update: Partial<Omit<ExpressionEntry, 'id'>>) => void;
1303
+ removeRow: (index: number) => void;
1304
+ inputVariableType?: VariableType;
1305
+ debugIndex: number;
1306
+ calculatedInputData?: Variable;
1307
+ debug?: ExpressionDebug;
1308
+ };
1309
+
1310
+ declare type ExtensionParams = {
1311
+ type?: 'standard' | 'unary' | 'template';
1312
+ };
1313
+
1314
+ declare const Function_2: default_2.FC<FunctionProps>;
1315
+ export { Function_2 as Function }
1316
+
1317
+ declare type FunctionLibrary = {
1318
+ name: string;
1319
+ tagline: string;
1320
+ typeDef: string;
1321
+ importName?: string;
1322
+ documentationUrl?: string;
1323
+ };
1324
+
1325
+ export declare const functionNodeSchema: z.ZodObject<{
1326
+ type: z.ZodLiteral<NodeKind.Function>;
1327
+ content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{
1328
+ source: z.ZodDefault<z.ZodString>;
1329
+ }, z.core.$strip>]>>>;
1330
+ id: z.ZodDefault<z.ZodString>;
1331
+ name: z.ZodString;
1332
+ position: z.ZodDefault<z.ZodObject<{
1333
+ x: z.ZodNumber;
1334
+ y: z.ZodNumber;
1335
+ }, z.core.$strip>>;
1336
+ }, z.core.$strip>;
1337
+
1338
+ export declare type FunctionPermission = 'edit:full';
1339
+
1340
+ export declare type FunctionProps = {
1341
+ disabled?: boolean;
1342
+ defaultValue?: string;
1343
+ disableDebug?: boolean;
1344
+ language?: string;
1345
+ value?: string;
1346
+ previousValue?: string;
1347
+ onChange?: (value: string) => void;
1348
+ trace?: SimulationTrace<SimulationTraceDataFunction>;
1349
+ onMonacoReady?: (monaco: Monaco) => void;
1350
+ onEditorMount?: (editor: editor.IStandaloneCodeEditor) => void;
1351
+ libraries?: FunctionLibrary[];
1352
+ inputData?: unknown;
1353
+ permission?: FunctionPermission;
1354
+ error?: {
1355
+ data: {
1356
+ nodeId: string;
1357
+ source?: string;
1358
+ };
1359
+ };
1360
+ };
1361
+
1362
+ declare type GenerateNodeParams = {
1363
+ index: number;
1364
+ };
1365
+
1366
+ declare type GenerateNodeParams_2 = {
1367
+ index: number;
1368
+ };
1369
+
1370
+ declare type GetNodeDataResult = {
1371
+ data: unknown;
1372
+ $nodes: unknown;
1373
+ $?: unknown;
1374
+ };
1375
+
1376
+ export declare const getRequestDefinitions: (content?: RequestContentLike | null) => RequestDefinition[];
1377
+
1378
+ export declare const getRequestExampleSources: (content?: RequestContentLike | null, options?: {
1379
+ dataLabel?: string;
1380
+ }) => RequestExampleSource[];
1381
+
1382
+ export declare const getRequestSchemaSourceValue: (content?: RequestContentLike | null) => unknown;
1383
+
1384
+ export declare const GraphDecisionNode: default_2.FC<GraphDecisionNodeProps>;
1385
+
1386
+ export declare type GraphDecisionNodeProps = {
1387
+ name?: string;
1388
+ icon: default_2.ReactNode;
1389
+ type: default_2.ReactNode;
1390
+ helper?: (default_2.ReactNode | false)[];
1391
+ disabled?: boolean;
1392
+ isSelected?: boolean;
1393
+ children?: default_2.ReactNode;
1394
+ actions?: default_2.ReactNode[];
1395
+ status?: 'error' | 'success' | 'warning';
1396
+ diffStatus?: 'removed' | 'added' | 'modified' | 'moved';
1397
+ noBodyPadding?: boolean;
1398
+ color?: 'primary' | 'secondary' | string;
1399
+ menuItems?: MenuProps['items'];
1400
+ onNameChange?: (name: string) => void;
1401
+ compactMode?: boolean;
1402
+ listMode?: boolean;
1403
+ details?: default_2.ReactNode;
1404
+ detailsOpen?: boolean;
1405
+ detailsTitle?: string;
1406
+ onDetailsClose?: () => void;
1407
+ };
1408
+
1409
+ export declare type GraphDiff = {
1410
+ addedNodes: GraphNodeChange[];
1411
+ removedNodes: GraphNodeChange[];
1412
+ modifiedNodes: GraphNodeChange[];
1413
+ addedEdges: GraphNodeChange[];
1414
+ removedEdges: GraphNodeChange[];
1415
+ modifiedEdges: GraphNodeChange[];
1416
+ unchanged: boolean;
1417
+ };
1418
+
1419
+ export declare const GraphNode: default_2.ForwardRefExoticComponent<{
1420
+ id: string;
1421
+ handleLeft?: boolean | Partial<HandleProps>;
1422
+ handleRight?: boolean | Partial<HandleProps>;
1423
+ className?: string;
1424
+ specification: MinimalNodeSpecification;
1425
+ displayError?: boolean;
1426
+ } & Partial<GraphDecisionNodeProps> & default_2.RefAttributes<HTMLDivElement>>;
1427
+
1428
+ export declare type GraphNodeChange = {
1429
+ id: string;
1430
+ name?: string;
1431
+ kind?: string;
1432
+ fields?: string[];
1433
+ };
1434
+
1435
+ export declare type GraphNodeProps = {
1436
+ id: string;
1437
+ handleLeft?: boolean | Partial<HandleProps>;
1438
+ handleRight?: boolean | Partial<HandleProps>;
1439
+ className?: string;
1440
+ specification: MinimalNodeSpecification;
1441
+ displayError?: boolean;
1442
+ } & Partial<GraphDecisionNodeProps>;
1443
+
1444
+ declare type GraphRef = DecisionGraphStoreType['actions'] & {
1445
+ stateStore: ExposedStore<DecisionGraphStoreType['state']>;
1446
+ serialize: () => DecisionGraphSnapshot;
1447
+ restore: (snapshot: DecisionGraphSnapshot) => void;
1448
+ };
1449
+
1450
+ export declare const GraphSimulator: default_2.FC<GraphSimulatorProps>;
1451
+
1452
+ export declare type GraphSimulatorProps = {
1453
+ onClear?: () => void;
1454
+ loading?: boolean;
1455
+ defaultRequest?: SimulatorRequestPanelProps['defaultRequest'];
1456
+ onChange?: SimulatorRequestPanelProps['onChange'];
1457
+ onRun?: SimulatorRequestPanelProps['onRun'];
1458
+ leftPanel?: default_2.FC<SimulatorRequestPanelProps>;
1459
+ };
1460
+
1461
+ declare type GraphTabsProps = {
1462
+ disabled?: boolean;
1463
+ tabBarExtraContent?: TabsProps['tabBarExtraContent'];
1464
+ };
1465
+
1466
+ declare type HitPolicy = 'first' | 'collect';
1467
+
1468
+ export declare type I18nMessages = Record<string, string>;
1469
+
1470
+ export declare const I18nProvider: React_2.FC<{
1471
+ locale: string;
1472
+ overrides?: I18nMessages;
1473
+ children: React_2.ReactNode;
1474
+ }>;
1475
+
1476
+ declare type InferredContent = z.infer<typeof inputNodeSchema>['content'];
1477
+
1478
+ declare type InferredContent_2 = z.infer<typeof outputNodeSchema>['content'];
1479
+
1480
+ declare type InferredContent_3 = z.infer<typeof decisionTableSchema>['content'];
1481
+
1482
+ declare type InferredContent_4 = z.infer<typeof expressionNodeSchema>['content'];
1483
+
1484
+ declare type InferTypeData<T> = {
1485
+ input: VariableType;
1486
+ content: T;
1487
+ };
1488
+
1489
+ declare type Input = unknown;
1490
+
1491
+ export declare const inputNodeSchema: z.ZodObject<{
1492
+ type: z.ZodLiteral<NodeKind.Input>;
1493
+ content: z.ZodDefault<z.ZodObject<{
1494
+ schema: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>>, z.ZodTransform<string, string | Record<string, any> | null | undefined>>;
1495
+ expressions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1496
+ id: z.ZodDefault<z.ZodString>;
1497
+ key: z.ZodDefault<z.ZodString>;
1498
+ value: z.ZodDefault<z.ZodAny>;
1499
+ type: z.ZodOptional<z.ZodString>;
1500
+ }, z.core.$strip>>>;
1501
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1502
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1503
+ }, z.core.$strip>>;
1504
+ id: z.ZodDefault<z.ZodString>;
1505
+ name: z.ZodString;
1506
+ position: z.ZodDefault<z.ZodObject<{
1507
+ x: z.ZodNumber;
1508
+ y: z.ZodNumber;
1509
+ }, z.core.$strip>>;
1510
+ }, z.core.$strip>;
1511
+
1512
+ declare interface InputProps extends Omit<React_2.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'suffix'> {
1513
+ size?: 'large' | 'middle' | 'small';
1514
+ allowClear?: boolean;
1515
+ bordered?: boolean;
1516
+ prefix?: React_2.ReactNode;
1517
+ suffix?: React_2.ReactNode;
1518
+ }
1519
+
1520
+ declare type InputSchema<Name extends string> = {
1521
+ name: Name;
1522
+ } & (BoolInput | TextInput);
1523
+
1524
+ declare type InputTypeMap = {
1525
+ bool: boolean;
1526
+ text: string;
1527
+ };
1528
+
1529
+ declare type InterpolationParams = Record<string, string | number>;
1530
+
1531
+ export declare const JdmConfigProvider: default_2.FC<JdmConfigProviderProps>;
1532
+
1533
+ export declare type JdmConfigProviderProps = {
1534
+ theme?: ThemeConfig;
1535
+ seeds?: ThemeSeeds;
1536
+ locale?: string;
1537
+ messages?: Record<string, string>;
1538
+ prefixCls?: string;
1539
+ dictionaries?: DictionaryMap;
1540
+ children?: default_2.ReactNode;
1541
+ };
1542
+
1543
+ export declare type JdmUiMode = 'dev' | 'business';
1544
+
1545
+ declare type JsonSchema = {
1546
+ type?: string | string[];
1547
+ properties?: Record<string, JsonSchema>;
1548
+ items?: JsonSchema | JsonSchema[];
1549
+ oneOf?: JsonSchema[];
1550
+ anyOf?: JsonSchema[];
1551
+ allOf?: JsonSchema[];
1552
+ nullable?: boolean;
1553
+ };
1554
+
1555
+ export declare const jsonSchemaToVariableType: (schema?: JsonSchema | null) => VariableType;
1556
+
1557
+ declare type LegacyRequestInput = {
1558
+ id?: string;
1559
+ key?: string;
1560
+ type?: string;
1561
+ value?: unknown;
1562
+ desc?: unknown;
1563
+ description?: unknown;
1564
+ };
1565
+
1566
+ export declare const lightTokens: Record<string, string | number>;
1567
+
1568
+ declare interface MenuItemType {
1569
+ key?: string;
1570
+ label?: React_2.ReactNode;
1571
+ icon?: React_2.ReactNode;
1572
+ danger?: boolean;
1573
+ disabled?: boolean;
1574
+ type?: 'divider' | 'group';
1575
+ onClick?: (info: {
1576
+ key: string;
1577
+ }) => void;
1578
+ children?: MenuItemType[];
1579
+ }
1580
+
1581
+ declare interface MenuProps {
1582
+ items?: MenuItemType[];
1583
+ onClick?: MenuItemType['onClick'];
1584
+ }
1585
+
1586
+ export declare type MinimalNodeProps = Pick<NodeProps, 'id' | 'selected'> & {
1587
+ data: any;
1588
+ };
1589
+
1590
+ export declare type MinimalNodeSpecification = Pick<NodeSpecification, 'color' | 'icon' | 'displayName' | 'documentationUrl' | 'helper' | 'renderSettings'>;
1591
+
1592
+ export declare const MODE_EXTRAS: Record<'light' | 'dark', {
1593
+ borderHover: string;
1594
+ borderFade: string;
1595
+ primaryBgFade: string;
1596
+ }>;
1597
+
1598
+ export declare enum NodeColor {
1599
+ Blue = "var(--node-color-blue)",
1600
+ Purple = "var(--node-color-purple)",
1601
+ Orange = "var(--node-color-orange)",
1602
+ Green = "var(--node-color-green)"
1603
+ }
1604
+
1605
+ declare type NodeDecisionTableData = Omit<InferredContent_3, 'inputs' | 'outputs' | 'rules'> & Diff & {
1606
+ rules: (InferredContent_3['rules'][0] & Diff)[];
1607
+ inputs: (InferredContent_3['inputs'][0] & Diff)[];
1608
+ outputs: (InferredContent_3['outputs'][0] & Diff)[];
1609
+ };
1610
+
1611
+ declare type NodeExpressionData = Omit<InferredContent_4, 'expressions'> & Diff & {
1612
+ expressions: (InferredContent_4['expressions'][0] & Diff)[];
1613
+ };
1614
+
1615
+ declare type NodeFunctionData = string | {
1616
+ source: string;
1617
+ };
1618
+
1619
+ declare type NodeInputData = InferredContent & Diff;
1620
+
1621
+ export declare enum NodeKind {
1622
+ Input = "inputNode",
1623
+ Output = "outputNode",
1624
+ DecisionTable = "decisionTableNode",
1625
+ Function = "functionNode",
1626
+ Expression = "expressionNode",
1627
+ Switch = "switchNode",
1628
+ Decision = "decisionNode"
1629
+ }
1630
+
1631
+ declare type NodeOutputData = InferredContent_2 & Diff;
1632
+
1633
+ declare type NodeSchema = z.infer<typeof nodeSchema>;
1634
+
1635
+ export declare const nodeSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
1636
+ type: z.ZodLiteral<NodeKind.Decision>;
1637
+ content: z.ZodObject<{
1638
+ key: z.ZodString;
1639
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
1640
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1641
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1642
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1643
+ single: "single";
1644
+ loop: "loop";
1645
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
1646
+ }, z.core.$strip>;
1647
+ id: z.ZodDefault<z.ZodString>;
1648
+ name: z.ZodString;
1649
+ position: z.ZodDefault<z.ZodObject<{
1650
+ x: z.ZodNumber;
1651
+ y: z.ZodNumber;
1652
+ }, z.core.$strip>>;
1653
+ }, z.core.$strip>, z.ZodObject<{
1654
+ type: z.ZodLiteral<NodeKind.Expression>;
1655
+ content: z.ZodObject<{
1656
+ expressions: z.ZodArray<z.ZodObject<{
1657
+ id: z.ZodDefault<z.ZodString>;
1658
+ key: z.ZodDefault<z.ZodString>;
1659
+ value: z.ZodDefault<z.ZodString>;
1660
+ }, z.core.$strip>>;
1661
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
1662
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1663
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1664
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1665
+ single: "single";
1666
+ loop: "loop";
1667
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
1668
+ }, z.core.$strip>;
1669
+ id: z.ZodDefault<z.ZodString>;
1670
+ name: z.ZodString;
1671
+ position: z.ZodDefault<z.ZodObject<{
1672
+ x: z.ZodNumber;
1673
+ y: z.ZodNumber;
1674
+ }, z.core.$strip>>;
1675
+ }, z.core.$strip>, z.ZodObject<{
1676
+ type: z.ZodLiteral<NodeKind.Function>;
1677
+ content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{
1678
+ source: z.ZodDefault<z.ZodString>;
1679
+ }, z.core.$strip>]>>>;
1680
+ id: z.ZodDefault<z.ZodString>;
1681
+ name: z.ZodString;
1682
+ position: z.ZodDefault<z.ZodObject<{
1683
+ x: z.ZodNumber;
1684
+ y: z.ZodNumber;
1685
+ }, z.core.$strip>>;
1686
+ }, z.core.$strip>, z.ZodObject<{
1687
+ type: z.ZodLiteral<NodeKind.DecisionTable>;
1688
+ content: z.ZodObject<{
1689
+ hitPolicy: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1690
+ first: "first";
1691
+ collect: "collect";
1692
+ }>>>, z.ZodTransform<"first" | "collect", "first" | "collect" | null | undefined>>;
1693
+ rules: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>>>>;
1694
+ inputs: z.ZodArray<z.ZodObject<{
1695
+ id: z.ZodDefault<z.ZodString>;
1696
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1697
+ field: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1698
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1699
+ fieldType: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1700
+ type: z.ZodLiteral<"any">;
1701
+ }, z.core.$strip>, z.ZodObject<{
1702
+ type: z.ZodLiteral<"string">;
1703
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1704
+ type: z.ZodLiteral<"inline">;
1705
+ values: z.ZodArray<z.ZodObject<{
1706
+ label: z.ZodString;
1707
+ value: z.ZodString;
1708
+ }, z.core.$strip>>;
1709
+ loose: z.ZodOptional<z.ZodBoolean>;
1710
+ }, z.core.$strip>, z.ZodObject<{
1711
+ type: z.ZodLiteral<"ref">;
1712
+ ref: z.ZodString;
1713
+ loose: z.ZodOptional<z.ZodBoolean>;
1714
+ }, z.core.$strip>], "type">>;
1715
+ }, z.core.$strip>, z.ZodObject<{
1716
+ type: z.ZodLiteral<"number">;
1717
+ }, z.core.$strip>, z.ZodObject<{
1718
+ type: z.ZodLiteral<"boolean">;
1719
+ }, z.core.$strip>, z.ZodObject<{
1720
+ type: z.ZodLiteral<"date">;
1721
+ }, z.core.$strip>], "type">>>;
1722
+ }, z.core.$strip>>;
1723
+ outputs: z.ZodArray<z.ZodObject<{
1724
+ id: z.ZodDefault<z.ZodString>;
1725
+ name: z.ZodString;
1726
+ field: z.ZodString;
1727
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1728
+ outputFieldType: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1729
+ type: z.ZodLiteral<"auto">;
1730
+ }, z.core.$strip>, z.ZodObject<{
1731
+ type: z.ZodLiteral<"string">;
1732
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1733
+ type: z.ZodLiteral<"inline">;
1734
+ values: z.ZodArray<z.ZodObject<{
1735
+ label: z.ZodString;
1736
+ value: z.ZodString;
1737
+ }, z.core.$strip>>;
1738
+ loose: z.ZodOptional<z.ZodBoolean>;
1739
+ }, z.core.$strip>, z.ZodObject<{
1740
+ type: z.ZodLiteral<"ref">;
1741
+ ref: z.ZodString;
1742
+ loose: z.ZodOptional<z.ZodBoolean>;
1743
+ }, z.core.$strip>], "type">>;
1744
+ }, z.core.$strip>, z.ZodObject<{
1745
+ type: z.ZodLiteral<"string-array">;
1746
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1747
+ type: z.ZodLiteral<"inline">;
1748
+ values: z.ZodArray<z.ZodObject<{
1749
+ label: z.ZodString;
1750
+ value: z.ZodString;
1751
+ }, z.core.$strip>>;
1752
+ loose: z.ZodOptional<z.ZodBoolean>;
1753
+ }, z.core.$strip>, z.ZodObject<{
1754
+ type: z.ZodLiteral<"ref">;
1755
+ ref: z.ZodString;
1756
+ loose: z.ZodOptional<z.ZodBoolean>;
1757
+ }, z.core.$strip>], "type">>;
1758
+ }, z.core.$strip>, z.ZodObject<{
1759
+ type: z.ZodLiteral<"number">;
1760
+ }, z.core.$strip>, z.ZodObject<{
1761
+ type: z.ZodLiteral<"boolean">;
1762
+ }, z.core.$strip>, z.ZodObject<{
1763
+ type: z.ZodLiteral<"date">;
1764
+ }, z.core.$strip>], "type">>>;
1765
+ }, z.core.$strip>>;
1766
+ passThrough: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
1767
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1768
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1769
+ executionMode: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1770
+ single: "single";
1771
+ loop: "loop";
1772
+ }>>>, z.ZodTransform<"single" | "loop", "single" | "loop" | null | undefined>>;
1773
+ }, z.core.$strip>;
1774
+ id: z.ZodDefault<z.ZodString>;
1775
+ name: z.ZodString;
1776
+ position: z.ZodDefault<z.ZodObject<{
1777
+ x: z.ZodNumber;
1778
+ y: z.ZodNumber;
1779
+ }, z.core.$strip>>;
1780
+ }, z.core.$strip>, z.ZodObject<{
1781
+ type: z.ZodLiteral<NodeKind.Switch>;
1782
+ content: z.ZodObject<{
1783
+ hitPolicy: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1784
+ first: "first";
1785
+ collect: "collect";
1786
+ }>>>, z.ZodTransform<"first" | "collect", "first" | "collect" | null | undefined>>;
1787
+ statements: z.ZodArray<z.ZodObject<{
1788
+ id: z.ZodDefault<z.ZodString>;
1789
+ condition: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
1790
+ isDefault: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
1791
+ }, z.core.$strip>>;
1792
+ }, z.core.$strip>;
1793
+ id: z.ZodDefault<z.ZodString>;
1794
+ name: z.ZodString;
1795
+ position: z.ZodDefault<z.ZodObject<{
1796
+ x: z.ZodNumber;
1797
+ y: z.ZodNumber;
1798
+ }, z.core.$strip>>;
1799
+ }, z.core.$strip>, z.ZodObject<{
1800
+ type: z.ZodLiteral<"customNode">;
1801
+ content: z.ZodObject<{
1802
+ kind: z.ZodString;
1803
+ config: z.ZodAny;
1804
+ }, z.core.$strip>;
1805
+ id: z.ZodDefault<z.ZodString>;
1806
+ name: z.ZodString;
1807
+ position: z.ZodDefault<z.ZodObject<{
1808
+ x: z.ZodNumber;
1809
+ y: z.ZodNumber;
1810
+ }, z.core.$strip>>;
1811
+ }, z.core.$strip>, z.ZodObject<{
1812
+ type: z.ZodLiteral<NodeKind.Input>;
1813
+ content: z.ZodDefault<z.ZodObject<{
1814
+ schema: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>>, z.ZodTransform<string, string | Record<string, any> | null | undefined>>;
1815
+ expressions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1816
+ id: z.ZodDefault<z.ZodString>;
1817
+ key: z.ZodDefault<z.ZodString>;
1818
+ value: z.ZodDefault<z.ZodAny>;
1819
+ type: z.ZodOptional<z.ZodString>;
1820
+ }, z.core.$strip>>>;
1821
+ inputField: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1822
+ outputPath: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>, z.ZodTransform<string | null, string | null>>;
1823
+ }, z.core.$strip>>;
1824
+ id: z.ZodDefault<z.ZodString>;
1825
+ name: z.ZodString;
1826
+ position: z.ZodDefault<z.ZodObject<{
1827
+ x: z.ZodNumber;
1828
+ y: z.ZodNumber;
1829
+ }, z.core.$strip>>;
1830
+ }, z.core.$strip>, z.ZodObject<{
1831
+ type: z.ZodLiteral<NodeKind.Output>;
1832
+ content: z.ZodDefault<z.ZodObject<{
1833
+ schema: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
1834
+ }, z.core.$strip>>;
1835
+ id: z.ZodDefault<z.ZodString>;
1836
+ name: z.ZodString;
1837
+ position: z.ZodDefault<z.ZodObject<{
1838
+ x: z.ZodNumber;
1839
+ y: z.ZodNumber;
1840
+ }, z.core.$strip>>;
1841
+ }, z.core.$strip>], "type">, z.ZodObject<{
1842
+ type: z.ZodString;
1843
+ content: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1844
+ id: z.ZodDefault<z.ZodString>;
1845
+ name: z.ZodString;
1846
+ position: z.ZodDefault<z.ZodObject<{
1847
+ x: z.ZodNumber;
1848
+ y: z.ZodNumber;
1849
+ }, z.core.$strip>>;
1850
+ }, z.core.$strip>]>;
1851
+
1852
+ export declare type NodeSpecification<T = any> = {
1853
+ icon?: default_2.ReactNode;
1854
+ type: string;
1855
+ color?: GraphDecisionNodeProps['color'];
1856
+ group?: string;
1857
+ displayName: string | default_2.ReactNode;
1858
+ documentationUrl?: string;
1859
+ shortDescription?: string;
1860
+ helper?: string | default_2.ReactNode;
1861
+ renderTab?: (props: {
1862
+ id: string;
1863
+ user?: string;
1864
+ customFunctions?: any;
1865
+ }) => default_2.ReactNode;
1866
+ getDiffContent?: (current: T, previous: T) => T;
1867
+ generateNode: (params: GenerateNodeParams) => Omit<DecisionNode<T>, 'position' | 'id' | 'type'>;
1868
+ renderNode: default_2.FC<MinimalNodeProps & {
1869
+ specification: MinimalNodeSpecification;
1870
+ }>;
1871
+ renderSettings?: default_2.FC<{
1872
+ id: string;
1873
+ }>;
1874
+ inferTypes?: {
1875
+ needsUpdate: (content: T, prevContent: T) => boolean;
1876
+ determineOutputType: (state: InferTypeData<T>) => VariableType;
1877
+ };
1878
+ onNodeAdd?: (node: DecisionNode<T>) => Promise<DecisionNode<T>>;
1879
+ };
1880
+
1881
+ export declare const nodeSpecification: Readonly<{
1882
+ inputNode: NodeSpecification< NodeInputData>;
1883
+ outputNode: NodeSpecification< NodeOutputData>;
1884
+ decisionTableNode: NodeSpecification< NodeDecisionTableData>;
1885
+ expressionNode: NodeSpecification< NodeExpressionData>;
1886
+ functionNode: NodeSpecification< NodeFunctionData>;
1887
+ switchNode: NodeSpecification< NodeSwitchData>;
1888
+ }>;
1889
+
1890
+ declare type NodeSwitchData = {
1891
+ hitPolicy?: 'first' | 'collect';
1892
+ statements?: (SwitchStatement & Diff)[];
1893
+ } & Diff;
1894
+
1895
+ export declare enum NodeTypeKind {
1896
+ Input = 0,
1897
+ Output = 1,
1898
+ InferredInput = 2,
1899
+ InferredOutput = 3
1900
+ }
1901
+
1902
+ declare type NodeTypeParams = {
1903
+ attachGlobals?: boolean;
1904
+ disabled?: boolean;
1905
+ };
1906
+
1907
+ export declare const normalizeRequestDefinitionOrders: <T extends Pick<RequestDefinition, "order" | "parentPath">>(definitions: T[]) => T[];
1908
+
1909
+ export declare const normalizeRequestFieldKey: (key: string) => string;
1910
+
1911
+ export declare const normalizeRequestJsonKeys: (value: unknown) => unknown;
1912
+
1913
+ declare type Output = unknown;
1914
+
1915
+ export declare const OUTPUT_FIELD_TYPE_OPTIONS: {
1916
+ value: OutputFieldType['type'];
1917
+ label: string;
1918
+ }[];
1919
+
1920
+ export declare type OutputFieldType = z.infer<typeof outputFieldTypeSchema>;
1921
+
1922
+ export declare const outputFieldTypeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1923
+ type: z.ZodLiteral<"auto">;
1924
+ }, z.core.$strip>, z.ZodObject<{
1925
+ type: z.ZodLiteral<"string">;
1926
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1927
+ type: z.ZodLiteral<"inline">;
1928
+ values: z.ZodArray<z.ZodObject<{
1929
+ label: z.ZodString;
1930
+ value: z.ZodString;
1931
+ }, z.core.$strip>>;
1932
+ loose: z.ZodOptional<z.ZodBoolean>;
1933
+ }, z.core.$strip>, z.ZodObject<{
1934
+ type: z.ZodLiteral<"ref">;
1935
+ ref: z.ZodString;
1936
+ loose: z.ZodOptional<z.ZodBoolean>;
1937
+ }, z.core.$strip>], "type">>;
1938
+ }, z.core.$strip>, z.ZodObject<{
1939
+ type: z.ZodLiteral<"string-array">;
1940
+ enum: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1941
+ type: z.ZodLiteral<"inline">;
1942
+ values: z.ZodArray<z.ZodObject<{
1943
+ label: z.ZodString;
1944
+ value: z.ZodString;
1945
+ }, z.core.$strip>>;
1946
+ loose: z.ZodOptional<z.ZodBoolean>;
1947
+ }, z.core.$strip>, z.ZodObject<{
1948
+ type: z.ZodLiteral<"ref">;
1949
+ ref: z.ZodString;
1950
+ loose: z.ZodOptional<z.ZodBoolean>;
1951
+ }, z.core.$strip>], "type">>;
1952
+ }, z.core.$strip>, z.ZodObject<{
1953
+ type: z.ZodLiteral<"number">;
1954
+ }, z.core.$strip>, z.ZodObject<{
1955
+ type: z.ZodLiteral<"boolean">;
1956
+ }, z.core.$strip>, z.ZodObject<{
1957
+ type: z.ZodLiteral<"date">;
1958
+ }, z.core.$strip>], "type">;
1959
+
1960
+ export declare const outputNodeSchema: z.ZodObject<{
1961
+ type: z.ZodLiteral<NodeKind.Output>;
1962
+ content: z.ZodDefault<z.ZodObject<{
1963
+ schema: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
1964
+ }, z.core.$strip>>;
1965
+ id: z.ZodDefault<z.ZodString>;
1966
+ name: z.ZodString;
1967
+ position: z.ZodDefault<z.ZodObject<{
1968
+ x: z.ZodNumber;
1969
+ y: z.ZodNumber;
1970
+ }, z.core.$strip>>;
1971
+ }, z.core.$strip>;
1972
+
1973
+ declare type PanelType = {
1974
+ id: string;
1975
+ icon: default_2.ReactNode;
1976
+ title: string;
1977
+ renderPanel?: () => default_2.ReactNode;
1978
+ hideHeader?: boolean;
1979
+ onClick?: () => void;
1980
+ };
1981
+
1982
+ export declare type Position = {
1983
+ x: number;
1984
+ y: number;
1985
+ };
1986
+
1987
+ declare const privateSymbol: unique symbol;
1988
+
1989
+ export declare const processEdges: (currentEdges: DecisionEdge[], previousEdges: DecisionEdge[]) => any[];
1990
+
1991
+ export declare const processNodes: (currentNodes: DecisionNode<any>[], previousNodes: DecisionNode<any>[], options?: ProcessNodesOptions) => any[];
1992
+
1993
+ export declare type ProcessNodesOptions = {
1994
+ components: NodeSpecification[];
1995
+ customNodes: CustomNodeSpecification<object, any>[];
1996
+ };
1997
+
1998
+ declare interface RadioGroupProps {
1999
+ value?: string | number | boolean;
2000
+ disabled?: boolean;
2001
+ size?: 'large' | 'middle' | 'small';
2002
+ options?: Array<{
2003
+ label?: React_2.ReactNode;
2004
+ value: string | number;
2005
+ disabled?: boolean;
2006
+ }>;
2007
+ onChange?: (event: {
2008
+ target: {
2009
+ value: unknown;
2010
+ };
2011
+ }) => void;
2012
+ className?: string;
2013
+ style?: React_2.CSSProperties;
2014
+ }
2015
+
2016
+ declare type RequestContentLike = {
2017
+ schema?: unknown;
2018
+ schemaUI?: unknown;
2019
+ inputs?: LegacyRequestInput[];
2020
+ };
2021
+
2022
+ export declare type RequestDefinition = {
2023
+ id: string;
2024
+ path: string;
2025
+ name: string;
2026
+ type: RequestDefinitionType;
2027
+ description: string;
2028
+ format: string;
2029
+ order: number;
2030
+ depth: number;
2031
+ parentPath: string | null;
2032
+ source: 'schema.properties' | 'content.inputs';
2033
+ defaultValue?: string;
2034
+ };
2035
+
2036
+ export declare type RequestDefinitionType = 'number' | 'string' | 'array' | 'object' | 'datetime' | 'boolean';
2037
+
2038
+ declare type RequestExampleMeta = {
2039
+ name?: string;
2040
+ description?: string;
2041
+ };
2042
+
2043
+ export declare type RequestExampleSource = {
2044
+ id: string;
2045
+ name: string;
2046
+ description?: string;
2047
+ data: Record<string, unknown>;
2048
+ source: 'schema.examples' | 'content.inputs';
2049
+ };
2050
+
2051
+ declare type RequestJsonSchema = {
2052
+ 'type'?: string | string[];
2053
+ 'description'?: string;
2054
+ 'format'?: string;
2055
+ 'properties'?: Record<string, RequestJsonSchema>;
2056
+ 'items'?: RequestJsonSchema | RequestJsonSchema[];
2057
+ 'examples'?: unknown[];
2058
+ 'x-examples-meta'?: RequestExampleMeta[];
2059
+ 'x-order'?: number;
2060
+ [key: string]: unknown;
2061
+ };
2062
+
2063
+ export declare const resolveRequestSchemaValue: (content?: RequestContentLike | null, options?: {
2064
+ includeExamples?: boolean;
2065
+ }) => RequestJsonSchema | null;
2066
+
2067
+ declare type SchemaSelectProps = {
2068
+ field: string;
2069
+ name?: string;
2070
+ items?: SchemaSelectProps[];
2071
+ };
2072
+
2073
+ declare interface SelectOption {
2074
+ id?: string;
2075
+ type?: string;
2076
+ wrapInQuotes?: boolean;
2077
+ display?: React_2.ReactNode;
2078
+ label?: React_2.ReactNode;
2079
+ value: string | number | boolean;
2080
+ disabled?: boolean;
2081
+ }
2082
+
2083
+ declare interface SelectProps {
2084
+ options?: SelectOption[];
2085
+ value?: string | number | boolean | Array<string | number>;
2086
+ defaultValue?: string | number | boolean | Array<string | number>;
2087
+ onChange?: (value: any, option?: SelectOption) => void;
2088
+ onSelect?: (value: string | number | boolean, option: SelectOption) => void;
2089
+ dropdownRender?: (menu: React_2.ReactNode) => React_2.ReactNode;
2090
+ optionRender?: (option: {
2091
+ data: SelectOption;
2092
+ }) => React_2.ReactNode;
2093
+ placeholder?: string;
2094
+ disabled?: boolean;
2095
+ size?: 'large' | 'middle' | 'small';
2096
+ allowClear?: boolean;
2097
+ onClear?: () => void;
2098
+ optionLabelProp?: string;
2099
+ loading?: boolean;
2100
+ showSearch?: boolean;
2101
+ filterOption?: boolean | ((input: string, option: SelectOption) => boolean);
2102
+ mode?: 'multiple' | 'tags';
2103
+ variant?: string;
2104
+ suffixIcon?: React_2.ReactNode;
2105
+ popupMatchSelectWidth?: boolean | number;
2106
+ tokenSeparators?: string[];
2107
+ maxCount?: number;
2108
+ overlayClassName?: string;
2109
+ needConfirm?: boolean;
2110
+ className?: string;
2111
+ style?: React_2.CSSProperties;
2112
+ }
2113
+
2114
+ declare type SetDecisionGraphOptions = {
2115
+ skipOnChangeEvent?: boolean;
2116
+ };
2117
+
2118
+ export declare type Simulation = {
2119
+ result?: SimulationOk;
2120
+ } & {
2121
+ error?: SimulationError;
2122
+ };
2123
+
2124
+ export declare type SimulationError = {
2125
+ title?: string;
2126
+ message?: string;
2127
+ data: {
2128
+ nodeId?: string;
2129
+ };
2130
+ };
2131
+
2132
+ export declare type SimulationOk = {
2133
+ performance: string;
2134
+ result: Output;
2135
+ snapshot: DecisionGraphType;
2136
+ trace: Record<string, SimulationTrace>;
2137
+ };
2138
+
2139
+ export declare type SimulationTrace<Trace = TraceDataVariants> = {
2140
+ input: Input | null;
2141
+ output: Output | null;
2142
+ name: string;
2143
+ id: string;
2144
+ performance: string | null;
2145
+ traceData: Trace | null;
2146
+ order?: number;
2147
+ };
2148
+
2149
+ export declare type SimulationTraceDataExpression = Arrayable<Record<string, {
2150
+ result: unknown;
2151
+ }>>;
2152
+
2153
+ export declare type SimulationTraceDataFunction = {
2154
+ log?: TraceFunctionLog[];
2155
+ };
2156
+
2157
+ export declare type SimulationTraceDataSwitch = {
2158
+ statements: {
2159
+ id: string;
2160
+ }[];
2161
+ };
2162
+
2163
+ export declare type SimulationTraceDataTable = SimulationTraceDataTableSingle | SimulationTraceDataTableSingle[];
2164
+
2165
+ declare type SimulationTraceDataTableSingle = {
2166
+ index: number;
2167
+ reference_map: Record<string, unknown>;
2168
+ rule: Record<string, string>;
2169
+ };
2170
+
2171
+ export declare const SimulatorEditor: default_2.FC<SimulatorEditorProps>;
2172
+
2173
+ declare type SimulatorEditorProps = {
2174
+ value?: string;
2175
+ onChange?: (value: string | undefined) => void;
2176
+ readOnly?: boolean;
2177
+ };
2178
+
2179
+ declare type SimulatorExampleBinding = {
2180
+ nodeId: string;
2181
+ sourceIndex: number;
2182
+ sourceName?: string;
2183
+ } | null;
2184
+
2185
+ declare type SimulatorRequestPanelProps = {
2186
+ defaultRequest?: string;
2187
+ onChange?: (contextJson: string) => void;
2188
+ hasInputNode?: boolean;
2189
+ loading?: boolean;
2190
+ onRun?: (payload: {
2191
+ graph: DecisionGraphType;
2192
+ context: unknown;
2193
+ }) => void;
2194
+ };
2195
+
2196
+ export declare type Slice<T = unknown> = {
2197
+ serialize: () => T;
2198
+ restore: (state: T) => void;
2199
+ };
2200
+
2201
+ declare type SpaceProps = React_2.HTMLAttributes<HTMLDivElement> & {
2202
+ size?: number | [number, number] | 'small' | 'middle' | 'large';
2203
+ direction?: 'horizontal' | 'vertical';
2204
+ wrap?: boolean;
2205
+ };
2206
+
2207
+ declare type SplitPath<Path extends string, Obj> = Path extends `${infer Prefix}.${infer Rest}` ? {
2208
+ [K in Prefix]: SplitPath<Rest, Obj>;
2209
+ } : {
2210
+ [K in Path]: Obj;
2211
+ };
2212
+
2213
+ export declare const stringifyRequestSchemaValue: (schema?: unknown) => string;
2214
+
2215
+ export declare const switchNodeSchema: z.ZodObject<{
2216
+ type: z.ZodLiteral<NodeKind.Switch>;
2217
+ content: z.ZodObject<{
2218
+ hitPolicy: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2219
+ first: "first";
2220
+ collect: "collect";
2221
+ }>>>, z.ZodTransform<"first" | "collect", "first" | "collect" | null | undefined>>;
2222
+ statements: z.ZodArray<z.ZodObject<{
2223
+ id: z.ZodDefault<z.ZodString>;
2224
+ condition: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
2225
+ isDefault: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
2226
+ }, z.core.$strip>>;
2227
+ }, z.core.$strip>;
2228
+ id: z.ZodDefault<z.ZodString>;
2229
+ name: z.ZodString;
2230
+ position: z.ZodDefault<z.ZodObject<{
2231
+ x: z.ZodNumber;
2232
+ y: z.ZodNumber;
2233
+ }, z.core.$strip>>;
2234
+ }, z.core.$strip>;
2235
+
2236
+ declare interface SwitchProps {
2237
+ checked?: boolean;
2238
+ defaultChecked?: boolean;
2239
+ disabled?: boolean;
2240
+ size?: 'default' | 'small';
2241
+ className?: string;
2242
+ style?: React_2.CSSProperties;
2243
+ onChange?: (checked: boolean) => void;
2244
+ checkedChildren?: React_2.ReactNode;
2245
+ unCheckedChildren?: React_2.ReactNode;
2246
+ }
2247
+
2248
+ declare type SwitchStatement = {
2249
+ id: string;
2250
+ condition?: string;
2251
+ isDefault?: boolean;
2252
+ } & Diff;
2253
+
2254
+ export declare type TabCustomFunctionProps = {
2255
+ id: string;
2256
+ user?: string;
2257
+ customFunctions?: any;
2258
+ };
2259
+
2260
+ declare type TableCellProps = {
2261
+ column?: ({
2262
+ colType: string;
2263
+ } & TableSchemaItem) | undefined;
2264
+ value: string;
2265
+ diff?: DiffMetadata | undefined;
2266
+ onChange: (value: string) => void;
2267
+ disabled?: boolean;
2268
+ index: number;
2269
+ };
2270
+
2271
+ declare type TableCursor = {
2272
+ x: string;
2273
+ y: number;
2274
+ };
2275
+
2276
+ export declare type TableSchemaItem = {
2277
+ id: string;
2278
+ name: string;
2279
+ field?: string;
2280
+ defaultValue?: string;
2281
+ fieldType?: ColumnFieldType;
2282
+ outputFieldType?: OutputFieldType;
2283
+ _diff?: DiffMetadata;
2284
+ };
2285
+
2286
+ export declare type TableScrollApi = {
2287
+ getTopRowIndex: () => number;
2288
+ scrollToRowIndex: (index: number) => void;
2289
+ };
2290
+
2291
+ export declare const TabRequest: default_2.FC<TabRequestProps>;
2292
+
2293
+ export declare type TabRequestProps = {
2294
+ id: string;
2295
+ manager?: DragDropManager;
2296
+ menuList?: unknown[];
2297
+ type?: string;
2298
+ };
2299
+
2300
+ declare interface TabsItemType {
2301
+ key: string;
2302
+ label: React_2.ReactNode;
2303
+ children?: React_2.ReactNode;
2304
+ disabled?: boolean;
2305
+ }
2306
+
2307
+ export declare type TabSnapshot = Record<string, unknown>;
2308
+
2309
+ declare interface TabsProps {
2310
+ items?: TabsItemType[];
2311
+ activeKey?: string;
2312
+ defaultActiveKey?: string;
2313
+ onChange?: (key: string) => void;
2314
+ type?: 'line' | 'card' | 'editable-card';
2315
+ size?: 'large' | 'middle' | 'small';
2316
+ className?: string;
2317
+ rootClassName?: string;
2318
+ style?: React_2.CSSProperties;
2319
+ tabBarExtraContent?: React_2.ReactNode;
2320
+ }
2321
+
2322
+ declare type TextInput = {
2323
+ control: 'text';
2324
+ label?: string;
2325
+ };
2326
+
2327
+ export declare type ThemeConfig = {
2328
+ mode?: 'light' | 'dark';
2329
+ token?: Record<string, unknown>;
2330
+ [key: string]: unknown;
2331
+ };
2332
+
2333
+ declare type ThemeSeeds = {
2334
+ primary?: string;
2335
+ success?: string;
2336
+ error?: string;
2337
+ warning?: string;
2338
+ info?: string;
2339
+ fieldInput?: string;
2340
+ fieldOutput?: string;
2341
+ };
2342
+
2343
+ export declare const ToolbarAnchor: default_2.FC<{
2344
+ items?: ToolbarItem[];
2345
+ }>;
2346
+
2347
+ export declare type ToolbarItem = {
2348
+ id: string;
2349
+ group?: string;
2350
+ order?: number;
2351
+ render: (ctx: {
2352
+ disabled: boolean;
2353
+ }) => default_2.ReactNode;
2354
+ };
2355
+
2356
+ declare type TraceDataVariants = SimulationTraceDataTable | SimulationTraceDataFunction | SimulationTraceDataExpression | SimulationTraceDataSwitch | null;
2357
+
2358
+ declare type TraceFunctionLog = {
2359
+ lines: string[];
2360
+ msSinceRun: number;
2361
+ };
2362
+
2363
+ declare type TranslationKey = keyof typeof en;
2364
+
2365
+ export declare const updateRequestSchemaExamples: (schemaValue: unknown, examples: Array<Record<string, unknown>>, examplesMeta?: RequestExampleMeta[]) => string;
2366
+
2367
+ export declare function useDecisionGraphActions(): DecisionGraphStoreType['actions'];
2368
+
2369
+ export declare function useDecisionGraphListeners<T>(selector: (state: DecisionGraphStoreType['listeners']) => T, equals?: (a: any, b: any) => boolean): T;
2370
+
2371
+ export declare function useDecisionGraphRaw(): {
2372
+ stateStore: ExposedStore<DecisionGraphStoreType["state"]>;
2373
+ listenerStore: ExposedStore<DecisionGraphStoreType["listeners"]>;
2374
+ referenceStore: ExposedStore<DecisionGraphStoreType["references"]>;
2375
+ actions: DecisionGraphStoreType["actions"];
2376
+ };
2377
+
2378
+ export declare function useDecisionGraphReferences<T>(selector: (state: DecisionGraphStoreType['references']) => T, equals?: (a: any, b: any) => boolean): T;
2379
+
2380
+ export declare function useDecisionGraphState<T>(selector: (state: DecisionGraphStoreType['state']) => T, equals?: (a: any, b: any) => boolean): T;
2381
+
2382
+ export declare const useDictionaries: () => DictionaryMap;
2383
+
2384
+ export declare const useEdgeDiff: (id: string) => {
2385
+ diff: {
2386
+ status: DiffStatus;
2387
+ } | undefined;
2388
+ };
2389
+
2390
+ declare const useGraphClipboard: (reactFlow: RefObject<ReactFlowInstance | null>, wrapper: RefObject<HTMLDivElement | null>) => {
2391
+ copyNodes: (nodes: Node_2[]) => Promise<void>;
2392
+ pasteNodes: () => Promise<void>;
2393
+ };
2394
+
2395
+ export declare function useGraphSerializer<T = unknown>(key: string | null | undefined, slice: Slice<T>, deps?: default_2.DependencyList): void;
2396
+
2397
+ export declare const useNodeDiff: (id: string) => {
2398
+ diff: {
2399
+ status: DiffStatus;
2400
+ fields?: Record<string, DiffMetadata>;
2401
+ } | undefined;
2402
+ contentDiff: any;
2403
+ };
2404
+
2405
+ export declare const useNodeType: (id: string, { attachGlobals, disabled }?: NodeTypeParams) => VariableType | undefined;
2406
+
2407
+ export declare const usePersistentState: <S>(key: string, defaultValue?: S) => [S | undefined, Dispatch<SetStateAction<S | undefined>>];
2408
+
2409
+ declare type UserResolver = () => Promise<{
2410
+ user?: string;
2411
+ }> | null;
2412
+
2413
+ export declare const useSimulatorAutoSync: ({ enabled, requestValue, requestSourcesSignature, boundRequestSourceIndex, onSyncToSchema, onPushToEditor, debounceMs, }: UseSimulatorAutoSyncParams) => {
2414
+ flush: () => void;
2415
+ };
2416
+
2417
+ export declare type UseSimulatorAutoSyncParams = {
2418
+ enabled: boolean;
2419
+ requestValue: string | undefined;
2420
+ requestSourcesSignature: string;
2421
+ boundRequestSourceIndex: number;
2422
+ onSyncToSchema: () => void;
2423
+ onPushToEditor: () => void;
2424
+ debounceMs?: number;
2425
+ };
2426
+
2427
+ export declare const useT: () => ((key: TranslationKey | string, params?: InterpolationParams) => string);
2428
+
2429
+ export declare function useTabSerializer<T = unknown>(tabId: string | null | undefined, key: string | null | undefined, slice: Slice<T>, deps?: default_2.DependencyList): void;
2430
+
2431
+ export declare const useThemeMode: () => "light" | "dark";
2432
+
2433
+ export declare const useWasmReady: () => boolean;
2434
+
2435
+ export declare const validationSchema: z.ZodObject<{
2436
+ inputSchema: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodAny>>>;
2437
+ outputSchema: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodAny>>>;
2438
+ }, z.core.$strip>;
2439
+
2440
+ declare type ViewConfig = {
2441
+ enabled: boolean;
2442
+ description?: string;
2443
+ permissions?: Record<string, ViewConfigPermission | null | undefined> | null;
2444
+ };
2445
+
2446
+ declare type ViewConfigPermission = 'edit:values' | 'edit:rules' | 'edit:full';
2447
+
2448
+ export { }
2449
+
2450
+
2451
+ declare global {
2452
+ interface Window {
2453
+ monaco?: Monaco;
2454
+ }
2455
+ }
2456
+
2457
+
2458
+ declare module '@gorules/zen-engine-wasm' {
2459
+ interface VariableType {
2460
+ __hash: string;
2461
+ }
2462
+ }
2463
+
2464
+
2465
+ declare namespace ContextMenuSub {
2466
+ var displayName: string;
2467
+ }
2468
+
2469
+ declare namespace console {
2470
+ function log(...args: any[]): void;
2471
+ async function sleep(durationMs: number): Promise<void>;
2472
+ }
2473
+
2474
+
2475
+
2476
+ declare namespace errorUtil {
2477
+ type ErrMessage =
2478
+ | string
2479
+ | {
2480
+ message?: string;
2481
+ };
2482
+ const errToObj: (message?: ErrMessage | undefined) => {
2483
+ message?: string | undefined;
2484
+ };
2485
+ const toString: (message?: ErrMessage | undefined) => string | undefined;
2486
+ }
2487
+
2488
+
2489
+
2490
+ declare namespace partialUtil {
2491
+ type DeepPartial<T extends ZodTypeAny> =
2492
+ T extends ZodObject<ZodRawShape>
2493
+ ? ZodObject<
2494
+ {
2495
+ [k in keyof T['shape']]: ZodOptional<DeepPartial<T['shape'][k]>>;
2496
+ },
2497
+ T['_def']['unknownKeys'],
2498
+ T['_def']['catchall']
2499
+ >
2500
+ : T extends ZodArray<infer Type, infer Card>
2501
+ ? ZodArray<DeepPartial<Type>, Card>
2502
+ : T extends ZodOptional<infer Type>
2503
+ ? ZodOptional<DeepPartial<Type>>
2504
+ : T extends ZodNullable<infer Type>
2505
+ ? ZodNullable<DeepPartial<Type>>
2506
+ : T extends ZodTuple<infer Items>
2507
+ ? {
2508
+ [k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
2509
+ } extends infer PI
2510
+ ? PI extends ZodTupleItems
2511
+ ? ZodTuple<PI>
2512
+ : never
2513
+ : never
2514
+ : T;
2515
+ }