@addai/flows-mcp 0.1.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/README.md +177 -0
- package/dist/bin/install.d.ts +2 -0
- package/dist/bin/install.js +294 -0
- package/dist/bin/install.js.map +1 -0
- package/dist/client.d.ts +51 -0
- package/dist/client.js +82 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/node-defaults.d.ts +37 -0
- package/dist/node-defaults.js +723 -0
- package/dist/node-defaults.js.map +1 -0
- package/dist/presence.d.ts +6 -0
- package/dist/presence.js +24 -0
- package/dist/presence.js.map +1 -0
- package/dist/tools/custom-nodes.d.ts +3 -0
- package/dist/tools/custom-nodes.js +81 -0
- package/dist/tools/custom-nodes.js.map +1 -0
- package/dist/tools/flows.d.ts +4 -0
- package/dist/tools/flows.js +113 -0
- package/dist/tools/flows.js.map +1 -0
- package/dist/tools/folders.d.ts +3 -0
- package/dist/tools/folders.js +47 -0
- package/dist/tools/folders.js.map +1 -0
- package/dist/tools/nodes.d.ts +4 -0
- package/dist/tools/nodes.js +203 -0
- package/dist/tools/nodes.js.map +1 -0
- package/dist/tools/publishing.d.ts +3 -0
- package/dist/tools/publishing.js +47 -0
- package/dist/tools/publishing.js.map +1 -0
- package/dist/tools/reference.d.ts +2 -0
- package/dist/tools/reference.js +83 -0
- package/dist/tools/reference.js.map +1 -0
- package/dist/tools/reviews.d.ts +3 -0
- package/dist/tools/reviews.js +19 -0
- package/dist/tools/reviews.js.map +1 -0
- package/dist/tools/runs.d.ts +3 -0
- package/dist/tools/runs.js +49 -0
- package/dist/tools/runs.js.map +1 -0
- package/dist/tools/split-tests.d.ts +3 -0
- package/dist/tools/split-tests.js +42 -0
- package/dist/tools/split-tests.js.map +1 -0
- package/dist/tools/stats.d.ts +3 -0
- package/dist/tools/stats.js +39 -0
- package/dist/tools/stats.js.map +1 -0
- package/dist/tools/variables.d.ts +4 -0
- package/dist/tools/variables.js +70 -0
- package/dist/tools/variables.js.map +1 -0
- package/dist/types.d.ts +101 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +31 -0
|
@@ -0,0 +1,723 @@
|
|
|
1
|
+
export const ELEMENT_TYPES = {
|
|
2
|
+
// ── LAYOUT ────────────────────────────────────────────────────────────────
|
|
3
|
+
columns: {
|
|
4
|
+
type: 'columns',
|
|
5
|
+
label: 'Columns',
|
|
6
|
+
description: 'Multi-column layout (use columns-2 or columns-3 variants)',
|
|
7
|
+
category: 'layout',
|
|
8
|
+
defaultConfig: {
|
|
9
|
+
columns: [],
|
|
10
|
+
gap: '1rem'
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
// ── INPUT ELEMENTS (produce form data) ────────────────────────────────────
|
|
14
|
+
shortText: {
|
|
15
|
+
type: 'shortText',
|
|
16
|
+
label: 'Short Text',
|
|
17
|
+
description: 'Single-line text input',
|
|
18
|
+
category: 'inputs',
|
|
19
|
+
defaultConfig: {
|
|
20
|
+
label: 'Text Field',
|
|
21
|
+
placeholder: 'Enter text...',
|
|
22
|
+
required: false,
|
|
23
|
+
defaultValue: '',
|
|
24
|
+
helpText: '',
|
|
25
|
+
width: 'full',
|
|
26
|
+
validation: {},
|
|
27
|
+
settings: {}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
longText: {
|
|
31
|
+
type: 'longText',
|
|
32
|
+
label: 'Long Text',
|
|
33
|
+
description: 'Multi-line text area',
|
|
34
|
+
category: 'inputs',
|
|
35
|
+
defaultConfig: {
|
|
36
|
+
label: 'Text Area',
|
|
37
|
+
placeholder: 'Enter text...',
|
|
38
|
+
required: false,
|
|
39
|
+
defaultValue: '',
|
|
40
|
+
helpText: '',
|
|
41
|
+
width: 'full',
|
|
42
|
+
rows: 4,
|
|
43
|
+
validation: {},
|
|
44
|
+
settings: {}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
email: {
|
|
48
|
+
type: 'email',
|
|
49
|
+
label: 'Email',
|
|
50
|
+
description: 'Email address input',
|
|
51
|
+
category: 'inputs',
|
|
52
|
+
defaultConfig: {
|
|
53
|
+
label: 'Email',
|
|
54
|
+
placeholder: 'name@example.com',
|
|
55
|
+
required: false,
|
|
56
|
+
defaultValue: '',
|
|
57
|
+
helpText: '',
|
|
58
|
+
width: 'full',
|
|
59
|
+
validation: {},
|
|
60
|
+
settings: {}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
url: {
|
|
64
|
+
type: 'url',
|
|
65
|
+
label: 'URL',
|
|
66
|
+
description: 'Web address input',
|
|
67
|
+
category: 'inputs',
|
|
68
|
+
defaultConfig: {
|
|
69
|
+
label: 'URL',
|
|
70
|
+
placeholder: 'https://...',
|
|
71
|
+
required: false,
|
|
72
|
+
defaultValue: '',
|
|
73
|
+
helpText: '',
|
|
74
|
+
width: 'full',
|
|
75
|
+
validation: {},
|
|
76
|
+
settings: {}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
number: {
|
|
80
|
+
type: 'number',
|
|
81
|
+
label: 'Number',
|
|
82
|
+
description: 'Numeric input',
|
|
83
|
+
category: 'inputs',
|
|
84
|
+
defaultConfig: {
|
|
85
|
+
label: 'Number',
|
|
86
|
+
placeholder: '0',
|
|
87
|
+
required: false,
|
|
88
|
+
defaultValue: '',
|
|
89
|
+
helpText: '',
|
|
90
|
+
width: 'full',
|
|
91
|
+
min: null,
|
|
92
|
+
max: null,
|
|
93
|
+
step: null,
|
|
94
|
+
validation: {},
|
|
95
|
+
settings: {}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
date: {
|
|
99
|
+
type: 'date',
|
|
100
|
+
label: 'Date',
|
|
101
|
+
description: 'Date picker',
|
|
102
|
+
category: 'inputs',
|
|
103
|
+
defaultConfig: {
|
|
104
|
+
label: 'Date',
|
|
105
|
+
placeholder: 'Select date...',
|
|
106
|
+
required: false,
|
|
107
|
+
defaultValue: '',
|
|
108
|
+
helpText: '',
|
|
109
|
+
width: 'full',
|
|
110
|
+
includeTime: false,
|
|
111
|
+
validation: {},
|
|
112
|
+
settings: {}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
dateOfBirth: {
|
|
116
|
+
type: 'dateOfBirth',
|
|
117
|
+
label: 'Date of Birth',
|
|
118
|
+
description: 'Day / Month / Year inputs',
|
|
119
|
+
category: 'inputs',
|
|
120
|
+
defaultConfig: {
|
|
121
|
+
label: 'Date of Birth',
|
|
122
|
+
required: false,
|
|
123
|
+
defaultValue: '',
|
|
124
|
+
helpText: '',
|
|
125
|
+
width: 'full',
|
|
126
|
+
validation: {},
|
|
127
|
+
settings: {}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
dropdown: {
|
|
131
|
+
type: 'dropdown',
|
|
132
|
+
label: 'Dropdown',
|
|
133
|
+
description: 'Select from options',
|
|
134
|
+
category: 'inputs',
|
|
135
|
+
defaultConfig: {
|
|
136
|
+
label: 'Dropdown',
|
|
137
|
+
placeholder: 'Select an option...',
|
|
138
|
+
required: false,
|
|
139
|
+
defaultValue: '',
|
|
140
|
+
helpText: '',
|
|
141
|
+
width: 'full',
|
|
142
|
+
options: [
|
|
143
|
+
{ id: 'opt_1', label: 'Option 1', value: 'option_1' },
|
|
144
|
+
{ id: 'opt_2', label: 'Option 2', value: 'option_2' }
|
|
145
|
+
],
|
|
146
|
+
allowMultiple: false,
|
|
147
|
+
validation: {},
|
|
148
|
+
settings: {}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
multipleChoice: {
|
|
152
|
+
type: 'multipleChoice',
|
|
153
|
+
label: 'Multiple Choice',
|
|
154
|
+
description: 'Radio or checkbox options',
|
|
155
|
+
category: 'inputs',
|
|
156
|
+
defaultConfig: {
|
|
157
|
+
label: 'Multiple Choice',
|
|
158
|
+
required: false,
|
|
159
|
+
defaultValue: '',
|
|
160
|
+
helpText: '',
|
|
161
|
+
width: 'full',
|
|
162
|
+
options: [
|
|
163
|
+
{ id: 'opt_1', label: 'Option 1', value: 'option_1' },
|
|
164
|
+
{ id: 'opt_2', label: 'Option 2', value: 'option_2' }
|
|
165
|
+
],
|
|
166
|
+
allowMultiple: false,
|
|
167
|
+
validation: {},
|
|
168
|
+
settings: {}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
fileUpload: {
|
|
172
|
+
type: 'fileUpload',
|
|
173
|
+
label: 'File Upload',
|
|
174
|
+
description: 'Upload files',
|
|
175
|
+
category: 'inputs',
|
|
176
|
+
defaultConfig: {
|
|
177
|
+
label: 'File Upload',
|
|
178
|
+
required: false,
|
|
179
|
+
helpText: '',
|
|
180
|
+
width: 'full',
|
|
181
|
+
accept: '',
|
|
182
|
+
maxSize: 10,
|
|
183
|
+
maxFiles: 1,
|
|
184
|
+
validation: {},
|
|
185
|
+
settings: {}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
signature: {
|
|
189
|
+
type: 'signature',
|
|
190
|
+
label: 'Signature',
|
|
191
|
+
description: 'Signature pad for capturing signatures',
|
|
192
|
+
category: 'inputs',
|
|
193
|
+
defaultConfig: {
|
|
194
|
+
label: 'Signature',
|
|
195
|
+
required: false,
|
|
196
|
+
helpText: '',
|
|
197
|
+
width: 'full',
|
|
198
|
+
validation: {},
|
|
199
|
+
settings: {}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
audioRecorder: {
|
|
203
|
+
type: 'audioRecorder',
|
|
204
|
+
label: 'Audio Recorder',
|
|
205
|
+
description: 'Record audio from the user',
|
|
206
|
+
category: 'inputs',
|
|
207
|
+
defaultConfig: {
|
|
208
|
+
label: 'Audio Recording',
|
|
209
|
+
required: false,
|
|
210
|
+
helpText: '',
|
|
211
|
+
width: 'full',
|
|
212
|
+
maxDuration: 120,
|
|
213
|
+
audioFormat: 'webm',
|
|
214
|
+
validation: {},
|
|
215
|
+
settings: {}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
// ── DISPLAY ELEMENTS (show content) ───────────────────────────────────────
|
|
219
|
+
textBlock: {
|
|
220
|
+
type: 'textBlock',
|
|
221
|
+
label: 'Text Block',
|
|
222
|
+
description: 'Display formatted text/markdown',
|
|
223
|
+
category: 'display',
|
|
224
|
+
defaultConfig: {
|
|
225
|
+
content: 'Enter your text here...',
|
|
226
|
+
required: false,
|
|
227
|
+
width: 'full',
|
|
228
|
+
settings: {}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
image: {
|
|
232
|
+
type: 'image',
|
|
233
|
+
label: 'Image',
|
|
234
|
+
description: 'Display an image',
|
|
235
|
+
category: 'display',
|
|
236
|
+
defaultConfig: {
|
|
237
|
+
src: '',
|
|
238
|
+
alt: '',
|
|
239
|
+
required: false,
|
|
240
|
+
width: 'full',
|
|
241
|
+
maxHeight: '400px',
|
|
242
|
+
settings: {}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
file: {
|
|
246
|
+
type: 'file',
|
|
247
|
+
label: 'File',
|
|
248
|
+
description: 'Display a downloadable file',
|
|
249
|
+
category: 'display',
|
|
250
|
+
defaultConfig: {
|
|
251
|
+
src: '',
|
|
252
|
+
fileName: '',
|
|
253
|
+
required: false,
|
|
254
|
+
width: 'full',
|
|
255
|
+
settings: {}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
video: {
|
|
259
|
+
type: 'video',
|
|
260
|
+
label: 'Video',
|
|
261
|
+
description: 'Embed a video',
|
|
262
|
+
category: 'display',
|
|
263
|
+
defaultConfig: {
|
|
264
|
+
src: '',
|
|
265
|
+
required: false,
|
|
266
|
+
width: 'full',
|
|
267
|
+
autoplay: false,
|
|
268
|
+
settings: {}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
embed: {
|
|
272
|
+
type: 'embed',
|
|
273
|
+
label: 'Embed',
|
|
274
|
+
description: 'Embed external content via URL',
|
|
275
|
+
category: 'display',
|
|
276
|
+
defaultConfig: {
|
|
277
|
+
url: '',
|
|
278
|
+
required: false,
|
|
279
|
+
width: 'full',
|
|
280
|
+
height: '400px',
|
|
281
|
+
settings: {}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
/** Page style defaults */
|
|
286
|
+
export const PAGE_STYLE_DEFAULTS = {
|
|
287
|
+
backgroundColor: '#f3f4f6',
|
|
288
|
+
backgroundImage: '',
|
|
289
|
+
maxWidth: '640px',
|
|
290
|
+
showProgressBar: true,
|
|
291
|
+
layout: 'centered',
|
|
292
|
+
};
|
|
293
|
+
/** Card style defaults */
|
|
294
|
+
export const CARD_STYLE_DEFAULTS = {
|
|
295
|
+
backgroundColor: '#ffffff',
|
|
296
|
+
borderRadius: '0.75rem',
|
|
297
|
+
padding: '1.5rem',
|
|
298
|
+
shadow: 'sm',
|
|
299
|
+
borderColor: '#e5e7eb',
|
|
300
|
+
submitButtonText: 'Continue',
|
|
301
|
+
submitButtonColor: '#3b82f6',
|
|
302
|
+
submitButtonAlign: 'left',
|
|
303
|
+
};
|
|
304
|
+
/** Loading config defaults */
|
|
305
|
+
export const LOADING_CONFIG_DEFAULTS = {
|
|
306
|
+
enabled: true,
|
|
307
|
+
text: 'Processing your request...',
|
|
308
|
+
subtext: 'Please wait a moment',
|
|
309
|
+
animation: 'spinner',
|
|
310
|
+
backgroundColor: '#ffffff',
|
|
311
|
+
};
|
|
312
|
+
// ============================================================================
|
|
313
|
+
// NODE TYPES
|
|
314
|
+
// ============================================================================
|
|
315
|
+
export const NODE_TYPES = {
|
|
316
|
+
trigger: {
|
|
317
|
+
type: 'trigger',
|
|
318
|
+
label: 'Webhook Trigger',
|
|
319
|
+
category: 'triggers',
|
|
320
|
+
description: 'Trigger flow via HTTP webhook',
|
|
321
|
+
defaultData: {
|
|
322
|
+
label: 'Webhook Trigger',
|
|
323
|
+
webhookPath: '',
|
|
324
|
+
method: 'POST',
|
|
325
|
+
description: 'Receives incoming HTTP requests'
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
scheduleTrigger: {
|
|
329
|
+
type: 'scheduleTrigger',
|
|
330
|
+
label: 'Schedule Trigger',
|
|
331
|
+
category: 'triggers',
|
|
332
|
+
description: 'Trigger flow on a schedule',
|
|
333
|
+
defaultData: {
|
|
334
|
+
label: 'Schedule Trigger',
|
|
335
|
+
scheduleType: 'interval',
|
|
336
|
+
intervalValue: 1,
|
|
337
|
+
intervalUnit: 'hours',
|
|
338
|
+
cronExpression: '0 * * * *',
|
|
339
|
+
timezone: 'UTC',
|
|
340
|
+
enabled: true
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
tablesSchedule: {
|
|
344
|
+
type: 'tablesSchedule',
|
|
345
|
+
label: 'Tables Schedule',
|
|
346
|
+
category: 'triggers',
|
|
347
|
+
description: 'Scheduled trigger for +Ai Tables',
|
|
348
|
+
defaultData: {
|
|
349
|
+
label: 'Tables Schedule',
|
|
350
|
+
databaseId: '',
|
|
351
|
+
databaseName: '',
|
|
352
|
+
tableId: '',
|
|
353
|
+
tableName: '',
|
|
354
|
+
apiKey: '',
|
|
355
|
+
useCustomApiKey: false,
|
|
356
|
+
schedule: {
|
|
357
|
+
minute: '0',
|
|
358
|
+
hour: '9',
|
|
359
|
+
dayOfMonth: '*',
|
|
360
|
+
month: '*',
|
|
361
|
+
dayOfWeek: '*'
|
|
362
|
+
},
|
|
363
|
+
scheduleEnabled: true,
|
|
364
|
+
timezone: 'UTC',
|
|
365
|
+
scheduleDescription: 'Daily at 9:00 AM',
|
|
366
|
+
description: 'Scheduled trigger for table operations',
|
|
367
|
+
syncEnabled: false,
|
|
368
|
+
syncDirection: 'full',
|
|
369
|
+
syncScope: 'all',
|
|
370
|
+
undeletable: true
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
tableButton: {
|
|
374
|
+
type: 'tableButton',
|
|
375
|
+
label: 'Table Button',
|
|
376
|
+
category: 'triggers',
|
|
377
|
+
description: 'Triggers when a table button is clicked',
|
|
378
|
+
defaultData: {
|
|
379
|
+
label: 'Table Button',
|
|
380
|
+
tableId: '',
|
|
381
|
+
tableName: '',
|
|
382
|
+
columnId: '',
|
|
383
|
+
columnName: '',
|
|
384
|
+
buttonLabel: '',
|
|
385
|
+
tableUrl: '',
|
|
386
|
+
undeletable: true,
|
|
387
|
+
description: 'Triggers when this button is clicked in the table'
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
tableActionTrigger: {
|
|
391
|
+
type: 'tableActionTrigger',
|
|
392
|
+
label: 'Table Button',
|
|
393
|
+
category: 'triggers',
|
|
394
|
+
description: 'Triggers when a table button is clicked',
|
|
395
|
+
defaultData: {
|
|
396
|
+
label: 'Table Button',
|
|
397
|
+
databaseId: '',
|
|
398
|
+
databaseName: '',
|
|
399
|
+
tableId: '',
|
|
400
|
+
tableName: '',
|
|
401
|
+
buttonColumnId: '',
|
|
402
|
+
buttonColumnName: '',
|
|
403
|
+
enabledButtons: [],
|
|
404
|
+
undeletable: true,
|
|
405
|
+
description: 'Triggers when a table button is clicked'
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
batchActionTrigger: {
|
|
409
|
+
type: 'batchActionTrigger',
|
|
410
|
+
label: 'Batch Action',
|
|
411
|
+
category: 'triggers',
|
|
412
|
+
description: 'Triggers when a batch/autopilot action runs',
|
|
413
|
+
defaultData: {
|
|
414
|
+
label: 'Batch Action',
|
|
415
|
+
databaseId: '',
|
|
416
|
+
databaseName: '',
|
|
417
|
+
tableId: '',
|
|
418
|
+
tableName: '',
|
|
419
|
+
apiKey: '',
|
|
420
|
+
useCustomApiKey: false,
|
|
421
|
+
enabledActions: [],
|
|
422
|
+
actionId: '',
|
|
423
|
+
actionLabel: '',
|
|
424
|
+
undeletable: true,
|
|
425
|
+
description: ''
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
tableTrigger: {
|
|
429
|
+
type: 'tableTrigger',
|
|
430
|
+
label: 'Table Trigger',
|
|
431
|
+
category: 'triggers',
|
|
432
|
+
description: 'Triggers when a table row is inserted, updated, or deleted',
|
|
433
|
+
defaultData: {
|
|
434
|
+
label: 'Table Trigger',
|
|
435
|
+
databaseId: '',
|
|
436
|
+
databaseName: '',
|
|
437
|
+
tableId: '',
|
|
438
|
+
tableName: '',
|
|
439
|
+
enabledEvents: ['INSERT', 'UPDATE', 'DELETE'],
|
|
440
|
+
enabledTriggerIds: [],
|
|
441
|
+
undeletable: true,
|
|
442
|
+
description: 'Responds to table row events'
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
emailTrigger: {
|
|
446
|
+
type: 'emailTrigger',
|
|
447
|
+
label: 'Email Trigger',
|
|
448
|
+
category: 'triggers',
|
|
449
|
+
description: 'Trigger flow via email',
|
|
450
|
+
defaultData: {
|
|
451
|
+
label: 'Email Trigger',
|
|
452
|
+
description: 'Triggers when an email is sent to this flow'
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
startForm: {
|
|
456
|
+
type: 'startForm',
|
|
457
|
+
label: 'Start Form',
|
|
458
|
+
category: 'triggers',
|
|
459
|
+
description: 'Start flow from a public form',
|
|
460
|
+
defaultData: {
|
|
461
|
+
label: 'Start Form',
|
|
462
|
+
elements: [],
|
|
463
|
+
pageStyle: {
|
|
464
|
+
backgroundColor: '#ffffff',
|
|
465
|
+
backgroundImage: '',
|
|
466
|
+
maxWidth: '640px',
|
|
467
|
+
padding: '2rem',
|
|
468
|
+
showProgressBar: false,
|
|
469
|
+
submitButtonText: 'Submit',
|
|
470
|
+
submitButtonColor: '#3b82f6'
|
|
471
|
+
},
|
|
472
|
+
formSlug: ''
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
httpRequest: {
|
|
476
|
+
type: 'httpRequest',
|
|
477
|
+
label: 'HTTP Request',
|
|
478
|
+
category: 'processing',
|
|
479
|
+
description: 'Make HTTP requests to external APIs',
|
|
480
|
+
defaultData: {
|
|
481
|
+
label: 'HTTP Request',
|
|
482
|
+
isAction: true,
|
|
483
|
+
url: '',
|
|
484
|
+
method: 'GET',
|
|
485
|
+
headers: [],
|
|
486
|
+
queryParams: [],
|
|
487
|
+
body: '',
|
|
488
|
+
bodyType: 'none',
|
|
489
|
+
timeout: 30000,
|
|
490
|
+
retries: 0,
|
|
491
|
+
onError: 'stop'
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
respondToWebhook: {
|
|
495
|
+
type: 'respondToWebhook',
|
|
496
|
+
label: 'Respond to Webhook',
|
|
497
|
+
category: 'processing',
|
|
498
|
+
description: 'Send a response back to the webhook caller',
|
|
499
|
+
defaultData: {
|
|
500
|
+
label: 'Respond to Webhook',
|
|
501
|
+
statusCode: 200,
|
|
502
|
+
responseBody: '{}',
|
|
503
|
+
bodyType: 'json',
|
|
504
|
+
headers: [],
|
|
505
|
+
description: 'Sends a custom response to the webhook caller'
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
code: {
|
|
509
|
+
type: 'code',
|
|
510
|
+
label: 'Code',
|
|
511
|
+
category: 'processing',
|
|
512
|
+
description: 'Execute custom JavaScript code',
|
|
513
|
+
defaultData: {
|
|
514
|
+
label: 'Code',
|
|
515
|
+
isAction: true,
|
|
516
|
+
mode: 'runOnce',
|
|
517
|
+
code: '// All upstream data is available via $input\nconst data = $input;\n\nreturn {\n result: data\n};',
|
|
518
|
+
itemsPath: '',
|
|
519
|
+
onError: 'stop'
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
map: {
|
|
523
|
+
type: 'map',
|
|
524
|
+
label: 'Map Data',
|
|
525
|
+
category: 'processing',
|
|
526
|
+
description: 'Transform and map data fields',
|
|
527
|
+
defaultData: {
|
|
528
|
+
label: 'Map Data',
|
|
529
|
+
mappings: [],
|
|
530
|
+
outputFormat: 'object'
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
if: {
|
|
534
|
+
type: 'if',
|
|
535
|
+
label: 'If Condition',
|
|
536
|
+
category: 'logic',
|
|
537
|
+
description: 'Branch flow based on conditions',
|
|
538
|
+
defaultData: {
|
|
539
|
+
label: 'If Condition',
|
|
540
|
+
conditions: [],
|
|
541
|
+
conditionLogic: 'and'
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
switch: {
|
|
545
|
+
type: 'switch',
|
|
546
|
+
label: 'Switch',
|
|
547
|
+
category: 'logic',
|
|
548
|
+
description: 'Multiple conditional paths',
|
|
549
|
+
defaultData: {
|
|
550
|
+
label: 'Switch',
|
|
551
|
+
cases: [],
|
|
552
|
+
mode: 'first',
|
|
553
|
+
hasDefault: true
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
wait: {
|
|
557
|
+
type: 'wait',
|
|
558
|
+
label: 'Wait',
|
|
559
|
+
category: 'logic',
|
|
560
|
+
description: 'Pause execution for a duration',
|
|
561
|
+
defaultData: {
|
|
562
|
+
label: 'Wait',
|
|
563
|
+
waitType: 'duration',
|
|
564
|
+
duration: 5,
|
|
565
|
+
durationUnit: 'seconds'
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
flow: {
|
|
569
|
+
type: 'flow',
|
|
570
|
+
label: 'Flow',
|
|
571
|
+
category: 'logic',
|
|
572
|
+
description: 'Execute another flow',
|
|
573
|
+
defaultData: {
|
|
574
|
+
label: 'Flow',
|
|
575
|
+
flowId: null,
|
|
576
|
+
flowName: null,
|
|
577
|
+
waitForCompletion: true,
|
|
578
|
+
body: '{}'
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
goal: {
|
|
582
|
+
type: 'goal',
|
|
583
|
+
label: 'Goal',
|
|
584
|
+
category: 'logic',
|
|
585
|
+
description: 'Goal endpoint for subflow or flow',
|
|
586
|
+
defaultData: {
|
|
587
|
+
label: 'Goal',
|
|
588
|
+
goalName: ''
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
exit: {
|
|
592
|
+
type: 'exit',
|
|
593
|
+
label: 'Exit',
|
|
594
|
+
category: 'logic',
|
|
595
|
+
description: 'Exit endpoint for subflow or flow',
|
|
596
|
+
defaultData: {
|
|
597
|
+
label: 'Exit',
|
|
598
|
+
exitName: ''
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
review: {
|
|
602
|
+
type: 'review',
|
|
603
|
+
label: 'Review',
|
|
604
|
+
category: 'logic',
|
|
605
|
+
description: 'Wait for approval before continuing',
|
|
606
|
+
defaultData: {
|
|
607
|
+
label: 'Review',
|
|
608
|
+
title: 'Review Required',
|
|
609
|
+
description: '',
|
|
610
|
+
fields: [],
|
|
611
|
+
options: [
|
|
612
|
+
{ id: 'option_0', label: 'Approve', color: 'green' },
|
|
613
|
+
{ id: 'option_1', label: 'Reject', color: 'red' }
|
|
614
|
+
]
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
page: {
|
|
618
|
+
type: 'page',
|
|
619
|
+
label: 'Page',
|
|
620
|
+
category: 'logic',
|
|
621
|
+
description: 'Show a form page and wait for submission',
|
|
622
|
+
defaultData: {
|
|
623
|
+
label: 'Page',
|
|
624
|
+
elements: [],
|
|
625
|
+
abandonments: [],
|
|
626
|
+
pageStyle: {
|
|
627
|
+
backgroundColor: '#ffffff',
|
|
628
|
+
backgroundImage: '',
|
|
629
|
+
maxWidth: '640px',
|
|
630
|
+
padding: '2rem',
|
|
631
|
+
showProgressBar: true,
|
|
632
|
+
submitButtonText: 'Continue',
|
|
633
|
+
submitButtonColor: '#3b82f6'
|
|
634
|
+
},
|
|
635
|
+
loadingConfig: {
|
|
636
|
+
enabled: true,
|
|
637
|
+
text: 'Processing your request...',
|
|
638
|
+
subtext: 'Please wait a moment',
|
|
639
|
+
animation: 'spinner',
|
|
640
|
+
backgroundColor: '#ffffff'
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
loop: {
|
|
645
|
+
type: 'loop',
|
|
646
|
+
label: 'Loop',
|
|
647
|
+
category: 'logic',
|
|
648
|
+
description: 'Iterate over an array',
|
|
649
|
+
defaultData: {
|
|
650
|
+
label: 'Loop',
|
|
651
|
+
arraySources: [''],
|
|
652
|
+
enableFailRoute: false,
|
|
653
|
+
description: 'Loop over each item in an array'
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
subflow: {
|
|
657
|
+
type: 'subflow',
|
|
658
|
+
label: 'Subflow',
|
|
659
|
+
category: 'logic',
|
|
660
|
+
description: 'Group nodes into a collapsible subflow',
|
|
661
|
+
defaultData: {
|
|
662
|
+
label: 'Subflow',
|
|
663
|
+
description: 'Group of nodes'
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
variable: {
|
|
667
|
+
type: 'variable',
|
|
668
|
+
label: 'Variable',
|
|
669
|
+
category: 'logic',
|
|
670
|
+
description: 'Create, update, or delete flow variables',
|
|
671
|
+
defaultData: {
|
|
672
|
+
label: 'Variable',
|
|
673
|
+
action: 'update',
|
|
674
|
+
variableName: '',
|
|
675
|
+
variableType: 'string',
|
|
676
|
+
operator: 'set',
|
|
677
|
+
value: '',
|
|
678
|
+
defaultValue: '',
|
|
679
|
+
variables: []
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
splitTest: {
|
|
683
|
+
type: 'splitTest',
|
|
684
|
+
label: 'Split Test',
|
|
685
|
+
category: 'logic',
|
|
686
|
+
description: 'Route traffic randomly by percentage',
|
|
687
|
+
defaultData: {
|
|
688
|
+
label: 'Split Test',
|
|
689
|
+
variants: [
|
|
690
|
+
{ id: 'v_0', label: 'Variant A', percentage: 50 },
|
|
691
|
+
{ id: 'v_1', label: 'Variant B', percentage: 50 }
|
|
692
|
+
]
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
customNode: {
|
|
696
|
+
type: 'customNode',
|
|
697
|
+
label: 'Custom Node',
|
|
698
|
+
category: 'custom',
|
|
699
|
+
description: 'User-created custom JavaScript node',
|
|
700
|
+
defaultData: {
|
|
701
|
+
label: 'Custom Node',
|
|
702
|
+
isAction: true,
|
|
703
|
+
customNodeId: null,
|
|
704
|
+
customVersionId: null,
|
|
705
|
+
customNodeName: null,
|
|
706
|
+
customNodeSlug: null,
|
|
707
|
+
customNodeIcon: null,
|
|
708
|
+
customNodeVersion: null,
|
|
709
|
+
onError: 'stop'
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
note: {
|
|
713
|
+
type: 'note',
|
|
714
|
+
label: 'Note',
|
|
715
|
+
category: 'utility',
|
|
716
|
+
description: 'Add notes to your flow',
|
|
717
|
+
defaultData: {
|
|
718
|
+
label: 'Note',
|
|
719
|
+
content: ''
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
//# sourceMappingURL=node-defaults.js.map
|