@elqnt/workflow 1.0.8 → 2.0.5

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.
package/dist/index.js CHANGED
@@ -1,207 +1,159 @@
1
- "use client";
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // index.tsx
22
- var index_exports = {};
23
- __export(index_exports, {
24
- AccountingNodeSubTypes: () => AccountingNodeSubTypes,
25
- ActionNodeSubTypes: () => ActionNodeSubTypes,
26
- AgentNodeSubTypes: () => AgentNodeSubTypes,
27
- DataNodeSubTypes: () => DataNodeSubTypes,
28
- DelayNodeSubTypes: () => DelayNodeSubTypes,
29
- DynamicSchemaForm: () => DynamicSchemaForm,
30
- EdgeStatusCompleted: () => EdgeStatusCompleted,
31
- EdgeStatusPending: () => EdgeStatusPending,
32
- EdgeStatusSkipped: () => EdgeStatusSkipped,
33
- EdgeTypeCompensation: () => EdgeTypeCompensation,
34
- EdgeTypeConditional: () => EdgeTypeConditional,
35
- EdgeTypeDefault: () => EdgeTypeDefault,
36
- EdgeTypeError: () => EdgeTypeError,
37
- EdgeTypeLoopBack: () => EdgeTypeLoopBack,
38
- EdgeTypeMerge: () => EdgeTypeMerge,
39
- EdgeTypeNormal: () => EdgeTypeNormal,
40
- EdgeTypeParallel: () => EdgeTypeParallel,
41
- EdgeTypeTimeout: () => EdgeTypeTimeout,
42
- ExpressionTypeDSL: () => ExpressionTypeDSL,
43
- ExpressionTypeFilter: () => ExpressionTypeFilter,
44
- ExpressionTypeJavaScript: () => ExpressionTypeJavaScript,
45
- ExpressionTypeRules: () => ExpressionTypeRules,
46
- ExpressionTypeTemplate: () => ExpressionTypeTemplate,
47
- HumanActionNodeSubTypes: () => HumanActionNodeSubTypes,
48
- InstanceStatusCompleted: () => InstanceStatusCompleted,
49
- InstanceStatusFailed: () => InstanceStatusFailed,
50
- InstanceStatusNew: () => InstanceStatusNew,
51
- InstanceStatusPaused: () => InstanceStatusPaused,
52
- InstanceStatusRunning: () => InstanceStatusRunning,
53
- InstanceStatusWaiting: () => InstanceStatusWaiting,
54
- LogicNodeSubTypes: () => LogicNodeSubTypes,
55
- LoopNodeSubTypes: () => LoopNodeSubTypes,
56
- NodeStatusCompleted: () => NodeStatusCompleted,
57
- NodeStatusFailed: () => NodeStatusFailed,
58
- NodeStatusPending: () => NodeStatusPending,
59
- NodeStatusRunning: () => NodeStatusRunning,
60
- NodeStatusSkipped: () => NodeStatusSkipped,
61
- NodeStatusWaiting: () => NodeStatusWaiting,
62
- NodeSubTypeActionApiCall: () => NodeSubTypeActionApiCall,
63
- NodeSubTypeActionAssignSLAPolicy: () => NodeSubTypeActionAssignSLAPolicy,
64
- NodeSubTypeActionCSATSurvey: () => NodeSubTypeActionCSATSurvey,
65
- NodeSubTypeActionChangeSLAStatus: () => NodeSubTypeActionChangeSLAStatus,
66
- NodeSubTypeActionCreateEntityRecord: () => NodeSubTypeActionCreateEntityRecord,
67
- NodeSubTypeActionDeleteEntityRecord: () => NodeSubTypeActionDeleteEntityRecord,
68
- NodeSubTypeActionDocumentExtraction: () => NodeSubTypeActionDocumentExtraction,
69
- NodeSubTypeActionEscalateSLA: () => NodeSubTypeActionEscalateSLA,
70
- NodeSubTypeActionGenerateDocument: () => NodeSubTypeActionGenerateDocument,
71
- NodeSubTypeActionMergeEntityRecords: () => NodeSubTypeActionMergeEntityRecords,
72
- NodeSubTypeActionNatsRequest: () => NodeSubTypeActionNatsRequest,
73
- NodeSubTypeActionProcessPayment: () => NodeSubTypeActionProcessPayment,
74
- NodeSubTypeActionQueryEntityRecords: () => NodeSubTypeActionQueryEntityRecords,
75
- NodeSubTypeActionSendEmail: () => NodeSubTypeActionSendEmail,
76
- NodeSubTypeActionSendSMS: () => NodeSubTypeActionSendSMS,
77
- NodeSubTypeActionSetVariables: () => NodeSubTypeActionSetVariables,
78
- NodeSubTypeActionUpdateEntityRecord: () => NodeSubTypeActionUpdateEntityRecord,
79
- NodeSubTypeAgentApiIntegration: () => NodeSubTypeAgentApiIntegration,
80
- NodeSubTypeAgentChat: () => NodeSubTypeAgentChat,
81
- NodeSubTypeAgentClientApiCall: () => NodeSubTypeAgentClientApiCall,
82
- NodeSubTypeAgentCustomResponse: () => NodeSubTypeAgentCustomResponse,
83
- NodeSubTypeAgentIntentDetector: () => NodeSubTypeAgentIntentDetector,
84
- NodeSubTypeAgentKnowledgeGraph: () => NodeSubTypeAgentKnowledgeGraph,
85
- NodeSubTypeAgentOpenTicket: () => NodeSubTypeAgentOpenTicket,
86
- NodeSubTypeAgentStructuredOutput: () => NodeSubTypeAgentStructuredOutput,
87
- NodeSubTypeAgentTransferToHuman: () => NodeSubTypeAgentTransferToHuman,
88
- NodeSubTypeDataCalculate: () => NodeSubTypeDataCalculate,
89
- NodeSubTypeDataFilter: () => NodeSubTypeDataFilter,
90
- NodeSubTypeDataMap: () => NodeSubTypeDataMap,
91
- NodeSubTypeDataValidate: () => NodeSubTypeDataValidate,
92
- NodeSubTypeDelay: () => NodeSubTypeDelay,
93
- NodeSubTypeHumanActionApproval: () => NodeSubTypeHumanActionApproval,
94
- NodeSubTypeHumanActionAssignment: () => NodeSubTypeHumanActionAssignment,
95
- NodeSubTypeHumanActionDataEntry: () => NodeSubTypeHumanActionDataEntry,
96
- NodeSubTypeHumanActionReview: () => NodeSubTypeHumanActionReview,
97
- NodeSubTypeLogicFor: () => NodeSubTypeLogicFor,
98
- NodeSubTypeLogicIf: () => NodeSubTypeLogicIf,
99
- NodeSubTypeLogicParallel: () => NodeSubTypeLogicParallel,
100
- NodeSubTypeLogicSwitch: () => NodeSubTypeLogicSwitch,
101
- NodeSubTypeLoopData: () => NodeSubTypeLoopData,
102
- NodeSubTypeTimerBusinessHours: () => NodeSubTypeTimerBusinessHours,
103
- NodeSubTypeTimerDelay: () => NodeSubTypeTimerDelay,
104
- NodeSubTypeTimerSchedule: () => NodeSubTypeTimerSchedule,
105
- NodeSubTypeTriggerEntityRecordCreated: () => NodeSubTypeTriggerEntityRecordCreated,
106
- NodeSubTypeTriggerEntityRecordDeleted: () => NodeSubTypeTriggerEntityRecordDeleted,
107
- NodeSubTypeTriggerEntityRecordUpdated: () => NodeSubTypeTriggerEntityRecordUpdated,
108
- NodeSubTypeTriggerEscalation: () => NodeSubTypeTriggerEscalation,
109
- NodeSubTypeTriggerSLABreach: () => NodeSubTypeTriggerSLABreach,
110
- NodeSubTypeTriggerSLAWarning: () => NodeSubTypeTriggerSLAWarning,
111
- NodeSubTypeTriggerStart: () => NodeSubTypeTriggerStart,
112
- NodeSubTypeTriggerWebhookReceived: () => NodeSubTypeTriggerWebhookReceived,
113
- NodeTypeAccounting: () => NodeTypeAccounting,
114
- NodeTypeAction: () => NodeTypeAction,
115
- NodeTypeAgent: () => NodeTypeAgent,
116
- NodeTypeCustom: () => NodeTypeCustom,
117
- NodeTypeData: () => NodeTypeData,
118
- NodeTypeDelay: () => NodeTypeDelay,
119
- NodeTypeHumanAction: () => NodeTypeHumanAction,
120
- NodeTypeIntegration: () => NodeTypeIntegration,
121
- NodeTypeLogic: () => NodeTypeLogic,
122
- NodeTypeLoop: () => NodeTypeLoop,
123
- NodeTypeParallel: () => NodeTypeParallel,
124
- NodeTypeSubflow: () => NodeTypeSubflow,
125
- NodeTypeTimer: () => NodeTypeTimer,
126
- NodeTypeTrigger: () => NodeTypeTrigger,
127
- ParallelNodeSubTypes: () => ParallelNodeSubTypes,
128
- PersistenceTypeEphemeral: () => PersistenceTypeEphemeral,
129
- PersistenceTypePermanent: () => PersistenceTypePermanent,
130
- RuleLevelError: () => RuleLevelError,
131
- RuleLevelInfo: () => RuleLevelInfo,
132
- RuleLevelWarning: () => RuleLevelWarning,
133
- SchemaBuilder: () => SchemaBuilder,
134
- TimeoutActionAlt: () => TimeoutActionAlt,
135
- TimeoutActionFail: () => TimeoutActionFail,
136
- TimeoutActionRetry: () => TimeoutActionRetry,
137
- TimeoutActionSkip: () => TimeoutActionSkip,
138
- TimerNodeSubTypes: () => TimerNodeSubTypes,
139
- TriggerNodeSubTypes: () => TriggerNodeSubTypes,
140
- WorkflowDefinitionContext: () => WorkflowDefinitionContext,
141
- WorkflowDefinitionCreate: () => WorkflowDefinitionCreate,
142
- WorkflowDefinitionCreated: () => WorkflowDefinitionCreated,
143
- WorkflowDefinitionDelete: () => WorkflowDefinitionDelete,
144
- WorkflowDefinitionDeleted: () => WorkflowDefinitionDeleted,
145
- WorkflowDefinitionGet: () => WorkflowDefinitionGet,
146
- WorkflowDefinitionGetByTitle: () => WorkflowDefinitionGetByTitle,
147
- WorkflowDefinitionGetServer: () => WorkflowDefinitionGetServer,
148
- WorkflowDefinitionList: () => WorkflowDefinitionList,
149
- WorkflowDefinitionProvider: () => WorkflowDefinitionProvider,
150
- WorkflowDefinitionUpdate: () => WorkflowDefinitionUpdate,
151
- WorkflowDefinitionUpdated: () => WorkflowDefinitionUpdated,
152
- WorkflowEdgeTypes: () => WorkflowEdgeTypes,
153
- WorkflowExecutionCompleted: () => WorkflowExecutionCompleted,
154
- WorkflowExecutionFailed: () => WorkflowExecutionFailed,
155
- WorkflowExecutionStarted: () => WorkflowExecutionStarted,
156
- WorkflowInstanceContext: () => WorkflowInstanceContext,
157
- WorkflowInstanceCreate: () => WorkflowInstanceCreate,
158
- WorkflowInstanceExecuteNode: () => WorkflowInstanceExecuteNode,
159
- WorkflowInstanceExecuteNodeLean: () => WorkflowInstanceExecuteNodeLean,
160
- WorkflowInstanceExecuteNodeLeanServer: () => WorkflowInstanceExecuteNodeLeanServer,
161
- WorkflowInstanceExecuteNodeServer: () => WorkflowInstanceExecuteNodeServer,
162
- WorkflowInstanceGet: () => WorkflowInstanceGet,
163
- WorkflowInstanceList: () => WorkflowInstanceList,
164
- WorkflowInstanceProvider: () => WorkflowInstanceProvider,
165
- WorkflowInstanceResumeNode: () => WorkflowInstanceResumeNode,
166
- WorkflowInstanceResumeNodeServer: () => WorkflowInstanceResumeNodeServer,
167
- WorkflowInstanceUpdate: () => WorkflowInstanceUpdate,
168
- WorkflowInstanceUpdateNodeMetadata: () => WorkflowInstanceUpdateNodeMetadata,
169
- WorkflowInstanceUpdated: () => WorkflowInstanceUpdated,
170
- WorkflowNodeTypes: () => WorkflowNodeTypes,
171
- WorkflowScheduleCreate: () => WorkflowScheduleCreate,
172
- WorkflowScheduleDelete: () => WorkflowScheduleDelete,
173
- WorkflowScheduleList: () => WorkflowScheduleList,
174
- WorkflowSchedulePause: () => WorkflowSchedulePause,
175
- WorkflowScheduleResume: () => WorkflowScheduleResume,
176
- WorkflowScheduleUpdate: () => WorkflowScheduleUpdate,
177
- WorkflowTemplateGet: () => WorkflowTemplateGet,
178
- WorkflowTemplateInstantiate: () => WorkflowTemplateInstantiate,
179
- WorkflowTemplateList: () => WorkflowTemplateList,
180
- WorkflowTriggerFired: () => WorkflowTriggerFired,
181
- WorkflowTriggerPause: () => WorkflowTriggerPause,
182
- WorkflowTriggerRegister: () => WorkflowTriggerRegister,
183
- WorkflowTriggerResume: () => WorkflowTriggerResume,
184
- WorkflowTriggerStatus: () => WorkflowTriggerStatus,
185
- WorkflowTypeAgent: () => WorkflowTypeAgent,
186
- WorkflowTypeChat: () => WorkflowTypeChat,
187
- WorkflowTypeDocument: () => WorkflowTypeDocument,
188
- WorkflowTypeEntity: () => WorkflowTypeEntity,
189
- WorkflowTypeProductivity: () => WorkflowTypeProductivity,
190
- WorkflowTypes: () => WorkflowTypes,
191
- nodeDefinitions: () => nodeDefinitions,
192
- nodeSchemas: () => nodeSchemas,
193
- useWorkflowDefinition: () => useWorkflowDefinition,
194
- useWorkflowDefinitionContext: () => useWorkflowDefinitionContext,
195
- useWorkflowInstance: () => useWorkflowInstance,
196
- useWorkflowInstanceContext: () => useWorkflowInstanceContext,
197
- workflowDefinitionReducer: () => workflowDefinitionReducer,
198
- workflowInstanceReducer: () => workflowInstanceReducer
199
- });
200
- module.exports = __toCommonJS(index_exports);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ var _chunkH24IF5AAjs = require('./chunk-H24IF5AA.js');
201
153
 
202
154
  // components/dynamic-schema-form.tsx
203
- var import_react = require("react");
204
- var import_jsx_runtime = require("react/jsx-runtime");
155
+ var _react = require('react');
156
+ var _jsxruntime = require('react/jsx-runtime');
205
157
  function DynamicSchemaForm({
206
158
  schema,
207
159
  value = {},
@@ -212,16 +164,16 @@ function DynamicSchemaForm({
212
164
  variables = [],
213
165
  showVariablePicker = false
214
166
  }) {
215
- const [collapsedSections, setCollapsedSections] = (0, import_react.useState)(
167
+ const [collapsedSections, setCollapsedSections] = _react.useState.call(void 0,
216
168
  /* @__PURE__ */ new Set()
217
169
  );
218
- const [openVariablePickers, setOpenVariablePickers] = (0, import_react.useState)(
170
+ const [openVariablePickers, setOpenVariablePickers] = _react.useState.call(void 0,
219
171
  /* @__PURE__ */ new Set()
220
172
  );
221
- const [openRichTextDialogs, setOpenRichTextDialogs] = (0, import_react.useState)(
173
+ const [openRichTextDialogs, setOpenRichTextDialogs] = _react.useState.call(void 0,
222
174
  /* @__PURE__ */ new Set()
223
175
  );
224
- const [richTextDraftValues, setRichTextDraftValues] = (0, import_react.useState)({});
176
+ const [richTextDraftValues, setRichTextDraftValues] = _react.useState.call(void 0, {});
225
177
  const {
226
178
  Input,
227
179
  Label,
@@ -291,7 +243,7 @@ function DynamicSchemaForm({
291
243
  const isOpen = openVariablePickers.has(fieldPath);
292
244
  const currentValue = value[fieldName];
293
245
  const isVariable = isVariableReference(currentValue);
294
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
246
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
295
247
  Popover,
296
248
  {
297
249
  open: isOpen,
@@ -307,7 +259,7 @@ function DynamicSchemaForm({
307
259
  }
308
260
  },
309
261
  children: [
310
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
262
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
311
263
  Button,
312
264
  {
313
265
  type: "button",
@@ -318,23 +270,23 @@ function DynamicSchemaForm({
318
270
  isVariable && "border-primary text-primary"
319
271
  ),
320
272
  disabled,
321
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VariableIcon, { className: "h-3.5 w-3.5" })
273
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VariableIcon, { className: "h-3.5 w-3.5" })
322
274
  }
323
275
  ) }),
324
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PopoverContent, { className: "w-56 p-1", align: "end", children: [
325
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-xs font-medium text-muted-foreground px-2 py-1.5", children: [
276
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PopoverContent, { className: "w-56 p-1", align: "end", children: [
277
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-xs font-medium text-muted-foreground px-2 py-1.5", children: [
326
278
  "Select Variable (",
327
279
  fieldType || "any",
328
280
  ")"
329
281
  ] }),
330
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "max-h-48 overflow-y-auto", children: matchingVars.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-2 py-3 text-xs text-muted-foreground text-center", children: [
282
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-h-48 overflow-y-auto", children: matchingVars.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "px-2 py-3 text-xs text-muted-foreground text-center", children: [
331
283
  "No variables available.",
332
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
333
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[10px]", children: "Add variables in Workflow Settings \u2192 Variables" })
284
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "br", {}),
285
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[10px]", children: "Add variables in Workflow Settings \u2192 Variables" })
334
286
  ] }) : matchingVars.map((variable) => {
335
287
  const varRef = `{{${variable.path}}}`;
336
288
  const isSelected = currentValue === varRef;
337
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
289
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
338
290
  "button",
339
291
  {
340
292
  type: "button",
@@ -351,11 +303,11 @@ function DynamicSchemaForm({
351
303
  });
352
304
  },
353
305
  children: [
354
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
355
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "font-medium", children: variable.title || variable.name }),
356
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-[10px] text-muted-foreground font-mono", children: variable.path })
306
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
307
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: variable.title || variable.name }),
308
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-[10px] text-muted-foreground font-mono", children: variable.path })
357
309
  ] }),
358
- isSelected && CheckIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckIcon, { className: "h-3 w-3" })
310
+ isSelected && CheckIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CheckIcon, { className: "h-3 w-3" })
359
311
  ]
360
312
  },
361
313
  variable.path
@@ -385,50 +337,50 @@ function DynamicSchemaForm({
385
337
  };
386
338
  const renderField = (fieldSchema, fieldName, fieldValue) => {
387
339
  const fieldPath = [...path, fieldName].join(".");
388
- const isRequired = schema.required?.includes(fieldName);
340
+ const isRequired = _optionalChain([schema, 'access', _2 => _2.required, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4(fieldName)]);
389
341
  if (fieldSchema.enum) {
390
342
  const labels = fieldSchema["x-enumLabels"] || fieldSchema.enum;
391
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
392
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { className: "text-xs font-medium", children: [
343
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
344
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
393
345
  fieldSchema.title || fieldName,
394
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
346
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
395
347
  ] }),
396
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
348
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
397
349
  Select,
398
350
  {
399
351
  value: fieldValue || "",
400
352
  onValueChange: (v) => handleFieldChange(fieldName, v),
401
353
  disabled,
402
354
  children: [
403
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
355
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
404
356
  SelectValue,
405
357
  {
406
358
  placeholder: `Select ${fieldSchema.title || fieldName}`
407
359
  }
408
360
  ) }),
409
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectContent, { children: fieldSchema.enum.map((option, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItem, { value: option, className: "text-xs", children: labels[idx] || option }, option)) })
361
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: fieldSchema.enum.map((option, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: option, className: "text-xs", children: labels[idx] || option }, option)) })
410
362
  ]
411
363
  }
412
364
  ),
413
- fieldSchema.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
365
+ fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
414
366
  ] }, fieldPath);
415
367
  }
416
368
  if (fieldSchema.type === "object" && fieldSchema.properties) {
417
369
  const isCollapsed = collapsedSections.has(fieldPath);
418
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
419
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
370
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
371
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
420
372
  "button",
421
373
  {
422
374
  type: "button",
423
375
  onClick: () => toggleSection(fieldPath),
424
376
  className: "flex items-center gap-1 text-xs font-medium text-gray-700 hover:text-gray-900",
425
377
  children: [
426
- isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronRightIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDownIcon, { className: "h-3 w-3" }),
378
+ isCollapsed ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronRightIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronDownIcon, { className: "h-3 w-3" }),
427
379
  fieldSchema.title || fieldName
428
380
  ]
429
381
  }
430
382
  ),
431
- !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, { className: "p-3 bg-gray-50/50", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
383
+ !isCollapsed && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "p-3 bg-gray-50/50", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
432
384
  DynamicSchemaForm,
433
385
  {
434
386
  schema: fieldSchema,
@@ -446,13 +398,13 @@ function DynamicSchemaForm({
446
398
  if (fieldSchema.type === "array" && fieldSchema.items) {
447
399
  const arrayValue = Array.isArray(fieldValue) ? fieldValue : [];
448
400
  const itemSchema = fieldSchema.items;
449
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
450
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
451
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { className: "text-xs font-medium", children: [
401
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
402
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
403
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
452
404
  fieldSchema.title || fieldName,
453
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
405
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
454
406
  ] }),
455
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
407
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
456
408
  Button,
457
409
  {
458
410
  type: "button",
@@ -465,15 +417,15 @@ function DynamicSchemaForm({
465
417
  },
466
418
  disabled,
467
419
  children: [
468
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PlusIcon, { className: "h-3 w-3 mr-1" }),
420
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-3 w-3 mr-1" }),
469
421
  "Add"
470
422
  ]
471
423
  }
472
424
  )
473
425
  ] }),
474
- fieldSchema.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description }),
475
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-2", children: arrayValue.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-2 items-start", children: [
476
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1", children: itemSchema.type === "object" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, { className: "p-2 bg-gray-50/50", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
426
+ fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description }),
427
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-2", children: arrayValue.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2 items-start", children: [
428
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: itemSchema.type === "object" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "p-2 bg-gray-50/50", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
477
429
  DynamicSchemaForm,
478
430
  {
479
431
  schema: itemSchema,
@@ -489,7 +441,7 @@ function DynamicSchemaForm({
489
441
  variables,
490
442
  showVariablePicker
491
443
  }
492
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
444
+ ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
493
445
  Input,
494
446
  {
495
447
  value: item || "",
@@ -502,7 +454,7 @@ function DynamicSchemaForm({
502
454
  className: "h-8 text-xs"
503
455
  }
504
456
  ) }),
505
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
506
458
  Button,
507
459
  {
508
460
  type: "button",
@@ -516,15 +468,15 @@ function DynamicSchemaForm({
516
468
  handleFieldChange(fieldName, newArray);
517
469
  },
518
470
  disabled,
519
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TrashIcon, { className: "h-3 w-3" })
471
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-3 w-3" })
520
472
  }
521
473
  )
522
474
  ] }, index)) })
523
475
  ] }, fieldPath);
524
476
  }
525
477
  if (fieldSchema.type === "boolean") {
526
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center space-x-2", children: [
527
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
478
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center space-x-2", children: [
479
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
528
480
  Checkbox,
529
481
  {
530
482
  id: fieldPath,
@@ -533,11 +485,11 @@ function DynamicSchemaForm({
533
485
  disabled
534
486
  }
535
487
  ),
536
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { htmlFor: fieldPath, className: "text-xs font-normal", children: [
488
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { htmlFor: fieldPath, className: "text-xs font-normal", children: [
537
489
  fieldSchema.title || fieldName,
538
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
490
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
539
491
  ] }),
540
- fieldSchema.description && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-[10px] text-muted-foreground ml-2", children: [
492
+ fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-[10px] text-muted-foreground ml-2", children: [
541
493
  "(",
542
494
  fieldSchema.description,
543
495
  ")"
@@ -546,17 +498,17 @@ function DynamicSchemaForm({
546
498
  }
547
499
  if (fieldSchema.type === "number" || fieldSchema.type === "integer") {
548
500
  const isVarValue = isVariableReference(fieldValue);
549
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
550
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { className: "text-xs font-medium", children: [
501
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
502
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
551
503
  fieldSchema.title || fieldName,
552
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
504
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
553
505
  ] }),
554
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-1.5", children: [
555
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
506
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
507
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
556
508
  Input,
557
509
  {
558
510
  type: isVarValue ? "text" : "number",
559
- value: fieldValue ?? "",
511
+ value: _nullishCoalesce(fieldValue, () => ( "")),
560
512
  onChange: (e) => {
561
513
  if (isVariableReference(e.target.value)) {
562
514
  handleFieldChange(fieldName, e.target.value);
@@ -579,21 +531,21 @@ function DynamicSchemaForm({
579
531
  (varPath) => handleFieldChange(fieldName, varPath)
580
532
  )
581
533
  ] }),
582
- fieldSchema.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
534
+ fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
583
535
  ] }, fieldPath);
584
536
  }
585
537
  if (fieldSchema.type === "string") {
586
538
  if (fieldSchema.format === "richtext") {
587
539
  const isDialogOpen = openRichTextDialogs.has(fieldPath);
588
- const draftValue = richTextDraftValues[fieldPath] ?? fieldValue ?? "";
540
+ const draftValue = _nullishCoalesce(_nullishCoalesce(richTextDraftValues[fieldPath], () => ( fieldValue)), () => ( ""));
589
541
  const previewText = (fieldValue || "").replace(/<[^>]*>/g, "").slice(0, 50);
590
542
  const matchingVars = getMatchingVariables("string");
591
543
  if (!Dialog || !DialogContent || !DialogHeader || !DialogTitle || !DialogFooter) {
592
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
593
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
594
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { className: "text-xs font-medium", children: [
544
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
545
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
546
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
595
547
  fieldSchema.title || fieldName,
596
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
548
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
597
549
  ] }),
598
550
  renderVariablePicker(
599
551
  fieldName,
@@ -602,7 +554,7 @@ function DynamicSchemaForm({
602
554
  (varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
603
555
  )
604
556
  ] }),
605
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
557
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
606
558
  Textarea,
607
559
  {
608
560
  value: fieldValue || "",
@@ -615,14 +567,14 @@ function DynamicSchemaForm({
615
567
  )
616
568
  ] }, fieldPath);
617
569
  }
618
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
619
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { className: "text-xs font-medium", children: [
570
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
571
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
620
572
  fieldSchema.title || fieldName,
621
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
573
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
622
574
  ] }),
623
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-1.5", children: [
624
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 min-w-0 px-2 py-1.5 bg-muted/50 rounded text-xs text-muted-foreground truncate border", children: previewText || /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "italic", children: "Click edit to add content..." }) }),
625
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
575
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
576
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 min-w-0 px-2 py-1.5 bg-muted/50 rounded text-xs text-muted-foreground truncate border", children: previewText || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "italic", children: "Click edit to add content..." }) }),
577
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
626
578
  Button,
627
579
  {
628
580
  type: "button",
@@ -634,11 +586,11 @@ function DynamicSchemaForm({
634
586
  setOpenRichTextDialogs((prev) => new Set(prev).add(fieldPath));
635
587
  },
636
588
  disabled,
637
- children: EditIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditIcon, { className: "h-3.5 w-3.5" }) : "Edit"
589
+ children: EditIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EditIcon, { className: "h-3.5 w-3.5" }) : "Edit"
638
590
  }
639
591
  )
640
592
  ] }),
641
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
593
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
642
594
  Dialog,
643
595
  {
644
596
  open: isDialogOpen,
@@ -651,12 +603,12 @@ function DynamicSchemaForm({
651
603
  });
652
604
  }
653
605
  },
654
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogContent, { className: "max-w-3xl max-h-[85vh] flex flex-col", children: [
655
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogTitle, { children: [
606
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: "max-w-3xl max-h-[85vh] flex flex-col", children: [
607
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogTitle, { children: [
656
608
  "Edit ",
657
609
  fieldSchema.title || fieldName
658
610
  ] }) }),
659
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1 overflow-hidden flex flex-col min-h-0", children: MarkdownEditor ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
611
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 overflow-hidden flex flex-col min-h-0", children: MarkdownEditor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
660
612
  MarkdownEditor,
661
613
  {
662
614
  content: draftValue,
@@ -667,8 +619,8 @@ function DynamicSchemaForm({
667
619
  minHeight: "300px",
668
620
  variables: showVariablePicker ? matchingVars : []
669
621
  }
670
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
671
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
622
+ ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
623
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
672
624
  Textarea,
673
625
  {
674
626
  value: draftValue,
@@ -680,9 +632,9 @@ function DynamicSchemaForm({
680
632
  placeholder: "Enter content... Use {{variables.name}} for dynamic values"
681
633
  }
682
634
  ),
683
- showVariablePicker && matchingVars.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "border rounded-md p-2 bg-muted/30 mt-3", children: [
684
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium mb-2", children: "Insert Variable:" }),
685
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-1", children: matchingVars.map((variable) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
635
+ showVariablePicker && matchingVars.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border rounded-md p-2 bg-muted/30 mt-3", children: [
636
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs font-medium mb-2", children: "Insert Variable:" }),
637
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-1", children: matchingVars.map((variable) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
686
638
  Button,
687
639
  {
688
640
  type: "button",
@@ -702,8 +654,8 @@ function DynamicSchemaForm({
702
654
  )) })
703
655
  ] })
704
656
  ] }) }),
705
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogFooter, { children: [
706
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
657
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogFooter, { children: [
658
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
707
659
  Button,
708
660
  {
709
661
  type: "button",
@@ -718,7 +670,7 @@ function DynamicSchemaForm({
718
670
  children: "Cancel"
719
671
  }
720
672
  ),
721
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
673
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
722
674
  Button,
723
675
  {
724
676
  type: "button",
@@ -741,11 +693,11 @@ function DynamicSchemaForm({
741
693
  }
742
694
  if (fieldSchema.format === "multiline" || fieldSchema.format === "textarea") {
743
695
  const isVarValue2 = isVariableReference(fieldValue);
744
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
745
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
746
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { className: "text-xs font-medium", children: [
696
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
697
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
698
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
747
699
  fieldSchema.title || fieldName,
748
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
700
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
749
701
  ] }),
750
702
  renderVariablePicker(
751
703
  fieldName,
@@ -754,7 +706,7 @@ function DynamicSchemaForm({
754
706
  (varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
755
707
  )
756
708
  ] }),
757
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
709
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
758
710
  Textarea,
759
711
  {
760
712
  value: fieldValue || "",
@@ -765,18 +717,18 @@ function DynamicSchemaForm({
765
717
  placeholder: fieldSchema.description
766
718
  }
767
719
  ),
768
- fieldSchema.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
720
+ fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
769
721
  ] }, fieldPath);
770
722
  }
771
723
  const inputType = fieldSchema.format === "email" ? "email" : fieldSchema.format === "uri" || fieldSchema.format === "url" ? "url" : fieldSchema.format === "password" ? "password" : "text";
772
724
  const isVarValue = isVariableReference(fieldValue);
773
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
774
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { className: "text-xs font-medium", children: [
725
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
726
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
775
727
  fieldSchema.title || fieldName,
776
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
728
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
777
729
  ] }),
778
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-1.5", children: [
779
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
730
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
731
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
780
732
  Input,
781
733
  {
782
734
  type: inputType,
@@ -794,15 +746,15 @@ function DynamicSchemaForm({
794
746
  (varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
795
747
  )
796
748
  ] }),
797
- fieldSchema.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
749
+ fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
798
750
  ] }, fieldPath);
799
751
  }
800
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
801
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Label, { className: "text-xs font-medium", children: [
752
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
753
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
802
754
  fieldSchema.title || fieldName,
803
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-red-500 ml-0.5", children: "*" })
755
+ isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
804
756
  ] }),
805
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
757
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
806
758
  Input,
807
759
  {
808
760
  value: typeof fieldValue === "object" ? JSON.stringify(fieldValue) : fieldValue || "",
@@ -810,7 +762,7 @@ function DynamicSchemaForm({
810
762
  try {
811
763
  const parsed = JSON.parse(e.target.value);
812
764
  handleFieldChange(fieldName, parsed);
813
- } catch {
765
+ } catch (e2) {
814
766
  handleFieldChange(fieldName, e.target.value);
815
767
  }
816
768
  },
@@ -818,7 +770,7 @@ function DynamicSchemaForm({
818
770
  className: "h-8 text-xs font-mono"
819
771
  }
820
772
  ),
821
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-[10px] text-muted-foreground", children: [
773
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: [
822
774
  "Type: ",
823
775
  fieldSchema.type || "unknown"
824
776
  ] })
@@ -827,21 +779,21 @@ function DynamicSchemaForm({
827
779
  if (schema.type === "object" && schema.properties) {
828
780
  const sortedProperties = Object.entries(schema.properties).sort(
829
781
  ([, a], [, b]) => {
830
- const orderA = a["x-displayOrder"] ?? 999;
831
- const orderB = b["x-displayOrder"] ?? 999;
782
+ const orderA = _nullishCoalesce(a["x-displayOrder"], () => ( 999));
783
+ const orderB = _nullishCoalesce(b["x-displayOrder"], () => ( 999));
832
784
  return orderA - orderB;
833
785
  }
834
786
  );
835
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-3", children: sortedProperties.map(
787
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-3", children: sortedProperties.map(
836
788
  ([fieldName, fieldSchema]) => renderField(fieldSchema, fieldName, value[fieldName])
837
789
  ) });
838
790
  }
839
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground text-center py-4", children: "No configuration required for this node." });
791
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground text-center py-4", children: "No configuration required for this node." });
840
792
  }
841
793
 
842
794
  // components/schema-builder.tsx
843
- var import_react2 = require("react");
844
- var import_jsx_runtime2 = require("react/jsx-runtime");
795
+
796
+
845
797
  var FIELD_TYPES = [
846
798
  { value: "string", label: "Text" },
847
799
  { value: "number", label: "Number" },
@@ -864,7 +816,7 @@ function SchemaBuilder({
864
816
  disabled = false,
865
817
  components
866
818
  }) {
867
- const [expandedFields, setExpandedFields] = (0, import_react2.useState)(/* @__PURE__ */ new Set());
819
+ const [expandedFields, setExpandedFields] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
868
820
  const {
869
821
  Input,
870
822
  Label,
@@ -883,7 +835,7 @@ function SchemaBuilder({
883
835
  ChevronRightIcon
884
836
  } = components;
885
837
  const getFieldsFromSchema = () => {
886
- if (!schema?.properties) return [];
838
+ if (!_optionalChain([schema, 'optionalAccess', _5 => _5.properties])) return [];
887
839
  return Object.entries(schema.properties).map(([name, prop]) => {
888
840
  const fieldSchema = prop;
889
841
  return {
@@ -891,7 +843,7 @@ function SchemaBuilder({
891
843
  type: fieldSchema.type || "string",
892
844
  title: fieldSchema.title || name,
893
845
  description: fieldSchema.description || "",
894
- required: schema.required?.includes(name) || false,
846
+ required: _optionalChain([schema, 'access', _6 => _6.required, 'optionalAccess', _7 => _7.includes, 'call', _8 => _8(name)]) || false,
895
847
  format: fieldSchema.format,
896
848
  enum: fieldSchema.enum,
897
849
  items: fieldSchema.items
@@ -966,22 +918,22 @@ function SchemaBuilder({
966
918
  return next;
967
919
  });
968
920
  };
969
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-2", children: [
970
- fields.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-xs text-muted-foreground italic py-3", children: 'No fields defined. Click "Add Field" to create one.' }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "space-y-3", children: fields.map((field, index) => {
921
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
922
+ fields.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground italic py-3", children: 'No fields defined. Click "Add Field" to create one.' }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-3", children: fields.map((field, index) => {
971
923
  const isExpanded = expandedFields.has(field.name);
972
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Card, { className: "p-3 bg-gray-50/50", children: [
973
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-2 mb-2", children: [
974
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(GripVerticalIcon, { className: "h-4 w-4 text-gray-300 flex-shrink-0 cursor-grab" }),
975
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
924
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { className: "p-3 bg-gray-50/50", children: [
925
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mb-2", children: [
926
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GripVerticalIcon, { className: "h-4 w-4 text-gray-300 flex-shrink-0 cursor-grab" }),
927
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
976
928
  "button",
977
929
  {
978
930
  type: "button",
979
931
  onClick: () => toggleExpand(field.name),
980
932
  className: "flex-shrink-0 p-1 hover:bg-gray-200 rounded",
981
- children: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronDownIcon, { className: "h-4 w-4 text-gray-500" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronRightIcon, { className: "h-4 w-4 text-gray-500" })
933
+ children: isExpanded ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronDownIcon, { className: "h-4 w-4 text-gray-500" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronRightIcon, { className: "h-4 w-4 text-gray-500" })
982
934
  }
983
935
  ),
984
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
936
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
985
937
  Input,
986
938
  {
987
939
  value: field.name,
@@ -1003,7 +955,7 @@ function SchemaBuilder({
1003
955
  disabled
1004
956
  }
1005
957
  ) }),
1006
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
958
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1007
959
  Button,
1008
960
  {
1009
961
  type: "button",
@@ -1012,25 +964,25 @@ function SchemaBuilder({
1012
964
  className: "h-9 w-9 p-0 text-red-500 hover:text-red-700 hover:bg-red-50 flex-shrink-0",
1013
965
  onClick: () => removeField(index),
1014
966
  disabled,
1015
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TrashIcon, { className: "h-4 w-4" })
967
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-4 w-4" })
1016
968
  }
1017
969
  )
1018
970
  ] }),
1019
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-3 pl-10", children: [
1020
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
971
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 pl-10", children: [
972
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1021
973
  Select,
1022
974
  {
1023
975
  value: field.type,
1024
976
  onValueChange: (v) => updateField(index, { type: v }),
1025
977
  disabled,
1026
978
  children: [
1027
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectValue, {}) }),
1028
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectContent, { children: FIELD_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectItem, { value: type.value, children: type.label }, type.value)) })
979
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
980
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: FIELD_TYPES.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.value, children: type.label }, type.value)) })
1029
981
  ]
1030
982
  }
1031
983
  ) }),
1032
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
1033
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
984
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 flex-shrink-0", children: [
985
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1034
986
  Checkbox,
1035
987
  {
1036
988
  id: `required-${index}`,
@@ -1039,7 +991,7 @@ function SchemaBuilder({
1039
991
  disabled
1040
992
  }
1041
993
  ),
1042
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
994
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1043
995
  Label,
1044
996
  {
1045
997
  htmlFor: `required-${index}`,
@@ -1049,10 +1001,10 @@ function SchemaBuilder({
1049
1001
  )
1050
1002
  ] })
1051
1003
  ] }),
1052
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "mt-3 pt-3 border-t space-y-3 pl-10", children: [
1053
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-1", children: [
1054
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Label, { className: "text-xs text-muted-foreground", children: "Display Title" }),
1055
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1004
+ isExpanded && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-3 pt-3 border-t space-y-3 pl-10", children: [
1005
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
1006
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Display Title" }),
1007
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1056
1008
  Input,
1057
1009
  {
1058
1010
  value: field.title,
@@ -1063,9 +1015,9 @@ function SchemaBuilder({
1063
1015
  }
1064
1016
  )
1065
1017
  ] }),
1066
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-1", children: [
1067
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Label, { className: "text-xs text-muted-foreground", children: "Description" }),
1068
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1018
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
1019
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Description" }),
1020
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1069
1021
  Input,
1070
1022
  {
1071
1023
  value: field.description,
@@ -1076,42 +1028,42 @@ function SchemaBuilder({
1076
1028
  }
1077
1029
  )
1078
1030
  ] }),
1079
- field.type === "string" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-1", children: [
1080
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Label, { className: "text-xs text-muted-foreground", children: "Format" }),
1081
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1031
+ field.type === "string" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
1032
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Format" }),
1033
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1082
1034
  Select,
1083
1035
  {
1084
1036
  value: field.format || "plain",
1085
1037
  onValueChange: (v) => updateField(index, { format: v }),
1086
1038
  disabled,
1087
1039
  children: [
1088
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectValue, {}) }),
1089
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectContent, { children: STRING_FORMATS.map((format) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectItem, { value: format.value, children: format.label }, format.value)) })
1040
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
1041
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: STRING_FORMATS.map((format) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: format.value, children: format.label }, format.value)) })
1090
1042
  ]
1091
1043
  }
1092
1044
  )
1093
1045
  ] }),
1094
- field.type === "array" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-1", children: [
1095
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Label, { className: "text-xs text-muted-foreground", children: "Item Type" }),
1096
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1046
+ field.type === "array" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
1047
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Item Type" }),
1048
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1097
1049
  Select,
1098
1050
  {
1099
- value: field.items?.type || "string",
1051
+ value: _optionalChain([field, 'access', _9 => _9.items, 'optionalAccess', _10 => _10.type]) || "string",
1100
1052
  onValueChange: (v) => updateField(index, { items: { type: v } }),
1101
1053
  disabled,
1102
1054
  children: [
1103
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectValue, {}) }),
1104
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectContent, { children: FIELD_TYPES.filter((t) => t.value !== "array").map(
1105
- (type) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectItem, { value: type.value, children: type.label }, type.value)
1055
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
1056
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: FIELD_TYPES.filter((t) => t.value !== "array").map(
1057
+ (type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.value, children: type.label }, type.value)
1106
1058
  ) })
1107
1059
  ]
1108
1060
  }
1109
1061
  )
1110
1062
  ] }),
1111
- field.type === "string" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-2", children: [
1112
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between", children: [
1113
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Label, { className: "text-xs text-muted-foreground", children: "Dropdown Options (optional)" }),
1114
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1063
+ field.type === "string" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1064
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
1065
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Dropdown Options (optional)" }),
1066
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1115
1067
  Button,
1116
1068
  {
1117
1069
  type: "button",
@@ -1129,14 +1081,14 @@ function SchemaBuilder({
1129
1081
  },
1130
1082
  disabled,
1131
1083
  children: [
1132
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PlusIcon, { className: "h-3 w-3 mr-1" }),
1084
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-3 w-3 mr-1" }),
1133
1085
  "Add Option"
1134
1086
  ]
1135
1087
  }
1136
1088
  )
1137
1089
  ] }),
1138
- field.enum && field.enum.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "space-y-2", children: field.enum.map((option, optIdx) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-2", children: [
1139
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1090
+ field.enum && field.enum.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-2", children: field.enum.map((option, optIdx) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
1091
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1140
1092
  Input,
1141
1093
  {
1142
1094
  value: option,
@@ -1150,7 +1102,7 @@ function SchemaBuilder({
1150
1102
  disabled
1151
1103
  }
1152
1104
  ),
1153
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1105
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1154
1106
  Button,
1155
1107
  {
1156
1108
  type: "button",
@@ -1166,7 +1118,7 @@ function SchemaBuilder({
1166
1118
  });
1167
1119
  },
1168
1120
  disabled,
1169
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TrashIcon, { className: "h-3 w-3" })
1121
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-3 w-3" })
1170
1122
  }
1171
1123
  )
1172
1124
  ] }, optIdx)) })
@@ -1174,7 +1126,7 @@ function SchemaBuilder({
1174
1126
  ] })
1175
1127
  ] }, index);
1176
1128
  }) }),
1177
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1129
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1178
1130
  Button,
1179
1131
  {
1180
1132
  type: "button",
@@ -1184,7 +1136,7 @@ function SchemaBuilder({
1184
1136
  onClick: addField,
1185
1137
  disabled,
1186
1138
  children: [
1187
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PlusIcon, { className: "h-4 w-4 mr-2" }),
1139
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-4 w-4 mr-2" }),
1188
1140
  "Add Field"
1189
1141
  ]
1190
1142
  }
@@ -1192,173 +1144,14 @@ function SchemaBuilder({
1192
1144
  ] });
1193
1145
  }
1194
1146
 
1195
- // context/workflow-definition-context.tsx
1196
- var import_react5 = require("react");
1197
-
1198
- // hooks/use-workflow-definition.ts
1199
- var import_nats = require("@elqnt/nats");
1200
- var import_react3 = require("react");
1201
- var import_react_redux = require("react-redux");
1202
-
1203
- // models/workflow.ts
1204
- var NodeTypeTrigger = "trigger";
1205
- var NodeTypeHumanAction = "humanAction";
1206
- var NodeTypeAgent = "agent";
1207
- var NodeTypeAction = "action";
1208
- var NodeTypeLogic = "logic";
1209
- var NodeTypeLoop = "loop";
1210
- var NodeTypeParallel = "parallel";
1211
- var NodeTypeDelay = "delay";
1212
- var NodeTypeData = "data";
1213
- var NodeTypeIntegration = "integration";
1214
- var NodeTypeTimer = "timer";
1215
- var NodeTypeSubflow = "subflow";
1216
- var NodeTypeCustom = "custom";
1217
- var NodeTypeAccounting = "accounting";
1218
- var NodeSubTypeTriggerStart = "triggerStart";
1219
- var NodeSubTypeTriggerEntityRecordCreated = "triggerEntityRecordCreated";
1220
- var NodeSubTypeTriggerEntityRecordUpdated = "triggerEntityRecordUpdated";
1221
- var NodeSubTypeTriggerEntityRecordDeleted = "triggerEntityRecordDeleted";
1222
- var NodeSubTypeTriggerSLAWarning = "triggerSLAWarning";
1223
- var NodeSubTypeTriggerSLABreach = "triggerSLABreach";
1224
- var NodeSubTypeTriggerEscalation = "triggerEscalation";
1225
- var NodeSubTypeTriggerWebhookReceived = "triggerWebhookReceived";
1226
- var NodeSubTypeHumanActionReview = "humanActionReview";
1227
- var NodeSubTypeHumanActionApproval = "humanActionApproval";
1228
- var NodeSubTypeHumanActionDataEntry = "humanActionDataEntry";
1229
- var NodeSubTypeHumanActionAssignment = "humanActionAssignment";
1230
- var NodeSubTypeAgentChat = "agentChat";
1231
- var NodeSubTypeAgentIntentDetector = "agentIntentDetector";
1232
- var NodeSubTypeAgentKnowledgeGraph = "agentKnowledgeGraph";
1233
- var NodeSubTypeAgentClientApiCall = "clientApiCall";
1234
- var NodeSubTypeAgentTransferToHuman = "agentTransferToHuman";
1235
- var NodeSubTypeAgentOpenTicket = "agentOpenTicket";
1236
- var NodeSubTypeAgentApiIntegration = "agentApiIntegration";
1237
- var NodeSubTypeAgentCustomResponse = "agentCustomResponse";
1238
- var NodeSubTypeAgentStructuredOutput = "agentStructuredOutput";
1239
- var NodeSubTypeActionApiCall = "actionApiCall";
1240
- var NodeSubTypeActionDocumentExtraction = "actionDocumentExtraction";
1241
- var NodeSubTypeActionSendEmail = "actionSendEmail";
1242
- var NodeSubTypeActionSendSMS = "actionSendSMS";
1243
- var NodeSubTypeActionGenerateDocument = "actionGenerateDocument";
1244
- var NodeSubTypeActionProcessPayment = "actionProcessPayment";
1245
- var NodeSubTypeActionCreateEntityRecord = "actionCreateEntityRecord";
1246
- var NodeSubTypeActionUpdateEntityRecord = "actionUpdateEntityRecord";
1247
- var NodeSubTypeActionDeleteEntityRecord = "actionDeleteEntityRecord";
1248
- var NodeSubTypeActionMergeEntityRecords = "actionMergeEntityRecords";
1249
- var NodeSubTypeActionAssignSLAPolicy = "actionAssignSLAPolicy";
1250
- var NodeSubTypeActionChangeSLAStatus = "actionChangeSLAAssignmentStatus";
1251
- var NodeSubTypeActionEscalateSLA = "actionEscalateSLAAssignment";
1252
- var NodeSubTypeActionCSATSurvey = "actionCSATSurvey";
1253
- var NodeSubTypeActionSetVariables = "actionSetVariables";
1254
- var NodeSubTypeActionQueryEntityRecords = "actionQueryEntityRecords";
1255
- var NodeSubTypeActionNatsRequest = "actionNatsRequest";
1256
- var NodeSubTypeLogicIf = "logicIf";
1257
- var NodeSubTypeLogicSwitch = "logicSwitch";
1258
- var NodeSubTypeLogicFor = "logicFor";
1259
- var NodeSubTypeLogicParallel = "logicParallel";
1260
- var NodeSubTypeLoopData = "loopData";
1261
- var NodeSubTypeDelay = "delay";
1262
- var NodeSubTypeDataFilter = "dataFilter";
1263
- var NodeSubTypeDataMap = "dataMap";
1264
- var NodeSubTypeDataCalculate = "dataCalculate";
1265
- var NodeSubTypeDataValidate = "dataValidate";
1266
- var NodeSubTypeTimerDelay = "timerDelay";
1267
- var NodeSubTypeTimerSchedule = "timerSchedule";
1268
- var NodeSubTypeTimerBusinessHours = "timerBusinessHours";
1269
- var ExpressionTypeFilter = "filter";
1270
- var ExpressionTypeJavaScript = "javascript";
1271
- var ExpressionTypeTemplate = "template";
1272
- var ExpressionTypeDSL = "dsl";
1273
- var ExpressionTypeRules = "rules";
1274
- var EdgeTypeNormal = "normal";
1275
- var EdgeTypeLoopBack = "loopBack";
1276
- var EdgeTypeError = "error";
1277
- var EdgeTypeDefault = "default";
1278
- var EdgeTypeParallel = "parallel";
1279
- var EdgeTypeConditional = "conditional";
1280
- var EdgeTypeMerge = "merge";
1281
- var EdgeTypeCompensation = "compensation";
1282
- var EdgeTypeTimeout = "timeout";
1283
- var WorkflowTypeEntity = "entity";
1284
- var WorkflowTypeDocument = "document";
1285
- var WorkflowTypeChat = "chat";
1286
- var WorkflowTypeAgent = "agent";
1287
- var WorkflowTypeProductivity = "productivity";
1288
- var RuleLevelError = "error";
1289
- var RuleLevelWarning = "warning";
1290
- var RuleLevelInfo = "info";
1291
- var PersistenceTypeEphemeral = "ephemeral";
1292
- var PersistenceTypePermanent = "permanent";
1293
- var TimeoutActionFail = "fail";
1294
- var TimeoutActionSkip = "skip";
1295
- var TimeoutActionRetry = "retry";
1296
- var TimeoutActionAlt = "alt";
1297
- var InstanceStatusNew = "NEW";
1298
- var InstanceStatusRunning = "RUNNING";
1299
- var InstanceStatusWaiting = "WAITING";
1300
- var InstanceStatusPaused = "PAUSED";
1301
- var InstanceStatusCompleted = "COMPLETED";
1302
- var InstanceStatusFailed = "FAILED";
1303
- var NodeStatusPending = "PENDING";
1304
- var NodeStatusRunning = "RUNNING";
1305
- var NodeStatusCompleted = "COMPLETED";
1306
- var NodeStatusFailed = "FAILED";
1307
- var NodeStatusWaiting = "WAITING";
1308
- var NodeStatusSkipped = "SKIPPED";
1309
- var EdgeStatusPending = "PENDING";
1310
- var EdgeStatusCompleted = "COMPLETED";
1311
- var EdgeStatusSkipped = "SKIPPED";
1312
-
1313
- // models/subjects.ts
1314
- var WorkflowDefinitionCreate = "workflow.definition.create";
1315
- var WorkflowDefinitionCreated = "workflow.definition.created";
1316
- var WorkflowDefinitionUpdate = "workflow.definition.update";
1317
- var WorkflowDefinitionUpdated = "workflow.definition.updated";
1318
- var WorkflowDefinitionGet = "workflow.definition.get";
1319
- var WorkflowDefinitionGetServer = "workflow.definition.get.server";
1320
- var WorkflowDefinitionGetByTitle = "workflow.definition.get.by.title";
1321
- var WorkflowDefinitionList = "workflow.definition.list";
1322
- var WorkflowDefinitionDelete = "workflow.definition.delete";
1323
- var WorkflowDefinitionDeleted = "workflow.definition.deleted";
1324
- var WorkflowInstanceCreate = "workflow.instance.create";
1325
- var WorkflowInstanceExecuteNode = "workflow.instance.execute.node";
1326
- var WorkflowInstanceResumeNode = "workflow.instance.resume.node";
1327
- var WorkflowInstanceExecuteNodeServer = "workflow.instance.execute.node.server";
1328
- var WorkflowInstanceResumeNodeServer = "workflow.instance.resume.node.server";
1329
- var WorkflowInstanceExecuteNodeLean = "workflow.instance.execute.node.lean";
1330
- var WorkflowInstanceExecuteNodeLeanServer = "workflow.instance.execute.node.lean.server";
1331
- var WorkflowInstanceGet = "workflow.instance.get";
1332
- var WorkflowInstanceList = "workflow.instance.list";
1333
- var WorkflowInstanceUpdate = "workflow.instance.update";
1334
- var WorkflowInstanceUpdated = "workflow.instance.updated";
1335
- var WorkflowInstanceUpdateNodeMetadata = "workflow.instance.update.node.metadata";
1336
- var WorkflowTemplateList = "workflow.template.list";
1337
- var WorkflowTemplateGet = "workflow.template.get";
1338
- var WorkflowTemplateInstantiate = "workflow.template.instantiate";
1339
- var WorkflowScheduleCreate = "workflow.schedule.create";
1340
- var WorkflowScheduleUpdate = "workflow.schedule.update";
1341
- var WorkflowScheduleDelete = "workflow.schedule.delete";
1342
- var WorkflowScheduleList = "workflow.schedule.list";
1343
- var WorkflowSchedulePause = "workflow.schedule.pause";
1344
- var WorkflowScheduleResume = "workflow.schedule.resume";
1345
- var WorkflowTriggerRegister = "workflow.trigger.register";
1346
- var WorkflowTriggerPause = "workflow.trigger.pause";
1347
- var WorkflowTriggerResume = "workflow.trigger.resume";
1348
- var WorkflowTriggerStatus = "workflow.trigger.status";
1349
- var WorkflowTriggerFired = "workflow.trigger.fired";
1350
- var WorkflowExecutionStarted = "workflow.execution.started";
1351
- var WorkflowExecutionCompleted = "workflow.execution.completed";
1352
- var WorkflowExecutionFailed = "workflow.execution.failed";
1353
-
1354
1147
  // store/workflow-definition-slice.ts
1355
- var import_toolkit = require("@reduxjs/toolkit");
1148
+ var _toolkit = require('@reduxjs/toolkit');
1356
1149
  var initialState = {
1357
1150
  definitions: {},
1358
1151
  isLoading: false,
1359
1152
  loadingStates: {}
1360
1153
  };
1361
- var workflowDefinitionSlice = (0, import_toolkit.createSlice)({
1154
+ var workflowDefinitionSlice = _toolkit.createSlice.call(void 0, {
1362
1155
  name: "workflowDefinition",
1363
1156
  initialState,
1364
1157
  reducers: {
@@ -1393,13 +1186,13 @@ var workflowDefinitionSlice = (0, import_toolkit.createSlice)({
1393
1186
  if (definition.id) {
1394
1187
  state.definitions[definition.id] = definition;
1395
1188
  }
1396
- if (state.selectedDefinition?.id === definition.id) {
1189
+ if (_optionalChain([state, 'access', _11 => _11.selectedDefinition, 'optionalAccess', _12 => _12.id]) === definition.id) {
1397
1190
  state.selectedDefinition = definition;
1398
1191
  }
1399
1192
  },
1400
1193
  removeDefinition: (state, action) => {
1401
1194
  delete state.definitions[action.payload];
1402
- if (state.selectedDefinition?.id === action.payload) {
1195
+ if (_optionalChain([state, 'access', _13 => _13.selectedDefinition, 'optionalAccess', _14 => _14.id]) === action.payload) {
1403
1196
  state.selectedDefinition = void 0;
1404
1197
  }
1405
1198
  },
@@ -1420,180 +1213,14 @@ var {
1420
1213
  } = workflowDefinitionSlice.actions;
1421
1214
  var workflowDefinitionReducer = workflowDefinitionSlice.reducer;
1422
1215
 
1423
- // hooks/use-workflow-definition.ts
1424
- function useWorkflowDefinition(orgId, definitionId, options = {}) {
1425
- const { autoLoad } = options;
1426
- const { natsConnected, request } = (0, import_nats.useNatsContext)();
1427
- const dispatch = (0, import_react_redux.useDispatch)();
1428
- const definitions = (0, import_react_redux.useSelector)(
1429
- (state) => state.workflowDefinition.definitions
1430
- );
1431
- const selectedDefinition = (0, import_react_redux.useSelector)(
1432
- (state) => state.workflowDefinition.selectedDefinition
1433
- );
1434
- const isLoading = (0, import_react_redux.useSelector)(
1435
- (state) => state.workflowDefinition.isLoading
1436
- );
1437
- const loadingStates = (0, import_react_redux.useSelector)(
1438
- (state) => state.workflowDefinition.loadingStates
1439
- );
1440
- const error = (0, import_react_redux.useSelector)(
1441
- (state) => state.workflowDefinition.error
1442
- );
1443
- const loadDefinitions = (0, import_react3.useCallback)(async () => {
1444
- if (!natsConnected || !orgId) return;
1445
- const loadingKey = "loadDefinitions";
1446
- if (loadingStates[loadingKey]) return;
1447
- dispatch(setOperationLoading({ operation: loadingKey, loading: true }));
1448
- try {
1449
- const response = await request(WorkflowDefinitionList, { orgId });
1450
- if (response instanceof Error) {
1451
- dispatch(setError(response.message));
1452
- } else {
1453
- dispatch(setDefinitions(response?.definitions ?? []));
1454
- }
1455
- } catch (err) {
1456
- dispatch(setError(err instanceof Error ? err.message : "Unknown error"));
1457
- } finally {
1458
- dispatch(setOperationLoading({ operation: loadingKey, loading: false }));
1459
- }
1460
- }, [natsConnected, orgId, dispatch, request]);
1461
- const loadDefinition = (0, import_react3.useCallback)(
1462
- async (id) => {
1463
- if (!natsConnected || !orgId) return;
1464
- dispatch(setOperationLoading({ operation: `load_${id}`, loading: true }));
1465
- try {
1466
- const response = await request(WorkflowDefinitionGet, { id, orgId });
1467
- if (response instanceof Error) {
1468
- dispatch(setError(response.message));
1469
- return;
1470
- }
1471
- dispatch(setSelectedDefinition(response.definition));
1472
- } finally {
1473
- dispatch(
1474
- setOperationLoading({ operation: `load_${id}`, loading: false })
1475
- );
1476
- }
1477
- },
1478
- [natsConnected, orgId, dispatch, request]
1479
- );
1480
- const resetSelectedDefinition = (0, import_react3.useCallback)(() => {
1481
- dispatch(setSelectedDefinition(void 0));
1482
- }, [dispatch]);
1483
- const createDefinition = async (definition) => {
1484
- if (!natsConnected || !orgId) {
1485
- throw new Error("Not connected or missing orgId");
1486
- }
1487
- dispatch(setOperationLoading({ operation: "create", loading: true }));
1488
- try {
1489
- const response = await request(WorkflowDefinitionCreate, { definition, orgId });
1490
- if (response instanceof Error) {
1491
- throw response;
1492
- }
1493
- if (response.metadata.success) {
1494
- dispatch(addDefinition(response.definition));
1495
- }
1496
- return response;
1497
- } finally {
1498
- dispatch(setOperationLoading({ operation: "create", loading: false }));
1499
- }
1500
- };
1501
- const updateDefinitionById = async (id, definition) => {
1502
- if (!natsConnected || !orgId) {
1503
- throw new Error("Not connected or missing orgId");
1504
- }
1505
- dispatch(setOperationLoading({ operation: `update_${id}`, loading: true }));
1506
- try {
1507
- const response = await request(WorkflowDefinitionUpdate, {
1508
- definition,
1509
- orgId
1510
- });
1511
- if (response instanceof Error) {
1512
- throw response;
1513
- }
1514
- if (response.metadata.success) {
1515
- dispatch(updateDefinition(response.definition));
1516
- }
1517
- return response;
1518
- } finally {
1519
- dispatch(
1520
- setOperationLoading({ operation: `update_${id}`, loading: false })
1521
- );
1522
- }
1523
- };
1524
- const deleteDefinition = async (id) => {
1525
- if (!natsConnected || !orgId) {
1526
- throw new Error("Not connected or missing orgId");
1527
- }
1528
- dispatch(setOperationLoading({ operation: `delete_${id}`, loading: true }));
1529
- try {
1530
- const response = await request(WorkflowDefinitionDelete, { id, orgId });
1531
- if (response instanceof Error) {
1532
- throw response;
1533
- }
1534
- dispatch(removeDefinition(id));
1535
- return response;
1536
- } finally {
1537
- dispatch(
1538
- setOperationLoading({ operation: `delete_${id}`, loading: false })
1539
- );
1540
- }
1541
- };
1542
- const refresh = (0, import_react3.useCallback)(() => {
1543
- if (!natsConnected || !orgId) return;
1544
- if (definitionId) {
1545
- loadDefinition(definitionId);
1546
- } else {
1547
- dispatch(setLoading(true));
1548
- loadDefinitions().finally(() => dispatch(setLoading(false)));
1549
- }
1550
- }, [natsConnected, orgId, definitionId, loadDefinition, dispatch]);
1551
- (0, import_react3.useEffect)(() => {
1552
- let mounted = true;
1553
- if (autoLoad && natsConnected && orgId && mounted) {
1554
- loadDefinitions();
1555
- }
1556
- return () => {
1557
- mounted = false;
1558
- };
1559
- }, [autoLoad, natsConnected, orgId]);
1560
- (0, import_react3.useEffect)(() => {
1561
- if (natsConnected && orgId && definitionId) {
1562
- loadDefinition(definitionId);
1563
- }
1564
- }, [natsConnected, orgId, definitionId, loadDefinition]);
1565
- return {
1566
- // State
1567
- definitions,
1568
- selectedDefinition,
1569
- isLoading,
1570
- loadingStates,
1571
- error,
1572
- // Operations
1573
- loadDefinitions,
1574
- loadDefinition,
1575
- resetSelectedDefinition,
1576
- createDefinition,
1577
- updateDefinition: updateDefinitionById,
1578
- deleteDefinition,
1579
- // Utilities
1580
- refresh
1581
- };
1582
- }
1583
-
1584
- // hooks/use-workflow-instance.ts
1585
- var import_nats2 = require("@elqnt/nats");
1586
- var import_react4 = require("react");
1587
- var import_react_redux2 = require("react-redux");
1588
-
1589
1216
  // store/workflow-instance-slice.ts
1590
- var import_toolkit2 = require("@reduxjs/toolkit");
1217
+
1591
1218
  var initialState2 = {
1592
1219
  instances: {},
1593
1220
  isLoading: false,
1594
1221
  loadingStates: {}
1595
1222
  };
1596
- var workflowInstanceSlice = (0, import_toolkit2.createSlice)({
1223
+ var workflowInstanceSlice = _toolkit.createSlice.call(void 0, {
1597
1224
  name: "workflowInstance",
1598
1225
  initialState: initialState2,
1599
1226
  reducers: {
@@ -1622,7 +1249,7 @@ var workflowInstanceSlice = (0, import_toolkit2.createSlice)({
1622
1249
  if (instance.id) {
1623
1250
  state.instances[instance.id] = instance;
1624
1251
  }
1625
- if (state.selectedInstance?.id === instance.id) {
1252
+ if (_optionalChain([state, 'access', _15 => _15.selectedInstance, 'optionalAccess', _16 => _16.id]) === instance.id) {
1626
1253
  state.selectedInstance = instance;
1627
1254
  }
1628
1255
  },
@@ -1641,290 +1268,6 @@ var {
1641
1268
  } = workflowInstanceSlice.actions;
1642
1269
  var workflowInstanceReducer = workflowInstanceSlice.reducer;
1643
1270
 
1644
- // hooks/use-workflow-instance.ts
1645
- function useWorkflowInstance(orgId, instanceId, definitionId, options = {}) {
1646
- const { autoLoad } = options;
1647
- const { natsConnected, request } = (0, import_nats2.useNatsContext)();
1648
- const dispatch = (0, import_react_redux2.useDispatch)();
1649
- const instances = (0, import_react_redux2.useSelector)(
1650
- (state) => state.workflowInstance.instances
1651
- );
1652
- const selectedInstance = (0, import_react_redux2.useSelector)(
1653
- (state) => state.workflowInstance.selectedInstance
1654
- );
1655
- const isLoading = (0, import_react_redux2.useSelector)(
1656
- (state) => state.workflowInstance.isLoading
1657
- );
1658
- const loadingStates = (0, import_react_redux2.useSelector)(
1659
- (state) => state.workflowInstance.loadingStates
1660
- );
1661
- const error = (0, import_react_redux2.useSelector)(
1662
- (state) => state.workflowInstance.error
1663
- );
1664
- const loadInstances = (0, import_react4.useCallback)(
1665
- async (defId) => {
1666
- if (!natsConnected || !orgId) return;
1667
- const loadingKey = `loadInstances_${defId}`;
1668
- if (loadingStates[loadingKey]) return;
1669
- dispatch(setOperationLoading2({ operation: loadingKey, loading: true }));
1670
- try {
1671
- const response = await request(WorkflowInstanceList, {
1672
- orgId,
1673
- definitionId: defId
1674
- });
1675
- if (response instanceof Error) {
1676
- dispatch(setError2(response.message));
1677
- } else {
1678
- dispatch(setInstances(response?.instances ?? []));
1679
- }
1680
- } catch (err) {
1681
- dispatch(
1682
- setError2(err instanceof Error ? err.message : "Unknown error")
1683
- );
1684
- } finally {
1685
- dispatch(
1686
- setOperationLoading2({ operation: loadingKey, loading: false })
1687
- );
1688
- }
1689
- },
1690
- [natsConnected, orgId, dispatch, request]
1691
- );
1692
- const loadInstance = (0, import_react4.useCallback)(
1693
- async (id) => {
1694
- if (!natsConnected || !orgId) return;
1695
- dispatch(setOperationLoading2({ operation: `load_${id}`, loading: true }));
1696
- try {
1697
- const response = await request(WorkflowInstanceGet, {
1698
- orgId,
1699
- instanceId: id
1700
- });
1701
- if (response instanceof Error) {
1702
- dispatch(setError2(response.message));
1703
- return;
1704
- }
1705
- dispatch(setSelectedInstance(response.instance));
1706
- } finally {
1707
- dispatch(
1708
- setOperationLoading2({ operation: `load_${id}`, loading: false })
1709
- );
1710
- }
1711
- },
1712
- [natsConnected, orgId, dispatch, request]
1713
- );
1714
- const doSetSelectedInstance = (0, import_react4.useCallback)(
1715
- (instance) => {
1716
- dispatch(setSelectedInstance(instance));
1717
- },
1718
- [dispatch]
1719
- );
1720
- const getInstance = async (id) => {
1721
- const response = await request(WorkflowInstanceGet, {
1722
- orgId: orgId ?? "",
1723
- instanceId: id
1724
- });
1725
- return response;
1726
- };
1727
- const createInstance = async (defId, variables) => {
1728
- if (!natsConnected || !orgId) {
1729
- throw new Error("Not connected or missing orgId");
1730
- }
1731
- dispatch(setOperationLoading2({ operation: "create", loading: true }));
1732
- try {
1733
- const response = await request(WorkflowInstanceCreate, {
1734
- orgId,
1735
- definitionId: defId,
1736
- variables: variables ?? {},
1737
- autoExecute: true
1738
- });
1739
- if (response instanceof Error) {
1740
- throw response;
1741
- }
1742
- if (response.metadata.success && response.instance) {
1743
- dispatch(updateInstance(response.instance));
1744
- }
1745
- return response;
1746
- } finally {
1747
- dispatch(setOperationLoading2({ operation: "create", loading: false }));
1748
- }
1749
- };
1750
- const executeNode = async (instId, nodeId, input) => {
1751
- if (!natsConnected || !orgId) {
1752
- throw new Error("Not connected or missing orgId");
1753
- }
1754
- dispatch(
1755
- setOperationLoading2({ operation: `execute_${nodeId}`, loading: true })
1756
- );
1757
- try {
1758
- const response = await request(WorkflowInstanceExecuteNode, {
1759
- orgId,
1760
- instanceId: instId,
1761
- nodeId,
1762
- input
1763
- });
1764
- if (response instanceof Error) {
1765
- throw response;
1766
- }
1767
- if (response.metadata.success && response.instance) {
1768
- dispatch(updateInstance(response.instance));
1769
- }
1770
- return response;
1771
- } finally {
1772
- dispatch(
1773
- setOperationLoading2({ operation: `execute_${nodeId}`, loading: false })
1774
- );
1775
- }
1776
- };
1777
- const updateInstanceNodeMetadata = async (instanceId2, nodeId, metadataKey, payload) => {
1778
- if (!natsConnected || !orgId) {
1779
- throw new Error("Not connected or missing orgId");
1780
- }
1781
- dispatch(
1782
- setOperationLoading2({ operation: `update_${nodeId}`, loading: true })
1783
- );
1784
- try {
1785
- const response = await request(WorkflowInstanceUpdateNodeMetadata, {
1786
- orgId,
1787
- instanceId: instanceId2,
1788
- nodeId,
1789
- metadataKey,
1790
- payload
1791
- });
1792
- if (response instanceof Error) {
1793
- throw response;
1794
- }
1795
- if (response.metadata.success && response.instance) {
1796
- dispatch(updateInstance(response.instance));
1797
- }
1798
- return response;
1799
- } finally {
1800
- dispatch(
1801
- setOperationLoading2({ operation: `update_${nodeId}`, loading: false })
1802
- );
1803
- }
1804
- };
1805
- const resumeInstanceNode = async (instanceId2, nodeId, result) => {
1806
- if (!natsConnected || !orgId) {
1807
- throw new Error("Not connected or missing orgId");
1808
- }
1809
- dispatch(
1810
- setOperationLoading2({ operation: `update_${nodeId}`, loading: true })
1811
- );
1812
- try {
1813
- const response = await request(WorkflowInstanceResumeNode, {
1814
- orgId,
1815
- instanceId: instanceId2,
1816
- nodeId,
1817
- result
1818
- });
1819
- if (response instanceof Error) {
1820
- throw response;
1821
- }
1822
- if (response.metadata.success && response.instance) {
1823
- dispatch(updateInstance(response.instance));
1824
- }
1825
- return response;
1826
- } finally {
1827
- dispatch(
1828
- setOperationLoading2({ operation: `update_${nodeId}`, loading: false })
1829
- );
1830
- }
1831
- };
1832
- const refresh = (0, import_react4.useCallback)(() => {
1833
- if (!natsConnected || !orgId) return;
1834
- if (instanceId) {
1835
- loadInstance(instanceId);
1836
- } else if (definitionId) {
1837
- dispatch(setLoading2(true));
1838
- loadInstances(definitionId).finally(() => dispatch(setLoading2(false)));
1839
- }
1840
- }, [natsConnected, orgId, instanceId, definitionId, loadInstance, dispatch]);
1841
- (0, import_react4.useEffect)(() => {
1842
- let mounted = true;
1843
- if (autoLoad && natsConnected && orgId && mounted) {
1844
- if (instanceId) {
1845
- loadInstance(instanceId);
1846
- } else if (definitionId) {
1847
- loadInstances(definitionId);
1848
- }
1849
- }
1850
- return () => {
1851
- mounted = false;
1852
- };
1853
- }, [autoLoad, natsConnected, orgId, instanceId, definitionId]);
1854
- return {
1855
- // State
1856
- instances,
1857
- selectedInstance,
1858
- doSetSelectedInstance,
1859
- isLoading,
1860
- loadingStates,
1861
- error,
1862
- // Operations
1863
- loadInstances,
1864
- loadInstance,
1865
- getInstance,
1866
- createInstance,
1867
- executeNode,
1868
- updateInstanceNodeMetadata,
1869
- resumeInstanceNode,
1870
- // Utilities
1871
- refresh
1872
- };
1873
- }
1874
-
1875
- // context/workflow-definition-context.tsx
1876
- var import_jsx_runtime3 = require("react/jsx-runtime");
1877
- var WorkflowDefinitionContext = (0, import_react5.createContext)(void 0);
1878
- function WorkflowDefinitionProvider({
1879
- children,
1880
- orgId,
1881
- definitionId,
1882
- options = {}
1883
- }) {
1884
- const hookValue = useWorkflowDefinition(orgId, definitionId, options);
1885
- const value = (0, import_react5.useMemo)(() => hookValue, [hookValue]);
1886
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(WorkflowDefinitionContext.Provider, { value, children });
1887
- }
1888
- function useWorkflowDefinitionContext() {
1889
- const context = (0, import_react5.useContext)(WorkflowDefinitionContext);
1890
- if (!context) {
1891
- throw new Error(
1892
- "useWorkflowDefinitionContext must be used within an WorkflowDefinitionProvider"
1893
- );
1894
- }
1895
- return context;
1896
- }
1897
-
1898
- // context/workflow-instance-context.tsx
1899
- var import_react6 = require("react");
1900
- var import_jsx_runtime4 = require("react/jsx-runtime");
1901
- var WorkflowInstanceContext = (0, import_react6.createContext)(void 0);
1902
- function WorkflowInstanceProvider({
1903
- children,
1904
- orgId,
1905
- instanceId,
1906
- definitionId,
1907
- options = {}
1908
- }) {
1909
- const hookValue = useWorkflowInstance(
1910
- orgId,
1911
- instanceId,
1912
- definitionId,
1913
- options
1914
- );
1915
- const value = (0, import_react6.useMemo)(() => hookValue, [hookValue]);
1916
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WorkflowInstanceContext.Provider, { value, children });
1917
- }
1918
- function useWorkflowInstanceContext() {
1919
- const context = (0, import_react6.useContext)(WorkflowInstanceContext);
1920
- if (!context) {
1921
- throw new Error(
1922
- "useWorkflowInstanceContext must be used within an WorkflowInstanceProvider"
1923
- );
1924
- }
1925
- return context;
1926
- }
1927
-
1928
1271
  // schema/schemas.ts
1929
1272
  var nodeDefinitions = {
1930
1273
  "actionAIClassify": {
@@ -4829,182 +4172,175 @@ var WorkflowTypes = {
4829
4172
  "label": "Productivity"
4830
4173
  }
4831
4174
  };
4832
- // Annotate the CommonJS export names for ESM import in node:
4833
- 0 && (module.exports = {
4834
- AccountingNodeSubTypes,
4835
- ActionNodeSubTypes,
4836
- AgentNodeSubTypes,
4837
- DataNodeSubTypes,
4838
- DelayNodeSubTypes,
4839
- DynamicSchemaForm,
4840
- EdgeStatusCompleted,
4841
- EdgeStatusPending,
4842
- EdgeStatusSkipped,
4843
- EdgeTypeCompensation,
4844
- EdgeTypeConditional,
4845
- EdgeTypeDefault,
4846
- EdgeTypeError,
4847
- EdgeTypeLoopBack,
4848
- EdgeTypeMerge,
4849
- EdgeTypeNormal,
4850
- EdgeTypeParallel,
4851
- EdgeTypeTimeout,
4852
- ExpressionTypeDSL,
4853
- ExpressionTypeFilter,
4854
- ExpressionTypeJavaScript,
4855
- ExpressionTypeRules,
4856
- ExpressionTypeTemplate,
4857
- HumanActionNodeSubTypes,
4858
- InstanceStatusCompleted,
4859
- InstanceStatusFailed,
4860
- InstanceStatusNew,
4861
- InstanceStatusPaused,
4862
- InstanceStatusRunning,
4863
- InstanceStatusWaiting,
4864
- LogicNodeSubTypes,
4865
- LoopNodeSubTypes,
4866
- NodeStatusCompleted,
4867
- NodeStatusFailed,
4868
- NodeStatusPending,
4869
- NodeStatusRunning,
4870
- NodeStatusSkipped,
4871
- NodeStatusWaiting,
4872
- NodeSubTypeActionApiCall,
4873
- NodeSubTypeActionAssignSLAPolicy,
4874
- NodeSubTypeActionCSATSurvey,
4875
- NodeSubTypeActionChangeSLAStatus,
4876
- NodeSubTypeActionCreateEntityRecord,
4877
- NodeSubTypeActionDeleteEntityRecord,
4878
- NodeSubTypeActionDocumentExtraction,
4879
- NodeSubTypeActionEscalateSLA,
4880
- NodeSubTypeActionGenerateDocument,
4881
- NodeSubTypeActionMergeEntityRecords,
4882
- NodeSubTypeActionNatsRequest,
4883
- NodeSubTypeActionProcessPayment,
4884
- NodeSubTypeActionQueryEntityRecords,
4885
- NodeSubTypeActionSendEmail,
4886
- NodeSubTypeActionSendSMS,
4887
- NodeSubTypeActionSetVariables,
4888
- NodeSubTypeActionUpdateEntityRecord,
4889
- NodeSubTypeAgentApiIntegration,
4890
- NodeSubTypeAgentChat,
4891
- NodeSubTypeAgentClientApiCall,
4892
- NodeSubTypeAgentCustomResponse,
4893
- NodeSubTypeAgentIntentDetector,
4894
- NodeSubTypeAgentKnowledgeGraph,
4895
- NodeSubTypeAgentOpenTicket,
4896
- NodeSubTypeAgentStructuredOutput,
4897
- NodeSubTypeAgentTransferToHuman,
4898
- NodeSubTypeDataCalculate,
4899
- NodeSubTypeDataFilter,
4900
- NodeSubTypeDataMap,
4901
- NodeSubTypeDataValidate,
4902
- NodeSubTypeDelay,
4903
- NodeSubTypeHumanActionApproval,
4904
- NodeSubTypeHumanActionAssignment,
4905
- NodeSubTypeHumanActionDataEntry,
4906
- NodeSubTypeHumanActionReview,
4907
- NodeSubTypeLogicFor,
4908
- NodeSubTypeLogicIf,
4909
- NodeSubTypeLogicParallel,
4910
- NodeSubTypeLogicSwitch,
4911
- NodeSubTypeLoopData,
4912
- NodeSubTypeTimerBusinessHours,
4913
- NodeSubTypeTimerDelay,
4914
- NodeSubTypeTimerSchedule,
4915
- NodeSubTypeTriggerEntityRecordCreated,
4916
- NodeSubTypeTriggerEntityRecordDeleted,
4917
- NodeSubTypeTriggerEntityRecordUpdated,
4918
- NodeSubTypeTriggerEscalation,
4919
- NodeSubTypeTriggerSLABreach,
4920
- NodeSubTypeTriggerSLAWarning,
4921
- NodeSubTypeTriggerStart,
4922
- NodeSubTypeTriggerWebhookReceived,
4923
- NodeTypeAccounting,
4924
- NodeTypeAction,
4925
- NodeTypeAgent,
4926
- NodeTypeCustom,
4927
- NodeTypeData,
4928
- NodeTypeDelay,
4929
- NodeTypeHumanAction,
4930
- NodeTypeIntegration,
4931
- NodeTypeLogic,
4932
- NodeTypeLoop,
4933
- NodeTypeParallel,
4934
- NodeTypeSubflow,
4935
- NodeTypeTimer,
4936
- NodeTypeTrigger,
4937
- ParallelNodeSubTypes,
4938
- PersistenceTypeEphemeral,
4939
- PersistenceTypePermanent,
4940
- RuleLevelError,
4941
- RuleLevelInfo,
4942
- RuleLevelWarning,
4943
- SchemaBuilder,
4944
- TimeoutActionAlt,
4945
- TimeoutActionFail,
4946
- TimeoutActionRetry,
4947
- TimeoutActionSkip,
4948
- TimerNodeSubTypes,
4949
- TriggerNodeSubTypes,
4950
- WorkflowDefinitionContext,
4951
- WorkflowDefinitionCreate,
4952
- WorkflowDefinitionCreated,
4953
- WorkflowDefinitionDelete,
4954
- WorkflowDefinitionDeleted,
4955
- WorkflowDefinitionGet,
4956
- WorkflowDefinitionGetByTitle,
4957
- WorkflowDefinitionGetServer,
4958
- WorkflowDefinitionList,
4959
- WorkflowDefinitionProvider,
4960
- WorkflowDefinitionUpdate,
4961
- WorkflowDefinitionUpdated,
4962
- WorkflowEdgeTypes,
4963
- WorkflowExecutionCompleted,
4964
- WorkflowExecutionFailed,
4965
- WorkflowExecutionStarted,
4966
- WorkflowInstanceContext,
4967
- WorkflowInstanceCreate,
4968
- WorkflowInstanceExecuteNode,
4969
- WorkflowInstanceExecuteNodeLean,
4970
- WorkflowInstanceExecuteNodeLeanServer,
4971
- WorkflowInstanceExecuteNodeServer,
4972
- WorkflowInstanceGet,
4973
- WorkflowInstanceList,
4974
- WorkflowInstanceProvider,
4975
- WorkflowInstanceResumeNode,
4976
- WorkflowInstanceResumeNodeServer,
4977
- WorkflowInstanceUpdate,
4978
- WorkflowInstanceUpdateNodeMetadata,
4979
- WorkflowInstanceUpdated,
4980
- WorkflowNodeTypes,
4981
- WorkflowScheduleCreate,
4982
- WorkflowScheduleDelete,
4983
- WorkflowScheduleList,
4984
- WorkflowSchedulePause,
4985
- WorkflowScheduleResume,
4986
- WorkflowScheduleUpdate,
4987
- WorkflowTemplateGet,
4988
- WorkflowTemplateInstantiate,
4989
- WorkflowTemplateList,
4990
- WorkflowTriggerFired,
4991
- WorkflowTriggerPause,
4992
- WorkflowTriggerRegister,
4993
- WorkflowTriggerResume,
4994
- WorkflowTriggerStatus,
4995
- WorkflowTypeAgent,
4996
- WorkflowTypeChat,
4997
- WorkflowTypeDocument,
4998
- WorkflowTypeEntity,
4999
- WorkflowTypeProductivity,
5000
- WorkflowTypes,
5001
- nodeDefinitions,
5002
- nodeSchemas,
5003
- useWorkflowDefinition,
5004
- useWorkflowDefinitionContext,
5005
- useWorkflowInstance,
5006
- useWorkflowInstanceContext,
5007
- workflowDefinitionReducer,
5008
- workflowInstanceReducer
5009
- });
4175
+
4176
+
4177
+
4178
+
4179
+
4180
+
4181
+
4182
+
4183
+
4184
+
4185
+
4186
+
4187
+
4188
+
4189
+
4190
+
4191
+
4192
+
4193
+
4194
+
4195
+
4196
+
4197
+
4198
+
4199
+
4200
+
4201
+
4202
+
4203
+
4204
+
4205
+
4206
+
4207
+
4208
+
4209
+
4210
+
4211
+
4212
+
4213
+
4214
+
4215
+
4216
+
4217
+
4218
+
4219
+
4220
+
4221
+
4222
+
4223
+
4224
+
4225
+
4226
+
4227
+
4228
+
4229
+
4230
+
4231
+
4232
+
4233
+
4234
+
4235
+
4236
+
4237
+
4238
+
4239
+
4240
+
4241
+
4242
+
4243
+
4244
+
4245
+
4246
+
4247
+
4248
+
4249
+
4250
+
4251
+
4252
+
4253
+
4254
+
4255
+
4256
+
4257
+
4258
+
4259
+
4260
+
4261
+
4262
+
4263
+
4264
+
4265
+
4266
+
4267
+
4268
+
4269
+
4270
+
4271
+
4272
+
4273
+
4274
+
4275
+
4276
+
4277
+
4278
+
4279
+
4280
+
4281
+
4282
+
4283
+
4284
+
4285
+
4286
+
4287
+
4288
+
4289
+
4290
+
4291
+
4292
+
4293
+
4294
+
4295
+
4296
+
4297
+
4298
+
4299
+
4300
+
4301
+
4302
+
4303
+
4304
+
4305
+
4306
+
4307
+
4308
+
4309
+
4310
+
4311
+
4312
+
4313
+
4314
+
4315
+
4316
+
4317
+
4318
+
4319
+
4320
+
4321
+
4322
+
4323
+
4324
+
4325
+
4326
+
4327
+
4328
+
4329
+
4330
+
4331
+
4332
+
4333
+
4334
+
4335
+
4336
+
4337
+
4338
+
4339
+
4340
+
4341
+
4342
+
4343
+
4344
+
4345
+ exports.AccountingNodeSubTypes = AccountingNodeSubTypes; exports.ActionNodeSubTypes = ActionNodeSubTypes; exports.AgentNodeSubTypes = AgentNodeSubTypes; exports.DataNodeSubTypes = DataNodeSubTypes; exports.DelayNodeSubTypes = DelayNodeSubTypes; exports.DynamicSchemaForm = DynamicSchemaForm; exports.EdgeStatusCompleted = _chunkH24IF5AAjs.EdgeStatusCompleted; exports.EdgeStatusPending = _chunkH24IF5AAjs.EdgeStatusPending; exports.EdgeStatusSkipped = _chunkH24IF5AAjs.EdgeStatusSkipped; exports.EdgeTypeCompensation = _chunkH24IF5AAjs.EdgeTypeCompensation; exports.EdgeTypeConditional = _chunkH24IF5AAjs.EdgeTypeConditional; exports.EdgeTypeDefault = _chunkH24IF5AAjs.EdgeTypeDefault; exports.EdgeTypeError = _chunkH24IF5AAjs.EdgeTypeError; exports.EdgeTypeLoopBack = _chunkH24IF5AAjs.EdgeTypeLoopBack; exports.EdgeTypeMerge = _chunkH24IF5AAjs.EdgeTypeMerge; exports.EdgeTypeNormal = _chunkH24IF5AAjs.EdgeTypeNormal; exports.EdgeTypeParallel = _chunkH24IF5AAjs.EdgeTypeParallel; exports.EdgeTypeTimeout = _chunkH24IF5AAjs.EdgeTypeTimeout; exports.ExpressionTypeDSL = _chunkH24IF5AAjs.ExpressionTypeDSL; exports.ExpressionTypeFilter = _chunkH24IF5AAjs.ExpressionTypeFilter; exports.ExpressionTypeJavaScript = _chunkH24IF5AAjs.ExpressionTypeJavaScript; exports.ExpressionTypeRules = _chunkH24IF5AAjs.ExpressionTypeRules; exports.ExpressionTypeTemplate = _chunkH24IF5AAjs.ExpressionTypeTemplate; exports.HumanActionNodeSubTypes = HumanActionNodeSubTypes; exports.InstanceStatusCompleted = _chunkH24IF5AAjs.InstanceStatusCompleted; exports.InstanceStatusFailed = _chunkH24IF5AAjs.InstanceStatusFailed; exports.InstanceStatusNew = _chunkH24IF5AAjs.InstanceStatusNew; exports.InstanceStatusPaused = _chunkH24IF5AAjs.InstanceStatusPaused; exports.InstanceStatusRunning = _chunkH24IF5AAjs.InstanceStatusRunning; exports.InstanceStatusWaiting = _chunkH24IF5AAjs.InstanceStatusWaiting; exports.LogicNodeSubTypes = LogicNodeSubTypes; exports.LoopNodeSubTypes = LoopNodeSubTypes; exports.NodeStatusCompleted = _chunkH24IF5AAjs.NodeStatusCompleted; exports.NodeStatusFailed = _chunkH24IF5AAjs.NodeStatusFailed; exports.NodeStatusPending = _chunkH24IF5AAjs.NodeStatusPending; exports.NodeStatusRunning = _chunkH24IF5AAjs.NodeStatusRunning; exports.NodeStatusSkipped = _chunkH24IF5AAjs.NodeStatusSkipped; exports.NodeStatusWaiting = _chunkH24IF5AAjs.NodeStatusWaiting; exports.NodeSubTypeActionApiCall = _chunkH24IF5AAjs.NodeSubTypeActionApiCall; exports.NodeSubTypeActionAssignSLAPolicy = _chunkH24IF5AAjs.NodeSubTypeActionAssignSLAPolicy; exports.NodeSubTypeActionCSATSurvey = _chunkH24IF5AAjs.NodeSubTypeActionCSATSurvey; exports.NodeSubTypeActionChangeSLAStatus = _chunkH24IF5AAjs.NodeSubTypeActionChangeSLAStatus; exports.NodeSubTypeActionCreateEntityRecord = _chunkH24IF5AAjs.NodeSubTypeActionCreateEntityRecord; exports.NodeSubTypeActionDeleteEntityRecord = _chunkH24IF5AAjs.NodeSubTypeActionDeleteEntityRecord; exports.NodeSubTypeActionDocumentExtraction = _chunkH24IF5AAjs.NodeSubTypeActionDocumentExtraction; exports.NodeSubTypeActionEscalateSLA = _chunkH24IF5AAjs.NodeSubTypeActionEscalateSLA; exports.NodeSubTypeActionGenerateDocument = _chunkH24IF5AAjs.NodeSubTypeActionGenerateDocument; exports.NodeSubTypeActionMergeEntityRecords = _chunkH24IF5AAjs.NodeSubTypeActionMergeEntityRecords; exports.NodeSubTypeActionNatsRequest = _chunkH24IF5AAjs.NodeSubTypeActionNatsRequest; exports.NodeSubTypeActionProcessPayment = _chunkH24IF5AAjs.NodeSubTypeActionProcessPayment; exports.NodeSubTypeActionQueryEntityRecords = _chunkH24IF5AAjs.NodeSubTypeActionQueryEntityRecords; exports.NodeSubTypeActionSendEmail = _chunkH24IF5AAjs.NodeSubTypeActionSendEmail; exports.NodeSubTypeActionSendSMS = _chunkH24IF5AAjs.NodeSubTypeActionSendSMS; exports.NodeSubTypeActionSetVariables = _chunkH24IF5AAjs.NodeSubTypeActionSetVariables; exports.NodeSubTypeActionUpdateEntityRecord = _chunkH24IF5AAjs.NodeSubTypeActionUpdateEntityRecord; exports.NodeSubTypeAgentApiIntegration = _chunkH24IF5AAjs.NodeSubTypeAgentApiIntegration; exports.NodeSubTypeAgentChat = _chunkH24IF5AAjs.NodeSubTypeAgentChat; exports.NodeSubTypeAgentClientApiCall = _chunkH24IF5AAjs.NodeSubTypeAgentClientApiCall; exports.NodeSubTypeAgentCustomResponse = _chunkH24IF5AAjs.NodeSubTypeAgentCustomResponse; exports.NodeSubTypeAgentIntentDetector = _chunkH24IF5AAjs.NodeSubTypeAgentIntentDetector; exports.NodeSubTypeAgentKnowledgeGraph = _chunkH24IF5AAjs.NodeSubTypeAgentKnowledgeGraph; exports.NodeSubTypeAgentOpenTicket = _chunkH24IF5AAjs.NodeSubTypeAgentOpenTicket; exports.NodeSubTypeAgentStructuredOutput = _chunkH24IF5AAjs.NodeSubTypeAgentStructuredOutput; exports.NodeSubTypeAgentTransferToHuman = _chunkH24IF5AAjs.NodeSubTypeAgentTransferToHuman; exports.NodeSubTypeDataCalculate = _chunkH24IF5AAjs.NodeSubTypeDataCalculate; exports.NodeSubTypeDataFilter = _chunkH24IF5AAjs.NodeSubTypeDataFilter; exports.NodeSubTypeDataMap = _chunkH24IF5AAjs.NodeSubTypeDataMap; exports.NodeSubTypeDataValidate = _chunkH24IF5AAjs.NodeSubTypeDataValidate; exports.NodeSubTypeDelay = _chunkH24IF5AAjs.NodeSubTypeDelay; exports.NodeSubTypeHumanActionApproval = _chunkH24IF5AAjs.NodeSubTypeHumanActionApproval; exports.NodeSubTypeHumanActionAssignment = _chunkH24IF5AAjs.NodeSubTypeHumanActionAssignment; exports.NodeSubTypeHumanActionDataEntry = _chunkH24IF5AAjs.NodeSubTypeHumanActionDataEntry; exports.NodeSubTypeHumanActionReview = _chunkH24IF5AAjs.NodeSubTypeHumanActionReview; exports.NodeSubTypeLogicFor = _chunkH24IF5AAjs.NodeSubTypeLogicFor; exports.NodeSubTypeLogicIf = _chunkH24IF5AAjs.NodeSubTypeLogicIf; exports.NodeSubTypeLogicParallel = _chunkH24IF5AAjs.NodeSubTypeLogicParallel; exports.NodeSubTypeLogicSwitch = _chunkH24IF5AAjs.NodeSubTypeLogicSwitch; exports.NodeSubTypeLoopData = _chunkH24IF5AAjs.NodeSubTypeLoopData; exports.NodeSubTypeTimerBusinessHours = _chunkH24IF5AAjs.NodeSubTypeTimerBusinessHours; exports.NodeSubTypeTimerDelay = _chunkH24IF5AAjs.NodeSubTypeTimerDelay; exports.NodeSubTypeTimerSchedule = _chunkH24IF5AAjs.NodeSubTypeTimerSchedule; exports.NodeSubTypeTriggerEntityRecordCreated = _chunkH24IF5AAjs.NodeSubTypeTriggerEntityRecordCreated; exports.NodeSubTypeTriggerEntityRecordDeleted = _chunkH24IF5AAjs.NodeSubTypeTriggerEntityRecordDeleted; exports.NodeSubTypeTriggerEntityRecordUpdated = _chunkH24IF5AAjs.NodeSubTypeTriggerEntityRecordUpdated; exports.NodeSubTypeTriggerEscalation = _chunkH24IF5AAjs.NodeSubTypeTriggerEscalation; exports.NodeSubTypeTriggerSLABreach = _chunkH24IF5AAjs.NodeSubTypeTriggerSLABreach; exports.NodeSubTypeTriggerSLAWarning = _chunkH24IF5AAjs.NodeSubTypeTriggerSLAWarning; exports.NodeSubTypeTriggerStart = _chunkH24IF5AAjs.NodeSubTypeTriggerStart; exports.NodeSubTypeTriggerWebhookReceived = _chunkH24IF5AAjs.NodeSubTypeTriggerWebhookReceived; exports.NodeTypeAccounting = _chunkH24IF5AAjs.NodeTypeAccounting; exports.NodeTypeAction = _chunkH24IF5AAjs.NodeTypeAction; exports.NodeTypeAgent = _chunkH24IF5AAjs.NodeTypeAgent; exports.NodeTypeCustom = _chunkH24IF5AAjs.NodeTypeCustom; exports.NodeTypeData = _chunkH24IF5AAjs.NodeTypeData; exports.NodeTypeDelay = _chunkH24IF5AAjs.NodeTypeDelay; exports.NodeTypeDocumentExtraction = _chunkH24IF5AAjs.NodeTypeDocumentExtraction; exports.NodeTypeHumanAction = _chunkH24IF5AAjs.NodeTypeHumanAction; exports.NodeTypeIntegration = _chunkH24IF5AAjs.NodeTypeIntegration; exports.NodeTypeLogic = _chunkH24IF5AAjs.NodeTypeLogic; exports.NodeTypeLoop = _chunkH24IF5AAjs.NodeTypeLoop; exports.NodeTypeParallel = _chunkH24IF5AAjs.NodeTypeParallel; exports.NodeTypeSubflow = _chunkH24IF5AAjs.NodeTypeSubflow; exports.NodeTypeTimer = _chunkH24IF5AAjs.NodeTypeTimer; exports.NodeTypeTrigger = _chunkH24IF5AAjs.NodeTypeTrigger; exports.ParallelNodeSubTypes = ParallelNodeSubTypes; exports.PersistenceTypeEphemeral = _chunkH24IF5AAjs.PersistenceTypeEphemeral; exports.PersistenceTypePermanent = _chunkH24IF5AAjs.PersistenceTypePermanent; exports.RuleLevelError = _chunkH24IF5AAjs.RuleLevelError; exports.RuleLevelInfo = _chunkH24IF5AAjs.RuleLevelInfo; exports.RuleLevelWarning = _chunkH24IF5AAjs.RuleLevelWarning; exports.SchemaBuilder = SchemaBuilder; exports.TimeoutActionAlt = _chunkH24IF5AAjs.TimeoutActionAlt; exports.TimeoutActionFail = _chunkH24IF5AAjs.TimeoutActionFail; exports.TimeoutActionRetry = _chunkH24IF5AAjs.TimeoutActionRetry; exports.TimeoutActionSkip = _chunkH24IF5AAjs.TimeoutActionSkip; exports.TimerNodeSubTypes = TimerNodeSubTypes; exports.TriggerNodeSubTypes = TriggerNodeSubTypes; exports.WorkflowDefinitionCreate = _chunkH24IF5AAjs.WorkflowDefinitionCreate; exports.WorkflowDefinitionCreated = _chunkH24IF5AAjs.WorkflowDefinitionCreated; exports.WorkflowDefinitionDelete = _chunkH24IF5AAjs.WorkflowDefinitionDelete; exports.WorkflowDefinitionDeleted = _chunkH24IF5AAjs.WorkflowDefinitionDeleted; exports.WorkflowDefinitionGet = _chunkH24IF5AAjs.WorkflowDefinitionGet; exports.WorkflowDefinitionGetByTitle = _chunkH24IF5AAjs.WorkflowDefinitionGetByTitle; exports.WorkflowDefinitionGetServer = _chunkH24IF5AAjs.WorkflowDefinitionGetServer; exports.WorkflowDefinitionList = _chunkH24IF5AAjs.WorkflowDefinitionList; exports.WorkflowDefinitionUpdate = _chunkH24IF5AAjs.WorkflowDefinitionUpdate; exports.WorkflowDefinitionUpdated = _chunkH24IF5AAjs.WorkflowDefinitionUpdated; exports.WorkflowEdgeTypes = WorkflowEdgeTypes; exports.WorkflowExecutionCompleted = _chunkH24IF5AAjs.WorkflowExecutionCompleted; exports.WorkflowExecutionFailed = _chunkH24IF5AAjs.WorkflowExecutionFailed; exports.WorkflowExecutionStarted = _chunkH24IF5AAjs.WorkflowExecutionStarted; exports.WorkflowInstanceCreate = _chunkH24IF5AAjs.WorkflowInstanceCreate; exports.WorkflowInstanceExecuteNode = _chunkH24IF5AAjs.WorkflowInstanceExecuteNode; exports.WorkflowInstanceExecuteNodeLean = _chunkH24IF5AAjs.WorkflowInstanceExecuteNodeLean; exports.WorkflowInstanceExecuteNodeLeanServer = _chunkH24IF5AAjs.WorkflowInstanceExecuteNodeLeanServer; exports.WorkflowInstanceExecuteNodeServer = _chunkH24IF5AAjs.WorkflowInstanceExecuteNodeServer; exports.WorkflowInstanceGet = _chunkH24IF5AAjs.WorkflowInstanceGet; exports.WorkflowInstanceGetByStateVariable = _chunkH24IF5AAjs.WorkflowInstanceGetByStateVariable; exports.WorkflowInstanceList = _chunkH24IF5AAjs.WorkflowInstanceList; exports.WorkflowInstanceResumeNode = _chunkH24IF5AAjs.WorkflowInstanceResumeNode; exports.WorkflowInstanceResumeNodeServer = _chunkH24IF5AAjs.WorkflowInstanceResumeNodeServer; exports.WorkflowInstanceUpdate = _chunkH24IF5AAjs.WorkflowInstanceUpdate; exports.WorkflowInstanceUpdateNodeMetadata = _chunkH24IF5AAjs.WorkflowInstanceUpdateNodeMetadata; exports.WorkflowInstanceUpdated = _chunkH24IF5AAjs.WorkflowInstanceUpdated; exports.WorkflowNodeTypes = WorkflowNodeTypes; exports.WorkflowScheduleCreate = _chunkH24IF5AAjs.WorkflowScheduleCreate; exports.WorkflowScheduleDelete = _chunkH24IF5AAjs.WorkflowScheduleDelete; exports.WorkflowScheduleList = _chunkH24IF5AAjs.WorkflowScheduleList; exports.WorkflowSchedulePause = _chunkH24IF5AAjs.WorkflowSchedulePause; exports.WorkflowScheduleResume = _chunkH24IF5AAjs.WorkflowScheduleResume; exports.WorkflowScheduleUpdate = _chunkH24IF5AAjs.WorkflowScheduleUpdate; exports.WorkflowTemplateGet = _chunkH24IF5AAjs.WorkflowTemplateGet; exports.WorkflowTemplateInstantiate = _chunkH24IF5AAjs.WorkflowTemplateInstantiate; exports.WorkflowTemplateList = _chunkH24IF5AAjs.WorkflowTemplateList; exports.WorkflowTriggerFired = _chunkH24IF5AAjs.WorkflowTriggerFired; exports.WorkflowTriggerPause = _chunkH24IF5AAjs.WorkflowTriggerPause; exports.WorkflowTriggerRegister = _chunkH24IF5AAjs.WorkflowTriggerRegister; exports.WorkflowTriggerResume = _chunkH24IF5AAjs.WorkflowTriggerResume; exports.WorkflowTriggerStatus = _chunkH24IF5AAjs.WorkflowTriggerStatus; exports.WorkflowTypeAgent = _chunkH24IF5AAjs.WorkflowTypeAgent; exports.WorkflowTypeChat = _chunkH24IF5AAjs.WorkflowTypeChat; exports.WorkflowTypeDocument = _chunkH24IF5AAjs.WorkflowTypeDocument; exports.WorkflowTypeEntity = _chunkH24IF5AAjs.WorkflowTypeEntity; exports.WorkflowTypeProductivity = _chunkH24IF5AAjs.WorkflowTypeProductivity; exports.WorkflowTypes = WorkflowTypes; exports.nodeDefinitions = nodeDefinitions; exports.nodeSchemas = nodeSchemas; exports.workflowDefinitionReducer = workflowDefinitionReducer; exports.workflowInstanceReducer = workflowInstanceReducer;
5010
4346
  //# sourceMappingURL=index.js.map