@epilot/sdk 2.20.85 → 2.20.87

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 (163) hide show
  1. package/definitions/automation-runtime.json +1 -1
  2. package/definitions/automation.json +294 -17
  3. package/definitions/workflow-definition.json +686 -12
  4. package/definitions/workflow-runtime.json +1 -1
  5. package/definitions/workflow.json +4072 -1386
  6. package/dist/apis/access-token.cjs +6 -6
  7. package/dist/apis/access-token.js +1 -1
  8. package/dist/apis/address-suggestions.cjs +6 -6
  9. package/dist/apis/address-suggestions.js +1 -1
  10. package/dist/apis/address.cjs +6 -6
  11. package/dist/apis/address.js +1 -1
  12. package/dist/apis/ai-agents.cjs +6 -6
  13. package/dist/apis/ai-agents.js +1 -1
  14. package/dist/apis/app.cjs +6 -6
  15. package/dist/apis/app.js +1 -1
  16. package/dist/apis/audit-logs.cjs +6 -6
  17. package/dist/apis/audit-logs.js +1 -1
  18. package/dist/apis/automation.cjs +8 -8
  19. package/dist/apis/automation.d.cts +2 -2
  20. package/dist/apis/automation.d.ts +2 -2
  21. package/dist/apis/automation.js +2 -2
  22. package/dist/apis/billing.cjs +6 -6
  23. package/dist/apis/billing.js +1 -1
  24. package/dist/apis/blueprint-manifest.cjs +6 -6
  25. package/dist/apis/blueprint-manifest.js +1 -1
  26. package/dist/apis/calendar.cjs +6 -6
  27. package/dist/apis/calendar.js +1 -1
  28. package/dist/apis/chat.cjs +6 -6
  29. package/dist/apis/chat.js +1 -1
  30. package/dist/apis/configuration-hub.cjs +6 -6
  31. package/dist/apis/configuration-hub.js +1 -1
  32. package/dist/apis/consent.cjs +6 -6
  33. package/dist/apis/consent.js +1 -1
  34. package/dist/apis/customer-portal.cjs +6 -6
  35. package/dist/apis/customer-portal.js +1 -1
  36. package/dist/apis/dashboard.cjs +6 -6
  37. package/dist/apis/dashboard.js +1 -1
  38. package/dist/apis/data-governance.cjs +6 -6
  39. package/dist/apis/data-governance.js +1 -1
  40. package/dist/apis/deduplication.cjs +6 -6
  41. package/dist/apis/deduplication.js +1 -1
  42. package/dist/apis/design.cjs +6 -6
  43. package/dist/apis/design.js +1 -1
  44. package/dist/apis/document.cjs +6 -6
  45. package/dist/apis/document.js +1 -1
  46. package/dist/apis/email-settings.cjs +6 -6
  47. package/dist/apis/email-settings.js +1 -1
  48. package/dist/apis/email-template.cjs +6 -6
  49. package/dist/apis/email-template.js +1 -1
  50. package/dist/apis/entity-mapping.cjs +6 -6
  51. package/dist/apis/entity-mapping.js +1 -1
  52. package/dist/apis/entity.cjs +6 -6
  53. package/dist/apis/entity.js +1 -1
  54. package/dist/apis/environments.cjs +6 -6
  55. package/dist/apis/environments.js +1 -1
  56. package/dist/apis/event-catalog.cjs +6 -6
  57. package/dist/apis/event-catalog.js +1 -1
  58. package/dist/apis/external-values.cjs +6 -6
  59. package/dist/apis/external-values.js +1 -1
  60. package/dist/apis/file.cjs +6 -6
  61. package/dist/apis/file.js +1 -1
  62. package/dist/apis/iban.cjs +6 -6
  63. package/dist/apis/iban.js +1 -1
  64. package/dist/apis/identity.cjs +6 -6
  65. package/dist/apis/identity.js +1 -1
  66. package/dist/apis/integration-toolkit.cjs +6 -6
  67. package/dist/apis/integration-toolkit.js +1 -1
  68. package/dist/apis/journey.cjs +6 -6
  69. package/dist/apis/journey.js +1 -1
  70. package/dist/apis/kanban.cjs +6 -6
  71. package/dist/apis/kanban.js +1 -1
  72. package/dist/apis/message.cjs +6 -6
  73. package/dist/apis/message.js +1 -1
  74. package/dist/apis/metering.cjs +6 -6
  75. package/dist/apis/metering.js +1 -1
  76. package/dist/apis/notes.cjs +6 -6
  77. package/dist/apis/notes.js +1 -1
  78. package/dist/apis/notification.cjs +6 -6
  79. package/dist/apis/notification.js +1 -1
  80. package/dist/apis/organization.cjs +6 -6
  81. package/dist/apis/organization.js +1 -1
  82. package/dist/apis/partner-directory.cjs +6 -6
  83. package/dist/apis/partner-directory.js +1 -1
  84. package/dist/apis/permissions.cjs +6 -6
  85. package/dist/apis/permissions.js +1 -1
  86. package/dist/apis/phone-integration.cjs +6 -6
  87. package/dist/apis/phone-integration.js +1 -1
  88. package/dist/apis/pricing-tier.cjs +6 -6
  89. package/dist/apis/pricing-tier.js +1 -1
  90. package/dist/apis/pricing.cjs +6 -6
  91. package/dist/apis/pricing.js +1 -1
  92. package/dist/apis/purpose.cjs +6 -6
  93. package/dist/apis/purpose.js +1 -1
  94. package/dist/apis/query.cjs +6 -6
  95. package/dist/apis/query.js +1 -1
  96. package/dist/apis/sandbox.cjs +6 -6
  97. package/dist/apis/sandbox.js +1 -1
  98. package/dist/apis/sharing.cjs +6 -6
  99. package/dist/apis/sharing.js +1 -1
  100. package/dist/apis/snapshot.cjs +6 -6
  101. package/dist/apis/snapshot.js +1 -1
  102. package/dist/apis/submission.cjs +6 -6
  103. package/dist/apis/submission.js +1 -1
  104. package/dist/apis/target.cjs +6 -6
  105. package/dist/apis/target.js +1 -1
  106. package/dist/apis/targeting.cjs +6 -6
  107. package/dist/apis/targeting.js +1 -1
  108. package/dist/apis/template-variables.cjs +6 -6
  109. package/dist/apis/template-variables.js +1 -1
  110. package/dist/apis/user.cjs +6 -6
  111. package/dist/apis/user.js +1 -1
  112. package/dist/apis/validation-rules.cjs +6 -6
  113. package/dist/apis/validation-rules.js +1 -1
  114. package/dist/apis/webhooks.cjs +6 -6
  115. package/dist/apis/webhooks.js +1 -1
  116. package/dist/apis/workflow-definition.cjs +6 -6
  117. package/dist/apis/workflow-definition.d.cts +2 -2
  118. package/dist/apis/workflow-definition.d.ts +2 -2
  119. package/dist/apis/workflow-definition.js +1 -1
  120. package/dist/apis/workflow.cjs +8 -8
  121. package/dist/apis/workflow.d.cts +2 -2
  122. package/dist/apis/workflow.d.ts +2 -2
  123. package/dist/apis/workflow.js +2 -2
  124. package/dist/automation-KNJZDJD7.cjs +7 -0
  125. package/dist/automation-RKVFGJTO.js +7 -0
  126. package/dist/{automation-runtime-KLCXZKEC.cjs → automation-runtime-7LXZ343U.cjs} +2 -2
  127. package/dist/{automation-runtime-Y52HM57N.js → automation-runtime-JZKABTGP.js} +1 -1
  128. package/dist/{automation.d-B8g3nYp-.d.cts → automation.d-cTvIBxDI.d.cts} +514 -26
  129. package/dist/{automation.d-B8g3nYp-.d.ts → automation.d-cTvIBxDI.d.ts} +514 -26
  130. package/dist/{chunk-7T4BNWMN.js → chunk-AMLTCPBT.js} +5 -5
  131. package/dist/{chunk-WOUASZJW.cjs → chunk-EIT2JFPB.cjs} +1 -1
  132. package/dist/{chunk-QW3ROE6H.js → chunk-JKCBMHOZ.js} +1 -1
  133. package/dist/{chunk-ZSZ4IWLQ.cjs → chunk-PQONAXAH.cjs} +5 -5
  134. package/dist/chunk-SWEH4LP3.cjs +14 -0
  135. package/dist/chunk-W5OQ3L53.js +14 -0
  136. package/dist/index.cjs +12 -12
  137. package/dist/index.d.cts +3 -3
  138. package/dist/index.d.ts +3 -3
  139. package/dist/index.js +3 -3
  140. package/dist/workflow-B5IJTSPX.js +7 -0
  141. package/dist/workflow-GOWWDU4Y.cjs +7 -0
  142. package/dist/workflow-definition-46NTR2N5.cjs +7 -0
  143. package/dist/workflow-definition-BSY2BNM2.js +7 -0
  144. package/dist/{workflow-definition.d-CweGhhBU.d.ts → workflow-definition.d-Be0CM3Py.d.cts} +574 -10
  145. package/dist/{workflow-definition.d-CweGhhBU.d.cts → workflow-definition.d-Be0CM3Py.d.ts} +574 -10
  146. package/dist/{workflow-runtime-L5HMFISV.js → workflow-runtime-GPXNF7WI.js} +1 -1
  147. package/dist/{workflow-runtime-LMGACZP4.cjs → workflow-runtime-HD6U5ZSL.cjs} +2 -2
  148. package/dist/workflow.d-B7utaxgb.d.cts +6868 -0
  149. package/dist/workflow.d-B7utaxgb.d.ts +6868 -0
  150. package/docs/automation.md +267 -26
  151. package/docs/workflow-definition.md +840 -138
  152. package/docs/workflow.md +4537 -1746
  153. package/package.json +1 -1
  154. package/dist/automation-G2CKAQNB.cjs +0 -7
  155. package/dist/automation-UPTNUOYO.js +0 -7
  156. package/dist/chunk-522LYPPW.js +0 -14
  157. package/dist/chunk-PM25LLET.cjs +0 -14
  158. package/dist/workflow-JQT3F5NJ.cjs +0 -7
  159. package/dist/workflow-Q6FAE5OL.js +0 -7
  160. package/dist/workflow-definition-MSO4JDA3.js +0 -7
  161. package/dist/workflow-definition-XTWO4RMY.cjs +0 -7
  162. package/dist/workflow.d-5cyNJgVQ.d.cts +0 -3843
  163. package/dist/workflow.d-5cyNJgVQ.d.ts +0 -3843
@@ -1,3843 +0,0 @@
1
- import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, UnknownParamsObject } from 'openapi-client-axios';
2
-
3
- /* Auto-copied from workflow-client */
4
-
5
-
6
- declare namespace Components {
7
- namespace Parameters {
8
- export type ExecutionIdParam = string;
9
- export type PhaseIdParam = string;
10
- export type ScheduleIdParam = string;
11
- export type SoftDeleteParam = boolean;
12
- export type TaskIdParam = string;
13
- }
14
- export interface PathParameters {
15
- ExecutionIdParam?: Parameters.ExecutionIdParam;
16
- TaskIdParam?: Parameters.TaskIdParam;
17
- PhaseIdParam?: Parameters.PhaseIdParam;
18
- ScheduleIdParam?: Parameters.ScheduleIdParam;
19
- }
20
- export interface QueryParameters {
21
- SoftDeleteParam?: Parameters.SoftDeleteParam;
22
- }
23
- namespace Schemas {
24
- export type ActionSchedule = ImmediateSchedule | DelayedSchedule | RelativeSchedule;
25
- export interface AddTaskReq {
26
- /**
27
- * Source node id for the edge to this task
28
- */
29
- previous_task_id: string; // uuid
30
- /**
31
- * Target node id for the edge from this task
32
- */
33
- next_task_id: string; // uuid
34
- task: {
35
- /**
36
- * Id of the task
37
- */
38
- id?: string; // uuid
39
- name: string;
40
- status?: /**
41
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
42
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
43
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
44
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
45
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
46
- * - **COMPLETED**: Step/Task has been finished successfully
47
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
48
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
49
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
50
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
51
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
52
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
53
- *
54
- */
55
- StepStatus;
56
- /**
57
- * example:
58
- * 2021-04-27T12:00:00.000Z
59
- */
60
- due_date?: string;
61
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
62
- assigned_to?: /* The user ids or variable assignments */ Assignees;
63
- /**
64
- * flag for controlling enabled/disabled state of the task
65
- */
66
- enabled?: boolean;
67
- automation_config?: AutomationInfo;
68
- phase_id?: string;
69
- task_type?: TaskType;
70
- };
71
- }
72
- /**
73
- * Configuration for AI Agent to run
74
- */
75
- export interface AgentConfig {
76
- [name: string]: any;
77
- /**
78
- * Id of the configured AI Agent to run
79
- */
80
- agent_id: string;
81
- /**
82
- * Parameters to customize the AI Agent behavior
83
- */
84
- parameters?: {
85
- [key: string]: any;
86
- };
87
- }
88
- export interface AgentExecutionInfo {
89
- /**
90
- * Id of the agent execution started by this task
91
- */
92
- execution_id?: string;
93
- /**
94
- * Status of the agent execution, when it already ran
95
- */
96
- execution_status?: string;
97
- error_reason?: string;
98
- /**
99
- * Server-computed outcome read from the agent execution's structured_output (e.g. assigned, recommended, no_eligible_partner, missing_input). When the outcome means the work is not really done (no_eligible_partner, missing_input) the task is held as the current task instead of auto-completing, so the phase does not advance.
100
- */
101
- outcome?: string;
102
- }
103
- export interface AiAgentTask {
104
- id: TaskId;
105
- template_id: string;
106
- name: string;
107
- description?: /* Longer information regarding Task */ StepDescription;
108
- status: /**
109
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
110
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
111
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
112
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
113
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
114
- * - **COMPLETED**: Step/Task has been finished successfully
115
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
116
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
117
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
118
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
119
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
120
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
121
- *
122
- */
123
- StepStatus;
124
- journey?: StepJourney;
125
- /**
126
- * example:
127
- * 2021-04-27T12:00:00.000Z
128
- */
129
- due_date?: string;
130
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
131
- /**
132
- * requirements that need to be fulfilled in order to enable the task while flow instances are running
133
- */
134
- requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[];
135
- assigned_to?: /* The user ids or variable assignments */ Assignees;
136
- analytics: AnalyticsInfo;
137
- /**
138
- * Time when the task was created
139
- */
140
- created_at?: string; // date-time
141
- /**
142
- * Last Update timestamp
143
- */
144
- updated_at?: string; // date-time
145
- /**
146
- * Flag to indicate if the task was created manually
147
- */
148
- manually_created?: boolean;
149
- /**
150
- * enabled flag results from calculating the requirements
151
- */
152
- enabled: boolean;
153
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
154
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
155
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
156
- /**
157
- * Taxonomy ids that are associated with this workflow and used for filtering
158
- */
159
- taxonomies?: string[];
160
- phase_id?: string;
161
- task_type: TaskType;
162
- agent_config?: /* Configuration for AI Agent to run */ AgentConfig;
163
- loop_config?: /* Information about loop iterations, when task is part of a loop branch */ LoopInfo;
164
- agent_execution?: AgentExecutionInfo;
165
- /**
166
- * ID of the agent execution, used for tracking status updates. This is needed as a separate field to allow indexing.
167
- */
168
- agent_execution_id?: string;
169
- }
170
- export interface AnalyticsInfo {
171
- started_at?: string; // date-time
172
- in_progress_at?: string; // date-time
173
- completed_at?: string; // date-time
174
- /**
175
- * Last updated timestamp of the status
176
- */
177
- status_updated_at?: string; // date-time
178
- /**
179
- * The user which moved the task/phase to IN_PROGRESS state.
180
- */
181
- in_progress_by?: /* The user id */ UserId;
182
- /**
183
- * The user which moved the task/phase to COMPLETED state.
184
- */
185
- completed_by?: /* The user id */ UserId;
186
- /**
187
- * The user which moved the task/phase to SKIPPED state.
188
- */
189
- skipped_by?: /* The user id */ UserId;
190
- /**
191
- * The user which moved the task/phase to ON_HOLD state.
192
- */
193
- on_hold_by?: /* The user id */ UserId;
194
- }
195
- /**
196
- * The user ids or variable assignments
197
- */
198
- export type Assignees = (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[];
199
- /**
200
- * Configuration for automation execution to run
201
- */
202
- export interface AutomationConfig {
203
- /**
204
- * Id of the configured automation to run
205
- */
206
- flowId: string;
207
- /**
208
- * Id of the automation execution which ran
209
- */
210
- executionId?: string;
211
- /**
212
- * Status of Automation Execution. Types can be found in Automation API
213
- */
214
- executionStatus?: string;
215
- }
216
- export interface AutomationInfo {
217
- /**
218
- * Id of the automation that should be run by this task
219
- */
220
- flow_id: string;
221
- /**
222
- * Id of the automation execution, when it already ran
223
- */
224
- execution_id?: string;
225
- /**
226
- * Status of the automation execution, when it already ran
227
- */
228
- execution_status?: string;
229
- error_reason?: string;
230
- input_context?: /**
231
- * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
232
- *
233
- */
234
- AutomationInputContext;
235
- /**
236
- * Internal — number of times flow-healing-service has attempted to re-trigger this task's lost automation dispatch. Used to cap retries and avoid an indefinite heal-on-every-read storm against a deterministically-failing automation flow.
237
- */
238
- heal_attempts?: number;
239
- /**
240
- * Internal — timestamp of the most recent heal attempt for this task. flow-healing-service uses this as a per-task debounce gate so the heal cannot fire more than once per HEAL_RETRY_COOLDOWN_MS regardless of how often the flow execution is read.
241
- */
242
- last_heal_attempted_at?: string; // date-time
243
- }
244
- /**
245
- * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
246
- *
247
- */
248
- export interface AutomationInputContext {
249
- /**
250
- * `trigger` = workflow's primary (trigger) entity. `task` = entity produced by an upstream task in the graph.
251
- *
252
- */
253
- source: "trigger" | "task";
254
- /**
255
- * Required when source is `task`. The id of the upstream task whose output entity should feed this task.
256
- */
257
- task_id?: string;
258
- }
259
- export interface AutomationTask {
260
- id: TaskId;
261
- template_id: string;
262
- name: string;
263
- description?: /* Longer information regarding Task */ StepDescription;
264
- status: /**
265
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
266
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
267
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
268
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
269
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
270
- * - **COMPLETED**: Step/Task has been finished successfully
271
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
272
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
273
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
274
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
275
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
276
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
277
- *
278
- */
279
- StepStatus;
280
- journey?: StepJourney;
281
- /**
282
- * example:
283
- * 2021-04-27T12:00:00.000Z
284
- */
285
- due_date?: string;
286
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
287
- /**
288
- * requirements that need to be fulfilled in order to enable the task while flow instances are running
289
- */
290
- requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[];
291
- assigned_to?: /* The user ids or variable assignments */ Assignees;
292
- analytics: AnalyticsInfo;
293
- /**
294
- * Time when the task was created
295
- */
296
- created_at?: string; // date-time
297
- /**
298
- * Last Update timestamp
299
- */
300
- updated_at?: string; // date-time
301
- /**
302
- * Flag to indicate if the task was created manually
303
- */
304
- manually_created?: boolean;
305
- /**
306
- * enabled flag results from calculating the requirements
307
- */
308
- enabled: boolean;
309
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
310
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
311
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
312
- /**
313
- * Taxonomy ids that are associated with this workflow and used for filtering
314
- */
315
- taxonomies?: string[];
316
- phase_id?: string;
317
- task_type: TaskType;
318
- automation_config: AutomationInfo;
319
- /**
320
- * ID of the automation execution, used for tracking status updates.
321
- */
322
- automation_execution_id?: string;
323
- trigger_mode?: TriggerMode;
324
- schedule?: ActionSchedule;
325
- loop_config?: /* Information about loop iterations, when task is part of a loop branch */ LoopInfo;
326
- }
327
- export interface ClosingReason {
328
- id: string;
329
- title: string;
330
- }
331
- export interface ClosingReasonResp {
332
- reasons?: ClosingReason[];
333
- }
334
- export interface Condition {
335
- id: /**
336
- * A locally unique identifier for the condition
337
- * example:
338
- * abc123
339
- */
340
- ConditionId;
341
- /**
342
- * The name of the branch
343
- * example:
344
- * Branch 1
345
- */
346
- branch_name: string;
347
- logical_operator: "AND" | "OR";
348
- statements: Statement[];
349
- /**
350
- * Time when the condition was evaluated
351
- */
352
- evaluated_at?: string; // date-time
353
- /**
354
- * The result of evaluating this condition - true / false
355
- */
356
- is_met?: boolean;
357
- }
358
- /**
359
- * A locally unique identifier for the condition
360
- * example:
361
- * abc123
362
- */
363
- export type ConditionId = string;
364
- export interface CreateStepReq {
365
- insertionIndex: number;
366
- name: string;
367
- /**
368
- * Longer information regarding Task
369
- */
370
- description?: {
371
- enabled: boolean;
372
- value: string;
373
- };
374
- status?: /**
375
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
376
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
377
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
378
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
379
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
380
- * - **COMPLETED**: Step/Task has been finished successfully
381
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
382
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
383
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
384
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
385
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
386
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
387
- *
388
- */
389
- StepStatus;
390
- sectionId?: string;
391
- /**
392
- * Manual / Automation step
393
- */
394
- executionType?: StepType;
395
- /**
396
- * Configuration for automated steps
397
- */
398
- automationConfig?: /* Configuration for automation execution to run */ AutomationConfig;
399
- }
400
- export interface DecisionTask {
401
- id: TaskId;
402
- template_id: string;
403
- name: string;
404
- description?: /* Longer information regarding Task */ StepDescription;
405
- status: /**
406
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
407
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
408
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
409
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
410
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
411
- * - **COMPLETED**: Step/Task has been finished successfully
412
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
413
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
414
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
415
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
416
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
417
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
418
- *
419
- */
420
- StepStatus;
421
- journey?: StepJourney;
422
- /**
423
- * example:
424
- * 2021-04-27T12:00:00.000Z
425
- */
426
- due_date?: string;
427
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
428
- /**
429
- * requirements that need to be fulfilled in order to enable the task while flow instances are running
430
- */
431
- requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[];
432
- assigned_to?: /* The user ids or variable assignments */ Assignees;
433
- analytics: AnalyticsInfo;
434
- /**
435
- * Time when the task was created
436
- */
437
- created_at?: string; // date-time
438
- /**
439
- * Last Update timestamp
440
- */
441
- updated_at?: string; // date-time
442
- /**
443
- * Flag to indicate if the task was created manually
444
- */
445
- manually_created?: boolean;
446
- /**
447
- * enabled flag results from calculating the requirements
448
- */
449
- enabled: boolean;
450
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
451
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
452
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
453
- /**
454
- * Taxonomy ids that are associated with this workflow and used for filtering
455
- */
456
- taxonomies?: string[];
457
- phase_id?: string;
458
- task_type: TaskType;
459
- trigger_mode: TriggerMode;
460
- conditions: Condition[];
461
- /**
462
- * When true, all branches with met conditions execute in parallel. When false, only the first branch with a met condition is executed. Defaults to true for backwards compatibility.
463
- */
464
- allow_parallel_execution?: boolean;
465
- schedule?: DelayedSchedule | RelativeSchedule;
466
- loop_config?: LoopConfig;
467
- }
468
- export interface DelayedSchedule {
469
- mode: "delayed";
470
- duration: number;
471
- unit: TimeUnit;
472
- /**
473
- * The id of the created schedule
474
- */
475
- schedule_id?: string;
476
- /**
477
- * The resolved absolute timestamp (ISO 8601, UTC) at which the task is
478
- * armed to run. Set by the backend when the schedule is armed and the
479
- * task transitions to SCHEDULED. Absent while the task is still
480
- * pending/unscheduled.
481
- *
482
- * Note: intentionally typed as plain `string` (not
483
- * `format: date-time`). `schedule` is embedded in the AutomationTask /
484
- * DecisionTask schemas; if a future request body ever accepts a task
485
- * (or schedule) and `safeParse`s it, `format: date-time` would make
486
- * openapi-zod-client emit `z.string().datetime({ offset: true })` and
487
- * reject any round-tripped value that is empty or tz-less — the exact
488
- * mechanism behind the May 2026 due_date incident (513ed597 added the
489
- * format, ee574b43 activated it via an unrelated regen; see commit
490
- * 2c91ff35). This field is server-written via `toISOString()` so it is
491
- * always a valid UTC instant; the datetime validator adds no
492
- * protection, only latent risk.
493
- *
494
- */
495
- scheduled_at?: string;
496
- /**
497
- * Set by the backend when scheduling this task FAILED (e.g. the
498
- * referenced date attribute is empty/unreadable, or the resolved fire
499
- * time is already in the past). A JSON string
500
- * ({ error_code, error_reason, error_info }) describing why, so the UI
501
- * can show a specific warning and ask the user to fix the date
502
- * attribute and re-schedule. Cleared when the task is successfully
503
- * (re-)armed. This is the decision-task counterpart of
504
- * AutomationInfo.error_reason (decision tasks have no automation_config).
505
- *
506
- */
507
- error_reason?: string;
508
- }
509
- /**
510
- * Set due date for the task based on a dynamic condition
511
- */
512
- export interface DueDateConfig {
513
- duration: number;
514
- unit: TimeUnit;
515
- type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED";
516
- task_id?: string;
517
- phase_id?: string;
518
- }
519
- /**
520
- * set a Duedate for a step then a specific
521
- */
522
- export interface DynamicDueDate {
523
- numberOfUnits: number;
524
- timePeriod: "minutes" | "hours" | "days" | "weeks" | "months";
525
- actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED";
526
- stepId?: string;
527
- phaseId?: string;
528
- }
529
- /**
530
- * Details regarding ECP for the workflow step
531
- */
532
- export interface ECPDetails {
533
- enabled?: boolean;
534
- label?: string;
535
- description?: string;
536
- journey?: StepJourney;
537
- }
538
- export interface Edge {
539
- id: string;
540
- from_id: TaskId;
541
- to_id: TaskId;
542
- condition_id?: /**
543
- * A locally unique identifier for the condition
544
- * example:
545
- * abc123
546
- */
547
- ConditionId;
548
- /**
549
- * Indicates a default case for a decision task. Only decision task edges can have this field and the flow advances using this edge if no conditions are met.
550
- */
551
- none_met?: boolean;
552
- }
553
- /**
554
- * describe the requirement for a task to be enabled
555
- */
556
- export interface EnableRequirement {
557
- /**
558
- * The template_id of the task that this requirement points to
559
- */
560
- task_id?: string;
561
- /**
562
- * The template_id of the phase that this requirement points to
563
- */
564
- phase_id?: string;
565
- when: "TASK_FINISHED" | "PHASE_FINISHED";
566
- }
567
- export interface EntityRef {
568
- entity_id?: string;
569
- entity_schema?: string;
570
- /**
571
- * Flag to indicate if the entity is primary and should be used for evaluating the conditions of the tasks
572
- */
573
- is_primary?: boolean;
574
- }
575
- /**
576
- * example:
577
- * {
578
- * "trigger": {
579
- * "event": "FlowStarted"
580
- * },
581
- * "target": {
582
- * "entitySchema": "opportunity",
583
- * "entityAttribute": "title"
584
- * },
585
- * "value": {
586
- * "source": "workflow_name"
587
- * }
588
- * }
589
- */
590
- export interface EntitySync {
591
- /**
592
- * Trigger configuration that determines when entity sync occurs.
593
- * Contains the event type and optional filter to target specific tasks/phases.
594
- *
595
- */
596
- trigger: {
597
- /**
598
- * Event or condition that triggers the entity sync.
599
- * Direct triggers match EventBridge event names (PascalCase).
600
- * Status triggers are deduced from event + entity status combination.
601
- *
602
- */
603
- event: "FlowStarted" | "FlowCompleted" | "FlowCancelled" | "FlowReopened" | "FlowDeleted" | "FlowAssigned" | "FlowDueDateChanged" | "FlowContextsChanged" | "TaskUpdated" | "CurrTaskChanged" | "TaskCompleted" | "TaskSkipped" | "TaskMarkedInProgress" | "TaskMarkedOnHold" | "PhaseUpdated" | "PhaseCompleted" | "PhaseSkipped" | "PhaseMarkedInProgress";
604
- /**
605
- * Optional filter to target specific tasks or phases.
606
- * Specify either task_template_id OR phase_template_id (mutually exclusive).
607
- * If omitted, trigger applies to all tasks/phases.
608
- *
609
- */
610
- filter?: {
611
- /**
612
- * Target a specific task by its template ID (stable across executions)
613
- */
614
- task_template_id?: string;
615
- /**
616
- * Target a specific phase by its template ID (stable across executions)
617
- */
618
- phase_template_id?: string;
619
- };
620
- };
621
- value: {
622
- source: "workflow_name" | "workflow_status" | "workflow_assigned_to" | "task_name" | "task_status" | "task_assigned_to" | "phase_name" | "phase_status" | "phase_assigned_to" | "custom_value";
623
- value?: string;
624
- };
625
- target: {
626
- /**
627
- * example:
628
- * opportunity
629
- */
630
- entitySchema: string;
631
- /**
632
- * example:
633
- * title
634
- */
635
- entityAttribute: string;
636
- };
637
- }
638
- /**
639
- * Standard error response returned when an API request fails.
640
- * Contains a human-readable message describing the error.
641
- *
642
- */
643
- export interface ErrorResp {
644
- /**
645
- * Human-readable description of the error that occurred
646
- * example:
647
- * Validation failed: workflowId is required
648
- */
649
- message: string;
650
- }
651
- export interface EvaluationSource {
652
- /**
653
- * The id of the action or trigger
654
- */
655
- id?: string;
656
- origin?: "trigger" | "action";
657
- origin_type?: "entity" | "workflow" | "journey_block";
658
- schema?: string;
659
- attribute?: string;
660
- attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address";
661
- attribute_repeatable?: boolean;
662
- attribute_operation?: "all" | "updated" | "added" | "deleted";
663
- /**
664
- * Multi-attribute mode. When present and length > 1, the statement is
665
- * evaluated against every listed attribute and combined via
666
- * `attributes_match`. All listed attributes must share the same
667
- * `attribute_type`. Mutually exclusive with `attribute_sub_field`,
668
- * `date_offset`, and `attribute_operation`. When absent or length === 1,
669
- * the legacy `attribute` field is used.
670
- *
671
- */
672
- attributes?: [
673
- string?,
674
- string?,
675
- string?,
676
- string?,
677
- string?,
678
- string?,
679
- string?,
680
- string?,
681
- string?,
682
- string?
683
- ];
684
- /**
685
- * Inner connector across `attributes`. `any` (default) means at least
686
- * one attribute must satisfy the operator; `all` means every attribute
687
- * must satisfy it. Ignored when `attributes` is absent or has length < 2.
688
- *
689
- */
690
- attributes_match?: "any" | "all";
691
- /**
692
- * For complex attribute types, specifies which sub-field to extract (e.g., 'address', 'name', 'email_type')
693
- */
694
- attribute_sub_field?: string;
695
- /**
696
- * Offset to apply to the source date value before comparison (e.g., +18 years for age check, +30 days for expiry)
697
- */
698
- date_offset?: {
699
- /**
700
- * Number of units to offset
701
- */
702
- amount?: number;
703
- /**
704
- * Unit of the offset
705
- */
706
- unit?: "days" | "months" | "years";
707
- };
708
- }
709
- export interface ExecutionPaginationDynamo {
710
- orgId?: string;
711
- creationTime?: string;
712
- }
713
- export interface Flow {
714
- flow: (/* A group of Steps that define the progress of the Workflow */ Section | Step)[];
715
- }
716
- export interface FlowClosingReason {
717
- selected_reasons?: ClosingReason[];
718
- configured_reasons?: ClosingReason[];
719
- extra_description?: string;
720
- }
721
- export type FlowContext = EntityRef;
722
- export interface FlowExecution {
723
- id: FlowExecutionId;
724
- flow_template_id: FlowTemplateId;
725
- org_id: string;
726
- name: string;
727
- /**
728
- * Creation timestamp which will double as started time as well
729
- */
730
- created_at: string;
731
- /**
732
- * Last Update timestamp
733
- */
734
- updated_at: string;
735
- /**
736
- * Due date for finishing the workflow
737
- */
738
- due_date?: string;
739
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
740
- status: WorkflowStatus;
741
- assigned_to?: /* The user ids or variable assignments */ Assignees;
742
- analytics: {
743
- /**
744
- * Timestamp when the flow execution started
745
- */
746
- started_at?: string;
747
- /**
748
- * Timestamp when the flow execution was completed
749
- */
750
- completed_at?: string;
751
- /**
752
- * Timestamp when the flow execution was closed
753
- */
754
- closed_at?: string;
755
- /**
756
- * User who started the flow execution.
757
- */
758
- started_by?: string;
759
- /**
760
- * User who closed the flow execution
761
- */
762
- closed_by?: string;
763
- };
764
- contexts: FlowContext[];
765
- crt_tasks: {
766
- id?: TaskId;
767
- /**
768
- * Timestamp when this task entered crt_tasks (i.e. became current). Used by the flow-healing-service as the authoritative gate for "has this PENDING task been stuck long enough to heal?". Using the task's own analytics.status_updated_at as the gate produced false positives because transitioning a task INTO crt_tasks does not change its status — so that timestamp can be hours old for a freshly-current task.
769
- */
770
- crt_since?: string; // date-time
771
- }[];
772
- phases?: Phase[];
773
- tasks: Task[];
774
- edges: Edge[];
775
- /**
776
- * [Internal] Tracks the chain of automation-originated executions to prevent infinite loops. This is an internal property and should not be used by external consumers.
777
- */
778
- _execution_chain?: {
779
- /**
780
- * ID of the parent flow execution that triggered this execution via automation
781
- */
782
- parent_execution_id?: string;
783
- /**
784
- * ID of the automation task in the parent execution that triggered this
785
- */
786
- parent_task_id?: string;
787
- /**
788
- * The depth in the execution chain (0 for manual triggers, 1+ for automation-triggered)
789
- */
790
- depth?: number;
791
- };
792
- closing_reason?: FlowClosingReason;
793
- /**
794
- * Indicates whether this flow execution is available for End Customer Portal or not. By default it's not.
795
- */
796
- available_in_ecp?: boolean;
797
- entity_sync?: /**
798
- * example:
799
- * {
800
- * "trigger": {
801
- * "event": "FlowStarted"
802
- * },
803
- * "target": {
804
- * "entitySchema": "opportunity",
805
- * "entityAttribute": "title"
806
- * },
807
- * "value": {
808
- * "source": "workflow_name"
809
- * }
810
- * }
811
- */
812
- EntitySync[];
813
- /**
814
- * Taxonomy ids (both Labels and Purposes) that are associated with this workflow and used for filtering
815
- */
816
- taxonomies?: string[];
817
- trigger: FlowTrigger;
818
- /**
819
- * Indicates whether only a single closing reason can be selected when closing the flow execution
820
- */
821
- singleClosingReasonSelection?: boolean;
822
- /**
823
- * Copied from the flow template at start. When true, task enablement is computed at runtime from the graph (a task is enabled only when all of its direct predecessor tasks in its branch are done) instead of from each task's explicit requirements.
824
- */
825
- linear?: boolean;
826
- }
827
- export type FlowExecutionId = string;
828
- export interface FlowSlim {
829
- flow: (/* A group of Steps that define the progress of the Workflow */ Section | Step)[];
830
- }
831
- export type FlowTemplateId = string;
832
- export interface FlowTrigger {
833
- type?: TriggerType;
834
- automation_config?: AutomationInfo;
835
- }
836
- export interface ImmediateSchedule {
837
- mode: "immediate";
838
- }
839
- export type ItemType = "STEP" | "SECTION";
840
- export interface LastEvaluatedKey {
841
- orgId?: string;
842
- creationTime?: string;
843
- }
844
- export interface LoopConfig {
845
- /**
846
- * The id of the branch that will be looped
847
- */
848
- loop_branch_id: string;
849
- /**
850
- * The id of the branch that will be used to exit the loop
851
- */
852
- exit_branch_id: string;
853
- /**
854
- * Maximum number of iterations for the loop branch
855
- */
856
- max_iterations: number;
857
- /**
858
- * Current number of iterations for the loop branch
859
- */
860
- crt_iterations?: number;
861
- }
862
- /**
863
- * Information about loop iterations, when task is part of a loop branch
864
- */
865
- export interface LoopInfo {
866
- /**
867
- * Maximum number of iterations for the loop branch
868
- */
869
- max_iterations: number;
870
- /**
871
- * Current number of iterations for the loop branch
872
- */
873
- crt_iterations?: number;
874
- }
875
- export interface ManualTask {
876
- id: TaskId;
877
- template_id: string;
878
- name: string;
879
- description?: /* Longer information regarding Task */ StepDescription;
880
- status: /**
881
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
882
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
883
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
884
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
885
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
886
- * - **COMPLETED**: Step/Task has been finished successfully
887
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
888
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
889
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
890
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
891
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
892
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
893
- *
894
- */
895
- StepStatus;
896
- journey?: StepJourney;
897
- /**
898
- * example:
899
- * 2021-04-27T12:00:00.000Z
900
- */
901
- due_date?: string;
902
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
903
- /**
904
- * requirements that need to be fulfilled in order to enable the task while flow instances are running
905
- */
906
- requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[];
907
- assigned_to?: /* The user ids or variable assignments */ Assignees;
908
- analytics: AnalyticsInfo;
909
- /**
910
- * Time when the task was created
911
- */
912
- created_at?: string; // date-time
913
- /**
914
- * Last Update timestamp
915
- */
916
- updated_at?: string; // date-time
917
- /**
918
- * Flag to indicate if the task was created manually
919
- */
920
- manually_created?: boolean;
921
- /**
922
- * enabled flag results from calculating the requirements
923
- */
924
- enabled: boolean;
925
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
926
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
927
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
928
- /**
929
- * Taxonomy ids that are associated with this workflow and used for filtering
930
- */
931
- taxonomies?: string[];
932
- phase_id?: string;
933
- task_type: TaskType;
934
- loop_config?: /* Information about loop iterations, when task is part of a loop branch */ LoopInfo;
935
- }
936
- export type Operator = "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty";
937
- /**
938
- * Details regarding partner for the workflow step
939
- */
940
- export interface PartnerDetails {
941
- enabled?: boolean;
942
- label?: string;
943
- description?: string;
944
- }
945
- export interface PatchFlowReq {
946
- status?: WorkflowStatus;
947
- assigned_to?: /* The user ids or variable assignments */ Assignees;
948
- closing_reason?: FlowClosingReason;
949
- due_date?: string;
950
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
951
- contexts?: FlowContext[];
952
- }
953
- export interface PatchPhaseReq {
954
- name?: string;
955
- /**
956
- * example:
957
- * 2021-04-27T12:00:00.000Z
958
- */
959
- due_date?: string;
960
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
961
- assigned_to?: /* The user ids or variable assignments */ Assignees;
962
- }
963
- /**
964
- * Request payload for updating a task within a flow execution.
965
- * All fields are optional; only provided fields will be updated.
966
- *
967
- */
968
- export interface PatchTaskReq {
969
- /**
970
- * Display name of the task
971
- * example:
972
- * Review customer application
973
- */
974
- name?: string;
975
- status?: /**
976
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
977
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
978
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
979
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
980
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
981
- * - **COMPLETED**: Step/Task has been finished successfully
982
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
983
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
984
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
985
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
986
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
987
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
988
- *
989
- */
990
- StepStatus;
991
- /**
992
- * Explicit due date for the task. Takes precedence over
993
- * due_date_config if both are provided.
994
- *
995
- * Note: intentionally typed as plain `string` (not
996
- * `format: date-time`). For day/week/month-precision due
997
- * dates the server stores a "floating" datetime without a
998
- * timezone designator (e.g. `2026-05-28T00:00:00.000`) so
999
- * that the UI can render it as a date in the user's local
1000
- * timezone without shifting the displayed day. Tightening
1001
- * this to `format: date-time` causes openapi-zod-client to
1002
- * emit `z.string().datetime({ offset: true })` in
1003
- * `validators-generated.ts`, which then trips
1004
- * `safeParse(body)` in `patch-task.ts` whenever the
1005
- * sidebar sends a stored task back with a tz-less
1006
- * `due_date`. See commit 4aca299c (Aug 2024) for the
1007
- * original date-only display rationale and the May 2026
1008
- * incident (513ed597 added the format, ee574b43
1009
- * unintentionally activated it via an unrelated regen) for
1010
- * the history. Long-term, day-precision due dates should
1011
- * migrate to a separate `format: date` field.
1012
- *
1013
- * example:
1014
- * 2026-05-28T00:00:00.000
1015
- */
1016
- due_date?: string;
1017
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
1018
- assigned_to?: /* The user ids or variable assignments */ Assignees;
1019
- /**
1020
- * Controls whether the task is enabled (can be worked on) or disabled (grayed out).
1021
- * Disabled tasks cannot have their status changed until re-enabled.
1022
- *
1023
- */
1024
- enabled?: boolean;
1025
- automation_config?: AutomationInfo;
1026
- description?: /* Longer information regarding Task */ StepDescription;
1027
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
1028
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
1029
- /**
1030
- * Partner-specific task details shown to partner org users viewing shared resources
1031
- */
1032
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
1033
- /**
1034
- * For decision tasks with manual trigger mode, specifies which condition/branch
1035
- * to follow when completing the task. The condition ID must match one of the
1036
- * conditions defined on the decision task.
1037
- *
1038
- * example:
1039
- * cond_branch_approved
1040
- */
1041
- next_condition_id?: string;
1042
- /**
1043
- * Controls behavior when updating a task that was already completed/skipped and
1044
- * comes before the current task in the workflow:
1045
- * - `true`: Reverts the execution - the patched task becomes the current task
1046
- * and all subsequent tasks are reset to PENDING status
1047
- * - `false` (default): Updates only this task without affecting workflow position
1048
- * or other tasks
1049
- *
1050
- * **Important:** This parameter is silently ignored when:
1051
- * - Patching the current task
1052
- * - Patching future tasks (tasks that haven't been reached yet)
1053
- *
1054
- */
1055
- revert_execution?: boolean;
1056
- /**
1057
- * Request-only signal indicating the task is being completed as a
1058
- * result of the user submitting the task's linked journey (journey
1059
- * auto-completion). When `true` and the task transitions to
1060
- * `COMPLETED`, the activity log records a journey-specific message
1061
- * instead of the generic completion message. Not persisted on the task.
1062
- *
1063
- */
1064
- completed_via_journey?: boolean;
1065
- }
1066
- export interface Phase {
1067
- id: PhaseId;
1068
- template_id: string;
1069
- name: string;
1070
- status?: SectionStatus;
1071
- /**
1072
- * Last Update timestamp
1073
- */
1074
- updated_at?: string;
1075
- /**
1076
- * example:
1077
- * 2021-04-27T12:00:00.000Z
1078
- */
1079
- due_date?: string;
1080
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
1081
- assigned_to?: /* The user ids or variable assignments */ Assignees;
1082
- analytics?: AnalyticsInfo;
1083
- /**
1084
- * Taxonomy ids that are associated with this workflow and used for filtering
1085
- */
1086
- taxonomies?: string[];
1087
- loop_config?: /* Information about loop iterations, when task is part of a loop branch */ LoopInfo;
1088
- }
1089
- export type PhaseId = string;
1090
- export interface PhaseInEntity {
1091
- phase_id?: string;
1092
- phase_name?: string;
1093
- phase_progress?: number;
1094
- phase_assignees?: string[];
1095
- }
1096
- export interface RelativeSchedule {
1097
- mode: "relative";
1098
- direction: "before" | "after";
1099
- duration: number;
1100
- unit: TimeUnit;
1101
- reference: {
1102
- /**
1103
- * The id of the entity / workflow / task, based on the origin of the schedule. For all_preceding_tasks_completed, use the sentinel value 'all_preceding_tasks_completed'.
1104
- */
1105
- id: string;
1106
- origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed";
1107
- /**
1108
- * The schema of the entity
1109
- */
1110
- schema?: string;
1111
- /**
1112
- * An entity attribute that identifies a date / datetime
1113
- */
1114
- attribute?: string;
1115
- };
1116
- /**
1117
- * The id of the created schedule
1118
- */
1119
- schedule_id?: string;
1120
- /**
1121
- * The resolved absolute timestamp (ISO 8601, UTC) at which the task is
1122
- * armed to run. Set by the backend when the schedule is armed and the
1123
- * task transitions to SCHEDULED. Absent while the task is still
1124
- * pending/unscheduled.
1125
- *
1126
- * Note: intentionally typed as plain `string` (not
1127
- * `format: date-time`). `schedule` is embedded in the AutomationTask /
1128
- * DecisionTask schemas; if a future request body ever accepts a task
1129
- * (or schedule) and `safeParse`s it, `format: date-time` would make
1130
- * openapi-zod-client emit `z.string().datetime({ offset: true })` and
1131
- * reject any round-tripped value that is empty or tz-less — the exact
1132
- * mechanism behind the May 2026 due_date incident (513ed597 added the
1133
- * format, ee574b43 activated it via an unrelated regen; see commit
1134
- * 2c91ff35). This field is server-written via `toISOString()` so it is
1135
- * always a valid UTC instant; the datetime validator adds no
1136
- * protection, only latent risk.
1137
- *
1138
- */
1139
- scheduled_at?: string;
1140
- /**
1141
- * Set by the backend when scheduling this task FAILED (e.g. the
1142
- * referenced date attribute is empty/unreadable, or the resolved fire
1143
- * time is already in the past). A JSON string
1144
- * ({ error_code, error_reason, error_info }) describing why, so the UI
1145
- * can show a specific warning and ask the user to fix the date
1146
- * attribute and re-schedule. Cleared when the task is successfully
1147
- * (re-)armed. This is the decision-task counterpart of
1148
- * AutomationInfo.error_reason (decision tasks have no automation_config).
1149
- *
1150
- */
1151
- error_reason?: string;
1152
- }
1153
- export interface SearchExecutionsReq {
1154
- name?: string;
1155
- status?: WorkflowStatus;
1156
- includeDoneWorkflows?: boolean;
1157
- assignedTo?: string;
1158
- sorting?: SearchSorting;
1159
- pagination?: ExecutionPaginationDynamo;
1160
- }
1161
- export interface SearchExecutionsResp {
1162
- executions: /**
1163
- * example:
1164
- * {
1165
- * "id": "8gja72h6kas6h",
1166
- * "name": "Lead Qualification",
1167
- * "trigger": "MANUAL",
1168
- * "status": "STARTED",
1169
- * "creationTime": "2021-04-27T12:01:13.000Z",
1170
- * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
1171
- * "dueDate": "2021-04-27T12:01:13.000Z",
1172
- * "flow": [
1173
- * {
1174
- * "id": "sectionId1",
1175
- * "definitionId": "section_definition_id_1",
1176
- * "name": "Initial Information Gathering",
1177
- * "type": "SECTION",
1178
- * "steps": [
1179
- * {
1180
- * "id": "sada5641f3a21",
1181
- * "definitionId": "step_definition_id_1",
1182
- * "name": "Call client"
1183
- * },
1184
- * {
1185
- * "id": "sada5641f3a22",
1186
- * "definitionId": "step_definition_id_2",
1187
- * "name": "Check product availability"
1188
- * },
1189
- * {
1190
- * "id": "sada5641f3a23",
1191
- * "definitionId": "step_definition_id_3",
1192
- * "name": "Send email confirming contact with the client"
1193
- * }
1194
- * ]
1195
- * },
1196
- * {
1197
- * "id": "firstLevelStepId1",
1198
- * "definitionId": "step_definition_id_4",
1199
- * "name": "Print and send catalog",
1200
- * "type": "STEP"
1201
- * }
1202
- * ]
1203
- * }
1204
- */
1205
- WorkflowExecutionSlim[];
1206
- lastEvaluatedKey?: LastEvaluatedKey;
1207
- }
1208
- export interface SearchFlowsReq {
1209
- entity_id: string;
1210
- entity_schema: string;
1211
- }
1212
- export interface SearchPagination {
1213
- from?: number;
1214
- size?: number;
1215
- }
1216
- export type SearchSorting = "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC";
1217
- export interface SearchStepsReq {
1218
- executionName?: string;
1219
- stepName?: string;
1220
- assignedTo?: number;
1221
- includeDoneWorkflows?: boolean;
1222
- manuallyCreated?: boolean;
1223
- status?: "OPEN" | "COMPLETE" | "NEXT_OPEN_ITEM_IN_WORKFLOW";
1224
- sorting?: SearchSorting;
1225
- pagination?: SearchPagination;
1226
- }
1227
- export interface SearchStepsResp {
1228
- /**
1229
- * example:
1230
- * 50
1231
- */
1232
- hits?: number;
1233
- results?: {
1234
- id: string;
1235
- definitionId?: string;
1236
- /**
1237
- * This field is deprecated. It will be soon removed. Please use only id.
1238
- */
1239
- entityRefId?: string;
1240
- name: string;
1241
- description?: /* Longer information regarding Task */ StepDescription;
1242
- type: ItemType;
1243
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
1244
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
1245
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
1246
- /**
1247
- * enabled flag results from calculating the requirements
1248
- */
1249
- enabled?: boolean;
1250
- requirements?: /* describe the requirement for step enablement */ StepRequirement[];
1251
- executionType?: StepType;
1252
- sectionId?: string;
1253
- executionId: string;
1254
- /**
1255
- * This field is deprecated. Please use assignedTo
1256
- */
1257
- userIds?: number[];
1258
- assignedTo?: string[];
1259
- /**
1260
- * The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task
1261
- */
1262
- assignedToInProgress?: string;
1263
- /**
1264
- * The user which moved the step/task to the ON_HOLD state. The user should also be present in the assignedTo property of the step/task
1265
- */
1266
- assignedToOnHold?: string;
1267
- status?: /**
1268
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
1269
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
1270
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
1271
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
1272
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
1273
- * - **COMPLETED**: Step/Task has been finished successfully
1274
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
1275
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
1276
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
1277
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
1278
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
1279
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
1280
- *
1281
- */
1282
- StepStatus;
1283
- created?: string;
1284
- lastUpdated?: string;
1285
- /**
1286
- * Last updated timestamp of the status
1287
- */
1288
- statusLastUpdated?: string;
1289
- startedTime?: string;
1290
- completedTime?: string;
1291
- dueDate?: string;
1292
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
1293
- manuallyCreated?: boolean;
1294
- automationConfig?: /* Configuration for automation execution to run */ AutomationConfig;
1295
- journey?: StepJourney;
1296
- /**
1297
- * Taxonomy ids (purposes in this case) that are associated with this step/task and used for filtering
1298
- */
1299
- taxonomies?: string[];
1300
- executionName: string;
1301
- executionStatus: WorkflowStatus;
1302
- contexts?: {
1303
- id: string;
1304
- title: string;
1305
- schema: string;
1306
- }[];
1307
- }[];
1308
- }
1309
- /**
1310
- * A group of Steps that define the progress of the Workflow
1311
- */
1312
- export interface Section {
1313
- id: string;
1314
- definitionId?: string;
1315
- /**
1316
- * Name for this Section
1317
- * example:
1318
- * Lead Qualification
1319
- */
1320
- name: string;
1321
- /**
1322
- * This field is deprecated. Please use assignedTo
1323
- */
1324
- userIds?: number[];
1325
- assignedTo?: string[];
1326
- /**
1327
- * example:
1328
- * 2021-04-27T12:00:00.000Z
1329
- */
1330
- dueDate?: string;
1331
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
1332
- startedTime?: string;
1333
- completedTime?: string;
1334
- status?: SectionStatus;
1335
- type: ItemType;
1336
- steps: Step[];
1337
- /**
1338
- * Taxonomy ids (purposes in this case) that are associated with this section and used for filtering
1339
- */
1340
- taxonomies?: string[];
1341
- }
1342
- /**
1343
- * A group of Steps that define the progress of the Workflow
1344
- */
1345
- export interface SectionSimplified {
1346
- id: string;
1347
- definitionId?: string;
1348
- /**
1349
- * Name for this Section
1350
- * example:
1351
- * Lead Qualification
1352
- */
1353
- name: string;
1354
- type: ItemType;
1355
- steps: StepSimplified[];
1356
- assignedTo?: string[];
1357
- }
1358
- export type SectionStatus = "OPEN" | "IN_PROGRESS" | "COMPLETED";
1359
- /**
1360
- * Request payload for starting a new flow execution from a template.
1361
- *
1362
- */
1363
- export interface StartFlowReq {
1364
- /**
1365
- * The unique identifier of the flow template (definition) to instantiate.
1366
- * The template must exist and be accessible within the organization.
1367
- *
1368
- * example:
1369
- * tpl_abc123def456
1370
- */
1371
- flow_template_id: string;
1372
- trigger?: FlowTrigger;
1373
- /**
1374
- * Entity references that this execution is linked to. At least one context
1375
- * is required. The primary context (is_primary: true) is used for condition
1376
- * evaluation and data mapping.
1377
- *
1378
- */
1379
- contexts: [
1380
- FlowContext,
1381
- ...FlowContext[]
1382
- ];
1383
- /**
1384
- * Taxonomy purpose IDs to filter which phases and tasks are included in the execution.
1385
- * Only phases/tasks tagged with matching purposes will be active. If empty or omitted,
1386
- * all phases and tasks from the template are included.
1387
- *
1388
- */
1389
- purposes?: string[];
1390
- }
1391
- export interface Statement {
1392
- id: string;
1393
- source: EvaluationSource;
1394
- operator: Operator;
1395
- values: string[];
1396
- /**
1397
- * How to interpret values. "static" (default) means literal values. "relative_date" means values[0] is a dynamic date token like "today".
1398
- */
1399
- value_type?: "static" | "relative_date";
1400
- }
1401
- export interface Step {
1402
- id: string;
1403
- definitionId?: string;
1404
- /**
1405
- * This field is deprecated. It will be soon removed. Please use only id.
1406
- */
1407
- entityRefId?: string;
1408
- name: string;
1409
- description?: /* Longer information regarding Task */ StepDescription;
1410
- type: ItemType;
1411
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
1412
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
1413
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
1414
- /**
1415
- * enabled flag results from calculating the requirements
1416
- */
1417
- enabled?: boolean;
1418
- requirements?: /* describe the requirement for step enablement */ StepRequirement[];
1419
- executionType?: StepType;
1420
- sectionId?: string;
1421
- executionId?: string;
1422
- /**
1423
- * This field is deprecated. Please use assignedTo
1424
- */
1425
- userIds?: number[];
1426
- assignedTo?: string[];
1427
- /**
1428
- * The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task
1429
- */
1430
- assignedToInProgress?: string;
1431
- /**
1432
- * The user which moved the step/task to the ON_HOLD state. The user should also be present in the assignedTo property of the step/task
1433
- */
1434
- assignedToOnHold?: string;
1435
- status?: /**
1436
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
1437
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
1438
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
1439
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
1440
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
1441
- * - **COMPLETED**: Step/Task has been finished successfully
1442
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
1443
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
1444
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
1445
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
1446
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
1447
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
1448
- *
1449
- */
1450
- StepStatus;
1451
- created?: string;
1452
- lastUpdated?: string;
1453
- /**
1454
- * Last updated timestamp of the status
1455
- */
1456
- statusLastUpdated?: string;
1457
- startedTime?: string;
1458
- completedTime?: string;
1459
- dueDate?: string;
1460
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
1461
- manuallyCreated?: boolean;
1462
- automationConfig?: /* Configuration for automation execution to run */ AutomationConfig;
1463
- journey?: StepJourney;
1464
- /**
1465
- * Taxonomy ids (purposes in this case) that are associated with this step/task and used for filtering
1466
- */
1467
- taxonomies?: string[];
1468
- }
1469
- /**
1470
- * Longer information regarding Task
1471
- */
1472
- export interface StepDescription {
1473
- enabled?: boolean;
1474
- value?: string;
1475
- }
1476
- export interface StepExtended {
1477
- id: string;
1478
- definitionId?: string;
1479
- /**
1480
- * This field is deprecated. It will be soon removed. Please use only id.
1481
- */
1482
- entityRefId?: string;
1483
- name: string;
1484
- description?: /* Longer information regarding Task */ StepDescription;
1485
- type: ItemType;
1486
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
1487
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
1488
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
1489
- /**
1490
- * enabled flag results from calculating the requirements
1491
- */
1492
- enabled?: boolean;
1493
- requirements?: /* describe the requirement for step enablement */ StepRequirement[];
1494
- executionType?: StepType;
1495
- sectionId?: string;
1496
- executionId: string;
1497
- /**
1498
- * This field is deprecated. Please use assignedTo
1499
- */
1500
- userIds?: number[];
1501
- assignedTo?: string[];
1502
- /**
1503
- * The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task
1504
- */
1505
- assignedToInProgress?: string;
1506
- /**
1507
- * The user which moved the step/task to the ON_HOLD state. The user should also be present in the assignedTo property of the step/task
1508
- */
1509
- assignedToOnHold?: string;
1510
- status?: /**
1511
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
1512
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
1513
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
1514
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
1515
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
1516
- * - **COMPLETED**: Step/Task has been finished successfully
1517
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
1518
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
1519
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
1520
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
1521
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
1522
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
1523
- *
1524
- */
1525
- StepStatus;
1526
- created?: string;
1527
- lastUpdated?: string;
1528
- /**
1529
- * Last updated timestamp of the status
1530
- */
1531
- statusLastUpdated?: string;
1532
- startedTime?: string;
1533
- completedTime?: string;
1534
- dueDate?: string;
1535
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
1536
- manuallyCreated?: boolean;
1537
- automationConfig?: /* Configuration for automation execution to run */ AutomationConfig;
1538
- journey?: StepJourney;
1539
- /**
1540
- * Taxonomy ids (purposes in this case) that are associated with this step/task and used for filtering
1541
- */
1542
- taxonomies?: string[];
1543
- executionName: string;
1544
- executionStatus: WorkflowStatus;
1545
- contexts?: {
1546
- id: string;
1547
- title: string;
1548
- schema: string;
1549
- }[];
1550
- }
1551
- export interface StepId {
1552
- id?: string;
1553
- /**
1554
- * This field is deprecated. It will be soon removed. Please use only id.
1555
- */
1556
- entityRefId?: string;
1557
- }
1558
- export interface StepJourney {
1559
- id?: string;
1560
- journeyId?: string;
1561
- name?: string;
1562
- /**
1563
- * If true, the task be auto completed when the journey is completed
1564
- */
1565
- complete_task_automatically?: boolean;
1566
- }
1567
- export interface StepPositionAt {
1568
- index: number;
1569
- sectionId?: string;
1570
- }
1571
- /**
1572
- * describe the requirement for step enablement
1573
- */
1574
- export interface StepRequirement {
1575
- definitionId: string;
1576
- type: ItemType;
1577
- condition: "CLOSED";
1578
- }
1579
- export interface StepSimplified {
1580
- id: string;
1581
- definitionId?: string;
1582
- /**
1583
- * This field is deprecated. It will be soon removed. Please use only id.
1584
- */
1585
- entityRefId?: string;
1586
- name: string;
1587
- description?: /* Longer information regarding Task */ StepDescription;
1588
- type: ItemType;
1589
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
1590
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
1591
- /**
1592
- * Partner-specific task details shown to partner org users viewing shared resources
1593
- */
1594
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
1595
- enabled?: boolean;
1596
- requirements?: /* describe the requirement for step enablement */ StepRequirement[];
1597
- /**
1598
- * Manual / Automation step
1599
- */
1600
- executionType?: StepType;
1601
- }
1602
- /**
1603
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
1604
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
1605
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
1606
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
1607
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
1608
- * - **COMPLETED**: Step/Task has been finished successfully
1609
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
1610
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
1611
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
1612
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
1613
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
1614
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
1615
- *
1616
- */
1617
- export type StepStatus = "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED";
1618
- export type StepType = "MANUAL" | "AUTOMATION";
1619
- export type Task = ManualTask | AutomationTask | DecisionTask | AiAgentTask;
1620
- export interface TaskBase {
1621
- id: TaskId;
1622
- template_id: string;
1623
- name: string;
1624
- description?: /* Longer information regarding Task */ StepDescription;
1625
- status: /**
1626
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
1627
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
1628
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
1629
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
1630
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
1631
- * - **COMPLETED**: Step/Task has been finished successfully
1632
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
1633
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
1634
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
1635
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
1636
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
1637
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
1638
- *
1639
- */
1640
- StepStatus;
1641
- journey?: StepJourney;
1642
- /**
1643
- * example:
1644
- * 2021-04-27T12:00:00.000Z
1645
- */
1646
- due_date?: string;
1647
- due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig;
1648
- /**
1649
- * requirements that need to be fulfilled in order to enable the task while flow instances are running
1650
- */
1651
- requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[];
1652
- assigned_to?: /* The user ids or variable assignments */ Assignees;
1653
- analytics: AnalyticsInfo;
1654
- /**
1655
- * Time when the task was created
1656
- */
1657
- created_at?: string; // date-time
1658
- /**
1659
- * Last Update timestamp
1660
- */
1661
- updated_at?: string; // date-time
1662
- /**
1663
- * Flag to indicate if the task was created manually
1664
- */
1665
- manually_created?: boolean;
1666
- /**
1667
- * enabled flag results from calculating the requirements
1668
- */
1669
- enabled: boolean;
1670
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
1671
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
1672
- /**
1673
- * Partner-specific task details shown to partner org users viewing shared resources
1674
- */
1675
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
1676
- /**
1677
- * Taxonomy ids that are associated with this workflow and used for filtering
1678
- */
1679
- taxonomies?: string[];
1680
- phase_id?: string;
1681
- task_type: TaskType;
1682
- }
1683
- export type TaskId = string;
1684
- export type TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT";
1685
- export type TimeUnit = "minutes" | "hours" | "days" | "weeks" | "months" | "years";
1686
- export type TriggerMode = "manual" | "automatic";
1687
- export type TriggerType = "MANUAL" | "AUTOMATIC";
1688
- export interface UpdateEntityAttributes {
1689
- source: "workflow_status" | "current_section" | "current_step";
1690
- target: {
1691
- /**
1692
- * example:
1693
- * opportunity
1694
- */
1695
- entitySchema: string;
1696
- /**
1697
- * example:
1698
- * my_status
1699
- */
1700
- entityAttribute: string;
1701
- };
1702
- }
1703
- export interface UpdateStepReq {
1704
- stepId?: string;
1705
- /**
1706
- * This field is deprecated. Please use stepId
1707
- */
1708
- entityRefId?: string;
1709
- /**
1710
- * This field is deprecated. Please use assignedTo
1711
- */
1712
- userIds?: number[];
1713
- assignedTo?: string[];
1714
- /**
1715
- * The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task
1716
- */
1717
- assignedToInProgress?: string;
1718
- /**
1719
- * The user which moved the step/task to the ON_HOLD state. The user should also be present in the assignedTo property of the step/task
1720
- */
1721
- assignedToOnHold?: string;
1722
- status?: /**
1723
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
1724
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
1725
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
1726
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
1727
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
1728
- * - **COMPLETED**: Step/Task has been finished successfully
1729
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
1730
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
1731
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
1732
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
1733
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
1734
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
1735
- *
1736
- */
1737
- StepStatus;
1738
- dueDate?: string;
1739
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
1740
- name?: string;
1741
- /**
1742
- * Longer information regarding Task
1743
- */
1744
- description?: {
1745
- enabled: boolean;
1746
- value: string;
1747
- };
1748
- position?: StepPositionAt;
1749
- automationConfig?: /* Configuration for automation execution to run */ AutomationConfig;
1750
- startedTime?: string;
1751
- completedTime?: string;
1752
- }
1753
- export interface UpdateStepResp {
1754
- id: string;
1755
- definitionId?: string;
1756
- /**
1757
- * This field is deprecated. It will be soon removed. Please use only id.
1758
- */
1759
- entityRefId?: string;
1760
- name: string;
1761
- description?: /* Longer information regarding Task */ StepDescription;
1762
- type: ItemType;
1763
- ecp?: /* Details regarding ECP for the workflow step */ ECPDetails;
1764
- installer?: /* Details regarding ECP for the workflow step */ ECPDetails;
1765
- partner?: /* Details regarding partner for the workflow step */ PartnerDetails;
1766
- /**
1767
- * enabled flag results from calculating the requirements
1768
- */
1769
- enabled?: boolean;
1770
- requirements?: /* describe the requirement for step enablement */ StepRequirement[];
1771
- executionType?: StepType;
1772
- sectionId?: string;
1773
- executionId?: string;
1774
- /**
1775
- * This field is deprecated. Please use assignedTo
1776
- */
1777
- userIds?: number[];
1778
- assignedTo?: string[];
1779
- /**
1780
- * The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task
1781
- */
1782
- assignedToInProgress?: string;
1783
- /**
1784
- * The user which moved the step/task to the ON_HOLD state. The user should also be present in the assignedTo property of the step/task
1785
- */
1786
- assignedToOnHold?: string;
1787
- status?: /**
1788
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
1789
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
1790
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
1791
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
1792
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
1793
- * - **COMPLETED**: Step/Task has been finished successfully
1794
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
1795
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
1796
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
1797
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
1798
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
1799
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
1800
- *
1801
- */
1802
- StepStatus;
1803
- created?: string;
1804
- lastUpdated?: string;
1805
- /**
1806
- * Last updated timestamp of the status
1807
- */
1808
- statusLastUpdated?: string;
1809
- startedTime?: string;
1810
- completedTime?: string;
1811
- dueDate?: string;
1812
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
1813
- manuallyCreated?: boolean;
1814
- automationConfig?: /* Configuration for automation execution to run */ AutomationConfig;
1815
- journey?: StepJourney;
1816
- /**
1817
- * Taxonomy ids (purposes in this case) that are associated with this step/task and used for filtering
1818
- */
1819
- taxonomies?: string[];
1820
- }
1821
- /**
1822
- * The user id
1823
- */
1824
- export type UserId = string;
1825
- /**
1826
- * Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.
1827
- */
1828
- export interface VariableAssignment {
1829
- /**
1830
- * The variable expression, e.g., "{{entity.owner}}"
1831
- * example:
1832
- * {{entity.owner}}
1833
- */
1834
- variable: string;
1835
- /**
1836
- * The resolved values after variable evaluation (populated during execution)
1837
- * example:
1838
- * [
1839
- * "user_12345"
1840
- * ]
1841
- */
1842
- value?: string[];
1843
- }
1844
- export interface WorkflowContext {
1845
- id: string;
1846
- title: string;
1847
- schema: string;
1848
- }
1849
- /**
1850
- * example:
1851
- * {
1852
- * "id": "8gja72h6kas6h",
1853
- * "name": "Lead Qualification",
1854
- * "trigger": "MANUAL",
1855
- * "status": "STARTED",
1856
- * "creationTime": "2021-04-27T12:01:13.000Z",
1857
- * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
1858
- * "dueDate": "2021-04-27T12:01:13.000Z",
1859
- * "assignedTo": [
1860
- * "252",
1861
- * "29052"
1862
- * ],
1863
- * "flow": [
1864
- * {
1865
- * "id": "sectionId1",
1866
- * "name": "Initial Information Gathering",
1867
- * "steps": [
1868
- * {
1869
- * "id": "sada5641f3a21",
1870
- * "name": "Call client and confirm address and product",
1871
- * "definitionId": "step_definition_id_1",
1872
- * "status": "ASSIGNED",
1873
- * "assignedTo": [
1874
- * "11"
1875
- * ]
1876
- * },
1877
- * {
1878
- * "id": "sada5641f3a22",
1879
- * "name": "Check product availability",
1880
- * "status": "UNASSIGNED",
1881
- * "definitionId": "step_definition_id_2"
1882
- * },
1883
- * {
1884
- * "id": "sada5641f3a23",
1885
- * "name": "Send email confirming contact with the client",
1886
- * "definitionId": "step_definition_id_3",
1887
- * "status": "SKIPPED"
1888
- * }
1889
- * ]
1890
- * },
1891
- * {
1892
- * "id": "firstLevelStepId1",
1893
- * "definitionId": "step_definition_id_4",
1894
- * "name": "Print and send catalog",
1895
- * "status": "SKIPPED",
1896
- * "dueDate": "2023-01-15T20:00:00"
1897
- * }
1898
- * ]
1899
- * }
1900
- */
1901
- export interface WorkflowExecution {
1902
- id?: string;
1903
- definitionId?: string;
1904
- orgId?: string;
1905
- name?: string;
1906
- /**
1907
- * Creation timestamp which will double as started time as well
1908
- */
1909
- creationTime?: string;
1910
- /**
1911
- * Last Update timestamp
1912
- */
1913
- lastUpdateTime?: string;
1914
- /**
1915
- * Due date for finishing the workflow
1916
- */
1917
- dueDate?: string;
1918
- /**
1919
- * Completed time of the workflow execution
1920
- */
1921
- completedTime?: string;
1922
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
1923
- status?: WorkflowStatus;
1924
- trigger?: TriggerType;
1925
- assignedTo?: string[];
1926
- /**
1927
- * Id of the user who closed workflow
1928
- */
1929
- lastModifiedBy?: string;
1930
- contexts?: WorkflowContext[];
1931
- nextOpenStep?: StepId;
1932
- configuredClosingReasonSnapshot?: ClosingReason[];
1933
- selectedClosingReasons?: ClosingReason[];
1934
- closingReasonDescription?: string;
1935
- /**
1936
- * Indicates whether this workflow is available for End Customer Portal or not. By default it's not.
1937
- */
1938
- enableECPWorkflow?: boolean;
1939
- updateEntityAttributes?: UpdateEntityAttributes[];
1940
- /**
1941
- * Version of the workflow execution.
1942
- */
1943
- version?: number;
1944
- /**
1945
- * Taxonomy ids (both Labels and Purposes) that are associated with this workflow and used for filtering
1946
- */
1947
- taxonomies?: string[];
1948
- /**
1949
- * Indicates whether only a single closing reason can be selected when closing the workflow execution
1950
- */
1951
- singleClosingReasonSelection?: boolean;
1952
- flow: (/* A group of Steps that define the progress of the Workflow */ Section | Step)[];
1953
- }
1954
- export interface WorkflowExecutionBase {
1955
- id?: string;
1956
- definitionId?: string;
1957
- orgId?: string;
1958
- name?: string;
1959
- /**
1960
- * Creation timestamp which will double as started time as well
1961
- */
1962
- creationTime?: string;
1963
- /**
1964
- * Last Update timestamp
1965
- */
1966
- lastUpdateTime?: string;
1967
- /**
1968
- * Due date for finishing the workflow
1969
- */
1970
- dueDate?: string;
1971
- /**
1972
- * Completed time of the workflow execution
1973
- */
1974
- completedTime?: string;
1975
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
1976
- status?: WorkflowStatus;
1977
- trigger?: TriggerType;
1978
- assignedTo?: string[];
1979
- /**
1980
- * Id of the user who closed workflow
1981
- */
1982
- lastModifiedBy?: string;
1983
- contexts?: WorkflowContext[];
1984
- nextOpenStep?: StepId;
1985
- configuredClosingReasonSnapshot?: ClosingReason[];
1986
- selectedClosingReasons?: ClosingReason[];
1987
- closingReasonDescription?: string;
1988
- /**
1989
- * Indicates whether this workflow is available for End Customer Portal or not. By default it's not.
1990
- */
1991
- enableECPWorkflow?: boolean;
1992
- updateEntityAttributes?: UpdateEntityAttributes[];
1993
- /**
1994
- * Version of the workflow execution.
1995
- */
1996
- version?: number;
1997
- /**
1998
- * Taxonomy ids (both Labels and Purposes) that are associated with this workflow and used for filtering
1999
- */
2000
- taxonomies?: string[];
2001
- /**
2002
- * Indicates whether only a single closing reason can be selected when closing the workflow execution
2003
- */
2004
- singleClosingReasonSelection?: boolean;
2005
- }
2006
- /**
2007
- * example:
2008
- * {
2009
- * "workflowId": "j3f23fh23uif98",
2010
- * "trigger": "AUTOMATIC",
2011
- * "contexts": [
2012
- * {
2013
- * "id": "3fa3fa86-0907-4642-a57e-0fe30a19874d",
2014
- * "schema": "contact"
2015
- * },
2016
- * {
2017
- * "id": "3a6d42fa-5070-4723-b90f-41ead4303e33",
2018
- * "schema": "opportunity"
2019
- * }
2020
- * ]
2021
- * }
2022
- */
2023
- export interface WorkflowExecutionCreateReq {
2024
- workflowId: string;
2025
- trigger?: TriggerType;
2026
- assignedTo?: string[];
2027
- contexts?: WorkflowContext[];
2028
- /**
2029
- * An array of purposes to filter workflow phases.
2030
- */
2031
- purposes?: string[];
2032
- }
2033
- /**
2034
- * example:
2035
- * {
2036
- * "id": "8gja72h6kas6h",
2037
- * "name": "Lead Qualification",
2038
- * "trigger": "MANUAL",
2039
- * "status": "STARTED",
2040
- * "creationTime": "2021-04-27T12:01:13.000Z",
2041
- * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
2042
- * "dueDate": "2021-04-27T12:01:13.000Z",
2043
- * "flow": [
2044
- * {
2045
- * "id": "sectionId1",
2046
- * "definitionId": "section_definition_id_1",
2047
- * "name": "Initial Information Gathering",
2048
- * "type": "SECTION",
2049
- * "steps": [
2050
- * {
2051
- * "id": "sada5641f3a21",
2052
- * "definitionId": "step_definition_id_1",
2053
- * "name": "Call client"
2054
- * },
2055
- * {
2056
- * "id": "sada5641f3a22",
2057
- * "definitionId": "step_definition_id_2",
2058
- * "name": "Check product availability"
2059
- * },
2060
- * {
2061
- * "id": "sada5641f3a23",
2062
- * "definitionId": "step_definition_id_3",
2063
- * "name": "Send email confirming contact with the client"
2064
- * }
2065
- * ]
2066
- * },
2067
- * {
2068
- * "id": "firstLevelStepId1",
2069
- * "definitionId": "step_definition_id_4",
2070
- * "name": "Print and send catalog",
2071
- * "type": "STEP"
2072
- * }
2073
- * ]
2074
- * }
2075
- */
2076
- export interface WorkflowExecutionSlim {
2077
- id?: string;
2078
- definitionId?: string;
2079
- orgId?: string;
2080
- name?: string;
2081
- /**
2082
- * Creation timestamp which will double as started time as well
2083
- */
2084
- creationTime?: string;
2085
- /**
2086
- * Last Update timestamp
2087
- */
2088
- lastUpdateTime?: string;
2089
- /**
2090
- * Due date for finishing the workflow
2091
- */
2092
- dueDate?: string;
2093
- /**
2094
- * Completed time of the workflow execution
2095
- */
2096
- completedTime?: string;
2097
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
2098
- status?: WorkflowStatus;
2099
- trigger?: TriggerType;
2100
- assignedTo?: string[];
2101
- /**
2102
- * Id of the user who closed workflow
2103
- */
2104
- lastModifiedBy?: string;
2105
- contexts?: WorkflowContext[];
2106
- nextOpenStep?: StepId;
2107
- configuredClosingReasonSnapshot?: ClosingReason[];
2108
- selectedClosingReasons?: ClosingReason[];
2109
- closingReasonDescription?: string;
2110
- /**
2111
- * Indicates whether this workflow is available for End Customer Portal or not. By default it's not.
2112
- */
2113
- enableECPWorkflow?: boolean;
2114
- updateEntityAttributes?: UpdateEntityAttributes[];
2115
- /**
2116
- * Version of the workflow execution.
2117
- */
2118
- version?: number;
2119
- /**
2120
- * Taxonomy ids (both Labels and Purposes) that are associated with this workflow and used for filtering
2121
- */
2122
- taxonomies?: string[];
2123
- /**
2124
- * Indicates whether only a single closing reason can be selected when closing the workflow execution
2125
- */
2126
- singleClosingReasonSelection?: boolean;
2127
- flow: (/* A group of Steps that define the progress of the Workflow */ Section | Step)[];
2128
- }
2129
- export interface WorkflowExecutionUpdateReq {
2130
- status?: WorkflowStatus;
2131
- assignedTo?: string[];
2132
- selectedClosingReasons?: ClosingReason[];
2133
- closingReasonDescription?: string;
2134
- dueDate?: string;
2135
- dynamicDueDate?: /* set a Duedate for a step then a specific */ DynamicDueDate;
2136
- /**
2137
- * id of the user / partner user who is closing the workflow. For partner pass orgId_userId.
2138
- */
2139
- closedBy?: string;
2140
- contexts?: WorkflowContext[];
2141
- /**
2142
- * Completed time of the workflow execution
2143
- */
2144
- completedTime?: string;
2145
- }
2146
- export interface WorkflowInEntity {
2147
- id?: string;
2148
- definition_id?: string;
2149
- name?: string;
2150
- status?: WorkflowStatus;
2151
- assignees?: string[];
2152
- duedate?: string; // date-time
2153
- last_update_time?: string; // date-time
2154
- progress?: number;
2155
- upcoming_tasks_assignees?: string[];
2156
- task_id?: string;
2157
- task_name?: string;
2158
- task_assignees?: string[];
2159
- task_duedate?: string; // date-time
2160
- task_execution_type?: StepType;
2161
- task_status?: /**
2162
- * **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
2163
- * - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
2164
- * - **ASSIGNED**: Step has been assigned to one or more users (deprecated - use PENDING instead)
2165
- * - **PENDING**: Step/Task is waiting to be started by assigned users or is ready for execution
2166
- * - **IN_PROGRESS**: Step/Task is currently being worked on by a user
2167
- * - **COMPLETED**: Step/Task has been finished successfully
2168
- * - **SKIPPED**: Step/Task was intentionally bypassed and will not be executed
2169
- * - **SCHEDULED**: Task is scheduled to run at a specific time in the future
2170
- * - **CONDITION_PENDING**: Task is waiting for certain conditions to be met before it can proceed
2171
- * - **WAITING_FOR_CONFIRMATION**: Step/Task is paused and waiting for user confirmation via an external input (e.g., link in email) before proceeding.
2172
- * - **ON_HOLD**: Step/Task is temporarily paused and cannot proceed until manually resumed
2173
- * - **FAILED**: Task encountered an error and could not be completed. Mainly for automation tasks.
2174
- *
2175
- */
2176
- StepStatus;
2177
- phase_id?: string;
2178
- phase_name?: string;
2179
- phase_assignees?: string[];
2180
- phase_progress?: number;
2181
- phases_in_progress?: PhaseInEntity[];
2182
- selected_closing_reasons?: ClosingReason[];
2183
- closing_reason_description?: string;
2184
- }
2185
- export type WorkflowStatus = "STARTED" | "DONE" | "CLOSED";
2186
- }
2187
- }
2188
- declare namespace Paths {
2189
- namespace AddTask {
2190
- namespace Parameters {
2191
- export type ExecutionId = string;
2192
- }
2193
- export interface PathParameters {
2194
- execution_id: Parameters.ExecutionId;
2195
- }
2196
- export type RequestBody = Components.Schemas.AddTaskReq;
2197
- namespace Responses {
2198
- export type $201 = Components.Schemas.Task;
2199
- export type $400 = /**
2200
- * Standard error response returned when an API request fails.
2201
- * Contains a human-readable message describing the error.
2202
- *
2203
- */
2204
- Components.Schemas.ErrorResp;
2205
- export type $401 = /**
2206
- * Standard error response returned when an API request fails.
2207
- * Contains a human-readable message describing the error.
2208
- *
2209
- */
2210
- Components.Schemas.ErrorResp;
2211
- export type $500 = /**
2212
- * Standard error response returned when an API request fails.
2213
- * Contains a human-readable message describing the error.
2214
- *
2215
- */
2216
- Components.Schemas.ErrorResp;
2217
- }
2218
- }
2219
- namespace CancelSchedule {
2220
- namespace Parameters {
2221
- export type ExecutionId = string;
2222
- export type ScheduleId = string;
2223
- }
2224
- export interface PathParameters {
2225
- execution_id: Parameters.ExecutionId;
2226
- schedule_id: Parameters.ScheduleId;
2227
- }
2228
- namespace Responses {
2229
- export interface $204 {
2230
- }
2231
- export type $400 = /**
2232
- * Standard error response returned when an API request fails.
2233
- * Contains a human-readable message describing the error.
2234
- *
2235
- */
2236
- Components.Schemas.ErrorResp;
2237
- export type $401 = /**
2238
- * Standard error response returned when an API request fails.
2239
- * Contains a human-readable message describing the error.
2240
- *
2241
- */
2242
- Components.Schemas.ErrorResp;
2243
- export type $404 = /**
2244
- * Standard error response returned when an API request fails.
2245
- * Contains a human-readable message describing the error.
2246
- *
2247
- */
2248
- Components.Schemas.ErrorResp;
2249
- export type $500 = /**
2250
- * Standard error response returned when an API request fails.
2251
- * Contains a human-readable message describing the error.
2252
- *
2253
- */
2254
- Components.Schemas.ErrorResp;
2255
- }
2256
- }
2257
- namespace CancelTaskSchedule {
2258
- namespace Parameters {
2259
- export type ExecutionId = string;
2260
- export type TaskId = string;
2261
- }
2262
- export interface PathParameters {
2263
- execution_id: Parameters.ExecutionId;
2264
- task_id: Parameters.TaskId;
2265
- }
2266
- namespace Responses {
2267
- export interface $204 {
2268
- }
2269
- export type $400 = /**
2270
- * Standard error response returned when an API request fails.
2271
- * Contains a human-readable message describing the error.
2272
- *
2273
- */
2274
- Components.Schemas.ErrorResp;
2275
- export type $401 = /**
2276
- * Standard error response returned when an API request fails.
2277
- * Contains a human-readable message describing the error.
2278
- *
2279
- */
2280
- Components.Schemas.ErrorResp;
2281
- export type $404 = /**
2282
- * Standard error response returned when an API request fails.
2283
- * Contains a human-readable message describing the error.
2284
- *
2285
- */
2286
- Components.Schemas.ErrorResp;
2287
- export type $500 = /**
2288
- * Standard error response returned when an API request fails.
2289
- * Contains a human-readable message describing the error.
2290
- *
2291
- */
2292
- Components.Schemas.ErrorResp;
2293
- }
2294
- }
2295
- namespace CreateExecution {
2296
- export type RequestBody = /**
2297
- * example:
2298
- * {
2299
- * "workflowId": "j3f23fh23uif98",
2300
- * "trigger": "AUTOMATIC",
2301
- * "contexts": [
2302
- * {
2303
- * "id": "3fa3fa86-0907-4642-a57e-0fe30a19874d",
2304
- * "schema": "contact"
2305
- * },
2306
- * {
2307
- * "id": "3a6d42fa-5070-4723-b90f-41ead4303e33",
2308
- * "schema": "opportunity"
2309
- * }
2310
- * ]
2311
- * }
2312
- */
2313
- Components.Schemas.WorkflowExecutionCreateReq;
2314
- namespace Responses {
2315
- export type $201 = /**
2316
- * example:
2317
- * {
2318
- * "id": "8gja72h6kas6h",
2319
- * "name": "Lead Qualification",
2320
- * "trigger": "MANUAL",
2321
- * "status": "STARTED",
2322
- * "creationTime": "2021-04-27T12:01:13.000Z",
2323
- * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
2324
- * "dueDate": "2021-04-27T12:01:13.000Z",
2325
- * "assignedTo": [
2326
- * "252",
2327
- * "29052"
2328
- * ],
2329
- * "flow": [
2330
- * {
2331
- * "id": "sectionId1",
2332
- * "name": "Initial Information Gathering",
2333
- * "steps": [
2334
- * {
2335
- * "id": "sada5641f3a21",
2336
- * "name": "Call client and confirm address and product",
2337
- * "definitionId": "step_definition_id_1",
2338
- * "status": "ASSIGNED",
2339
- * "assignedTo": [
2340
- * "11"
2341
- * ]
2342
- * },
2343
- * {
2344
- * "id": "sada5641f3a22",
2345
- * "name": "Check product availability",
2346
- * "status": "UNASSIGNED",
2347
- * "definitionId": "step_definition_id_2"
2348
- * },
2349
- * {
2350
- * "id": "sada5641f3a23",
2351
- * "name": "Send email confirming contact with the client",
2352
- * "definitionId": "step_definition_id_3",
2353
- * "status": "SKIPPED"
2354
- * }
2355
- * ]
2356
- * },
2357
- * {
2358
- * "id": "firstLevelStepId1",
2359
- * "definitionId": "step_definition_id_4",
2360
- * "name": "Print and send catalog",
2361
- * "status": "SKIPPED",
2362
- * "dueDate": "2023-01-15T20:00:00"
2363
- * }
2364
- * ]
2365
- * }
2366
- */
2367
- Components.Schemas.WorkflowExecution;
2368
- export type $400 = /**
2369
- * Standard error response returned when an API request fails.
2370
- * Contains a human-readable message describing the error.
2371
- *
2372
- */
2373
- Components.Schemas.ErrorResp;
2374
- export type $401 = /**
2375
- * Standard error response returned when an API request fails.
2376
- * Contains a human-readable message describing the error.
2377
- *
2378
- */
2379
- Components.Schemas.ErrorResp;
2380
- export type $500 = /**
2381
- * Standard error response returned when an API request fails.
2382
- * Contains a human-readable message describing the error.
2383
- *
2384
- */
2385
- Components.Schemas.ErrorResp;
2386
- }
2387
- }
2388
- namespace CreateStep {
2389
- namespace Parameters {
2390
- export type ExecutionId = string;
2391
- }
2392
- export interface PathParameters {
2393
- executionId: Parameters.ExecutionId;
2394
- }
2395
- export type RequestBody = Components.Schemas.CreateStepReq;
2396
- namespace Responses {
2397
- export type $201 = Components.Schemas.Step;
2398
- export type $400 = /**
2399
- * Standard error response returned when an API request fails.
2400
- * Contains a human-readable message describing the error.
2401
- *
2402
- */
2403
- Components.Schemas.ErrorResp;
2404
- export type $401 = /**
2405
- * Standard error response returned when an API request fails.
2406
- * Contains a human-readable message describing the error.
2407
- *
2408
- */
2409
- Components.Schemas.ErrorResp;
2410
- export type $500 = /**
2411
- * Standard error response returned when an API request fails.
2412
- * Contains a human-readable message describing the error.
2413
- *
2414
- */
2415
- Components.Schemas.ErrorResp;
2416
- }
2417
- }
2418
- namespace DeleteExecution {
2419
- namespace Parameters {
2420
- export type ExecutionId = string;
2421
- }
2422
- export interface PathParameters {
2423
- executionId: Parameters.ExecutionId;
2424
- }
2425
- namespace Responses {
2426
- export interface $204 {
2427
- }
2428
- export type $401 = /**
2429
- * Standard error response returned when an API request fails.
2430
- * Contains a human-readable message describing the error.
2431
- *
2432
- */
2433
- Components.Schemas.ErrorResp;
2434
- export interface $404 {
2435
- }
2436
- }
2437
- }
2438
- namespace DeleteFlowExecution {
2439
- namespace Parameters {
2440
- export type ExecutionId = string;
2441
- export type Soft = boolean;
2442
- }
2443
- export interface PathParameters {
2444
- execution_id: Parameters.ExecutionId;
2445
- }
2446
- export interface QueryParameters {
2447
- soft?: Parameters.Soft;
2448
- }
2449
- namespace Responses {
2450
- export interface $204 {
2451
- }
2452
- export interface $401 {
2453
- }
2454
- export interface $403 {
2455
- }
2456
- export interface $404 {
2457
- }
2458
- }
2459
- }
2460
- namespace DeleteStep {
2461
- namespace Parameters {
2462
- export type ExecutionId = string;
2463
- export type StepId = string;
2464
- }
2465
- export interface PathParameters {
2466
- executionId: Parameters.ExecutionId;
2467
- stepId: Parameters.StepId;
2468
- }
2469
- namespace Responses {
2470
- export interface $204 {
2471
- }
2472
- export type $500 = /**
2473
- * Standard error response returned when an API request fails.
2474
- * Contains a human-readable message describing the error.
2475
- *
2476
- */
2477
- Components.Schemas.ErrorResp;
2478
- }
2479
- }
2480
- namespace ExecuteTask {
2481
- namespace Parameters {
2482
- export type ExecutionId = string;
2483
- export type TaskId = string;
2484
- }
2485
- export interface PathParameters {
2486
- execution_id: Parameters.ExecutionId;
2487
- task_id: Parameters.TaskId;
2488
- }
2489
- namespace Responses {
2490
- export type $200 = Components.Schemas.Task;
2491
- export type $400 = /**
2492
- * Standard error response returned when an API request fails.
2493
- * Contains a human-readable message describing the error.
2494
- *
2495
- */
2496
- Components.Schemas.ErrorResp;
2497
- export type $401 = /**
2498
- * Standard error response returned when an API request fails.
2499
- * Contains a human-readable message describing the error.
2500
- *
2501
- */
2502
- Components.Schemas.ErrorResp;
2503
- export type $500 = /**
2504
- * Standard error response returned when an API request fails.
2505
- * Contains a human-readable message describing the error.
2506
- *
2507
- */
2508
- Components.Schemas.ErrorResp;
2509
- }
2510
- }
2511
- namespace GetClosingReasonExecution {
2512
- namespace Parameters {
2513
- export type ExecutionId = string;
2514
- }
2515
- export interface PathParameters {
2516
- executionId: Parameters.ExecutionId;
2517
- }
2518
- namespace Responses {
2519
- export type $200 = Components.Schemas.ClosingReasonResp;
2520
- export type $500 = /**
2521
- * Standard error response returned when an API request fails.
2522
- * Contains a human-readable message describing the error.
2523
- *
2524
- */
2525
- Components.Schemas.ErrorResp;
2526
- }
2527
- }
2528
- namespace GetExecution {
2529
- namespace Parameters {
2530
- export type ExecutionId = string;
2531
- }
2532
- export interface PathParameters {
2533
- executionId: Parameters.ExecutionId;
2534
- }
2535
- namespace Responses {
2536
- export type $200 = /**
2537
- * example:
2538
- * {
2539
- * "id": "8gja72h6kas6h",
2540
- * "name": "Lead Qualification",
2541
- * "trigger": "MANUAL",
2542
- * "status": "STARTED",
2543
- * "creationTime": "2021-04-27T12:01:13.000Z",
2544
- * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
2545
- * "dueDate": "2021-04-27T12:01:13.000Z",
2546
- * "assignedTo": [
2547
- * "252",
2548
- * "29052"
2549
- * ],
2550
- * "flow": [
2551
- * {
2552
- * "id": "sectionId1",
2553
- * "name": "Initial Information Gathering",
2554
- * "steps": [
2555
- * {
2556
- * "id": "sada5641f3a21",
2557
- * "name": "Call client and confirm address and product",
2558
- * "definitionId": "step_definition_id_1",
2559
- * "status": "ASSIGNED",
2560
- * "assignedTo": [
2561
- * "11"
2562
- * ]
2563
- * },
2564
- * {
2565
- * "id": "sada5641f3a22",
2566
- * "name": "Check product availability",
2567
- * "status": "UNASSIGNED",
2568
- * "definitionId": "step_definition_id_2"
2569
- * },
2570
- * {
2571
- * "id": "sada5641f3a23",
2572
- * "name": "Send email confirming contact with the client",
2573
- * "definitionId": "step_definition_id_3",
2574
- * "status": "SKIPPED"
2575
- * }
2576
- * ]
2577
- * },
2578
- * {
2579
- * "id": "firstLevelStepId1",
2580
- * "definitionId": "step_definition_id_4",
2581
- * "name": "Print and send catalog",
2582
- * "status": "SKIPPED",
2583
- * "dueDate": "2023-01-15T20:00:00"
2584
- * }
2585
- * ]
2586
- * }
2587
- */
2588
- Components.Schemas.WorkflowExecution;
2589
- export type $500 = /**
2590
- * Standard error response returned when an API request fails.
2591
- * Contains a human-readable message describing the error.
2592
- *
2593
- */
2594
- Components.Schemas.ErrorResp;
2595
- }
2596
- }
2597
- namespace GetExecutions {
2598
- namespace Parameters {
2599
- export type Context = string;
2600
- export type Schema = string;
2601
- }
2602
- export interface QueryParameters {
2603
- context?: Parameters.Context;
2604
- schema?: Parameters.Schema;
2605
- }
2606
- namespace Responses {
2607
- export type $200 = /**
2608
- * example:
2609
- * {
2610
- * "id": "8gja72h6kas6h",
2611
- * "name": "Lead Qualification",
2612
- * "trigger": "MANUAL",
2613
- * "status": "STARTED",
2614
- * "creationTime": "2021-04-27T12:01:13.000Z",
2615
- * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
2616
- * "dueDate": "2021-04-27T12:01:13.000Z",
2617
- * "flow": [
2618
- * {
2619
- * "id": "sectionId1",
2620
- * "definitionId": "section_definition_id_1",
2621
- * "name": "Initial Information Gathering",
2622
- * "type": "SECTION",
2623
- * "steps": [
2624
- * {
2625
- * "id": "sada5641f3a21",
2626
- * "definitionId": "step_definition_id_1",
2627
- * "name": "Call client"
2628
- * },
2629
- * {
2630
- * "id": "sada5641f3a22",
2631
- * "definitionId": "step_definition_id_2",
2632
- * "name": "Check product availability"
2633
- * },
2634
- * {
2635
- * "id": "sada5641f3a23",
2636
- * "definitionId": "step_definition_id_3",
2637
- * "name": "Send email confirming contact with the client"
2638
- * }
2639
- * ]
2640
- * },
2641
- * {
2642
- * "id": "firstLevelStepId1",
2643
- * "definitionId": "step_definition_id_4",
2644
- * "name": "Print and send catalog",
2645
- * "type": "STEP"
2646
- * }
2647
- * ]
2648
- * }
2649
- */
2650
- Components.Schemas.WorkflowExecutionSlim[];
2651
- export type $500 = /**
2652
- * Standard error response returned when an API request fails.
2653
- * Contains a human-readable message describing the error.
2654
- *
2655
- */
2656
- Components.Schemas.ErrorResp;
2657
- }
2658
- }
2659
- namespace GetFlowExecution {
2660
- namespace Parameters {
2661
- export type ExecutionId = string;
2662
- }
2663
- export interface PathParameters {
2664
- execution_id: Parameters.ExecutionId;
2665
- }
2666
- namespace Responses {
2667
- export type $200 = Components.Schemas.FlowExecution;
2668
- export interface $401 {
2669
- }
2670
- export interface $403 {
2671
- }
2672
- export interface $404 {
2673
- }
2674
- }
2675
- }
2676
- namespace PatchFlowExecution {
2677
- namespace Parameters {
2678
- export type ExecutionId = string;
2679
- }
2680
- export interface PathParameters {
2681
- execution_id: Parameters.ExecutionId;
2682
- }
2683
- export type RequestBody = Components.Schemas.PatchFlowReq;
2684
- namespace Responses {
2685
- export type $200 = Components.Schemas.FlowExecution;
2686
- export interface $401 {
2687
- }
2688
- export interface $403 {
2689
- }
2690
- export interface $404 {
2691
- }
2692
- export type $500 = /**
2693
- * Standard error response returned when an API request fails.
2694
- * Contains a human-readable message describing the error.
2695
- *
2696
- */
2697
- Components.Schemas.ErrorResp;
2698
- }
2699
- }
2700
- namespace PatchPhase {
2701
- namespace Parameters {
2702
- export type ExecutionId = string;
2703
- export type PhaseId = string;
2704
- }
2705
- export interface PathParameters {
2706
- execution_id: Parameters.ExecutionId;
2707
- phase_id: Parameters.PhaseId;
2708
- }
2709
- export type RequestBody = Components.Schemas.PatchPhaseReq;
2710
- namespace Responses {
2711
- export type $200 = Components.Schemas.Phase;
2712
- export type $400 = /**
2713
- * Standard error response returned when an API request fails.
2714
- * Contains a human-readable message describing the error.
2715
- *
2716
- */
2717
- Components.Schemas.ErrorResp;
2718
- export type $401 = /**
2719
- * Standard error response returned when an API request fails.
2720
- * Contains a human-readable message describing the error.
2721
- *
2722
- */
2723
- Components.Schemas.ErrorResp;
2724
- export type $500 = /**
2725
- * Standard error response returned when an API request fails.
2726
- * Contains a human-readable message describing the error.
2727
- *
2728
- */
2729
- Components.Schemas.ErrorResp;
2730
- }
2731
- }
2732
- namespace PatchTask {
2733
- namespace Parameters {
2734
- export type ExecutionId = string;
2735
- export type TaskId = string;
2736
- }
2737
- export interface PathParameters {
2738
- execution_id: Parameters.ExecutionId;
2739
- task_id: Parameters.TaskId;
2740
- }
2741
- export type RequestBody = /**
2742
- * Request payload for updating a task within a flow execution.
2743
- * All fields are optional; only provided fields will be updated.
2744
- *
2745
- */
2746
- Components.Schemas.PatchTaskReq;
2747
- namespace Responses {
2748
- export type $200 = Components.Schemas.Task;
2749
- export type $400 = /**
2750
- * Standard error response returned when an API request fails.
2751
- * Contains a human-readable message describing the error.
2752
- *
2753
- */
2754
- Components.Schemas.ErrorResp;
2755
- export type $401 = /**
2756
- * Standard error response returned when an API request fails.
2757
- * Contains a human-readable message describing the error.
2758
- *
2759
- */
2760
- Components.Schemas.ErrorResp;
2761
- export type $404 = /**
2762
- * Standard error response returned when an API request fails.
2763
- * Contains a human-readable message describing the error.
2764
- *
2765
- */
2766
- Components.Schemas.ErrorResp;
2767
- export type $500 = /**
2768
- * Standard error response returned when an API request fails.
2769
- * Contains a human-readable message describing the error.
2770
- *
2771
- */
2772
- Components.Schemas.ErrorResp;
2773
- }
2774
- }
2775
- namespace ReconcileAutomationTask {
2776
- namespace Parameters {
2777
- export type ExecutionId = string;
2778
- export type TaskId = string;
2779
- }
2780
- export interface PathParameters {
2781
- execution_id: Parameters.ExecutionId;
2782
- task_id: Parameters.TaskId;
2783
- }
2784
- namespace Responses {
2785
- export type $200 = Components.Schemas.FlowExecution;
2786
- export type $400 = /**
2787
- * Standard error response returned when an API request fails.
2788
- * Contains a human-readable message describing the error.
2789
- *
2790
- */
2791
- Components.Schemas.ErrorResp;
2792
- export type $401 = /**
2793
- * Standard error response returned when an API request fails.
2794
- * Contains a human-readable message describing the error.
2795
- *
2796
- */
2797
- Components.Schemas.ErrorResp;
2798
- export type $403 = /**
2799
- * Standard error response returned when an API request fails.
2800
- * Contains a human-readable message describing the error.
2801
- *
2802
- */
2803
- Components.Schemas.ErrorResp;
2804
- export type $404 = /**
2805
- * Standard error response returned when an API request fails.
2806
- * Contains a human-readable message describing the error.
2807
- *
2808
- */
2809
- Components.Schemas.ErrorResp;
2810
- export type $500 = /**
2811
- * Standard error response returned when an API request fails.
2812
- * Contains a human-readable message describing the error.
2813
- *
2814
- */
2815
- Components.Schemas.ErrorResp;
2816
- }
2817
- }
2818
- namespace RunTaskAutomation {
2819
- namespace Parameters {
2820
- export type ExecutionId = string;
2821
- export type TaskId = string;
2822
- }
2823
- export interface PathParameters {
2824
- execution_id: Parameters.ExecutionId;
2825
- task_id: Parameters.TaskId;
2826
- }
2827
- namespace Responses {
2828
- export type $200 = Components.Schemas.AutomationTask;
2829
- export type $400 = /**
2830
- * Standard error response returned when an API request fails.
2831
- * Contains a human-readable message describing the error.
2832
- *
2833
- */
2834
- Components.Schemas.ErrorResp;
2835
- export type $401 = /**
2836
- * Standard error response returned when an API request fails.
2837
- * Contains a human-readable message describing the error.
2838
- *
2839
- */
2840
- Components.Schemas.ErrorResp;
2841
- export type $500 = /**
2842
- * Standard error response returned when an API request fails.
2843
- * Contains a human-readable message describing the error.
2844
- *
2845
- */
2846
- Components.Schemas.ErrorResp;
2847
- }
2848
- }
2849
- namespace RunTaskScheduleNow {
2850
- namespace Parameters {
2851
- export type ExecutionId = string;
2852
- export type TaskId = string;
2853
- }
2854
- export interface PathParameters {
2855
- execution_id: Parameters.ExecutionId;
2856
- task_id: Parameters.TaskId;
2857
- }
2858
- namespace Responses {
2859
- export type $200 = Components.Schemas.Task;
2860
- export type $400 = /**
2861
- * Standard error response returned when an API request fails.
2862
- * Contains a human-readable message describing the error.
2863
- *
2864
- */
2865
- Components.Schemas.ErrorResp;
2866
- export type $401 = /**
2867
- * Standard error response returned when an API request fails.
2868
- * Contains a human-readable message describing the error.
2869
- *
2870
- */
2871
- Components.Schemas.ErrorResp;
2872
- export type $404 = /**
2873
- * Standard error response returned when an API request fails.
2874
- * Contains a human-readable message describing the error.
2875
- *
2876
- */
2877
- Components.Schemas.ErrorResp;
2878
- export type $500 = /**
2879
- * Standard error response returned when an API request fails.
2880
- * Contains a human-readable message describing the error.
2881
- *
2882
- */
2883
- Components.Schemas.ErrorResp;
2884
- }
2885
- }
2886
- namespace SearchExecutions {
2887
- export type RequestBody = Components.Schemas.SearchExecutionsReq;
2888
- namespace Responses {
2889
- export type $200 = Components.Schemas.SearchExecutionsResp;
2890
- export type $400 = /**
2891
- * Standard error response returned when an API request fails.
2892
- * Contains a human-readable message describing the error.
2893
- *
2894
- */
2895
- Components.Schemas.ErrorResp;
2896
- export type $401 = /**
2897
- * Standard error response returned when an API request fails.
2898
- * Contains a human-readable message describing the error.
2899
- *
2900
- */
2901
- Components.Schemas.ErrorResp;
2902
- export type $500 = /**
2903
- * Standard error response returned when an API request fails.
2904
- * Contains a human-readable message describing the error.
2905
- *
2906
- */
2907
- Components.Schemas.ErrorResp;
2908
- }
2909
- }
2910
- namespace SearchFlowExecutions {
2911
- export type RequestBody = Components.Schemas.SearchFlowsReq;
2912
- namespace Responses {
2913
- export interface $200 {
2914
- results?: Components.Schemas.FlowExecution[];
2915
- }
2916
- export type $400 = /**
2917
- * Standard error response returned when an API request fails.
2918
- * Contains a human-readable message describing the error.
2919
- *
2920
- */
2921
- Components.Schemas.ErrorResp;
2922
- export interface $401 {
2923
- }
2924
- export interface $403 {
2925
- }
2926
- export type $500 = /**
2927
- * Standard error response returned when an API request fails.
2928
- * Contains a human-readable message describing the error.
2929
- *
2930
- */
2931
- Components.Schemas.ErrorResp;
2932
- }
2933
- }
2934
- namespace SearchSteps {
2935
- export type RequestBody = Components.Schemas.SearchStepsReq;
2936
- namespace Responses {
2937
- export type $200 = Components.Schemas.SearchStepsResp;
2938
- export type $400 = /**
2939
- * Standard error response returned when an API request fails.
2940
- * Contains a human-readable message describing the error.
2941
- *
2942
- */
2943
- Components.Schemas.ErrorResp;
2944
- export type $401 = /**
2945
- * Standard error response returned when an API request fails.
2946
- * Contains a human-readable message describing the error.
2947
- *
2948
- */
2949
- Components.Schemas.ErrorResp;
2950
- export type $500 = /**
2951
- * Standard error response returned when an API request fails.
2952
- * Contains a human-readable message describing the error.
2953
- *
2954
- */
2955
- Components.Schemas.ErrorResp;
2956
- }
2957
- }
2958
- namespace StartFlowExecution {
2959
- export type RequestBody = /**
2960
- * Request payload for starting a new flow execution from a template.
2961
- *
2962
- */
2963
- Components.Schemas.StartFlowReq;
2964
- namespace Responses {
2965
- export type $201 = Components.Schemas.FlowExecution;
2966
- export type $400 = /**
2967
- * Standard error response returned when an API request fails.
2968
- * Contains a human-readable message describing the error.
2969
- *
2970
- */
2971
- Components.Schemas.ErrorResp;
2972
- export type $401 = /**
2973
- * Standard error response returned when an API request fails.
2974
- * Contains a human-readable message describing the error.
2975
- *
2976
- */
2977
- Components.Schemas.ErrorResp;
2978
- export type $403 = /**
2979
- * Standard error response returned when an API request fails.
2980
- * Contains a human-readable message describing the error.
2981
- *
2982
- */
2983
- Components.Schemas.ErrorResp;
2984
- export type $500 = /**
2985
- * Standard error response returned when an API request fails.
2986
- * Contains a human-readable message describing the error.
2987
- *
2988
- */
2989
- Components.Schemas.ErrorResp;
2990
- }
2991
- }
2992
- namespace UpdateExecution {
2993
- namespace Parameters {
2994
- export type ExecutionId = string;
2995
- }
2996
- export interface PathParameters {
2997
- executionId: Parameters.ExecutionId;
2998
- }
2999
- export type RequestBody = Components.Schemas.WorkflowExecutionUpdateReq;
3000
- namespace Responses {
3001
- export interface $204 {
3002
- }
3003
- export type $500 = /**
3004
- * Standard error response returned when an API request fails.
3005
- * Contains a human-readable message describing the error.
3006
- *
3007
- */
3008
- Components.Schemas.ErrorResp;
3009
- }
3010
- }
3011
- namespace UpdateStep {
3012
- namespace Parameters {
3013
- export type ExecutionId = string;
3014
- export type StepId = string;
3015
- }
3016
- export interface PathParameters {
3017
- executionId: Parameters.ExecutionId;
3018
- stepId: Parameters.StepId;
3019
- }
3020
- export type RequestBody = Components.Schemas.UpdateStepReq;
3021
- namespace Responses {
3022
- export type $200 = Components.Schemas.Step;
3023
- export type $400 = /**
3024
- * Standard error response returned when an API request fails.
3025
- * Contains a human-readable message describing the error.
3026
- *
3027
- */
3028
- Components.Schemas.ErrorResp;
3029
- export type $401 = /**
3030
- * Standard error response returned when an API request fails.
3031
- * Contains a human-readable message describing the error.
3032
- *
3033
- */
3034
- Components.Schemas.ErrorResp;
3035
- export type $500 = /**
3036
- * Standard error response returned when an API request fails.
3037
- * Contains a human-readable message describing the error.
3038
- *
3039
- */
3040
- Components.Schemas.ErrorResp;
3041
- }
3042
- }
3043
- }
3044
-
3045
-
3046
- interface OperationMethods {
3047
- /**
3048
- * getExecutions - getExecutions
3049
- *
3050
- * Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are more light weight - steps are not loaded with all information.
3051
- */
3052
- 'getExecutions'(
3053
- parameters?: Parameters<Paths.GetExecutions.QueryParameters> | null,
3054
- data?: any,
3055
- config?: AxiosRequestConfig
3056
- ): OperationResponse<Paths.GetExecutions.Responses.$200>
3057
- /**
3058
- * createExecution - createExecution
3059
- *
3060
- * Creates a new V1 Workflow Execution from a workflow definition (template).
3061
- *
3062
- * **Note:** This is the legacy V1 API. For new integrations, use `POST /v2/flows/executions` instead.
3063
- *
3064
- * The workflow definition specifies the structure (sections and steps) of the workflow.
3065
- * When created, the execution instantiates all steps and begins tracking progress.
3066
- *
3067
- */
3068
- 'createExecution'(
3069
- parameters?: Parameters<UnknownParamsObject> | null,
3070
- data?: Paths.CreateExecution.RequestBody,
3071
- config?: AxiosRequestConfig
3072
- ): OperationResponse<Paths.CreateExecution.Responses.$201>
3073
- /**
3074
- * getExecution - getExecution
3075
- *
3076
- * Retrieves a complete V1 workflow execution by ID, including all steps information.
3077
- *
3078
- * **Note:** This is the legacy V1 API. For new integrations, use `GET /v2/flows/executions/{execution_id}` instead.
3079
- *
3080
- */
3081
- 'getExecution'(
3082
- parameters?: Parameters<Paths.GetExecution.PathParameters> | null,
3083
- data?: any,
3084
- config?: AxiosRequestConfig
3085
- ): OperationResponse<Paths.GetExecution.Responses.$200>
3086
- /**
3087
- * updateExecution - updateExecution
3088
- *
3089
- * Patches updates like assignees, status, closingReason for a single Workflow Execution.
3090
- */
3091
- 'updateExecution'(
3092
- parameters?: Parameters<Paths.UpdateExecution.PathParameters> | null,
3093
- data?: Paths.UpdateExecution.RequestBody,
3094
- config?: AxiosRequestConfig
3095
- ): OperationResponse<Paths.UpdateExecution.Responses.$204>
3096
- /**
3097
- * deleteExecution - deleteExecution
3098
- *
3099
- * Delete workflow execution by id. Workflow contexts will NOT be deleted.
3100
- */
3101
- 'deleteExecution'(
3102
- parameters?: Parameters<Paths.DeleteExecution.PathParameters> | null,
3103
- data?: any,
3104
- config?: AxiosRequestConfig
3105
- ): OperationResponse<Paths.DeleteExecution.Responses.$204>
3106
- /**
3107
- * createStep - createStep
3108
- *
3109
- * Create a new step in current workflow execution.
3110
- */
3111
- 'createStep'(
3112
- parameters?: Parameters<Paths.CreateStep.PathParameters> | null,
3113
- data?: Paths.CreateStep.RequestBody,
3114
- config?: AxiosRequestConfig
3115
- ): OperationResponse<Paths.CreateStep.Responses.$201>
3116
- /**
3117
- * updateStep - updateStep
3118
- *
3119
- * Updates a workflow execution step with new values for status, assignees, due date, position, and more.
3120
- *
3121
- * **Note:** This is the legacy V1 API. For new integrations, use `PATCH /v2/flows/executions/{execution_id}/tasks/{task_id}` instead.
3122
- *
3123
- * **Common use cases:**
3124
- * - Mark a step as completed or skipped
3125
- * - Assign or reassign users to a step
3126
- * - Update step due dates (static or dynamic)
3127
- * - Reorder steps within a section
3128
- *
3129
- */
3130
- 'updateStep'(
3131
- parameters?: Parameters<Paths.UpdateStep.PathParameters> | null,
3132
- data?: Paths.UpdateStep.RequestBody,
3133
- config?: AxiosRequestConfig
3134
- ): OperationResponse<Paths.UpdateStep.Responses.$200>
3135
- /**
3136
- * deleteStep - deleteStep
3137
- *
3138
- * Deletes a step from a workflow execution.
3139
- */
3140
- 'deleteStep'(
3141
- parameters?: Parameters<Paths.DeleteStep.PathParameters> | null,
3142
- data?: any,
3143
- config?: AxiosRequestConfig
3144
- ): OperationResponse<Paths.DeleteStep.Responses.$204>
3145
- /**
3146
- * searchExecutions - searchExecutions
3147
- *
3148
- * Search Workflow Executions by different filters.
3149
- */
3150
- 'searchExecutions'(
3151
- parameters?: Parameters<UnknownParamsObject> | null,
3152
- data?: Paths.SearchExecutions.RequestBody,
3153
- config?: AxiosRequestConfig
3154
- ): OperationResponse<Paths.SearchExecutions.Responses.$200>
3155
- /**
3156
- * searchSteps - searchSteps
3157
- *
3158
- * Search workflow execution steps by different filters.
3159
- */
3160
- 'searchSteps'(
3161
- parameters?: Parameters<UnknownParamsObject> | null,
3162
- data?: Paths.SearchSteps.RequestBody,
3163
- config?: AxiosRequestConfig
3164
- ): OperationResponse<Paths.SearchSteps.Responses.$200>
3165
- /**
3166
- * getClosingReasonExecution - getClosingReasonExecution
3167
- *
3168
- * Shows all Closing Reasons defined at the moment of starting the Workflow Execution.
3169
- * The Closing Reasons shown in the execution are just snapshots
3170
- * from the state of the Definition when the instance was created.
3171
- *
3172
- */
3173
- 'getClosingReasonExecution'(
3174
- parameters?: Parameters<Paths.GetClosingReasonExecution.PathParameters> | null,
3175
- data?: any,
3176
- config?: AxiosRequestConfig
3177
- ): OperationResponse<Paths.GetClosingReasonExecution.Responses.$200>
3178
- /**
3179
- * startFlowExecution - startFlowExecution
3180
- *
3181
- * Starts a new Flow Execution based on a flow template (definition).
3182
- *
3183
- * The flow template defines the structure of the workflow including phases, tasks, edges (transitions),
3184
- * and automation configurations. When started, the execution creates runtime instances of all tasks
3185
- * and begins processing from the initial task(s).
3186
- *
3187
- * **Required fields:**
3188
- * - `flow_template_id`: The ID of the flow template to instantiate
3189
- * - `contexts`: At least one entity context to link the execution to
3190
- *
3191
- * **Optional fields:**
3192
- * - `trigger`: Specifies how the execution was triggered (manual or automatic)
3193
- * - `purposes`: Filter which phases/tasks are included based on taxonomy purposes
3194
- *
3195
- */
3196
- 'startFlowExecution'(
3197
- parameters?: Parameters<UnknownParamsObject> | null,
3198
- data?: Paths.StartFlowExecution.RequestBody,
3199
- config?: AxiosRequestConfig
3200
- ): OperationResponse<Paths.StartFlowExecution.Responses.$201>
3201
- /**
3202
- * getFlowExecution - getFlowExecution
3203
- *
3204
- * Retrieves a complete flow execution by ID, including all phases, tasks, edges, contexts, and analytics.
3205
- *
3206
- * The response includes:
3207
- * - **Execution metadata**: ID, name, status, timestamps, assignees
3208
- * - **Phases**: Organizational groupings of tasks with progress tracking
3209
- * - **Tasks**: Individual work items with their status, assignees, and configurations
3210
- * - **Edges**: Connections between tasks defining the workflow graph
3211
- * - **Analytics**: Timing information (started, completed, closed timestamps)
3212
- * - **Contexts**: Linked entity references
3213
- *
3214
- */
3215
- 'getFlowExecution'(
3216
- parameters?: Parameters<Paths.GetFlowExecution.PathParameters> | null,
3217
- data?: any,
3218
- config?: AxiosRequestConfig
3219
- ): OperationResponse<Paths.GetFlowExecution.Responses.$200>
3220
- /**
3221
- * patchFlowExecution - patchFlowExecution
3222
- *
3223
- * Patch flow execution with new assignees, status, analytics & other changes.
3224
- */
3225
- 'patchFlowExecution'(
3226
- parameters?: Parameters<Paths.PatchFlowExecution.PathParameters> | null,
3227
- data?: Paths.PatchFlowExecution.RequestBody,
3228
- config?: AxiosRequestConfig
3229
- ): OperationResponse<Paths.PatchFlowExecution.Responses.$200>
3230
- /**
3231
- * deleteFlowExecution - deleteFlowExecution
3232
- *
3233
- * Deletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted.
3234
- */
3235
- 'deleteFlowExecution'(
3236
- parameters?: Parameters<Paths.DeleteFlowExecution.QueryParameters & Paths.DeleteFlowExecution.PathParameters> | null,
3237
- data?: any,
3238
- config?: AxiosRequestConfig
3239
- ): OperationResponse<Paths.DeleteFlowExecution.Responses.$204>
3240
- /**
3241
- * searchFlowExecutions - searchFlowExecutions
3242
- *
3243
- * Search Flow Executions for a specific Entity.
3244
- */
3245
- 'searchFlowExecutions'(
3246
- parameters?: Parameters<UnknownParamsObject> | null,
3247
- data?: Paths.SearchFlowExecutions.RequestBody,
3248
- config?: AxiosRequestConfig
3249
- ): OperationResponse<Paths.SearchFlowExecutions.Responses.$200>
3250
- /**
3251
- * patchTask - patchTask
3252
- *
3253
- * Updates attributes of a flow task including status, assignees, due date, and more.
3254
- *
3255
- * **Common use cases:**
3256
- * - Mark a task as completed or skipped
3257
- * - Assign or reassign users to a task
3258
- * - Update task due dates
3259
- * - Enable or disable a task
3260
- * - Revert execution to a previous task
3261
- *
3262
- * **Status transitions:**
3263
- * - `PENDING` -> `IN_PROGRESS`: User starts working on the task
3264
- * - `IN_PROGRESS` -> `COMPLETED`: User finishes the task
3265
- * - `PENDING` or `IN_PROGRESS` -> `SKIPPED`: Task is bypassed
3266
- * - `COMPLETED` or `SKIPPED` -> `PENDING`: Task is reopened (with revert_execution flag)
3267
- *
3268
- * **Reverting execution:**
3269
- * When updating a task that was already completed/skipped and comes before the current task,
3270
- * use `revert_execution: true` to reset the flow back to that point. All subsequent tasks
3271
- * will be reset to PENDING status.
3272
- *
3273
- */
3274
- 'patchTask'(
3275
- parameters?: Parameters<Paths.PatchTask.PathParameters> | null,
3276
- data?: Paths.PatchTask.RequestBody,
3277
- config?: AxiosRequestConfig
3278
- ): OperationResponse<Paths.PatchTask.Responses.$200>
3279
- /**
3280
- * runTaskAutomation - runTaskAutomation
3281
- *
3282
- * Runs configured automation for a flow task
3283
- */
3284
- 'runTaskAutomation'(
3285
- parameters?: Parameters<Paths.RunTaskAutomation.PathParameters> | null,
3286
- data?: any,
3287
- config?: AxiosRequestConfig
3288
- ): OperationResponse<Paths.RunTaskAutomation.Responses.$200>
3289
- /**
3290
- * executeTask - executeTask
3291
- *
3292
- * Executes any kind of flow task immediately.
3293
- */
3294
- 'executeTask'(
3295
- parameters?: Parameters<Paths.ExecuteTask.PathParameters> | null,
3296
- data?: any,
3297
- config?: AxiosRequestConfig
3298
- ): OperationResponse<Paths.ExecuteTask.Responses.$200>
3299
- /**
3300
- * patchPhase - patchPhase
3301
- *
3302
- * Apply updates to a phase within flow execution
3303
- */
3304
- 'patchPhase'(
3305
- parameters?: Parameters<Paths.PatchPhase.PathParameters> | null,
3306
- data?: Paths.PatchPhase.RequestBody,
3307
- config?: AxiosRequestConfig
3308
- ): OperationResponse<Paths.PatchPhase.Responses.$200>
3309
- /**
3310
- * addTask - addTask
3311
- *
3312
- * Create a new task in current workflow execution.
3313
- */
3314
- 'addTask'(
3315
- parameters?: Parameters<Paths.AddTask.PathParameters> | null,
3316
- data?: Paths.AddTask.RequestBody,
3317
- config?: AxiosRequestConfig
3318
- ): OperationResponse<Paths.AddTask.Responses.$201>
3319
- /**
3320
- * cancelTaskSchedule - cancelTaskSchedule
3321
- *
3322
- * Cancels a scheduled task, deleting the schedule and marking the task as skipped.
3323
- */
3324
- 'cancelTaskSchedule'(
3325
- parameters?: Parameters<Paths.CancelTaskSchedule.PathParameters> | null,
3326
- data?: any,
3327
- config?: AxiosRequestConfig
3328
- ): OperationResponse<Paths.CancelTaskSchedule.Responses.$204>
3329
- /**
3330
- * reconcileAutomationTask - reconcileAutomationTask
3331
- *
3332
- * Reconciles an automation task's status against its linked automation execution.
3333
- *
3334
- * Looks the task up by id (whether or not it is currently a `crt_task`),
3335
- * fetches its automation execution, and — if the automation has reached a
3336
- * terminal state (success/failed/skipped) — corrects the task's `status`,
3337
- * `automation_config` and `analytics` to match and persists them. If the
3338
- * task is the current task and the flow is still active, the flow is
3339
- * advanced; otherwise only the task record is corrected.
3340
- *
3341
- * Used by the "Refresh status" action to recover a task left `IN_PROGRESS`
3342
- * after a missed or clobbered completion event. No-op (returns the
3343
- * execution unchanged) when the task is already terminal or the automation
3344
- * is still running.
3345
- *
3346
- */
3347
- 'reconcileAutomationTask'(
3348
- parameters?: Parameters<Paths.ReconcileAutomationTask.PathParameters> | null,
3349
- data?: any,
3350
- config?: AxiosRequestConfig
3351
- ): OperationResponse<Paths.ReconcileAutomationTask.Responses.$200>
3352
- /**
3353
- * runTaskScheduleNow - runTaskScheduleNow
3354
- *
3355
- * Cancels the pending schedule for a task and immediately triggers its automation execution.
3356
- */
3357
- 'runTaskScheduleNow'(
3358
- parameters?: Parameters<Paths.RunTaskScheduleNow.PathParameters> | null,
3359
- data?: any,
3360
- config?: AxiosRequestConfig
3361
- ): OperationResponse<Paths.RunTaskScheduleNow.Responses.$200>
3362
- /**
3363
- * cancelSchedule - cancelSchedule
3364
- *
3365
- * Cancels a flow schedule, marking it as canceled.
3366
- *
3367
- * **Deprecated**: Use DELETE /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule instead.
3368
- *
3369
- */
3370
- 'cancelSchedule'(
3371
- parameters?: Parameters<Paths.CancelSchedule.PathParameters> | null,
3372
- data?: any,
3373
- config?: AxiosRequestConfig
3374
- ): OperationResponse<Paths.CancelSchedule.Responses.$204>
3375
- }
3376
-
3377
- interface PathsDictionary {
3378
- ['/v1/workflows/executions']: {
3379
- /**
3380
- * getExecutions - getExecutions
3381
- *
3382
- * Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are more light weight - steps are not loaded with all information.
3383
- */
3384
- 'get'(
3385
- parameters?: Parameters<Paths.GetExecutions.QueryParameters> | null,
3386
- data?: any,
3387
- config?: AxiosRequestConfig
3388
- ): OperationResponse<Paths.GetExecutions.Responses.$200>
3389
- /**
3390
- * createExecution - createExecution
3391
- *
3392
- * Creates a new V1 Workflow Execution from a workflow definition (template).
3393
- *
3394
- * **Note:** This is the legacy V1 API. For new integrations, use `POST /v2/flows/executions` instead.
3395
- *
3396
- * The workflow definition specifies the structure (sections and steps) of the workflow.
3397
- * When created, the execution instantiates all steps and begins tracking progress.
3398
- *
3399
- */
3400
- 'post'(
3401
- parameters?: Parameters<UnknownParamsObject> | null,
3402
- data?: Paths.CreateExecution.RequestBody,
3403
- config?: AxiosRequestConfig
3404
- ): OperationResponse<Paths.CreateExecution.Responses.$201>
3405
- }
3406
- ['/v1/workflows/executions/{executionId}']: {
3407
- /**
3408
- * getExecution - getExecution
3409
- *
3410
- * Retrieves a complete V1 workflow execution by ID, including all steps information.
3411
- *
3412
- * **Note:** This is the legacy V1 API. For new integrations, use `GET /v2/flows/executions/{execution_id}` instead.
3413
- *
3414
- */
3415
- 'get'(
3416
- parameters?: Parameters<Paths.GetExecution.PathParameters> | null,
3417
- data?: any,
3418
- config?: AxiosRequestConfig
3419
- ): OperationResponse<Paths.GetExecution.Responses.$200>
3420
- /**
3421
- * updateExecution - updateExecution
3422
- *
3423
- * Patches updates like assignees, status, closingReason for a single Workflow Execution.
3424
- */
3425
- 'patch'(
3426
- parameters?: Parameters<Paths.UpdateExecution.PathParameters> | null,
3427
- data?: Paths.UpdateExecution.RequestBody,
3428
- config?: AxiosRequestConfig
3429
- ): OperationResponse<Paths.UpdateExecution.Responses.$204>
3430
- /**
3431
- * deleteExecution - deleteExecution
3432
- *
3433
- * Delete workflow execution by id. Workflow contexts will NOT be deleted.
3434
- */
3435
- 'delete'(
3436
- parameters?: Parameters<Paths.DeleteExecution.PathParameters> | null,
3437
- data?: any,
3438
- config?: AxiosRequestConfig
3439
- ): OperationResponse<Paths.DeleteExecution.Responses.$204>
3440
- }
3441
- ['/v1/workflows/executions/{executionId}/steps']: {
3442
- /**
3443
- * createStep - createStep
3444
- *
3445
- * Create a new step in current workflow execution.
3446
- */
3447
- 'post'(
3448
- parameters?: Parameters<Paths.CreateStep.PathParameters> | null,
3449
- data?: Paths.CreateStep.RequestBody,
3450
- config?: AxiosRequestConfig
3451
- ): OperationResponse<Paths.CreateStep.Responses.$201>
3452
- }
3453
- ['/v1/workflows/executions/{executionId}/steps/{stepId}']: {
3454
- /**
3455
- * updateStep - updateStep
3456
- *
3457
- * Updates a workflow execution step with new values for status, assignees, due date, position, and more.
3458
- *
3459
- * **Note:** This is the legacy V1 API. For new integrations, use `PATCH /v2/flows/executions/{execution_id}/tasks/{task_id}` instead.
3460
- *
3461
- * **Common use cases:**
3462
- * - Mark a step as completed or skipped
3463
- * - Assign or reassign users to a step
3464
- * - Update step due dates (static or dynamic)
3465
- * - Reorder steps within a section
3466
- *
3467
- */
3468
- 'patch'(
3469
- parameters?: Parameters<Paths.UpdateStep.PathParameters> | null,
3470
- data?: Paths.UpdateStep.RequestBody,
3471
- config?: AxiosRequestConfig
3472
- ): OperationResponse<Paths.UpdateStep.Responses.$200>
3473
- /**
3474
- * deleteStep - deleteStep
3475
- *
3476
- * Deletes a step from a workflow execution.
3477
- */
3478
- 'delete'(
3479
- parameters?: Parameters<Paths.DeleteStep.PathParameters> | null,
3480
- data?: any,
3481
- config?: AxiosRequestConfig
3482
- ): OperationResponse<Paths.DeleteStep.Responses.$204>
3483
- }
3484
- ['/v1/workflows/executions/search']: {
3485
- /**
3486
- * searchExecutions - searchExecutions
3487
- *
3488
- * Search Workflow Executions by different filters.
3489
- */
3490
- 'post'(
3491
- parameters?: Parameters<UnknownParamsObject> | null,
3492
- data?: Paths.SearchExecutions.RequestBody,
3493
- config?: AxiosRequestConfig
3494
- ): OperationResponse<Paths.SearchExecutions.Responses.$200>
3495
- }
3496
- ['/v1/workflows/executions/steps/search']: {
3497
- /**
3498
- * searchSteps - searchSteps
3499
- *
3500
- * Search workflow execution steps by different filters.
3501
- */
3502
- 'post'(
3503
- parameters?: Parameters<UnknownParamsObject> | null,
3504
- data?: Paths.SearchSteps.RequestBody,
3505
- config?: AxiosRequestConfig
3506
- ): OperationResponse<Paths.SearchSteps.Responses.$200>
3507
- }
3508
- ['/v1/workflows/executions/{executionId}/closing-reasons']: {
3509
- /**
3510
- * getClosingReasonExecution - getClosingReasonExecution
3511
- *
3512
- * Shows all Closing Reasons defined at the moment of starting the Workflow Execution.
3513
- * The Closing Reasons shown in the execution are just snapshots
3514
- * from the state of the Definition when the instance was created.
3515
- *
3516
- */
3517
- 'get'(
3518
- parameters?: Parameters<Paths.GetClosingReasonExecution.PathParameters> | null,
3519
- data?: any,
3520
- config?: AxiosRequestConfig
3521
- ): OperationResponse<Paths.GetClosingReasonExecution.Responses.$200>
3522
- }
3523
- ['/v2/flows/executions']: {
3524
- /**
3525
- * startFlowExecution - startFlowExecution
3526
- *
3527
- * Starts a new Flow Execution based on a flow template (definition).
3528
- *
3529
- * The flow template defines the structure of the workflow including phases, tasks, edges (transitions),
3530
- * and automation configurations. When started, the execution creates runtime instances of all tasks
3531
- * and begins processing from the initial task(s).
3532
- *
3533
- * **Required fields:**
3534
- * - `flow_template_id`: The ID of the flow template to instantiate
3535
- * - `contexts`: At least one entity context to link the execution to
3536
- *
3537
- * **Optional fields:**
3538
- * - `trigger`: Specifies how the execution was triggered (manual or automatic)
3539
- * - `purposes`: Filter which phases/tasks are included based on taxonomy purposes
3540
- *
3541
- */
3542
- 'post'(
3543
- parameters?: Parameters<UnknownParamsObject> | null,
3544
- data?: Paths.StartFlowExecution.RequestBody,
3545
- config?: AxiosRequestConfig
3546
- ): OperationResponse<Paths.StartFlowExecution.Responses.$201>
3547
- }
3548
- ['/v2/flows/executions/{execution_id}']: {
3549
- /**
3550
- * getFlowExecution - getFlowExecution
3551
- *
3552
- * Retrieves a complete flow execution by ID, including all phases, tasks, edges, contexts, and analytics.
3553
- *
3554
- * The response includes:
3555
- * - **Execution metadata**: ID, name, status, timestamps, assignees
3556
- * - **Phases**: Organizational groupings of tasks with progress tracking
3557
- * - **Tasks**: Individual work items with their status, assignees, and configurations
3558
- * - **Edges**: Connections between tasks defining the workflow graph
3559
- * - **Analytics**: Timing information (started, completed, closed timestamps)
3560
- * - **Contexts**: Linked entity references
3561
- *
3562
- */
3563
- 'get'(
3564
- parameters?: Parameters<Paths.GetFlowExecution.PathParameters> | null,
3565
- data?: any,
3566
- config?: AxiosRequestConfig
3567
- ): OperationResponse<Paths.GetFlowExecution.Responses.$200>
3568
- /**
3569
- * patchFlowExecution - patchFlowExecution
3570
- *
3571
- * Patch flow execution with new assignees, status, analytics & other changes.
3572
- */
3573
- 'patch'(
3574
- parameters?: Parameters<Paths.PatchFlowExecution.PathParameters> | null,
3575
- data?: Paths.PatchFlowExecution.RequestBody,
3576
- config?: AxiosRequestConfig
3577
- ): OperationResponse<Paths.PatchFlowExecution.Responses.$200>
3578
- /**
3579
- * deleteFlowExecution - deleteFlowExecution
3580
- *
3581
- * Deletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted.
3582
- */
3583
- 'delete'(
3584
- parameters?: Parameters<Paths.DeleteFlowExecution.QueryParameters & Paths.DeleteFlowExecution.PathParameters> | null,
3585
- data?: any,
3586
- config?: AxiosRequestConfig
3587
- ): OperationResponse<Paths.DeleteFlowExecution.Responses.$204>
3588
- }
3589
- ['/v2/flows/executions:search']: {
3590
- /**
3591
- * searchFlowExecutions - searchFlowExecutions
3592
- *
3593
- * Search Flow Executions for a specific Entity.
3594
- */
3595
- 'post'(
3596
- parameters?: Parameters<UnknownParamsObject> | null,
3597
- data?: Paths.SearchFlowExecutions.RequestBody,
3598
- config?: AxiosRequestConfig
3599
- ): OperationResponse<Paths.SearchFlowExecutions.Responses.$200>
3600
- }
3601
- ['/v2/flows/executions/{execution_id}/tasks/{task_id}']: {
3602
- /**
3603
- * patchTask - patchTask
3604
- *
3605
- * Updates attributes of a flow task including status, assignees, due date, and more.
3606
- *
3607
- * **Common use cases:**
3608
- * - Mark a task as completed or skipped
3609
- * - Assign or reassign users to a task
3610
- * - Update task due dates
3611
- * - Enable or disable a task
3612
- * - Revert execution to a previous task
3613
- *
3614
- * **Status transitions:**
3615
- * - `PENDING` -> `IN_PROGRESS`: User starts working on the task
3616
- * - `IN_PROGRESS` -> `COMPLETED`: User finishes the task
3617
- * - `PENDING` or `IN_PROGRESS` -> `SKIPPED`: Task is bypassed
3618
- * - `COMPLETED` or `SKIPPED` -> `PENDING`: Task is reopened (with revert_execution flag)
3619
- *
3620
- * **Reverting execution:**
3621
- * When updating a task that was already completed/skipped and comes before the current task,
3622
- * use `revert_execution: true` to reset the flow back to that point. All subsequent tasks
3623
- * will be reset to PENDING status.
3624
- *
3625
- */
3626
- 'patch'(
3627
- parameters?: Parameters<Paths.PatchTask.PathParameters> | null,
3628
- data?: Paths.PatchTask.RequestBody,
3629
- config?: AxiosRequestConfig
3630
- ): OperationResponse<Paths.PatchTask.Responses.$200>
3631
- }
3632
- ['/v2/flows/executions/{execution_id}/tasks/{task_id}/automation:run']: {
3633
- /**
3634
- * runTaskAutomation - runTaskAutomation
3635
- *
3636
- * Runs configured automation for a flow task
3637
- */
3638
- 'post'(
3639
- parameters?: Parameters<Paths.RunTaskAutomation.PathParameters> | null,
3640
- data?: any,
3641
- config?: AxiosRequestConfig
3642
- ): OperationResponse<Paths.RunTaskAutomation.Responses.$200>
3643
- }
3644
- ['/v2/flows/executions/{execution_id}/tasks/{task_id}/execute']: {
3645
- /**
3646
- * executeTask - executeTask
3647
- *
3648
- * Executes any kind of flow task immediately.
3649
- */
3650
- 'post'(
3651
- parameters?: Parameters<Paths.ExecuteTask.PathParameters> | null,
3652
- data?: any,
3653
- config?: AxiosRequestConfig
3654
- ): OperationResponse<Paths.ExecuteTask.Responses.$200>
3655
- }
3656
- ['/v2/flows/executions/{execution_id}/phases/{phase_id}']: {
3657
- /**
3658
- * patchPhase - patchPhase
3659
- *
3660
- * Apply updates to a phase within flow execution
3661
- */
3662
- 'patch'(
3663
- parameters?: Parameters<Paths.PatchPhase.PathParameters> | null,
3664
- data?: Paths.PatchPhase.RequestBody,
3665
- config?: AxiosRequestConfig
3666
- ): OperationResponse<Paths.PatchPhase.Responses.$200>
3667
- }
3668
- ['/v2/flows/executions/{execution_id}/tasks']: {
3669
- /**
3670
- * addTask - addTask
3671
- *
3672
- * Create a new task in current workflow execution.
3673
- */
3674
- 'post'(
3675
- parameters?: Parameters<Paths.AddTask.PathParameters> | null,
3676
- data?: Paths.AddTask.RequestBody,
3677
- config?: AxiosRequestConfig
3678
- ): OperationResponse<Paths.AddTask.Responses.$201>
3679
- }
3680
- ['/v2/flows/executions/{execution_id}/tasks/{task_id}/schedule']: {
3681
- /**
3682
- * cancelTaskSchedule - cancelTaskSchedule
3683
- *
3684
- * Cancels a scheduled task, deleting the schedule and marking the task as skipped.
3685
- */
3686
- 'delete'(
3687
- parameters?: Parameters<Paths.CancelTaskSchedule.PathParameters> | null,
3688
- data?: any,
3689
- config?: AxiosRequestConfig
3690
- ): OperationResponse<Paths.CancelTaskSchedule.Responses.$204>
3691
- }
3692
- ['/v2/flows/executions/{execution_id}/tasks/{task_id}/reconcile-automation']: {
3693
- /**
3694
- * reconcileAutomationTask - reconcileAutomationTask
3695
- *
3696
- * Reconciles an automation task's status against its linked automation execution.
3697
- *
3698
- * Looks the task up by id (whether or not it is currently a `crt_task`),
3699
- * fetches its automation execution, and — if the automation has reached a
3700
- * terminal state (success/failed/skipped) — corrects the task's `status`,
3701
- * `automation_config` and `analytics` to match and persists them. If the
3702
- * task is the current task and the flow is still active, the flow is
3703
- * advanced; otherwise only the task record is corrected.
3704
- *
3705
- * Used by the "Refresh status" action to recover a task left `IN_PROGRESS`
3706
- * after a missed or clobbered completion event. No-op (returns the
3707
- * execution unchanged) when the task is already terminal or the automation
3708
- * is still running.
3709
- *
3710
- */
3711
- 'post'(
3712
- parameters?: Parameters<Paths.ReconcileAutomationTask.PathParameters> | null,
3713
- data?: any,
3714
- config?: AxiosRequestConfig
3715
- ): OperationResponse<Paths.ReconcileAutomationTask.Responses.$200>
3716
- }
3717
- ['/v2/flows/executions/{execution_id}/tasks/{task_id}/schedule/run-now']: {
3718
- /**
3719
- * runTaskScheduleNow - runTaskScheduleNow
3720
- *
3721
- * Cancels the pending schedule for a task and immediately triggers its automation execution.
3722
- */
3723
- 'post'(
3724
- parameters?: Parameters<Paths.RunTaskScheduleNow.PathParameters> | null,
3725
- data?: any,
3726
- config?: AxiosRequestConfig
3727
- ): OperationResponse<Paths.RunTaskScheduleNow.Responses.$200>
3728
- }
3729
- ['/v2/flows/executions/{execution_id}/schedules/{schedule_id}']: {
3730
- /**
3731
- * cancelSchedule - cancelSchedule
3732
- *
3733
- * Cancels a flow schedule, marking it as canceled.
3734
- *
3735
- * **Deprecated**: Use DELETE /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule instead.
3736
- *
3737
- */
3738
- 'post'(
3739
- parameters?: Parameters<Paths.CancelSchedule.PathParameters> | null,
3740
- data?: any,
3741
- config?: AxiosRequestConfig
3742
- ): OperationResponse<Paths.CancelSchedule.Responses.$204>
3743
- }
3744
- }
3745
-
3746
- type Client = OpenAPIClient<OperationMethods, PathsDictionary>
3747
-
3748
-
3749
- type ActionSchedule = Components.Schemas.ActionSchedule;
3750
- type AddTaskReq = Components.Schemas.AddTaskReq;
3751
- type AgentConfig = Components.Schemas.AgentConfig;
3752
- type AgentExecutionInfo = Components.Schemas.AgentExecutionInfo;
3753
- type AiAgentTask = Components.Schemas.AiAgentTask;
3754
- type AnalyticsInfo = Components.Schemas.AnalyticsInfo;
3755
- type Assignees = Components.Schemas.Assignees;
3756
- type AutomationConfig = Components.Schemas.AutomationConfig;
3757
- type AutomationInfo = Components.Schemas.AutomationInfo;
3758
- type AutomationInputContext = Components.Schemas.AutomationInputContext;
3759
- type AutomationTask = Components.Schemas.AutomationTask;
3760
- type ClosingReason = Components.Schemas.ClosingReason;
3761
- type ClosingReasonResp = Components.Schemas.ClosingReasonResp;
3762
- type Condition = Components.Schemas.Condition;
3763
- type ConditionId = Components.Schemas.ConditionId;
3764
- type CreateStepReq = Components.Schemas.CreateStepReq;
3765
- type DecisionTask = Components.Schemas.DecisionTask;
3766
- type DelayedSchedule = Components.Schemas.DelayedSchedule;
3767
- type DueDateConfig = Components.Schemas.DueDateConfig;
3768
- type DynamicDueDate = Components.Schemas.DynamicDueDate;
3769
- type ECPDetails = Components.Schemas.ECPDetails;
3770
- type Edge = Components.Schemas.Edge;
3771
- type EnableRequirement = Components.Schemas.EnableRequirement;
3772
- type EntityRef = Components.Schemas.EntityRef;
3773
- type EntitySync = Components.Schemas.EntitySync;
3774
- type ErrorResp = Components.Schemas.ErrorResp;
3775
- type EvaluationSource = Components.Schemas.EvaluationSource;
3776
- type ExecutionPaginationDynamo = Components.Schemas.ExecutionPaginationDynamo;
3777
- type Flow = Components.Schemas.Flow;
3778
- type FlowClosingReason = Components.Schemas.FlowClosingReason;
3779
- type FlowContext = Components.Schemas.FlowContext;
3780
- type FlowExecution = Components.Schemas.FlowExecution;
3781
- type FlowExecutionId = Components.Schemas.FlowExecutionId;
3782
- type FlowSlim = Components.Schemas.FlowSlim;
3783
- type FlowTemplateId = Components.Schemas.FlowTemplateId;
3784
- type FlowTrigger = Components.Schemas.FlowTrigger;
3785
- type ImmediateSchedule = Components.Schemas.ImmediateSchedule;
3786
- type ItemType = Components.Schemas.ItemType;
3787
- type LastEvaluatedKey = Components.Schemas.LastEvaluatedKey;
3788
- type LoopConfig = Components.Schemas.LoopConfig;
3789
- type LoopInfo = Components.Schemas.LoopInfo;
3790
- type ManualTask = Components.Schemas.ManualTask;
3791
- type Operator = Components.Schemas.Operator;
3792
- type PartnerDetails = Components.Schemas.PartnerDetails;
3793
- type PatchFlowReq = Components.Schemas.PatchFlowReq;
3794
- type PatchPhaseReq = Components.Schemas.PatchPhaseReq;
3795
- type PatchTaskReq = Components.Schemas.PatchTaskReq;
3796
- type Phase = Components.Schemas.Phase;
3797
- type PhaseId = Components.Schemas.PhaseId;
3798
- type PhaseInEntity = Components.Schemas.PhaseInEntity;
3799
- type RelativeSchedule = Components.Schemas.RelativeSchedule;
3800
- type SearchExecutionsReq = Components.Schemas.SearchExecutionsReq;
3801
- type SearchExecutionsResp = Components.Schemas.SearchExecutionsResp;
3802
- type SearchFlowsReq = Components.Schemas.SearchFlowsReq;
3803
- type SearchPagination = Components.Schemas.SearchPagination;
3804
- type SearchSorting = Components.Schemas.SearchSorting;
3805
- type SearchStepsReq = Components.Schemas.SearchStepsReq;
3806
- type SearchStepsResp = Components.Schemas.SearchStepsResp;
3807
- type Section = Components.Schemas.Section;
3808
- type SectionSimplified = Components.Schemas.SectionSimplified;
3809
- type SectionStatus = Components.Schemas.SectionStatus;
3810
- type StartFlowReq = Components.Schemas.StartFlowReq;
3811
- type Statement = Components.Schemas.Statement;
3812
- type Step = Components.Schemas.Step;
3813
- type StepDescription = Components.Schemas.StepDescription;
3814
- type StepExtended = Components.Schemas.StepExtended;
3815
- type StepId = Components.Schemas.StepId;
3816
- type StepJourney = Components.Schemas.StepJourney;
3817
- type StepPositionAt = Components.Schemas.StepPositionAt;
3818
- type StepRequirement = Components.Schemas.StepRequirement;
3819
- type StepSimplified = Components.Schemas.StepSimplified;
3820
- type StepStatus = Components.Schemas.StepStatus;
3821
- type StepType = Components.Schemas.StepType;
3822
- type Task = Components.Schemas.Task;
3823
- type TaskBase = Components.Schemas.TaskBase;
3824
- type TaskId = Components.Schemas.TaskId;
3825
- type TaskType = Components.Schemas.TaskType;
3826
- type TimeUnit = Components.Schemas.TimeUnit;
3827
- type TriggerMode = Components.Schemas.TriggerMode;
3828
- type TriggerType = Components.Schemas.TriggerType;
3829
- type UpdateEntityAttributes = Components.Schemas.UpdateEntityAttributes;
3830
- type UpdateStepReq = Components.Schemas.UpdateStepReq;
3831
- type UpdateStepResp = Components.Schemas.UpdateStepResp;
3832
- type UserId = Components.Schemas.UserId;
3833
- type VariableAssignment = Components.Schemas.VariableAssignment;
3834
- type WorkflowContext = Components.Schemas.WorkflowContext;
3835
- type WorkflowExecution = Components.Schemas.WorkflowExecution;
3836
- type WorkflowExecutionBase = Components.Schemas.WorkflowExecutionBase;
3837
- type WorkflowExecutionCreateReq = Components.Schemas.WorkflowExecutionCreateReq;
3838
- type WorkflowExecutionSlim = Components.Schemas.WorkflowExecutionSlim;
3839
- type WorkflowExecutionUpdateReq = Components.Schemas.WorkflowExecutionUpdateReq;
3840
- type WorkflowInEntity = Components.Schemas.WorkflowInEntity;
3841
- type WorkflowStatus = Components.Schemas.WorkflowStatus;
3842
-
3843
- export { type PhaseId as $, type ActionSchedule as A, type ExecutionPaginationDynamo as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type Flow as F, type FlowClosingReason as G, type FlowContext as H, type FlowExecution as I, type FlowExecutionId as J, type FlowSlim as K, type FlowTemplateId as L, type FlowTrigger as M, type ImmediateSchedule as N, type OperationMethods as O, Paths as P, type ItemType as Q, type LastEvaluatedKey as R, type LoopConfig as S, type LoopInfo as T, type ManualTask as U, type Operator as V, type PartnerDetails as W, type PatchFlowReq as X, type PatchPhaseReq as Y, type PatchTaskReq as Z, type Phase as _, Components as a, type PhaseInEntity as a0, type RelativeSchedule as a1, type SearchExecutionsReq as a2, type SearchExecutionsResp as a3, type SearchFlowsReq as a4, type SearchPagination as a5, type SearchSorting as a6, type SearchStepsReq as a7, type SearchStepsResp as a8, type Section as a9, type WorkflowContext as aA, type WorkflowExecution as aB, type WorkflowExecutionBase as aC, type WorkflowExecutionCreateReq as aD, type WorkflowExecutionSlim as aE, type WorkflowExecutionUpdateReq as aF, type WorkflowInEntity as aG, type WorkflowStatus as aH, type SectionSimplified as aa, type SectionStatus as ab, type StartFlowReq as ac, type Statement as ad, type Step as ae, type StepDescription as af, type StepExtended as ag, type StepId as ah, type StepJourney as ai, type StepPositionAt as aj, type StepRequirement as ak, type StepSimplified as al, type StepStatus as am, type StepType as an, type Task as ao, type TaskBase as ap, type TaskId as aq, type TaskType as ar, type TimeUnit as as, type TriggerMode as at, type TriggerType as au, type UpdateEntityAttributes as av, type UpdateStepReq as aw, type UpdateStepResp as ax, type UserId as ay, type VariableAssignment as az, type PathsDictionary as b, type AddTaskReq as c, type AgentConfig as d, type AgentExecutionInfo as e, type AiAgentTask as f, type AnalyticsInfo as g, type Assignees as h, type AutomationConfig as i, type AutomationInfo as j, type AutomationInputContext as k, type AutomationTask as l, type ClosingReason as m, type ClosingReasonResp as n, type Condition as o, type ConditionId as p, type CreateStepReq as q, type DelayedSchedule as r, type DueDateConfig as s, type DynamicDueDate as t, type Edge as u, type EnableRequirement as v, type EntityRef as w, type EntitySync as x, type ErrorResp as y, type EvaluationSource as z };