@xyne/workflow-sdk 3.2.61 → 3.2.62

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.
Files changed (112) hide show
  1. package/dist/agents/compaction.d.ts +62 -0
  2. package/dist/agents/compaction.d.ts.map +1 -0
  3. package/dist/agents/compaction.js +153 -0
  4. package/dist/agents/compaction.js.map +1 -0
  5. package/dist/agents/host-agent-step.d.ts +2 -2
  6. package/dist/agents/llm-call-policy.d.ts +48 -0
  7. package/dist/agents/llm-call-policy.d.ts.map +1 -0
  8. package/dist/agents/llm-call-policy.js +140 -0
  9. package/dist/agents/llm-call-policy.js.map +1 -0
  10. package/dist/builder/index.d.ts +1 -1
  11. package/dist/builder/index.d.ts.map +1 -1
  12. package/dist/builder/index.js.map +1 -1
  13. package/dist/client/index.d.ts +1 -1
  14. package/dist/client/index.d.ts.map +1 -1
  15. package/dist/client/types.d.ts +10 -2
  16. package/dist/client/types.d.ts.map +1 -1
  17. package/dist/client/workflow-client.d.ts.map +1 -1
  18. package/dist/client/workflow-client.js +8 -0
  19. package/dist/client/workflow-client.js.map +1 -1
  20. package/dist/connectors/builtin/steps/parallel.step.d.ts +4 -4
  21. package/dist/connectors/builtin/steps/wait-for-human.step.d.ts +7 -0
  22. package/dist/connectors/builtin/steps/wait-for-human.step.d.ts.map +1 -1
  23. package/dist/connectors/builtin/steps/wait-for-human.step.js +15 -0
  24. package/dist/connectors/builtin/steps/wait-for-human.step.js.map +1 -1
  25. package/dist/engine/workflow-executor.d.ts.map +1 -1
  26. package/dist/engine/workflow-executor.js +6 -0
  27. package/dist/engine/workflow-executor.js.map +1 -1
  28. package/dist/expression/recalc.d.ts +26 -0
  29. package/dist/expression/recalc.d.ts.map +1 -0
  30. package/dist/expression/recalc.js +62 -0
  31. package/dist/expression/recalc.js.map +1 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +1 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/persistence/in-memory-adapter.d.ts +7 -0
  37. package/dist/persistence/in-memory-adapter.d.ts.map +1 -1
  38. package/dist/persistence/in-memory-adapter.js +35 -2
  39. package/dist/persistence/in-memory-adapter.js.map +1 -1
  40. package/dist/persistence/types.d.ts +32 -1
  41. package/dist/persistence/types.d.ts.map +1 -1
  42. package/dist/router/workflow-router.d.ts.map +1 -1
  43. package/dist/router/workflow-router.js +19 -1
  44. package/dist/router/workflow-router.js.map +1 -1
  45. package/dist/runtime/workflow-runtime.d.ts +89 -4
  46. package/dist/runtime/workflow-runtime.d.ts.map +1 -1
  47. package/dist/runtime/workflow-runtime.js +176 -13
  48. package/dist/runtime/workflow-runtime.js.map +1 -1
  49. package/dist/types/audit-log.d.ts +55 -0
  50. package/dist/types/audit-log.d.ts.map +1 -0
  51. package/dist/types/audit-log.js +2 -0
  52. package/dist/types/audit-log.js.map +1 -0
  53. package/dist/types/index.d.ts +1 -1
  54. package/dist/types/index.d.ts.map +1 -1
  55. package/dist/types/index.js.map +1 -1
  56. package/dist/types/workflow-config.d.ts +56 -0
  57. package/dist/types/workflow-config.d.ts.map +1 -1
  58. package/dist/types/workflow-config.js +16 -0
  59. package/dist/types/workflow-config.js.map +1 -1
  60. package/dist/util/gate-assignees.d.ts +2 -0
  61. package/dist/util/gate-assignees.d.ts.map +1 -0
  62. package/dist/util/gate-assignees.js +14 -0
  63. package/dist/util/gate-assignees.js.map +1 -0
  64. package/dist/util/variable-ref.d.ts +3 -1
  65. package/dist/util/variable-ref.d.ts.map +1 -1
  66. package/dist/util/variable-ref.js +1 -1
  67. package/dist/util/variable-ref.js.map +1 -1
  68. package/dist/util/wait-audit.d.ts +9 -0
  69. package/dist/util/wait-audit.d.ts.map +1 -0
  70. package/dist/util/wait-audit.js +75 -0
  71. package/dist/util/wait-audit.js.map +1 -0
  72. package/package.json +1 -1
  73. package/dist/connectors/builtin/steps/compute.step.d.ts +0 -56
  74. package/dist/connectors/builtin/steps/compute.step.d.ts.map +0 -1
  75. package/dist/connectors/builtin/steps/compute.step.js +0 -48
  76. package/dist/connectors/builtin/steps/compute.step.js.map +0 -1
  77. package/dist/connectors/builtin/steps/wait-for-api-call.step.d.ts +0 -80
  78. package/dist/connectors/builtin/steps/wait-for-api-call.step.d.ts.map +0 -1
  79. package/dist/connectors/builtin/steps/wait-for-api-call.step.js +0 -104
  80. package/dist/connectors/builtin/steps/wait-for-api-call.step.js.map +0 -1
  81. package/dist/connectors/builtin/steps/wait.step.d.ts +0 -1087
  82. package/dist/connectors/builtin/steps/wait.step.d.ts.map +0 -1
  83. package/dist/connectors/builtin/steps/wait.step.js +0 -252
  84. package/dist/connectors/builtin/steps/wait.step.js.map +0 -1
  85. package/dist/conversational-flow/edit/followups.d.ts +0 -28
  86. package/dist/conversational-flow/edit/followups.d.ts.map +0 -1
  87. package/dist/conversational-flow/edit/followups.js +0 -103
  88. package/dist/conversational-flow/edit/followups.js.map +0 -1
  89. package/dist/util/computed-value.d.ts +0 -103
  90. package/dist/util/computed-value.d.ts.map +0 -1
  91. package/dist/util/computed-value.js +0 -453
  92. package/dist/util/computed-value.js.map +0 -1
  93. package/dist/util/expression-format.d.ts +0 -41
  94. package/dist/util/expression-format.d.ts.map +0 -1
  95. package/dist/util/expression-format.js +0 -84
  96. package/dist/util/expression-format.js.map +0 -1
  97. package/dist/util/expression-functions.d.ts +0 -35
  98. package/dist/util/expression-functions.d.ts.map +0 -1
  99. package/dist/util/expression-functions.js +0 -82
  100. package/dist/util/expression-functions.js.map +0 -1
  101. package/dist/util/expression.d.ts +0 -98
  102. package/dist/util/expression.d.ts.map +0 -1
  103. package/dist/util/expression.js +0 -395
  104. package/dist/util/expression.js.map +0 -1
  105. package/dist/util/jsonata-signatures.d.ts +0 -45
  106. package/dist/util/jsonata-signatures.d.ts.map +0 -1
  107. package/dist/util/jsonata-signatures.js +0 -113
  108. package/dist/util/jsonata-signatures.js.map +0 -1
  109. package/dist/util/signature.d.ts +0 -41
  110. package/dist/util/signature.d.ts.map +0 -1
  111. package/dist/util/signature.js +0 -124
  112. package/dist/util/signature.js.map +0 -1
@@ -1,1087 +0,0 @@
1
- /**
2
- * WAIT step — pause execution and resume on a trigger.
3
- *
4
- * - `delay`: resume after a duration. Pauses with `statePatch.resumeAfter`
5
- * for a host that schedules a delayed re-enqueue.
6
- * - `approval`: resume when a person answers, through the resume API.
7
- *
8
- * Both pause through `ctx.pause()`; the step is stateless and trusts
9
- * `onResume()` to receive whatever the caller provided.
10
- */
11
- import { z } from 'zod';
12
- import { BaseActionStep } from '../../../steps/base-step.js';
13
- import type { StepExecutionContext } from '../../../steps/base-step.js';
14
- import { BuiltinStepType } from '../../../types/known-types.js';
15
- import type { StepCategory } from '../../../types/categories.js';
16
- export declare const WaitStepConfigSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
17
- mode: z.ZodLiteral<"delay">;
18
- delayMs: z.ZodNumber;
19
- }, "strip", z.ZodTypeAny, {
20
- mode: "delay";
21
- delayMs: number;
22
- }, {
23
- mode: "delay";
24
- delayMs: number;
25
- }>, z.ZodObject<{
26
- mode: z.ZodLiteral<"approval">;
27
- reason: z.ZodString;
28
- dueInMs: z.ZodOptional<z.ZodNumber>;
29
- prompt: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
30
- display: z.ZodOptional<z.ZodArray<z.ZodObject<{
31
- id: z.ZodOptional<z.ZodString>;
32
- label: z.ZodString;
33
- value: z.ZodUnknown;
34
- }, "strip", z.ZodTypeAny, {
35
- label: string;
36
- value?: unknown;
37
- id?: string | undefined;
38
- }, {
39
- label: string;
40
- value?: unknown;
41
- id?: string | undefined;
42
- }>, "many">>;
43
- form: z.ZodOptional<z.ZodObject<{
44
- fields: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
45
- type: z.ZodLiteral<"text">;
46
- name: z.ZodString;
47
- label: z.ZodString;
48
- required: z.ZodOptional<z.ZodBoolean>;
49
- description: z.ZodOptional<z.ZodString>;
50
- placeholder: z.ZodOptional<z.ZodString>;
51
- defaultValue: z.ZodOptional<z.ZodString>;
52
- }, "strip", z.ZodTypeAny, {
53
- type: "text";
54
- name: string;
55
- label: string;
56
- description?: string | undefined;
57
- required?: boolean | undefined;
58
- placeholder?: string | undefined;
59
- defaultValue?: string | undefined;
60
- }, {
61
- type: "text";
62
- name: string;
63
- label: string;
64
- description?: string | undefined;
65
- required?: boolean | undefined;
66
- placeholder?: string | undefined;
67
- defaultValue?: string | undefined;
68
- }>, z.ZodObject<{
69
- type: z.ZodLiteral<"textarea">;
70
- name: z.ZodString;
71
- label: z.ZodString;
72
- required: z.ZodOptional<z.ZodBoolean>;
73
- description: z.ZodOptional<z.ZodString>;
74
- placeholder: z.ZodOptional<z.ZodString>;
75
- defaultValue: z.ZodOptional<z.ZodString>;
76
- rows: z.ZodOptional<z.ZodNumber>;
77
- }, "strip", z.ZodTypeAny, {
78
- type: "textarea";
79
- name: string;
80
- label: string;
81
- description?: string | undefined;
82
- required?: boolean | undefined;
83
- placeholder?: string | undefined;
84
- defaultValue?: string | undefined;
85
- rows?: number | undefined;
86
- }, {
87
- type: "textarea";
88
- name: string;
89
- label: string;
90
- description?: string | undefined;
91
- required?: boolean | undefined;
92
- placeholder?: string | undefined;
93
- defaultValue?: string | undefined;
94
- rows?: number | undefined;
95
- }>, z.ZodObject<{
96
- type: z.ZodLiteral<"number">;
97
- name: z.ZodString;
98
- label: z.ZodString;
99
- required: z.ZodOptional<z.ZodBoolean>;
100
- description: z.ZodOptional<z.ZodString>;
101
- placeholder: z.ZodOptional<z.ZodString>;
102
- defaultValue: z.ZodOptional<z.ZodNumber>;
103
- min: z.ZodOptional<z.ZodNumber>;
104
- max: z.ZodOptional<z.ZodNumber>;
105
- }, "strip", z.ZodTypeAny, {
106
- type: "number";
107
- name: string;
108
- label: string;
109
- description?: string | undefined;
110
- required?: boolean | undefined;
111
- max?: number | undefined;
112
- min?: number | undefined;
113
- placeholder?: string | undefined;
114
- defaultValue?: number | undefined;
115
- }, {
116
- type: "number";
117
- name: string;
118
- label: string;
119
- description?: string | undefined;
120
- required?: boolean | undefined;
121
- max?: number | undefined;
122
- min?: number | undefined;
123
- placeholder?: string | undefined;
124
- defaultValue?: number | undefined;
125
- }>, z.ZodObject<{
126
- type: z.ZodLiteral<"select">;
127
- name: z.ZodString;
128
- label: z.ZodString;
129
- required: z.ZodOptional<z.ZodBoolean>;
130
- description: z.ZodOptional<z.ZodString>;
131
- placeholder: z.ZodOptional<z.ZodString>;
132
- defaultValue: z.ZodOptional<z.ZodString>;
133
- options: z.ZodUnion<[z.ZodArray<z.ZodObject<{
134
- label: z.ZodString;
135
- value: z.ZodString;
136
- when: z.ZodOptional<z.ZodType<import("../../../types/workflow-config.js").Condition, z.ZodTypeDef, import("../../../types/workflow-config.js").Condition>>;
137
- }, "strip", z.ZodTypeAny, {
138
- value: string;
139
- label: string;
140
- when?: import("../../../types/workflow-config.js").Condition | undefined;
141
- }, {
142
- value: string;
143
- label: string;
144
- when?: import("../../../types/workflow-config.js").Condition | undefined;
145
- }>, "many">, z.ZodString]>;
146
- allowCustomValue: z.ZodOptional<z.ZodBoolean>;
147
- }, "strip", z.ZodTypeAny, {
148
- options: string | {
149
- value: string;
150
- label: string;
151
- when?: import("../../../types/workflow-config.js").Condition | undefined;
152
- }[];
153
- type: "select";
154
- name: string;
155
- label: string;
156
- description?: string | undefined;
157
- required?: boolean | undefined;
158
- placeholder?: string | undefined;
159
- defaultValue?: string | undefined;
160
- allowCustomValue?: boolean | undefined;
161
- }, {
162
- options: string | {
163
- value: string;
164
- label: string;
165
- when?: import("../../../types/workflow-config.js").Condition | undefined;
166
- }[];
167
- type: "select";
168
- name: string;
169
- label: string;
170
- description?: string | undefined;
171
- required?: boolean | undefined;
172
- placeholder?: string | undefined;
173
- defaultValue?: string | undefined;
174
- allowCustomValue?: boolean | undefined;
175
- }>, z.ZodObject<{
176
- type: z.ZodLiteral<"checkbox">;
177
- name: z.ZodString;
178
- label: z.ZodString;
179
- required: z.ZodOptional<z.ZodBoolean>;
180
- description: z.ZodOptional<z.ZodString>;
181
- defaultValue: z.ZodOptional<z.ZodBoolean>;
182
- }, "strip", z.ZodTypeAny, {
183
- type: "checkbox";
184
- name: string;
185
- label: string;
186
- description?: string | undefined;
187
- required?: boolean | undefined;
188
- defaultValue?: boolean | undefined;
189
- }, {
190
- type: "checkbox";
191
- name: string;
192
- label: string;
193
- description?: string | undefined;
194
- required?: boolean | undefined;
195
- defaultValue?: boolean | undefined;
196
- }>, z.ZodObject<{
197
- type: z.ZodLiteral<"attachment">;
198
- name: z.ZodString;
199
- label: z.ZodString;
200
- required: z.ZodOptional<z.ZodBoolean>;
201
- description: z.ZodOptional<z.ZodString>;
202
- multiple: z.ZodOptional<z.ZodBoolean>;
203
- accept: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
204
- maxSize: z.ZodOptional<z.ZodNumber>;
205
- maxItems: z.ZodOptional<z.ZodNumber>;
206
- }, "strip", z.ZodTypeAny, {
207
- type: "attachment";
208
- name: string;
209
- label: string;
210
- maxItems?: number | undefined;
211
- description?: string | undefined;
212
- required?: boolean | undefined;
213
- accept?: string[] | undefined;
214
- maxSize?: number | undefined;
215
- multiple?: boolean | undefined;
216
- }, {
217
- type: "attachment";
218
- name: string;
219
- label: string;
220
- maxItems?: number | undefined;
221
- description?: string | undefined;
222
- required?: boolean | undefined;
223
- accept?: string[] | undefined;
224
- maxSize?: number | undefined;
225
- multiple?: boolean | undefined;
226
- }>]>, "many">;
227
- description: z.ZodOptional<z.ZodString>;
228
- }, "strip", z.ZodTypeAny, {
229
- fields: ({
230
- type: "text";
231
- name: string;
232
- label: string;
233
- description?: string | undefined;
234
- required?: boolean | undefined;
235
- placeholder?: string | undefined;
236
- defaultValue?: string | undefined;
237
- } | {
238
- type: "textarea";
239
- name: string;
240
- label: string;
241
- description?: string | undefined;
242
- required?: boolean | undefined;
243
- placeholder?: string | undefined;
244
- defaultValue?: string | undefined;
245
- rows?: number | undefined;
246
- } | {
247
- type: "number";
248
- name: string;
249
- label: string;
250
- description?: string | undefined;
251
- required?: boolean | undefined;
252
- max?: number | undefined;
253
- min?: number | undefined;
254
- placeholder?: string | undefined;
255
- defaultValue?: number | undefined;
256
- } | {
257
- options: string | {
258
- value: string;
259
- label: string;
260
- when?: import("../../../types/workflow-config.js").Condition | undefined;
261
- }[];
262
- type: "select";
263
- name: string;
264
- label: string;
265
- description?: string | undefined;
266
- required?: boolean | undefined;
267
- placeholder?: string | undefined;
268
- defaultValue?: string | undefined;
269
- allowCustomValue?: boolean | undefined;
270
- } | {
271
- type: "checkbox";
272
- name: string;
273
- label: string;
274
- description?: string | undefined;
275
- required?: boolean | undefined;
276
- defaultValue?: boolean | undefined;
277
- } | {
278
- type: "attachment";
279
- name: string;
280
- label: string;
281
- maxItems?: number | undefined;
282
- description?: string | undefined;
283
- required?: boolean | undefined;
284
- accept?: string[] | undefined;
285
- maxSize?: number | undefined;
286
- multiple?: boolean | undefined;
287
- })[];
288
- description?: string | undefined;
289
- }, {
290
- fields: ({
291
- type: "text";
292
- name: string;
293
- label: string;
294
- description?: string | undefined;
295
- required?: boolean | undefined;
296
- placeholder?: string | undefined;
297
- defaultValue?: string | undefined;
298
- } | {
299
- type: "textarea";
300
- name: string;
301
- label: string;
302
- description?: string | undefined;
303
- required?: boolean | undefined;
304
- placeholder?: string | undefined;
305
- defaultValue?: string | undefined;
306
- rows?: number | undefined;
307
- } | {
308
- type: "number";
309
- name: string;
310
- label: string;
311
- description?: string | undefined;
312
- required?: boolean | undefined;
313
- max?: number | undefined;
314
- min?: number | undefined;
315
- placeholder?: string | undefined;
316
- defaultValue?: number | undefined;
317
- } | {
318
- options: string | {
319
- value: string;
320
- label: string;
321
- when?: import("../../../types/workflow-config.js").Condition | undefined;
322
- }[];
323
- type: "select";
324
- name: string;
325
- label: string;
326
- description?: string | undefined;
327
- required?: boolean | undefined;
328
- placeholder?: string | undefined;
329
- defaultValue?: string | undefined;
330
- allowCustomValue?: boolean | undefined;
331
- } | {
332
- type: "checkbox";
333
- name: string;
334
- label: string;
335
- description?: string | undefined;
336
- required?: boolean | undefined;
337
- defaultValue?: boolean | undefined;
338
- } | {
339
- type: "attachment";
340
- name: string;
341
- label: string;
342
- maxItems?: number | undefined;
343
- description?: string | undefined;
344
- required?: boolean | undefined;
345
- accept?: string[] | undefined;
346
- maxSize?: number | undefined;
347
- multiple?: boolean | undefined;
348
- })[];
349
- description?: string | undefined;
350
- }>>;
351
- actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
352
- key: z.ZodString;
353
- label: z.ZodString;
354
- style: z.ZodOptional<z.ZodEnum<["primary", "danger", "default"]>>;
355
- abort: z.ZodOptional<z.ZodBoolean>;
356
- submitsForm: z.ZodOptional<z.ZodBoolean>;
357
- }, "strip", z.ZodTypeAny, {
358
- key: string;
359
- label: string;
360
- abort?: boolean | undefined;
361
- style?: "default" | "primary" | "danger" | undefined;
362
- submitsForm?: boolean | undefined;
363
- }, {
364
- key: string;
365
- label: string;
366
- abort?: boolean | undefined;
367
- style?: "default" | "primary" | "danger" | undefined;
368
- submitsForm?: boolean | undefined;
369
- }>, "many">>;
370
- }, "strip", z.ZodTypeAny, {
371
- reason: string;
372
- mode: "approval";
373
- dueInMs?: number | undefined;
374
- prompt?: string[] | undefined;
375
- display?: {
376
- label: string;
377
- value?: unknown;
378
- id?: string | undefined;
379
- }[] | undefined;
380
- form?: {
381
- fields: ({
382
- type: "text";
383
- name: string;
384
- label: string;
385
- description?: string | undefined;
386
- required?: boolean | undefined;
387
- placeholder?: string | undefined;
388
- defaultValue?: string | undefined;
389
- } | {
390
- type: "textarea";
391
- name: string;
392
- label: string;
393
- description?: string | undefined;
394
- required?: boolean | undefined;
395
- placeholder?: string | undefined;
396
- defaultValue?: string | undefined;
397
- rows?: number | undefined;
398
- } | {
399
- type: "number";
400
- name: string;
401
- label: string;
402
- description?: string | undefined;
403
- required?: boolean | undefined;
404
- max?: number | undefined;
405
- min?: number | undefined;
406
- placeholder?: string | undefined;
407
- defaultValue?: number | undefined;
408
- } | {
409
- options: string | {
410
- value: string;
411
- label: string;
412
- when?: import("../../../types/workflow-config.js").Condition | undefined;
413
- }[];
414
- type: "select";
415
- name: string;
416
- label: string;
417
- description?: string | undefined;
418
- required?: boolean | undefined;
419
- placeholder?: string | undefined;
420
- defaultValue?: string | undefined;
421
- allowCustomValue?: boolean | undefined;
422
- } | {
423
- type: "checkbox";
424
- name: string;
425
- label: string;
426
- description?: string | undefined;
427
- required?: boolean | undefined;
428
- defaultValue?: boolean | undefined;
429
- } | {
430
- type: "attachment";
431
- name: string;
432
- label: string;
433
- maxItems?: number | undefined;
434
- description?: string | undefined;
435
- required?: boolean | undefined;
436
- accept?: string[] | undefined;
437
- maxSize?: number | undefined;
438
- multiple?: boolean | undefined;
439
- })[];
440
- description?: string | undefined;
441
- } | undefined;
442
- actions?: {
443
- key: string;
444
- label: string;
445
- abort?: boolean | undefined;
446
- style?: "default" | "primary" | "danger" | undefined;
447
- submitsForm?: boolean | undefined;
448
- }[] | undefined;
449
- }, {
450
- reason: string;
451
- mode: "approval";
452
- dueInMs?: number | undefined;
453
- prompt?: string[] | undefined;
454
- display?: {
455
- label: string;
456
- value?: unknown;
457
- id?: string | undefined;
458
- }[] | undefined;
459
- form?: {
460
- fields: ({
461
- type: "text";
462
- name: string;
463
- label: string;
464
- description?: string | undefined;
465
- required?: boolean | undefined;
466
- placeholder?: string | undefined;
467
- defaultValue?: string | undefined;
468
- } | {
469
- type: "textarea";
470
- name: string;
471
- label: string;
472
- description?: string | undefined;
473
- required?: boolean | undefined;
474
- placeholder?: string | undefined;
475
- defaultValue?: string | undefined;
476
- rows?: number | undefined;
477
- } | {
478
- type: "number";
479
- name: string;
480
- label: string;
481
- description?: string | undefined;
482
- required?: boolean | undefined;
483
- max?: number | undefined;
484
- min?: number | undefined;
485
- placeholder?: string | undefined;
486
- defaultValue?: number | undefined;
487
- } | {
488
- options: string | {
489
- value: string;
490
- label: string;
491
- when?: import("../../../types/workflow-config.js").Condition | undefined;
492
- }[];
493
- type: "select";
494
- name: string;
495
- label: string;
496
- description?: string | undefined;
497
- required?: boolean | undefined;
498
- placeholder?: string | undefined;
499
- defaultValue?: string | undefined;
500
- allowCustomValue?: boolean | undefined;
501
- } | {
502
- type: "checkbox";
503
- name: string;
504
- label: string;
505
- description?: string | undefined;
506
- required?: boolean | undefined;
507
- defaultValue?: boolean | undefined;
508
- } | {
509
- type: "attachment";
510
- name: string;
511
- label: string;
512
- maxItems?: number | undefined;
513
- description?: string | undefined;
514
- required?: boolean | undefined;
515
- accept?: string[] | undefined;
516
- maxSize?: number | undefined;
517
- multiple?: boolean | undefined;
518
- })[];
519
- description?: string | undefined;
520
- } | undefined;
521
- actions?: {
522
- key: string;
523
- label: string;
524
- abort?: boolean | undefined;
525
- style?: "default" | "primary" | "danger" | undefined;
526
- submitsForm?: boolean | undefined;
527
- }[] | undefined;
528
- }>]>;
529
- export type WaitStepConfig = z.infer<typeof WaitStepConfigSchema>;
530
- export interface WaitStepOutput extends Record<string, unknown> {
531
- /** Which mode was used. */
532
- mode: 'delay' | 'approval';
533
- /** Data provided by the resume call (empty for delay auto-resume). */
534
- resumeData: Record<string, unknown>;
535
- }
536
- export declare class WaitStep extends BaseActionStep<typeof WaitStepConfigSchema, WaitStepOutput> {
537
- readonly type = BuiltinStepType.WAIT;
538
- readonly name = "Wait";
539
- readonly description = "Pause execution and resume after a delay or a person's answer";
540
- readonly configSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
541
- mode: z.ZodLiteral<"delay">;
542
- delayMs: z.ZodNumber;
543
- }, "strip", z.ZodTypeAny, {
544
- mode: "delay";
545
- delayMs: number;
546
- }, {
547
- mode: "delay";
548
- delayMs: number;
549
- }>, z.ZodObject<{
550
- mode: z.ZodLiteral<"approval">;
551
- reason: z.ZodString;
552
- dueInMs: z.ZodOptional<z.ZodNumber>;
553
- prompt: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
554
- display: z.ZodOptional<z.ZodArray<z.ZodObject<{
555
- id: z.ZodOptional<z.ZodString>;
556
- label: z.ZodString;
557
- value: z.ZodUnknown;
558
- }, "strip", z.ZodTypeAny, {
559
- label: string;
560
- value?: unknown;
561
- id?: string | undefined;
562
- }, {
563
- label: string;
564
- value?: unknown;
565
- id?: string | undefined;
566
- }>, "many">>;
567
- form: z.ZodOptional<z.ZodObject<{
568
- fields: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
569
- type: z.ZodLiteral<"text">;
570
- name: z.ZodString;
571
- label: z.ZodString;
572
- required: z.ZodOptional<z.ZodBoolean>;
573
- description: z.ZodOptional<z.ZodString>;
574
- placeholder: z.ZodOptional<z.ZodString>;
575
- defaultValue: z.ZodOptional<z.ZodString>;
576
- }, "strip", z.ZodTypeAny, {
577
- type: "text";
578
- name: string;
579
- label: string;
580
- description?: string | undefined;
581
- required?: boolean | undefined;
582
- placeholder?: string | undefined;
583
- defaultValue?: string | undefined;
584
- }, {
585
- type: "text";
586
- name: string;
587
- label: string;
588
- description?: string | undefined;
589
- required?: boolean | undefined;
590
- placeholder?: string | undefined;
591
- defaultValue?: string | undefined;
592
- }>, z.ZodObject<{
593
- type: z.ZodLiteral<"textarea">;
594
- name: z.ZodString;
595
- label: z.ZodString;
596
- required: z.ZodOptional<z.ZodBoolean>;
597
- description: z.ZodOptional<z.ZodString>;
598
- placeholder: z.ZodOptional<z.ZodString>;
599
- defaultValue: z.ZodOptional<z.ZodString>;
600
- rows: z.ZodOptional<z.ZodNumber>;
601
- }, "strip", z.ZodTypeAny, {
602
- type: "textarea";
603
- name: string;
604
- label: string;
605
- description?: string | undefined;
606
- required?: boolean | undefined;
607
- placeholder?: string | undefined;
608
- defaultValue?: string | undefined;
609
- rows?: number | undefined;
610
- }, {
611
- type: "textarea";
612
- name: string;
613
- label: string;
614
- description?: string | undefined;
615
- required?: boolean | undefined;
616
- placeholder?: string | undefined;
617
- defaultValue?: string | undefined;
618
- rows?: number | undefined;
619
- }>, z.ZodObject<{
620
- type: z.ZodLiteral<"number">;
621
- name: z.ZodString;
622
- label: z.ZodString;
623
- required: z.ZodOptional<z.ZodBoolean>;
624
- description: z.ZodOptional<z.ZodString>;
625
- placeholder: z.ZodOptional<z.ZodString>;
626
- defaultValue: z.ZodOptional<z.ZodNumber>;
627
- min: z.ZodOptional<z.ZodNumber>;
628
- max: z.ZodOptional<z.ZodNumber>;
629
- }, "strip", z.ZodTypeAny, {
630
- type: "number";
631
- name: string;
632
- label: string;
633
- description?: string | undefined;
634
- required?: boolean | undefined;
635
- max?: number | undefined;
636
- min?: number | undefined;
637
- placeholder?: string | undefined;
638
- defaultValue?: number | undefined;
639
- }, {
640
- type: "number";
641
- name: string;
642
- label: string;
643
- description?: string | undefined;
644
- required?: boolean | undefined;
645
- max?: number | undefined;
646
- min?: number | undefined;
647
- placeholder?: string | undefined;
648
- defaultValue?: number | undefined;
649
- }>, z.ZodObject<{
650
- type: z.ZodLiteral<"select">;
651
- name: z.ZodString;
652
- label: z.ZodString;
653
- required: z.ZodOptional<z.ZodBoolean>;
654
- description: z.ZodOptional<z.ZodString>;
655
- placeholder: z.ZodOptional<z.ZodString>;
656
- defaultValue: z.ZodOptional<z.ZodString>;
657
- options: z.ZodUnion<[z.ZodArray<z.ZodObject<{
658
- label: z.ZodString;
659
- value: z.ZodString;
660
- when: z.ZodOptional<z.ZodType<import("../../../types/workflow-config.js").Condition, z.ZodTypeDef, import("../../../types/workflow-config.js").Condition>>;
661
- }, "strip", z.ZodTypeAny, {
662
- value: string;
663
- label: string;
664
- when?: import("../../../types/workflow-config.js").Condition | undefined;
665
- }, {
666
- value: string;
667
- label: string;
668
- when?: import("../../../types/workflow-config.js").Condition | undefined;
669
- }>, "many">, z.ZodString]>;
670
- allowCustomValue: z.ZodOptional<z.ZodBoolean>;
671
- }, "strip", z.ZodTypeAny, {
672
- options: string | {
673
- value: string;
674
- label: string;
675
- when?: import("../../../types/workflow-config.js").Condition | undefined;
676
- }[];
677
- type: "select";
678
- name: string;
679
- label: string;
680
- description?: string | undefined;
681
- required?: boolean | undefined;
682
- placeholder?: string | undefined;
683
- defaultValue?: string | undefined;
684
- allowCustomValue?: boolean | undefined;
685
- }, {
686
- options: string | {
687
- value: string;
688
- label: string;
689
- when?: import("../../../types/workflow-config.js").Condition | undefined;
690
- }[];
691
- type: "select";
692
- name: string;
693
- label: string;
694
- description?: string | undefined;
695
- required?: boolean | undefined;
696
- placeholder?: string | undefined;
697
- defaultValue?: string | undefined;
698
- allowCustomValue?: boolean | undefined;
699
- }>, z.ZodObject<{
700
- type: z.ZodLiteral<"checkbox">;
701
- name: z.ZodString;
702
- label: z.ZodString;
703
- required: z.ZodOptional<z.ZodBoolean>;
704
- description: z.ZodOptional<z.ZodString>;
705
- defaultValue: z.ZodOptional<z.ZodBoolean>;
706
- }, "strip", z.ZodTypeAny, {
707
- type: "checkbox";
708
- name: string;
709
- label: string;
710
- description?: string | undefined;
711
- required?: boolean | undefined;
712
- defaultValue?: boolean | undefined;
713
- }, {
714
- type: "checkbox";
715
- name: string;
716
- label: string;
717
- description?: string | undefined;
718
- required?: boolean | undefined;
719
- defaultValue?: boolean | undefined;
720
- }>, z.ZodObject<{
721
- type: z.ZodLiteral<"attachment">;
722
- name: z.ZodString;
723
- label: z.ZodString;
724
- required: z.ZodOptional<z.ZodBoolean>;
725
- description: z.ZodOptional<z.ZodString>;
726
- multiple: z.ZodOptional<z.ZodBoolean>;
727
- accept: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
728
- maxSize: z.ZodOptional<z.ZodNumber>;
729
- maxItems: z.ZodOptional<z.ZodNumber>;
730
- }, "strip", z.ZodTypeAny, {
731
- type: "attachment";
732
- name: string;
733
- label: string;
734
- maxItems?: number | undefined;
735
- description?: string | undefined;
736
- required?: boolean | undefined;
737
- accept?: string[] | undefined;
738
- maxSize?: number | undefined;
739
- multiple?: boolean | undefined;
740
- }, {
741
- type: "attachment";
742
- name: string;
743
- label: string;
744
- maxItems?: number | undefined;
745
- description?: string | undefined;
746
- required?: boolean | undefined;
747
- accept?: string[] | undefined;
748
- maxSize?: number | undefined;
749
- multiple?: boolean | undefined;
750
- }>]>, "many">;
751
- description: z.ZodOptional<z.ZodString>;
752
- }, "strip", z.ZodTypeAny, {
753
- fields: ({
754
- type: "text";
755
- name: string;
756
- label: string;
757
- description?: string | undefined;
758
- required?: boolean | undefined;
759
- placeholder?: string | undefined;
760
- defaultValue?: string | undefined;
761
- } | {
762
- type: "textarea";
763
- name: string;
764
- label: string;
765
- description?: string | undefined;
766
- required?: boolean | undefined;
767
- placeholder?: string | undefined;
768
- defaultValue?: string | undefined;
769
- rows?: number | undefined;
770
- } | {
771
- type: "number";
772
- name: string;
773
- label: string;
774
- description?: string | undefined;
775
- required?: boolean | undefined;
776
- max?: number | undefined;
777
- min?: number | undefined;
778
- placeholder?: string | undefined;
779
- defaultValue?: number | undefined;
780
- } | {
781
- options: string | {
782
- value: string;
783
- label: string;
784
- when?: import("../../../types/workflow-config.js").Condition | undefined;
785
- }[];
786
- type: "select";
787
- name: string;
788
- label: string;
789
- description?: string | undefined;
790
- required?: boolean | undefined;
791
- placeholder?: string | undefined;
792
- defaultValue?: string | undefined;
793
- allowCustomValue?: boolean | undefined;
794
- } | {
795
- type: "checkbox";
796
- name: string;
797
- label: string;
798
- description?: string | undefined;
799
- required?: boolean | undefined;
800
- defaultValue?: boolean | undefined;
801
- } | {
802
- type: "attachment";
803
- name: string;
804
- label: string;
805
- maxItems?: number | undefined;
806
- description?: string | undefined;
807
- required?: boolean | undefined;
808
- accept?: string[] | undefined;
809
- maxSize?: number | undefined;
810
- multiple?: boolean | undefined;
811
- })[];
812
- description?: string | undefined;
813
- }, {
814
- fields: ({
815
- type: "text";
816
- name: string;
817
- label: string;
818
- description?: string | undefined;
819
- required?: boolean | undefined;
820
- placeholder?: string | undefined;
821
- defaultValue?: string | undefined;
822
- } | {
823
- type: "textarea";
824
- name: string;
825
- label: string;
826
- description?: string | undefined;
827
- required?: boolean | undefined;
828
- placeholder?: string | undefined;
829
- defaultValue?: string | undefined;
830
- rows?: number | undefined;
831
- } | {
832
- type: "number";
833
- name: string;
834
- label: string;
835
- description?: string | undefined;
836
- required?: boolean | undefined;
837
- max?: number | undefined;
838
- min?: number | undefined;
839
- placeholder?: string | undefined;
840
- defaultValue?: number | undefined;
841
- } | {
842
- options: string | {
843
- value: string;
844
- label: string;
845
- when?: import("../../../types/workflow-config.js").Condition | undefined;
846
- }[];
847
- type: "select";
848
- name: string;
849
- label: string;
850
- description?: string | undefined;
851
- required?: boolean | undefined;
852
- placeholder?: string | undefined;
853
- defaultValue?: string | undefined;
854
- allowCustomValue?: boolean | undefined;
855
- } | {
856
- type: "checkbox";
857
- name: string;
858
- label: string;
859
- description?: string | undefined;
860
- required?: boolean | undefined;
861
- defaultValue?: boolean | undefined;
862
- } | {
863
- type: "attachment";
864
- name: string;
865
- label: string;
866
- maxItems?: number | undefined;
867
- description?: string | undefined;
868
- required?: boolean | undefined;
869
- accept?: string[] | undefined;
870
- maxSize?: number | undefined;
871
- multiple?: boolean | undefined;
872
- })[];
873
- description?: string | undefined;
874
- }>>;
875
- actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
876
- key: z.ZodString;
877
- label: z.ZodString;
878
- style: z.ZodOptional<z.ZodEnum<["primary", "danger", "default"]>>;
879
- abort: z.ZodOptional<z.ZodBoolean>;
880
- submitsForm: z.ZodOptional<z.ZodBoolean>;
881
- }, "strip", z.ZodTypeAny, {
882
- key: string;
883
- label: string;
884
- abort?: boolean | undefined;
885
- style?: "default" | "primary" | "danger" | undefined;
886
- submitsForm?: boolean | undefined;
887
- }, {
888
- key: string;
889
- label: string;
890
- abort?: boolean | undefined;
891
- style?: "default" | "primary" | "danger" | undefined;
892
- submitsForm?: boolean | undefined;
893
- }>, "many">>;
894
- }, "strip", z.ZodTypeAny, {
895
- reason: string;
896
- mode: "approval";
897
- dueInMs?: number | undefined;
898
- prompt?: string[] | undefined;
899
- display?: {
900
- label: string;
901
- value?: unknown;
902
- id?: string | undefined;
903
- }[] | undefined;
904
- form?: {
905
- fields: ({
906
- type: "text";
907
- name: string;
908
- label: string;
909
- description?: string | undefined;
910
- required?: boolean | undefined;
911
- placeholder?: string | undefined;
912
- defaultValue?: string | undefined;
913
- } | {
914
- type: "textarea";
915
- name: string;
916
- label: string;
917
- description?: string | undefined;
918
- required?: boolean | undefined;
919
- placeholder?: string | undefined;
920
- defaultValue?: string | undefined;
921
- rows?: number | undefined;
922
- } | {
923
- type: "number";
924
- name: string;
925
- label: string;
926
- description?: string | undefined;
927
- required?: boolean | undefined;
928
- max?: number | undefined;
929
- min?: number | undefined;
930
- placeholder?: string | undefined;
931
- defaultValue?: number | undefined;
932
- } | {
933
- options: string | {
934
- value: string;
935
- label: string;
936
- when?: import("../../../types/workflow-config.js").Condition | undefined;
937
- }[];
938
- type: "select";
939
- name: string;
940
- label: string;
941
- description?: string | undefined;
942
- required?: boolean | undefined;
943
- placeholder?: string | undefined;
944
- defaultValue?: string | undefined;
945
- allowCustomValue?: boolean | undefined;
946
- } | {
947
- type: "checkbox";
948
- name: string;
949
- label: string;
950
- description?: string | undefined;
951
- required?: boolean | undefined;
952
- defaultValue?: boolean | undefined;
953
- } | {
954
- type: "attachment";
955
- name: string;
956
- label: string;
957
- maxItems?: number | undefined;
958
- description?: string | undefined;
959
- required?: boolean | undefined;
960
- accept?: string[] | undefined;
961
- maxSize?: number | undefined;
962
- multiple?: boolean | undefined;
963
- })[];
964
- description?: string | undefined;
965
- } | undefined;
966
- actions?: {
967
- key: string;
968
- label: string;
969
- abort?: boolean | undefined;
970
- style?: "default" | "primary" | "danger" | undefined;
971
- submitsForm?: boolean | undefined;
972
- }[] | undefined;
973
- }, {
974
- reason: string;
975
- mode: "approval";
976
- dueInMs?: number | undefined;
977
- prompt?: string[] | undefined;
978
- display?: {
979
- label: string;
980
- value?: unknown;
981
- id?: string | undefined;
982
- }[] | undefined;
983
- form?: {
984
- fields: ({
985
- type: "text";
986
- name: string;
987
- label: string;
988
- description?: string | undefined;
989
- required?: boolean | undefined;
990
- placeholder?: string | undefined;
991
- defaultValue?: string | undefined;
992
- } | {
993
- type: "textarea";
994
- name: string;
995
- label: string;
996
- description?: string | undefined;
997
- required?: boolean | undefined;
998
- placeholder?: string | undefined;
999
- defaultValue?: string | undefined;
1000
- rows?: number | undefined;
1001
- } | {
1002
- type: "number";
1003
- name: string;
1004
- label: string;
1005
- description?: string | undefined;
1006
- required?: boolean | undefined;
1007
- max?: number | undefined;
1008
- min?: number | undefined;
1009
- placeholder?: string | undefined;
1010
- defaultValue?: number | undefined;
1011
- } | {
1012
- options: string | {
1013
- value: string;
1014
- label: string;
1015
- when?: import("../../../types/workflow-config.js").Condition | undefined;
1016
- }[];
1017
- type: "select";
1018
- name: string;
1019
- label: string;
1020
- description?: string | undefined;
1021
- required?: boolean | undefined;
1022
- placeholder?: string | undefined;
1023
- defaultValue?: string | undefined;
1024
- allowCustomValue?: boolean | undefined;
1025
- } | {
1026
- type: "checkbox";
1027
- name: string;
1028
- label: string;
1029
- description?: string | undefined;
1030
- required?: boolean | undefined;
1031
- defaultValue?: boolean | undefined;
1032
- } | {
1033
- type: "attachment";
1034
- name: string;
1035
- label: string;
1036
- maxItems?: number | undefined;
1037
- description?: string | undefined;
1038
- required?: boolean | undefined;
1039
- accept?: string[] | undefined;
1040
- maxSize?: number | undefined;
1041
- multiple?: boolean | undefined;
1042
- })[];
1043
- description?: string | undefined;
1044
- } | undefined;
1045
- actions?: {
1046
- key: string;
1047
- label: string;
1048
- abort?: boolean | undefined;
1049
- style?: "default" | "primary" | "danger" | undefined;
1050
- submitsForm?: boolean | undefined;
1051
- }[] | undefined;
1052
- }>]>;
1053
- readonly outputSchema: z.ZodObject<{
1054
- mode: z.ZodEnum<["delay", "approval"]>;
1055
- resumeData: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1056
- }, "strip", z.ZodTypeAny, {
1057
- mode: "delay" | "approval";
1058
- resumeData: Record<string, unknown>;
1059
- }, {
1060
- mode: "delay" | "approval";
1061
- resumeData: Record<string, unknown>;
1062
- }>;
1063
- readonly category: StepCategory;
1064
- readonly icon = "clock";
1065
- resolveOutputJsonSchema(config: Record<string, unknown>): Record<string, unknown>;
1066
- execute(config: WaitStepConfig, ctx: StepExecutionContext): Promise<WaitStepOutput>;
1067
- onResume(rowData: Record<string, unknown>, _config: WaitStepConfig, _ctx: StepExecutionContext): Promise<WaitStepOutput>;
1068
- private executeDelay;
1069
- /**
1070
- * Async only because an option's `when` condition may now compare a computed
1071
- * value. It still never returns — `ctx.pause` throws — so the dispatch in
1072
- * `execute` is unchanged; an async method returning `Promise<never>` is
1073
- * assignable wherever the sync one was.
1074
- */
1075
- private executeApproval;
1076
- /**
1077
- * The form as this person sees it: a choice carrying a `when` is kept only
1078
- * when the condition holds against the run so far.
1079
- *
1080
- * What is filtered is the *offer*, not the answer — so nothing downstream has
1081
- * to know a choice existed. A field left with no choices still renders; that
1082
- * is the author's flow saying "under this data, there is nothing to pick here",
1083
- * and hiding the question instead would be this step inventing a rule.
1084
- */
1085
- private offered;
1086
- }
1087
- //# sourceMappingURL=wait.step.d.ts.map