@elqnt/workflow 1.0.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-CZAV6SMB.mjs +305 -0
- package/dist/chunk-CZAV6SMB.mjs.map +1 -0
- package/dist/chunk-GYLRUX77.js +305 -0
- package/dist/chunk-GYLRUX77.js.map +1 -0
- package/dist/index-BDCA9Cs7.d.mts +850 -0
- package/dist/index-BDCA9Cs7.d.ts +850 -0
- package/dist/index.d.mts +3 -890
- package/dist/index.d.ts +3 -890
- package/dist/index.js +482 -1148
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +151 -617
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.d.mts +2 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +302 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/index.mjs +302 -0
- package/dist/models/index.mjs.map +1 -0
- package/package.json +10 -6
package/dist/index.js
CHANGED
|
@@ -1,207 +1,158 @@
|
|
|
1
|
-
"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
|
-
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
|
+
var _chunkGYLRUX77js = require('./chunk-GYLRUX77.js');
|
|
201
152
|
|
|
202
153
|
// components/dynamic-schema-form.tsx
|
|
203
|
-
var
|
|
204
|
-
var
|
|
154
|
+
var _react = require('react');
|
|
155
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
205
156
|
function DynamicSchemaForm({
|
|
206
157
|
schema,
|
|
207
158
|
value = {},
|
|
@@ -212,16 +163,16 @@ function DynamicSchemaForm({
|
|
|
212
163
|
variables = [],
|
|
213
164
|
showVariablePicker = false
|
|
214
165
|
}) {
|
|
215
|
-
const [collapsedSections, setCollapsedSections] = (0,
|
|
166
|
+
const [collapsedSections, setCollapsedSections] = _react.useState.call(void 0,
|
|
216
167
|
/* @__PURE__ */ new Set()
|
|
217
168
|
);
|
|
218
|
-
const [openVariablePickers, setOpenVariablePickers] = (0,
|
|
169
|
+
const [openVariablePickers, setOpenVariablePickers] = _react.useState.call(void 0,
|
|
219
170
|
/* @__PURE__ */ new Set()
|
|
220
171
|
);
|
|
221
|
-
const [openRichTextDialogs, setOpenRichTextDialogs] = (0,
|
|
172
|
+
const [openRichTextDialogs, setOpenRichTextDialogs] = _react.useState.call(void 0,
|
|
222
173
|
/* @__PURE__ */ new Set()
|
|
223
174
|
);
|
|
224
|
-
const [richTextDraftValues, setRichTextDraftValues] = (0,
|
|
175
|
+
const [richTextDraftValues, setRichTextDraftValues] = _react.useState.call(void 0, {});
|
|
225
176
|
const {
|
|
226
177
|
Input,
|
|
227
178
|
Label,
|
|
@@ -291,7 +242,7 @@ function DynamicSchemaForm({
|
|
|
291
242
|
const isOpen = openVariablePickers.has(fieldPath);
|
|
292
243
|
const currentValue = value[fieldName];
|
|
293
244
|
const isVariable = isVariableReference(currentValue);
|
|
294
|
-
return /* @__PURE__ */ (0,
|
|
245
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
295
246
|
Popover,
|
|
296
247
|
{
|
|
297
248
|
open: isOpen,
|
|
@@ -307,7 +258,7 @@ function DynamicSchemaForm({
|
|
|
307
258
|
}
|
|
308
259
|
},
|
|
309
260
|
children: [
|
|
310
|
-
/* @__PURE__ */ (0,
|
|
261
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
311
262
|
Button,
|
|
312
263
|
{
|
|
313
264
|
type: "button",
|
|
@@ -318,23 +269,23 @@ function DynamicSchemaForm({
|
|
|
318
269
|
isVariable && "border-primary text-primary"
|
|
319
270
|
),
|
|
320
271
|
disabled,
|
|
321
|
-
children: /* @__PURE__ */ (0,
|
|
272
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VariableIcon, { className: "h-3.5 w-3.5" })
|
|
322
273
|
}
|
|
323
274
|
) }),
|
|
324
|
-
/* @__PURE__ */ (0,
|
|
325
|
-
/* @__PURE__ */ (0,
|
|
275
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PopoverContent, { className: "w-56 p-1", align: "end", children: [
|
|
276
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-xs font-medium text-muted-foreground px-2 py-1.5", children: [
|
|
326
277
|
"Select Variable (",
|
|
327
278
|
fieldType || "any",
|
|
328
279
|
")"
|
|
329
280
|
] }),
|
|
330
|
-
/* @__PURE__ */ (0,
|
|
281
|
+
/* @__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
282
|
"No variables available.",
|
|
332
|
-
/* @__PURE__ */ (0,
|
|
333
|
-
/* @__PURE__ */ (0,
|
|
283
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "br", {}),
|
|
284
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[10px]", children: "Add variables in Workflow Settings \u2192 Variables" })
|
|
334
285
|
] }) : matchingVars.map((variable) => {
|
|
335
286
|
const varRef = `{{${variable.path}}}`;
|
|
336
287
|
const isSelected = currentValue === varRef;
|
|
337
|
-
return /* @__PURE__ */ (0,
|
|
288
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
338
289
|
"button",
|
|
339
290
|
{
|
|
340
291
|
type: "button",
|
|
@@ -351,11 +302,11 @@ function DynamicSchemaForm({
|
|
|
351
302
|
});
|
|
352
303
|
},
|
|
353
304
|
children: [
|
|
354
|
-
/* @__PURE__ */ (0,
|
|
355
|
-
/* @__PURE__ */ (0,
|
|
356
|
-
/* @__PURE__ */ (0,
|
|
305
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
306
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: variable.title || variable.name }),
|
|
307
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-[10px] text-muted-foreground font-mono", children: variable.path })
|
|
357
308
|
] }),
|
|
358
|
-
isSelected && CheckIcon && /* @__PURE__ */ (0,
|
|
309
|
+
isSelected && CheckIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CheckIcon, { className: "h-3 w-3" })
|
|
359
310
|
]
|
|
360
311
|
},
|
|
361
312
|
variable.path
|
|
@@ -385,50 +336,50 @@ function DynamicSchemaForm({
|
|
|
385
336
|
};
|
|
386
337
|
const renderField = (fieldSchema, fieldName, fieldValue) => {
|
|
387
338
|
const fieldPath = [...path, fieldName].join(".");
|
|
388
|
-
const isRequired = schema.required
|
|
339
|
+
const isRequired = _optionalChain([schema, 'access', _2 => _2.required, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4(fieldName)]);
|
|
389
340
|
if (fieldSchema.enum) {
|
|
390
341
|
const labels = fieldSchema["x-enumLabels"] || fieldSchema.enum;
|
|
391
|
-
return /* @__PURE__ */ (0,
|
|
392
|
-
/* @__PURE__ */ (0,
|
|
342
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
|
|
343
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
|
|
393
344
|
fieldSchema.title || fieldName,
|
|
394
|
-
isRequired && /* @__PURE__ */ (0,
|
|
345
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
395
346
|
] }),
|
|
396
|
-
/* @__PURE__ */ (0,
|
|
347
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
397
348
|
Select,
|
|
398
349
|
{
|
|
399
350
|
value: fieldValue || "",
|
|
400
351
|
onValueChange: (v) => handleFieldChange(fieldName, v),
|
|
401
352
|
disabled,
|
|
402
353
|
children: [
|
|
403
|
-
/* @__PURE__ */ (0,
|
|
354
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
404
355
|
SelectValue,
|
|
405
356
|
{
|
|
406
357
|
placeholder: `Select ${fieldSchema.title || fieldName}`
|
|
407
358
|
}
|
|
408
359
|
) }),
|
|
409
|
-
/* @__PURE__ */ (0,
|
|
360
|
+
/* @__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
361
|
]
|
|
411
362
|
}
|
|
412
363
|
),
|
|
413
|
-
fieldSchema.description && /* @__PURE__ */ (0,
|
|
364
|
+
fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
|
|
414
365
|
] }, fieldPath);
|
|
415
366
|
}
|
|
416
367
|
if (fieldSchema.type === "object" && fieldSchema.properties) {
|
|
417
368
|
const isCollapsed = collapsedSections.has(fieldPath);
|
|
418
|
-
return /* @__PURE__ */ (0,
|
|
419
|
-
/* @__PURE__ */ (0,
|
|
369
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
370
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
420
371
|
"button",
|
|
421
372
|
{
|
|
422
373
|
type: "button",
|
|
423
374
|
onClick: () => toggleSection(fieldPath),
|
|
424
375
|
className: "flex items-center gap-1 text-xs font-medium text-gray-700 hover:text-gray-900",
|
|
425
376
|
children: [
|
|
426
|
-
isCollapsed ? /* @__PURE__ */ (0,
|
|
377
|
+
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
378
|
fieldSchema.title || fieldName
|
|
428
379
|
]
|
|
429
380
|
}
|
|
430
381
|
),
|
|
431
|
-
!isCollapsed && /* @__PURE__ */ (0,
|
|
382
|
+
!isCollapsed && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "p-3 bg-gray-50/50", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
432
383
|
DynamicSchemaForm,
|
|
433
384
|
{
|
|
434
385
|
schema: fieldSchema,
|
|
@@ -446,13 +397,13 @@ function DynamicSchemaForm({
|
|
|
446
397
|
if (fieldSchema.type === "array" && fieldSchema.items) {
|
|
447
398
|
const arrayValue = Array.isArray(fieldValue) ? fieldValue : [];
|
|
448
399
|
const itemSchema = fieldSchema.items;
|
|
449
|
-
return /* @__PURE__ */ (0,
|
|
450
|
-
/* @__PURE__ */ (0,
|
|
451
|
-
/* @__PURE__ */ (0,
|
|
400
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
401
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
|
|
402
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
|
|
452
403
|
fieldSchema.title || fieldName,
|
|
453
|
-
isRequired && /* @__PURE__ */ (0,
|
|
404
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
454
405
|
] }),
|
|
455
|
-
/* @__PURE__ */ (0,
|
|
406
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
456
407
|
Button,
|
|
457
408
|
{
|
|
458
409
|
type: "button",
|
|
@@ -465,15 +416,15 @@ function DynamicSchemaForm({
|
|
|
465
416
|
},
|
|
466
417
|
disabled,
|
|
467
418
|
children: [
|
|
468
|
-
/* @__PURE__ */ (0,
|
|
419
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-3 w-3 mr-1" }),
|
|
469
420
|
"Add"
|
|
470
421
|
]
|
|
471
422
|
}
|
|
472
423
|
)
|
|
473
424
|
] }),
|
|
474
|
-
fieldSchema.description && /* @__PURE__ */ (0,
|
|
475
|
-
/* @__PURE__ */ (0,
|
|
476
|
-
/* @__PURE__ */ (0,
|
|
425
|
+
fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description }),
|
|
426
|
+
/* @__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: [
|
|
427
|
+
/* @__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
428
|
DynamicSchemaForm,
|
|
478
429
|
{
|
|
479
430
|
schema: itemSchema,
|
|
@@ -489,7 +440,7 @@ function DynamicSchemaForm({
|
|
|
489
440
|
variables,
|
|
490
441
|
showVariablePicker
|
|
491
442
|
}
|
|
492
|
-
) }) : /* @__PURE__ */ (0,
|
|
443
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
493
444
|
Input,
|
|
494
445
|
{
|
|
495
446
|
value: item || "",
|
|
@@ -502,7 +453,7 @@ function DynamicSchemaForm({
|
|
|
502
453
|
className: "h-8 text-xs"
|
|
503
454
|
}
|
|
504
455
|
) }),
|
|
505
|
-
/* @__PURE__ */ (0,
|
|
456
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
506
457
|
Button,
|
|
507
458
|
{
|
|
508
459
|
type: "button",
|
|
@@ -516,15 +467,15 @@ function DynamicSchemaForm({
|
|
|
516
467
|
handleFieldChange(fieldName, newArray);
|
|
517
468
|
},
|
|
518
469
|
disabled,
|
|
519
|
-
children: /* @__PURE__ */ (0,
|
|
470
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-3 w-3" })
|
|
520
471
|
}
|
|
521
472
|
)
|
|
522
473
|
] }, index)) })
|
|
523
474
|
] }, fieldPath);
|
|
524
475
|
}
|
|
525
476
|
if (fieldSchema.type === "boolean") {
|
|
526
|
-
return /* @__PURE__ */ (0,
|
|
527
|
-
/* @__PURE__ */ (0,
|
|
477
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center space-x-2", children: [
|
|
478
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
528
479
|
Checkbox,
|
|
529
480
|
{
|
|
530
481
|
id: fieldPath,
|
|
@@ -533,11 +484,11 @@ function DynamicSchemaForm({
|
|
|
533
484
|
disabled
|
|
534
485
|
}
|
|
535
486
|
),
|
|
536
|
-
/* @__PURE__ */ (0,
|
|
487
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { htmlFor: fieldPath, className: "text-xs font-normal", children: [
|
|
537
488
|
fieldSchema.title || fieldName,
|
|
538
|
-
isRequired && /* @__PURE__ */ (0,
|
|
489
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
539
490
|
] }),
|
|
540
|
-
fieldSchema.description && /* @__PURE__ */ (0,
|
|
491
|
+
fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-[10px] text-muted-foreground ml-2", children: [
|
|
541
492
|
"(",
|
|
542
493
|
fieldSchema.description,
|
|
543
494
|
")"
|
|
@@ -546,17 +497,17 @@ function DynamicSchemaForm({
|
|
|
546
497
|
}
|
|
547
498
|
if (fieldSchema.type === "number" || fieldSchema.type === "integer") {
|
|
548
499
|
const isVarValue = isVariableReference(fieldValue);
|
|
549
|
-
return /* @__PURE__ */ (0,
|
|
550
|
-
/* @__PURE__ */ (0,
|
|
500
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
|
|
501
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
|
|
551
502
|
fieldSchema.title || fieldName,
|
|
552
|
-
isRequired && /* @__PURE__ */ (0,
|
|
503
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
553
504
|
] }),
|
|
554
|
-
/* @__PURE__ */ (0,
|
|
555
|
-
/* @__PURE__ */ (0,
|
|
505
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
|
|
506
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
556
507
|
Input,
|
|
557
508
|
{
|
|
558
509
|
type: isVarValue ? "text" : "number",
|
|
559
|
-
value: fieldValue
|
|
510
|
+
value: _nullishCoalesce(fieldValue, () => ( "")),
|
|
560
511
|
onChange: (e) => {
|
|
561
512
|
if (isVariableReference(e.target.value)) {
|
|
562
513
|
handleFieldChange(fieldName, e.target.value);
|
|
@@ -579,21 +530,21 @@ function DynamicSchemaForm({
|
|
|
579
530
|
(varPath) => handleFieldChange(fieldName, varPath)
|
|
580
531
|
)
|
|
581
532
|
] }),
|
|
582
|
-
fieldSchema.description && /* @__PURE__ */ (0,
|
|
533
|
+
fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
|
|
583
534
|
] }, fieldPath);
|
|
584
535
|
}
|
|
585
536
|
if (fieldSchema.type === "string") {
|
|
586
537
|
if (fieldSchema.format === "richtext") {
|
|
587
538
|
const isDialogOpen = openRichTextDialogs.has(fieldPath);
|
|
588
|
-
const draftValue = richTextDraftValues[fieldPath]
|
|
539
|
+
const draftValue = _nullishCoalesce(_nullishCoalesce(richTextDraftValues[fieldPath], () => ( fieldValue)), () => ( ""));
|
|
589
540
|
const previewText = (fieldValue || "").replace(/<[^>]*>/g, "").slice(0, 50);
|
|
590
541
|
const matchingVars = getMatchingVariables("string");
|
|
591
542
|
if (!Dialog || !DialogContent || !DialogHeader || !DialogTitle || !DialogFooter) {
|
|
592
|
-
return /* @__PURE__ */ (0,
|
|
593
|
-
/* @__PURE__ */ (0,
|
|
594
|
-
/* @__PURE__ */ (0,
|
|
543
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
|
|
544
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
|
|
545
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
|
|
595
546
|
fieldSchema.title || fieldName,
|
|
596
|
-
isRequired && /* @__PURE__ */ (0,
|
|
547
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
597
548
|
] }),
|
|
598
549
|
renderVariablePicker(
|
|
599
550
|
fieldName,
|
|
@@ -602,7 +553,7 @@ function DynamicSchemaForm({
|
|
|
602
553
|
(varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
|
|
603
554
|
)
|
|
604
555
|
] }),
|
|
605
|
-
/* @__PURE__ */ (0,
|
|
556
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
606
557
|
Textarea,
|
|
607
558
|
{
|
|
608
559
|
value: fieldValue || "",
|
|
@@ -615,14 +566,14 @@ function DynamicSchemaForm({
|
|
|
615
566
|
)
|
|
616
567
|
] }, fieldPath);
|
|
617
568
|
}
|
|
618
|
-
return /* @__PURE__ */ (0,
|
|
619
|
-
/* @__PURE__ */ (0,
|
|
569
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
|
|
570
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
|
|
620
571
|
fieldSchema.title || fieldName,
|
|
621
|
-
isRequired && /* @__PURE__ */ (0,
|
|
572
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
622
573
|
] }),
|
|
623
|
-
/* @__PURE__ */ (0,
|
|
624
|
-
/* @__PURE__ */ (0,
|
|
625
|
-
/* @__PURE__ */ (0,
|
|
574
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
|
|
575
|
+
/* @__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..." }) }),
|
|
576
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
626
577
|
Button,
|
|
627
578
|
{
|
|
628
579
|
type: "button",
|
|
@@ -634,11 +585,11 @@ function DynamicSchemaForm({
|
|
|
634
585
|
setOpenRichTextDialogs((prev) => new Set(prev).add(fieldPath));
|
|
635
586
|
},
|
|
636
587
|
disabled,
|
|
637
|
-
children: EditIcon ? /* @__PURE__ */ (0,
|
|
588
|
+
children: EditIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EditIcon, { className: "h-3.5 w-3.5" }) : "Edit"
|
|
638
589
|
}
|
|
639
590
|
)
|
|
640
591
|
] }),
|
|
641
|
-
/* @__PURE__ */ (0,
|
|
592
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
642
593
|
Dialog,
|
|
643
594
|
{
|
|
644
595
|
open: isDialogOpen,
|
|
@@ -651,12 +602,12 @@ function DynamicSchemaForm({
|
|
|
651
602
|
});
|
|
652
603
|
}
|
|
653
604
|
},
|
|
654
|
-
children: /* @__PURE__ */ (0,
|
|
655
|
-
/* @__PURE__ */ (0,
|
|
605
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: "max-w-3xl max-h-[85vh] flex flex-col", children: [
|
|
606
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogTitle, { children: [
|
|
656
607
|
"Edit ",
|
|
657
608
|
fieldSchema.title || fieldName
|
|
658
609
|
] }) }),
|
|
659
|
-
/* @__PURE__ */ (0,
|
|
610
|
+
/* @__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
611
|
MarkdownEditor,
|
|
661
612
|
{
|
|
662
613
|
content: draftValue,
|
|
@@ -667,8 +618,8 @@ function DynamicSchemaForm({
|
|
|
667
618
|
minHeight: "300px",
|
|
668
619
|
variables: showVariablePicker ? matchingVars : []
|
|
669
620
|
}
|
|
670
|
-
) : /* @__PURE__ */ (0,
|
|
671
|
-
/* @__PURE__ */ (0,
|
|
621
|
+
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
622
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
672
623
|
Textarea,
|
|
673
624
|
{
|
|
674
625
|
value: draftValue,
|
|
@@ -680,9 +631,9 @@ function DynamicSchemaForm({
|
|
|
680
631
|
placeholder: "Enter content... Use {{variables.name}} for dynamic values"
|
|
681
632
|
}
|
|
682
633
|
),
|
|
683
|
-
showVariablePicker && matchingVars.length > 0 && /* @__PURE__ */ (0,
|
|
684
|
-
/* @__PURE__ */ (0,
|
|
685
|
-
/* @__PURE__ */ (0,
|
|
634
|
+
showVariablePicker && matchingVars.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border rounded-md p-2 bg-muted/30 mt-3", children: [
|
|
635
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs font-medium mb-2", children: "Insert Variable:" }),
|
|
636
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-1", children: matchingVars.map((variable) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
686
637
|
Button,
|
|
687
638
|
{
|
|
688
639
|
type: "button",
|
|
@@ -702,8 +653,8 @@ function DynamicSchemaForm({
|
|
|
702
653
|
)) })
|
|
703
654
|
] })
|
|
704
655
|
] }) }),
|
|
705
|
-
/* @__PURE__ */ (0,
|
|
706
|
-
/* @__PURE__ */ (0,
|
|
656
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogFooter, { children: [
|
|
657
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
707
658
|
Button,
|
|
708
659
|
{
|
|
709
660
|
type: "button",
|
|
@@ -718,7 +669,7 @@ function DynamicSchemaForm({
|
|
|
718
669
|
children: "Cancel"
|
|
719
670
|
}
|
|
720
671
|
),
|
|
721
|
-
/* @__PURE__ */ (0,
|
|
672
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
722
673
|
Button,
|
|
723
674
|
{
|
|
724
675
|
type: "button",
|
|
@@ -741,11 +692,11 @@ function DynamicSchemaForm({
|
|
|
741
692
|
}
|
|
742
693
|
if (fieldSchema.format === "multiline" || fieldSchema.format === "textarea") {
|
|
743
694
|
const isVarValue2 = isVariableReference(fieldValue);
|
|
744
|
-
return /* @__PURE__ */ (0,
|
|
745
|
-
/* @__PURE__ */ (0,
|
|
746
|
-
/* @__PURE__ */ (0,
|
|
695
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
|
|
696
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
|
|
697
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
|
|
747
698
|
fieldSchema.title || fieldName,
|
|
748
|
-
isRequired && /* @__PURE__ */ (0,
|
|
699
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
749
700
|
] }),
|
|
750
701
|
renderVariablePicker(
|
|
751
702
|
fieldName,
|
|
@@ -754,7 +705,7 @@ function DynamicSchemaForm({
|
|
|
754
705
|
(varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
|
|
755
706
|
)
|
|
756
707
|
] }),
|
|
757
|
-
/* @__PURE__ */ (0,
|
|
708
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
758
709
|
Textarea,
|
|
759
710
|
{
|
|
760
711
|
value: fieldValue || "",
|
|
@@ -765,18 +716,18 @@ function DynamicSchemaForm({
|
|
|
765
716
|
placeholder: fieldSchema.description
|
|
766
717
|
}
|
|
767
718
|
),
|
|
768
|
-
fieldSchema.description && /* @__PURE__ */ (0,
|
|
719
|
+
fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
|
|
769
720
|
] }, fieldPath);
|
|
770
721
|
}
|
|
771
722
|
const inputType = fieldSchema.format === "email" ? "email" : fieldSchema.format === "uri" || fieldSchema.format === "url" ? "url" : fieldSchema.format === "password" ? "password" : "text";
|
|
772
723
|
const isVarValue = isVariableReference(fieldValue);
|
|
773
|
-
return /* @__PURE__ */ (0,
|
|
774
|
-
/* @__PURE__ */ (0,
|
|
724
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
|
|
725
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
|
|
775
726
|
fieldSchema.title || fieldName,
|
|
776
|
-
isRequired && /* @__PURE__ */ (0,
|
|
727
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
777
728
|
] }),
|
|
778
|
-
/* @__PURE__ */ (0,
|
|
779
|
-
/* @__PURE__ */ (0,
|
|
729
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
|
|
730
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
780
731
|
Input,
|
|
781
732
|
{
|
|
782
733
|
type: inputType,
|
|
@@ -794,15 +745,15 @@ function DynamicSchemaForm({
|
|
|
794
745
|
(varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
|
|
795
746
|
)
|
|
796
747
|
] }),
|
|
797
|
-
fieldSchema.description && /* @__PURE__ */ (0,
|
|
748
|
+
fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
|
|
798
749
|
] }, fieldPath);
|
|
799
750
|
}
|
|
800
|
-
return /* @__PURE__ */ (0,
|
|
801
|
-
/* @__PURE__ */ (0,
|
|
751
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
|
|
752
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
|
|
802
753
|
fieldSchema.title || fieldName,
|
|
803
|
-
isRequired && /* @__PURE__ */ (0,
|
|
754
|
+
isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
804
755
|
] }),
|
|
805
|
-
/* @__PURE__ */ (0,
|
|
756
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
806
757
|
Input,
|
|
807
758
|
{
|
|
808
759
|
value: typeof fieldValue === "object" ? JSON.stringify(fieldValue) : fieldValue || "",
|
|
@@ -810,7 +761,7 @@ function DynamicSchemaForm({
|
|
|
810
761
|
try {
|
|
811
762
|
const parsed = JSON.parse(e.target.value);
|
|
812
763
|
handleFieldChange(fieldName, parsed);
|
|
813
|
-
} catch {
|
|
764
|
+
} catch (e2) {
|
|
814
765
|
handleFieldChange(fieldName, e.target.value);
|
|
815
766
|
}
|
|
816
767
|
},
|
|
@@ -818,7 +769,7 @@ function DynamicSchemaForm({
|
|
|
818
769
|
className: "h-8 text-xs font-mono"
|
|
819
770
|
}
|
|
820
771
|
),
|
|
821
|
-
/* @__PURE__ */ (0,
|
|
772
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: [
|
|
822
773
|
"Type: ",
|
|
823
774
|
fieldSchema.type || "unknown"
|
|
824
775
|
] })
|
|
@@ -827,21 +778,21 @@ function DynamicSchemaForm({
|
|
|
827
778
|
if (schema.type === "object" && schema.properties) {
|
|
828
779
|
const sortedProperties = Object.entries(schema.properties).sort(
|
|
829
780
|
([, a], [, b]) => {
|
|
830
|
-
const orderA = a["x-displayOrder"]
|
|
831
|
-
const orderB = b["x-displayOrder"]
|
|
781
|
+
const orderA = _nullishCoalesce(a["x-displayOrder"], () => ( 999));
|
|
782
|
+
const orderB = _nullishCoalesce(b["x-displayOrder"], () => ( 999));
|
|
832
783
|
return orderA - orderB;
|
|
833
784
|
}
|
|
834
785
|
);
|
|
835
|
-
return /* @__PURE__ */ (0,
|
|
786
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-3", children: sortedProperties.map(
|
|
836
787
|
([fieldName, fieldSchema]) => renderField(fieldSchema, fieldName, value[fieldName])
|
|
837
788
|
) });
|
|
838
789
|
}
|
|
839
|
-
return /* @__PURE__ */ (0,
|
|
790
|
+
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
791
|
}
|
|
841
792
|
|
|
842
793
|
// components/schema-builder.tsx
|
|
843
|
-
|
|
844
|
-
|
|
794
|
+
|
|
795
|
+
|
|
845
796
|
var FIELD_TYPES = [
|
|
846
797
|
{ value: "string", label: "Text" },
|
|
847
798
|
{ value: "number", label: "Number" },
|
|
@@ -864,7 +815,7 @@ function SchemaBuilder({
|
|
|
864
815
|
disabled = false,
|
|
865
816
|
components
|
|
866
817
|
}) {
|
|
867
|
-
const [expandedFields, setExpandedFields] = (0,
|
|
818
|
+
const [expandedFields, setExpandedFields] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
|
|
868
819
|
const {
|
|
869
820
|
Input,
|
|
870
821
|
Label,
|
|
@@ -883,7 +834,7 @@ function SchemaBuilder({
|
|
|
883
834
|
ChevronRightIcon
|
|
884
835
|
} = components;
|
|
885
836
|
const getFieldsFromSchema = () => {
|
|
886
|
-
if (!schema
|
|
837
|
+
if (!_optionalChain([schema, 'optionalAccess', _5 => _5.properties])) return [];
|
|
887
838
|
return Object.entries(schema.properties).map(([name, prop]) => {
|
|
888
839
|
const fieldSchema = prop;
|
|
889
840
|
return {
|
|
@@ -891,7 +842,7 @@ function SchemaBuilder({
|
|
|
891
842
|
type: fieldSchema.type || "string",
|
|
892
843
|
title: fieldSchema.title || name,
|
|
893
844
|
description: fieldSchema.description || "",
|
|
894
|
-
required: schema.required
|
|
845
|
+
required: _optionalChain([schema, 'access', _6 => _6.required, 'optionalAccess', _7 => _7.includes, 'call', _8 => _8(name)]) || false,
|
|
895
846
|
format: fieldSchema.format,
|
|
896
847
|
enum: fieldSchema.enum,
|
|
897
848
|
items: fieldSchema.items
|
|
@@ -966,22 +917,22 @@ function SchemaBuilder({
|
|
|
966
917
|
return next;
|
|
967
918
|
});
|
|
968
919
|
};
|
|
969
|
-
return /* @__PURE__ */ (0,
|
|
970
|
-
fields.length === 0 ? /* @__PURE__ */ (0,
|
|
920
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
921
|
+
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
922
|
const isExpanded = expandedFields.has(field.name);
|
|
972
|
-
return /* @__PURE__ */ (0,
|
|
973
|
-
/* @__PURE__ */ (0,
|
|
974
|
-
/* @__PURE__ */ (0,
|
|
975
|
-
/* @__PURE__ */ (0,
|
|
923
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { className: "p-3 bg-gray-50/50", children: [
|
|
924
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mb-2", children: [
|
|
925
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, GripVerticalIcon, { className: "h-4 w-4 text-gray-300 flex-shrink-0 cursor-grab" }),
|
|
926
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
976
927
|
"button",
|
|
977
928
|
{
|
|
978
929
|
type: "button",
|
|
979
930
|
onClick: () => toggleExpand(field.name),
|
|
980
931
|
className: "flex-shrink-0 p-1 hover:bg-gray-200 rounded",
|
|
981
|
-
children: isExpanded ? /* @__PURE__ */ (0,
|
|
932
|
+
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
933
|
}
|
|
983
934
|
),
|
|
984
|
-
/* @__PURE__ */ (0,
|
|
935
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
985
936
|
Input,
|
|
986
937
|
{
|
|
987
938
|
value: field.name,
|
|
@@ -1003,7 +954,7 @@ function SchemaBuilder({
|
|
|
1003
954
|
disabled
|
|
1004
955
|
}
|
|
1005
956
|
) }),
|
|
1006
|
-
/* @__PURE__ */ (0,
|
|
957
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1007
958
|
Button,
|
|
1008
959
|
{
|
|
1009
960
|
type: "button",
|
|
@@ -1012,25 +963,25 @@ function SchemaBuilder({
|
|
|
1012
963
|
className: "h-9 w-9 p-0 text-red-500 hover:text-red-700 hover:bg-red-50 flex-shrink-0",
|
|
1013
964
|
onClick: () => removeField(index),
|
|
1014
965
|
disabled,
|
|
1015
|
-
children: /* @__PURE__ */ (0,
|
|
966
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-4 w-4" })
|
|
1016
967
|
}
|
|
1017
968
|
)
|
|
1018
969
|
] }),
|
|
1019
|
-
/* @__PURE__ */ (0,
|
|
1020
|
-
/* @__PURE__ */ (0,
|
|
970
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 pl-10", children: [
|
|
971
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1021
972
|
Select,
|
|
1022
973
|
{
|
|
1023
974
|
value: field.type,
|
|
1024
975
|
onValueChange: (v) => updateField(index, { type: v }),
|
|
1025
976
|
disabled,
|
|
1026
977
|
children: [
|
|
1027
|
-
/* @__PURE__ */ (0,
|
|
1028
|
-
/* @__PURE__ */ (0,
|
|
978
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
|
|
979
|
+
/* @__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
980
|
]
|
|
1030
981
|
}
|
|
1031
982
|
) }),
|
|
1032
|
-
/* @__PURE__ */ (0,
|
|
1033
|
-
/* @__PURE__ */ (0,
|
|
983
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
984
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1034
985
|
Checkbox,
|
|
1035
986
|
{
|
|
1036
987
|
id: `required-${index}`,
|
|
@@ -1039,7 +990,7 @@ function SchemaBuilder({
|
|
|
1039
990
|
disabled
|
|
1040
991
|
}
|
|
1041
992
|
),
|
|
1042
|
-
/* @__PURE__ */ (0,
|
|
993
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1043
994
|
Label,
|
|
1044
995
|
{
|
|
1045
996
|
htmlFor: `required-${index}`,
|
|
@@ -1049,10 +1000,10 @@ function SchemaBuilder({
|
|
|
1049
1000
|
)
|
|
1050
1001
|
] })
|
|
1051
1002
|
] }),
|
|
1052
|
-
isExpanded && /* @__PURE__ */ (0,
|
|
1053
|
-
/* @__PURE__ */ (0,
|
|
1054
|
-
/* @__PURE__ */ (0,
|
|
1055
|
-
/* @__PURE__ */ (0,
|
|
1003
|
+
isExpanded && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-3 pt-3 border-t space-y-3 pl-10", children: [
|
|
1004
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
|
|
1005
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Display Title" }),
|
|
1006
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1056
1007
|
Input,
|
|
1057
1008
|
{
|
|
1058
1009
|
value: field.title,
|
|
@@ -1063,9 +1014,9 @@ function SchemaBuilder({
|
|
|
1063
1014
|
}
|
|
1064
1015
|
)
|
|
1065
1016
|
] }),
|
|
1066
|
-
/* @__PURE__ */ (0,
|
|
1067
|
-
/* @__PURE__ */ (0,
|
|
1068
|
-
/* @__PURE__ */ (0,
|
|
1017
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
|
|
1018
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Description" }),
|
|
1019
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1069
1020
|
Input,
|
|
1070
1021
|
{
|
|
1071
1022
|
value: field.description,
|
|
@@ -1076,42 +1027,42 @@ function SchemaBuilder({
|
|
|
1076
1027
|
}
|
|
1077
1028
|
)
|
|
1078
1029
|
] }),
|
|
1079
|
-
field.type === "string" && /* @__PURE__ */ (0,
|
|
1080
|
-
/* @__PURE__ */ (0,
|
|
1081
|
-
/* @__PURE__ */ (0,
|
|
1030
|
+
field.type === "string" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
|
|
1031
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Format" }),
|
|
1032
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1082
1033
|
Select,
|
|
1083
1034
|
{
|
|
1084
1035
|
value: field.format || "plain",
|
|
1085
1036
|
onValueChange: (v) => updateField(index, { format: v }),
|
|
1086
1037
|
disabled,
|
|
1087
1038
|
children: [
|
|
1088
|
-
/* @__PURE__ */ (0,
|
|
1089
|
-
/* @__PURE__ */ (0,
|
|
1039
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
|
|
1040
|
+
/* @__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
1041
|
]
|
|
1091
1042
|
}
|
|
1092
1043
|
)
|
|
1093
1044
|
] }),
|
|
1094
|
-
field.type === "array" && /* @__PURE__ */ (0,
|
|
1095
|
-
/* @__PURE__ */ (0,
|
|
1096
|
-
/* @__PURE__ */ (0,
|
|
1045
|
+
field.type === "array" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
|
|
1046
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Item Type" }),
|
|
1047
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1097
1048
|
Select,
|
|
1098
1049
|
{
|
|
1099
|
-
value: field.items
|
|
1050
|
+
value: _optionalChain([field, 'access', _9 => _9.items, 'optionalAccess', _10 => _10.type]) || "string",
|
|
1100
1051
|
onValueChange: (v) => updateField(index, { items: { type: v } }),
|
|
1101
1052
|
disabled,
|
|
1102
1053
|
children: [
|
|
1103
|
-
/* @__PURE__ */ (0,
|
|
1104
|
-
/* @__PURE__ */ (0,
|
|
1105
|
-
(type) => /* @__PURE__ */ (0,
|
|
1054
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
|
|
1055
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: FIELD_TYPES.filter((t) => t.value !== "array").map(
|
|
1056
|
+
(type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.value, children: type.label }, type.value)
|
|
1106
1057
|
) })
|
|
1107
1058
|
]
|
|
1108
1059
|
}
|
|
1109
1060
|
)
|
|
1110
1061
|
] }),
|
|
1111
|
-
field.type === "string" && /* @__PURE__ */ (0,
|
|
1112
|
-
/* @__PURE__ */ (0,
|
|
1113
|
-
/* @__PURE__ */ (0,
|
|
1114
|
-
/* @__PURE__ */ (0,
|
|
1062
|
+
field.type === "string" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
1063
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
|
|
1064
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Dropdown Options (optional)" }),
|
|
1065
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1115
1066
|
Button,
|
|
1116
1067
|
{
|
|
1117
1068
|
type: "button",
|
|
@@ -1129,14 +1080,14 @@ function SchemaBuilder({
|
|
|
1129
1080
|
},
|
|
1130
1081
|
disabled,
|
|
1131
1082
|
children: [
|
|
1132
|
-
/* @__PURE__ */ (0,
|
|
1083
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-3 w-3 mr-1" }),
|
|
1133
1084
|
"Add Option"
|
|
1134
1085
|
]
|
|
1135
1086
|
}
|
|
1136
1087
|
)
|
|
1137
1088
|
] }),
|
|
1138
|
-
field.enum && field.enum.length > 0 && /* @__PURE__ */ (0,
|
|
1139
|
-
/* @__PURE__ */ (0,
|
|
1089
|
+
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: [
|
|
1090
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1140
1091
|
Input,
|
|
1141
1092
|
{
|
|
1142
1093
|
value: option,
|
|
@@ -1150,7 +1101,7 @@ function SchemaBuilder({
|
|
|
1150
1101
|
disabled
|
|
1151
1102
|
}
|
|
1152
1103
|
),
|
|
1153
|
-
/* @__PURE__ */ (0,
|
|
1104
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1154
1105
|
Button,
|
|
1155
1106
|
{
|
|
1156
1107
|
type: "button",
|
|
@@ -1166,7 +1117,7 @@ function SchemaBuilder({
|
|
|
1166
1117
|
});
|
|
1167
1118
|
},
|
|
1168
1119
|
disabled,
|
|
1169
|
-
children: /* @__PURE__ */ (0,
|
|
1120
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-3 w-3" })
|
|
1170
1121
|
}
|
|
1171
1122
|
)
|
|
1172
1123
|
] }, optIdx)) })
|
|
@@ -1174,7 +1125,7 @@ function SchemaBuilder({
|
|
|
1174
1125
|
] })
|
|
1175
1126
|
] }, index);
|
|
1176
1127
|
}) }),
|
|
1177
|
-
/* @__PURE__ */ (0,
|
|
1128
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1178
1129
|
Button,
|
|
1179
1130
|
{
|
|
1180
1131
|
type: "button",
|
|
@@ -1184,7 +1135,7 @@ function SchemaBuilder({
|
|
|
1184
1135
|
onClick: addField,
|
|
1185
1136
|
disabled,
|
|
1186
1137
|
children: [
|
|
1187
|
-
/* @__PURE__ */ (0,
|
|
1138
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-4 w-4 mr-2" }),
|
|
1188
1139
|
"Add Field"
|
|
1189
1140
|
]
|
|
1190
1141
|
}
|
|
@@ -1192,173 +1143,14 @@ function SchemaBuilder({
|
|
|
1192
1143
|
] });
|
|
1193
1144
|
}
|
|
1194
1145
|
|
|
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
1146
|
// store/workflow-definition-slice.ts
|
|
1355
|
-
var
|
|
1147
|
+
var _toolkit = require('@reduxjs/toolkit');
|
|
1356
1148
|
var initialState = {
|
|
1357
1149
|
definitions: {},
|
|
1358
1150
|
isLoading: false,
|
|
1359
1151
|
loadingStates: {}
|
|
1360
1152
|
};
|
|
1361
|
-
var workflowDefinitionSlice = (0,
|
|
1153
|
+
var workflowDefinitionSlice = _toolkit.createSlice.call(void 0, {
|
|
1362
1154
|
name: "workflowDefinition",
|
|
1363
1155
|
initialState,
|
|
1364
1156
|
reducers: {
|
|
@@ -1393,13 +1185,13 @@ var workflowDefinitionSlice = (0, import_toolkit.createSlice)({
|
|
|
1393
1185
|
if (definition.id) {
|
|
1394
1186
|
state.definitions[definition.id] = definition;
|
|
1395
1187
|
}
|
|
1396
|
-
if (state.selectedDefinition
|
|
1188
|
+
if (_optionalChain([state, 'access', _11 => _11.selectedDefinition, 'optionalAccess', _12 => _12.id]) === definition.id) {
|
|
1397
1189
|
state.selectedDefinition = definition;
|
|
1398
1190
|
}
|
|
1399
1191
|
},
|
|
1400
1192
|
removeDefinition: (state, action) => {
|
|
1401
1193
|
delete state.definitions[action.payload];
|
|
1402
|
-
if (state.selectedDefinition
|
|
1194
|
+
if (_optionalChain([state, 'access', _13 => _13.selectedDefinition, 'optionalAccess', _14 => _14.id]) === action.payload) {
|
|
1403
1195
|
state.selectedDefinition = void 0;
|
|
1404
1196
|
}
|
|
1405
1197
|
},
|
|
@@ -1420,180 +1212,14 @@ var {
|
|
|
1420
1212
|
} = workflowDefinitionSlice.actions;
|
|
1421
1213
|
var workflowDefinitionReducer = workflowDefinitionSlice.reducer;
|
|
1422
1214
|
|
|
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
1215
|
// store/workflow-instance-slice.ts
|
|
1590
|
-
|
|
1216
|
+
|
|
1591
1217
|
var initialState2 = {
|
|
1592
1218
|
instances: {},
|
|
1593
1219
|
isLoading: false,
|
|
1594
1220
|
loadingStates: {}
|
|
1595
1221
|
};
|
|
1596
|
-
var workflowInstanceSlice = (0,
|
|
1222
|
+
var workflowInstanceSlice = _toolkit.createSlice.call(void 0, {
|
|
1597
1223
|
name: "workflowInstance",
|
|
1598
1224
|
initialState: initialState2,
|
|
1599
1225
|
reducers: {
|
|
@@ -1622,7 +1248,7 @@ var workflowInstanceSlice = (0, import_toolkit2.createSlice)({
|
|
|
1622
1248
|
if (instance.id) {
|
|
1623
1249
|
state.instances[instance.id] = instance;
|
|
1624
1250
|
}
|
|
1625
|
-
if (state.selectedInstance
|
|
1251
|
+
if (_optionalChain([state, 'access', _15 => _15.selectedInstance, 'optionalAccess', _16 => _16.id]) === instance.id) {
|
|
1626
1252
|
state.selectedInstance = instance;
|
|
1627
1253
|
}
|
|
1628
1254
|
},
|
|
@@ -1641,290 +1267,6 @@ var {
|
|
|
1641
1267
|
} = workflowInstanceSlice.actions;
|
|
1642
1268
|
var workflowInstanceReducer = workflowInstanceSlice.reducer;
|
|
1643
1269
|
|
|
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
1270
|
// schema/schemas.ts
|
|
1929
1271
|
var nodeDefinitions = {
|
|
1930
1272
|
"actionAIClassify": {
|
|
@@ -4829,182 +4171,174 @@ var WorkflowTypes = {
|
|
|
4829
4171
|
"label": "Productivity"
|
|
4830
4172
|
}
|
|
4831
4173
|
};
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
nodeDefinitions,
|
|
5002
|
-
nodeSchemas,
|
|
5003
|
-
useWorkflowDefinition,
|
|
5004
|
-
useWorkflowDefinitionContext,
|
|
5005
|
-
useWorkflowInstance,
|
|
5006
|
-
useWorkflowInstanceContext,
|
|
5007
|
-
workflowDefinitionReducer,
|
|
5008
|
-
workflowInstanceReducer
|
|
5009
|
-
});
|
|
4174
|
+
|
|
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
|
+
exports.AccountingNodeSubTypes = AccountingNodeSubTypes; exports.ActionNodeSubTypes = ActionNodeSubTypes; exports.AgentNodeSubTypes = AgentNodeSubTypes; exports.DataNodeSubTypes = DataNodeSubTypes; exports.DelayNodeSubTypes = DelayNodeSubTypes; exports.DynamicSchemaForm = DynamicSchemaForm; exports.EdgeStatusCompleted = _chunkGYLRUX77js.EdgeStatusCompleted; exports.EdgeStatusPending = _chunkGYLRUX77js.EdgeStatusPending; exports.EdgeStatusSkipped = _chunkGYLRUX77js.EdgeStatusSkipped; exports.EdgeTypeCompensation = _chunkGYLRUX77js.EdgeTypeCompensation; exports.EdgeTypeConditional = _chunkGYLRUX77js.EdgeTypeConditional; exports.EdgeTypeDefault = _chunkGYLRUX77js.EdgeTypeDefault; exports.EdgeTypeError = _chunkGYLRUX77js.EdgeTypeError; exports.EdgeTypeLoopBack = _chunkGYLRUX77js.EdgeTypeLoopBack; exports.EdgeTypeMerge = _chunkGYLRUX77js.EdgeTypeMerge; exports.EdgeTypeNormal = _chunkGYLRUX77js.EdgeTypeNormal; exports.EdgeTypeParallel = _chunkGYLRUX77js.EdgeTypeParallel; exports.EdgeTypeTimeout = _chunkGYLRUX77js.EdgeTypeTimeout; exports.ExpressionTypeDSL = _chunkGYLRUX77js.ExpressionTypeDSL; exports.ExpressionTypeFilter = _chunkGYLRUX77js.ExpressionTypeFilter; exports.ExpressionTypeJavaScript = _chunkGYLRUX77js.ExpressionTypeJavaScript; exports.ExpressionTypeRules = _chunkGYLRUX77js.ExpressionTypeRules; exports.ExpressionTypeTemplate = _chunkGYLRUX77js.ExpressionTypeTemplate; exports.HumanActionNodeSubTypes = HumanActionNodeSubTypes; exports.InstanceStatusCompleted = _chunkGYLRUX77js.InstanceStatusCompleted; exports.InstanceStatusFailed = _chunkGYLRUX77js.InstanceStatusFailed; exports.InstanceStatusNew = _chunkGYLRUX77js.InstanceStatusNew; exports.InstanceStatusPaused = _chunkGYLRUX77js.InstanceStatusPaused; exports.InstanceStatusRunning = _chunkGYLRUX77js.InstanceStatusRunning; exports.InstanceStatusWaiting = _chunkGYLRUX77js.InstanceStatusWaiting; exports.LogicNodeSubTypes = LogicNodeSubTypes; exports.LoopNodeSubTypes = LoopNodeSubTypes; exports.NodeStatusCompleted = _chunkGYLRUX77js.NodeStatusCompleted; exports.NodeStatusFailed = _chunkGYLRUX77js.NodeStatusFailed; exports.NodeStatusPending = _chunkGYLRUX77js.NodeStatusPending; exports.NodeStatusRunning = _chunkGYLRUX77js.NodeStatusRunning; exports.NodeStatusSkipped = _chunkGYLRUX77js.NodeStatusSkipped; exports.NodeStatusWaiting = _chunkGYLRUX77js.NodeStatusWaiting; exports.NodeSubTypeActionApiCall = _chunkGYLRUX77js.NodeSubTypeActionApiCall; exports.NodeSubTypeActionAssignSLAPolicy = _chunkGYLRUX77js.NodeSubTypeActionAssignSLAPolicy; exports.NodeSubTypeActionCSATSurvey = _chunkGYLRUX77js.NodeSubTypeActionCSATSurvey; exports.NodeSubTypeActionChangeSLAStatus = _chunkGYLRUX77js.NodeSubTypeActionChangeSLAStatus; exports.NodeSubTypeActionCreateEntityRecord = _chunkGYLRUX77js.NodeSubTypeActionCreateEntityRecord; exports.NodeSubTypeActionDeleteEntityRecord = _chunkGYLRUX77js.NodeSubTypeActionDeleteEntityRecord; exports.NodeSubTypeActionDocumentExtraction = _chunkGYLRUX77js.NodeSubTypeActionDocumentExtraction; exports.NodeSubTypeActionEscalateSLA = _chunkGYLRUX77js.NodeSubTypeActionEscalateSLA; exports.NodeSubTypeActionGenerateDocument = _chunkGYLRUX77js.NodeSubTypeActionGenerateDocument; exports.NodeSubTypeActionMergeEntityRecords = _chunkGYLRUX77js.NodeSubTypeActionMergeEntityRecords; exports.NodeSubTypeActionNatsRequest = _chunkGYLRUX77js.NodeSubTypeActionNatsRequest; exports.NodeSubTypeActionProcessPayment = _chunkGYLRUX77js.NodeSubTypeActionProcessPayment; exports.NodeSubTypeActionQueryEntityRecords = _chunkGYLRUX77js.NodeSubTypeActionQueryEntityRecords; exports.NodeSubTypeActionSendEmail = _chunkGYLRUX77js.NodeSubTypeActionSendEmail; exports.NodeSubTypeActionSendSMS = _chunkGYLRUX77js.NodeSubTypeActionSendSMS; exports.NodeSubTypeActionSetVariables = _chunkGYLRUX77js.NodeSubTypeActionSetVariables; exports.NodeSubTypeActionUpdateEntityRecord = _chunkGYLRUX77js.NodeSubTypeActionUpdateEntityRecord; exports.NodeSubTypeAgentApiIntegration = _chunkGYLRUX77js.NodeSubTypeAgentApiIntegration; exports.NodeSubTypeAgentChat = _chunkGYLRUX77js.NodeSubTypeAgentChat; exports.NodeSubTypeAgentClientApiCall = _chunkGYLRUX77js.NodeSubTypeAgentClientApiCall; exports.NodeSubTypeAgentCustomResponse = _chunkGYLRUX77js.NodeSubTypeAgentCustomResponse; exports.NodeSubTypeAgentIntentDetector = _chunkGYLRUX77js.NodeSubTypeAgentIntentDetector; exports.NodeSubTypeAgentKnowledgeGraph = _chunkGYLRUX77js.NodeSubTypeAgentKnowledgeGraph; exports.NodeSubTypeAgentOpenTicket = _chunkGYLRUX77js.NodeSubTypeAgentOpenTicket; exports.NodeSubTypeAgentStructuredOutput = _chunkGYLRUX77js.NodeSubTypeAgentStructuredOutput; exports.NodeSubTypeAgentTransferToHuman = _chunkGYLRUX77js.NodeSubTypeAgentTransferToHuman; exports.NodeSubTypeDataCalculate = _chunkGYLRUX77js.NodeSubTypeDataCalculate; exports.NodeSubTypeDataFilter = _chunkGYLRUX77js.NodeSubTypeDataFilter; exports.NodeSubTypeDataMap = _chunkGYLRUX77js.NodeSubTypeDataMap; exports.NodeSubTypeDataValidate = _chunkGYLRUX77js.NodeSubTypeDataValidate; exports.NodeSubTypeDelay = _chunkGYLRUX77js.NodeSubTypeDelay; exports.NodeSubTypeHumanActionApproval = _chunkGYLRUX77js.NodeSubTypeHumanActionApproval; exports.NodeSubTypeHumanActionAssignment = _chunkGYLRUX77js.NodeSubTypeHumanActionAssignment; exports.NodeSubTypeHumanActionDataEntry = _chunkGYLRUX77js.NodeSubTypeHumanActionDataEntry; exports.NodeSubTypeHumanActionReview = _chunkGYLRUX77js.NodeSubTypeHumanActionReview; exports.NodeSubTypeLogicFor = _chunkGYLRUX77js.NodeSubTypeLogicFor; exports.NodeSubTypeLogicIf = _chunkGYLRUX77js.NodeSubTypeLogicIf; exports.NodeSubTypeLogicParallel = _chunkGYLRUX77js.NodeSubTypeLogicParallel; exports.NodeSubTypeLogicSwitch = _chunkGYLRUX77js.NodeSubTypeLogicSwitch; exports.NodeSubTypeLoopData = _chunkGYLRUX77js.NodeSubTypeLoopData; exports.NodeSubTypeTimerBusinessHours = _chunkGYLRUX77js.NodeSubTypeTimerBusinessHours; exports.NodeSubTypeTimerDelay = _chunkGYLRUX77js.NodeSubTypeTimerDelay; exports.NodeSubTypeTimerSchedule = _chunkGYLRUX77js.NodeSubTypeTimerSchedule; exports.NodeSubTypeTriggerEntityRecordCreated = _chunkGYLRUX77js.NodeSubTypeTriggerEntityRecordCreated; exports.NodeSubTypeTriggerEntityRecordDeleted = _chunkGYLRUX77js.NodeSubTypeTriggerEntityRecordDeleted; exports.NodeSubTypeTriggerEntityRecordUpdated = _chunkGYLRUX77js.NodeSubTypeTriggerEntityRecordUpdated; exports.NodeSubTypeTriggerEscalation = _chunkGYLRUX77js.NodeSubTypeTriggerEscalation; exports.NodeSubTypeTriggerSLABreach = _chunkGYLRUX77js.NodeSubTypeTriggerSLABreach; exports.NodeSubTypeTriggerSLAWarning = _chunkGYLRUX77js.NodeSubTypeTriggerSLAWarning; exports.NodeSubTypeTriggerStart = _chunkGYLRUX77js.NodeSubTypeTriggerStart; exports.NodeSubTypeTriggerWebhookReceived = _chunkGYLRUX77js.NodeSubTypeTriggerWebhookReceived; exports.NodeTypeAccounting = _chunkGYLRUX77js.NodeTypeAccounting; exports.NodeTypeAction = _chunkGYLRUX77js.NodeTypeAction; exports.NodeTypeAgent = _chunkGYLRUX77js.NodeTypeAgent; exports.NodeTypeCustom = _chunkGYLRUX77js.NodeTypeCustom; exports.NodeTypeData = _chunkGYLRUX77js.NodeTypeData; exports.NodeTypeDelay = _chunkGYLRUX77js.NodeTypeDelay; exports.NodeTypeHumanAction = _chunkGYLRUX77js.NodeTypeHumanAction; exports.NodeTypeIntegration = _chunkGYLRUX77js.NodeTypeIntegration; exports.NodeTypeLogic = _chunkGYLRUX77js.NodeTypeLogic; exports.NodeTypeLoop = _chunkGYLRUX77js.NodeTypeLoop; exports.NodeTypeParallel = _chunkGYLRUX77js.NodeTypeParallel; exports.NodeTypeSubflow = _chunkGYLRUX77js.NodeTypeSubflow; exports.NodeTypeTimer = _chunkGYLRUX77js.NodeTypeTimer; exports.NodeTypeTrigger = _chunkGYLRUX77js.NodeTypeTrigger; exports.ParallelNodeSubTypes = ParallelNodeSubTypes; exports.PersistenceTypeEphemeral = _chunkGYLRUX77js.PersistenceTypeEphemeral; exports.PersistenceTypePermanent = _chunkGYLRUX77js.PersistenceTypePermanent; exports.RuleLevelError = _chunkGYLRUX77js.RuleLevelError; exports.RuleLevelInfo = _chunkGYLRUX77js.RuleLevelInfo; exports.RuleLevelWarning = _chunkGYLRUX77js.RuleLevelWarning; exports.SchemaBuilder = SchemaBuilder; exports.TimeoutActionAlt = _chunkGYLRUX77js.TimeoutActionAlt; exports.TimeoutActionFail = _chunkGYLRUX77js.TimeoutActionFail; exports.TimeoutActionRetry = _chunkGYLRUX77js.TimeoutActionRetry; exports.TimeoutActionSkip = _chunkGYLRUX77js.TimeoutActionSkip; exports.TimerNodeSubTypes = TimerNodeSubTypes; exports.TriggerNodeSubTypes = TriggerNodeSubTypes; exports.WorkflowDefinitionCreate = _chunkGYLRUX77js.WorkflowDefinitionCreate; exports.WorkflowDefinitionCreated = _chunkGYLRUX77js.WorkflowDefinitionCreated; exports.WorkflowDefinitionDelete = _chunkGYLRUX77js.WorkflowDefinitionDelete; exports.WorkflowDefinitionDeleted = _chunkGYLRUX77js.WorkflowDefinitionDeleted; exports.WorkflowDefinitionGet = _chunkGYLRUX77js.WorkflowDefinitionGet; exports.WorkflowDefinitionGetByTitle = _chunkGYLRUX77js.WorkflowDefinitionGetByTitle; exports.WorkflowDefinitionGetServer = _chunkGYLRUX77js.WorkflowDefinitionGetServer; exports.WorkflowDefinitionList = _chunkGYLRUX77js.WorkflowDefinitionList; exports.WorkflowDefinitionUpdate = _chunkGYLRUX77js.WorkflowDefinitionUpdate; exports.WorkflowDefinitionUpdated = _chunkGYLRUX77js.WorkflowDefinitionUpdated; exports.WorkflowEdgeTypes = WorkflowEdgeTypes; exports.WorkflowExecutionCompleted = _chunkGYLRUX77js.WorkflowExecutionCompleted; exports.WorkflowExecutionFailed = _chunkGYLRUX77js.WorkflowExecutionFailed; exports.WorkflowExecutionStarted = _chunkGYLRUX77js.WorkflowExecutionStarted; exports.WorkflowInstanceCreate = _chunkGYLRUX77js.WorkflowInstanceCreate; exports.WorkflowInstanceExecuteNode = _chunkGYLRUX77js.WorkflowInstanceExecuteNode; exports.WorkflowInstanceExecuteNodeLean = _chunkGYLRUX77js.WorkflowInstanceExecuteNodeLean; exports.WorkflowInstanceExecuteNodeLeanServer = _chunkGYLRUX77js.WorkflowInstanceExecuteNodeLeanServer; exports.WorkflowInstanceExecuteNodeServer = _chunkGYLRUX77js.WorkflowInstanceExecuteNodeServer; exports.WorkflowInstanceGet = _chunkGYLRUX77js.WorkflowInstanceGet; exports.WorkflowInstanceGetByStateVariable = _chunkGYLRUX77js.WorkflowInstanceGetByStateVariable; exports.WorkflowInstanceList = _chunkGYLRUX77js.WorkflowInstanceList; exports.WorkflowInstanceResumeNode = _chunkGYLRUX77js.WorkflowInstanceResumeNode; exports.WorkflowInstanceResumeNodeServer = _chunkGYLRUX77js.WorkflowInstanceResumeNodeServer; exports.WorkflowInstanceUpdate = _chunkGYLRUX77js.WorkflowInstanceUpdate; exports.WorkflowInstanceUpdateNodeMetadata = _chunkGYLRUX77js.WorkflowInstanceUpdateNodeMetadata; exports.WorkflowInstanceUpdated = _chunkGYLRUX77js.WorkflowInstanceUpdated; exports.WorkflowNodeTypes = WorkflowNodeTypes; exports.WorkflowScheduleCreate = _chunkGYLRUX77js.WorkflowScheduleCreate; exports.WorkflowScheduleDelete = _chunkGYLRUX77js.WorkflowScheduleDelete; exports.WorkflowScheduleList = _chunkGYLRUX77js.WorkflowScheduleList; exports.WorkflowSchedulePause = _chunkGYLRUX77js.WorkflowSchedulePause; exports.WorkflowScheduleResume = _chunkGYLRUX77js.WorkflowScheduleResume; exports.WorkflowScheduleUpdate = _chunkGYLRUX77js.WorkflowScheduleUpdate; exports.WorkflowTemplateGet = _chunkGYLRUX77js.WorkflowTemplateGet; exports.WorkflowTemplateInstantiate = _chunkGYLRUX77js.WorkflowTemplateInstantiate; exports.WorkflowTemplateList = _chunkGYLRUX77js.WorkflowTemplateList; exports.WorkflowTriggerFired = _chunkGYLRUX77js.WorkflowTriggerFired; exports.WorkflowTriggerPause = _chunkGYLRUX77js.WorkflowTriggerPause; exports.WorkflowTriggerRegister = _chunkGYLRUX77js.WorkflowTriggerRegister; exports.WorkflowTriggerResume = _chunkGYLRUX77js.WorkflowTriggerResume; exports.WorkflowTriggerStatus = _chunkGYLRUX77js.WorkflowTriggerStatus; exports.WorkflowTypeAgent = _chunkGYLRUX77js.WorkflowTypeAgent; exports.WorkflowTypeChat = _chunkGYLRUX77js.WorkflowTypeChat; exports.WorkflowTypeDocument = _chunkGYLRUX77js.WorkflowTypeDocument; exports.WorkflowTypeEntity = _chunkGYLRUX77js.WorkflowTypeEntity; exports.WorkflowTypeProductivity = _chunkGYLRUX77js.WorkflowTypeProductivity; exports.WorkflowTypes = WorkflowTypes; exports.nodeDefinitions = nodeDefinitions; exports.nodeSchemas = nodeSchemas; exports.workflowDefinitionReducer = workflowDefinitionReducer; exports.workflowInstanceReducer = workflowInstanceReducer;
|
|
5010
4344
|
//# sourceMappingURL=index.js.map
|