@epilot/automation-client 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +31 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +14 -0
- package/dist/definition.d.ts +3 -0
- package/dist/definition.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -0
- package/dist/openapi.d.ts +1761 -0
- package/dist/openapi.json +1997 -0
- package/package.json +74 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,1761 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type {
|
|
3
|
+
OpenAPIClient,
|
|
4
|
+
Parameters,
|
|
5
|
+
UnknownParamsObject,
|
|
6
|
+
OperationResponse,
|
|
7
|
+
AxiosRequestConfig,
|
|
8
|
+
} from 'openapi-client-axios';
|
|
9
|
+
|
|
10
|
+
declare namespace Components {
|
|
11
|
+
namespace Schemas {
|
|
12
|
+
/**
|
|
13
|
+
* example:
|
|
14
|
+
* {
|
|
15
|
+
* "target": {
|
|
16
|
+
* "schema": "contact",
|
|
17
|
+
* "tag": "primary",
|
|
18
|
+
* "key": "address",
|
|
19
|
+
* "value_json": "{\"_tags\": [\"billing\"],\"city\":\"steps[0][Adresse][city]\",\"country\":\"steps[0][Adresse][countryCode]\",\"postal_code\":\"steps[0][Adresse][zipCode]\",\"street\":\"steps[0][Adresse][streetName]\",\"street_number\":\"steps[0][Adresse][houseNumber]\",\"additional_info\":\"steps[0][Adresse][addressExtention]\"}",
|
|
20
|
+
* "target_unique": [
|
|
21
|
+
* "country",
|
|
22
|
+
* "city",
|
|
23
|
+
* "postal_code",
|
|
24
|
+
* "street",
|
|
25
|
+
* "street_number"
|
|
26
|
+
* ]
|
|
27
|
+
* },
|
|
28
|
+
* "reference": {
|
|
29
|
+
* "schema": "opportunity",
|
|
30
|
+
* "key": "billing_address"
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
export interface AddressMapper {
|
|
35
|
+
target: {
|
|
36
|
+
/**
|
|
37
|
+
* find target entity based on schema
|
|
38
|
+
*/
|
|
39
|
+
schema: string;
|
|
40
|
+
/**
|
|
41
|
+
* find target entity based on entity tag
|
|
42
|
+
*/
|
|
43
|
+
tag?: string;
|
|
44
|
+
/**
|
|
45
|
+
* find target entity based on relation tag on main entity relation
|
|
46
|
+
*/
|
|
47
|
+
relation_tag?: string;
|
|
48
|
+
/**
|
|
49
|
+
* target field for where to store this address.
|
|
50
|
+
*/
|
|
51
|
+
key: string;
|
|
52
|
+
/**
|
|
53
|
+
* stringified JSON for how to map address data
|
|
54
|
+
*/
|
|
55
|
+
value_json: string;
|
|
56
|
+
/**
|
|
57
|
+
* Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
target_unique?: string[];
|
|
61
|
+
};
|
|
62
|
+
reference: {
|
|
63
|
+
/**
|
|
64
|
+
* Schema of the entity where the reference will be stored.
|
|
65
|
+
*/
|
|
66
|
+
schema: string;
|
|
67
|
+
/**
|
|
68
|
+
* Field location to store the reference.
|
|
69
|
+
*/
|
|
70
|
+
key: string;
|
|
71
|
+
/**
|
|
72
|
+
* Optional relation labels to give meaning to this reference.
|
|
73
|
+
*/
|
|
74
|
+
labels?: string[];
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export type AnyAction = /**
|
|
78
|
+
* example:
|
|
79
|
+
* {
|
|
80
|
+
* "id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
81
|
+
* "name": "Map Entity",
|
|
82
|
+
* "type": "map-entity",
|
|
83
|
+
* "config": {
|
|
84
|
+
* "target_schema": "contact",
|
|
85
|
+
* "target_unique": [
|
|
86
|
+
* "email.0.email"
|
|
87
|
+
* ],
|
|
88
|
+
* "relation_attributes": [
|
|
89
|
+
* {
|
|
90
|
+
* "target": "company",
|
|
91
|
+
* "mode": "append",
|
|
92
|
+
* "source_filter": {
|
|
93
|
+
* "schema": "account",
|
|
94
|
+
* "limit": 1
|
|
95
|
+
* }
|
|
96
|
+
* }
|
|
97
|
+
* ],
|
|
98
|
+
* "mapping_attributes": [
|
|
99
|
+
* {
|
|
100
|
+
* "target": "_tags",
|
|
101
|
+
* "operation": {
|
|
102
|
+
* "_append": [
|
|
103
|
+
* "primary",
|
|
104
|
+
* "payer"
|
|
105
|
+
* ],
|
|
106
|
+
* "_uniq": true
|
|
107
|
+
* }
|
|
108
|
+
* },
|
|
109
|
+
* {
|
|
110
|
+
* "target": "email",
|
|
111
|
+
* "operation": {
|
|
112
|
+
* "_append": [
|
|
113
|
+
* {
|
|
114
|
+
* "email": {
|
|
115
|
+
* "_copy": "billing_contact.email"
|
|
116
|
+
* }
|
|
117
|
+
* }
|
|
118
|
+
* ]
|
|
119
|
+
* }
|
|
120
|
+
* },
|
|
121
|
+
* {
|
|
122
|
+
* "target": "first_name",
|
|
123
|
+
* "operation": {
|
|
124
|
+
* "_copy": "billing_contact.first_name"
|
|
125
|
+
* }
|
|
126
|
+
* },
|
|
127
|
+
* {
|
|
128
|
+
* "target": "last_name",
|
|
129
|
+
* "operation": {
|
|
130
|
+
* "_copy": "billing_contact.last_name"
|
|
131
|
+
* }
|
|
132
|
+
* },
|
|
133
|
+
* {
|
|
134
|
+
* "target": "contact_type",
|
|
135
|
+
* "operation": {
|
|
136
|
+
* "_set": "customer"
|
|
137
|
+
* }
|
|
138
|
+
* },
|
|
139
|
+
* {
|
|
140
|
+
* "target": "address",
|
|
141
|
+
* "operation": {
|
|
142
|
+
* "_append": [
|
|
143
|
+
* {
|
|
144
|
+
* "_tags": [
|
|
145
|
+
* "billing",
|
|
146
|
+
* "primary"
|
|
147
|
+
* ],
|
|
148
|
+
* "street_name": {
|
|
149
|
+
* "_copy": "billing_contact.street_name"
|
|
150
|
+
* },
|
|
151
|
+
* "street_number": {
|
|
152
|
+
* "_copy": "billing_contact.street_number"
|
|
153
|
+
* },
|
|
154
|
+
* "city": {
|
|
155
|
+
* "_copy": "billing_contact.city"
|
|
156
|
+
* },
|
|
157
|
+
* "postal_code": {
|
|
158
|
+
* "_copy": "billing_contact.postal_code"
|
|
159
|
+
* },
|
|
160
|
+
* "country": {
|
|
161
|
+
* "_copy": "billing_contact.country"
|
|
162
|
+
* }
|
|
163
|
+
* },
|
|
164
|
+
* {
|
|
165
|
+
* "_tags": [
|
|
166
|
+
* "delivery"
|
|
167
|
+
* ],
|
|
168
|
+
* "street_name": {
|
|
169
|
+
* "_copy": "delivery_contact.street_name"
|
|
170
|
+
* },
|
|
171
|
+
* "street_number": {
|
|
172
|
+
* "_copy": "delivery_contact.street_number"
|
|
173
|
+
* },
|
|
174
|
+
* "city": {
|
|
175
|
+
* "_copy": "delivery_contact.city"
|
|
176
|
+
* },
|
|
177
|
+
* "postal_code": {
|
|
178
|
+
* "_copy": "delivery_contact.postal_code"
|
|
179
|
+
* },
|
|
180
|
+
* "country": {
|
|
181
|
+
* "_copy": "delivery_contact.country"
|
|
182
|
+
* }
|
|
183
|
+
* }
|
|
184
|
+
* ],
|
|
185
|
+
* "_uniq": [
|
|
186
|
+
* "street_name",
|
|
187
|
+
* "street_number",
|
|
188
|
+
* "postal_code",
|
|
189
|
+
* "country"
|
|
190
|
+
* ]
|
|
191
|
+
* }
|
|
192
|
+
* }
|
|
193
|
+
* ]
|
|
194
|
+
* }
|
|
195
|
+
* }
|
|
196
|
+
*/
|
|
197
|
+
MapEntityAction | FillEntityAction | /**
|
|
198
|
+
* example:
|
|
199
|
+
* {
|
|
200
|
+
* "id": "08g988-ojt2jtaga-292h-8978gsaga",
|
|
201
|
+
* "name": "Trigger Workflow",
|
|
202
|
+
* "type": "trigger-workflow",
|
|
203
|
+
* "config": {
|
|
204
|
+
* "target_workflow": "mfptvUMH",
|
|
205
|
+
* "conditions": [
|
|
206
|
+
* {
|
|
207
|
+
* "schema": "ivy-opportunity",
|
|
208
|
+
* "source": "customer.type",
|
|
209
|
+
* "comparison": "equals",
|
|
210
|
+
* "value": "PRIVATE"
|
|
211
|
+
* }
|
|
212
|
+
* ],
|
|
213
|
+
* "assign_steps": [
|
|
214
|
+
* {
|
|
215
|
+
* "step_name": "Lead Sales",
|
|
216
|
+
* "user_ids": [
|
|
217
|
+
* 10010729
|
|
218
|
+
* ]
|
|
219
|
+
* },
|
|
220
|
+
* {
|
|
221
|
+
* "step_name": "Operations",
|
|
222
|
+
* "user_ids": [
|
|
223
|
+
* 10010728,
|
|
224
|
+
* 10010729
|
|
225
|
+
* ]
|
|
226
|
+
* }
|
|
227
|
+
* ]
|
|
228
|
+
* }
|
|
229
|
+
* }
|
|
230
|
+
*/
|
|
231
|
+
TriggerWorkflowAction | /**
|
|
232
|
+
* example:
|
|
233
|
+
* {
|
|
234
|
+
* "id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
235
|
+
* "name": "Trigger Webhook",
|
|
236
|
+
* "type": "trigger-webhook",
|
|
237
|
+
* "config": {
|
|
238
|
+
* "entity_sources": [
|
|
239
|
+
* "contact",
|
|
240
|
+
* "account"
|
|
241
|
+
* ],
|
|
242
|
+
* "target_webhook_id": "25jg9ag2ga"
|
|
243
|
+
* }
|
|
244
|
+
* }
|
|
245
|
+
*/
|
|
246
|
+
TriggerWebhookAction | /**
|
|
247
|
+
* example:
|
|
248
|
+
* {
|
|
249
|
+
* "id": "08g988-ojt2jtaga-292h-8978gsaga",
|
|
250
|
+
* "name": "Create Document",
|
|
251
|
+
* "type": "create-document",
|
|
252
|
+
* "config": {
|
|
253
|
+
* "template_id": {
|
|
254
|
+
* "type": "string",
|
|
255
|
+
* "example": "112b08ba-789c-42f2-9940-43b302f641e8\""
|
|
256
|
+
* },
|
|
257
|
+
* "filename": {
|
|
258
|
+
* "type": "string",
|
|
259
|
+
* "example": "newsletter.pdf\""
|
|
260
|
+
* }
|
|
261
|
+
* }
|
|
262
|
+
* }
|
|
263
|
+
*/
|
|
264
|
+
CreateDocumentAction | /**
|
|
265
|
+
* example:
|
|
266
|
+
* {
|
|
267
|
+
* "id": "25jga0-gkasl26-0asg-908sgaj2",
|
|
268
|
+
* "name": "Send Email",
|
|
269
|
+
* "type": "send-email",
|
|
270
|
+
* "config": {
|
|
271
|
+
* "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2",
|
|
272
|
+
* "language_code": "de"
|
|
273
|
+
* }
|
|
274
|
+
* }
|
|
275
|
+
*/
|
|
276
|
+
SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | AutomationAction;
|
|
277
|
+
export type AnyTrigger = FrontendSubmitTrigger | JourneySubmitTrigger | ApiSubmissionTrigger | EntityOperationTrigger | EntityManualTrigger | ReceivedEmailTrigger;
|
|
278
|
+
export interface ApiSubmissionTrigger {
|
|
279
|
+
type: "api_submission";
|
|
280
|
+
configuration: {
|
|
281
|
+
source_id?: string;
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
export interface AppendValueMapper {
|
|
285
|
+
mode: /**
|
|
286
|
+
* - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.
|
|
287
|
+
*
|
|
288
|
+
*/
|
|
289
|
+
MappingAttributeMode;
|
|
290
|
+
/**
|
|
291
|
+
* JSON like target path for the attribute. Eg. last_name
|
|
292
|
+
*/
|
|
293
|
+
target: string;
|
|
294
|
+
/**
|
|
295
|
+
* JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price
|
|
296
|
+
*
|
|
297
|
+
*/
|
|
298
|
+
source?: string;
|
|
299
|
+
/**
|
|
300
|
+
* To be provided only when mapping json objects into a target attribute. Eg array of addresses.
|
|
301
|
+
*
|
|
302
|
+
*/
|
|
303
|
+
value_json: string;
|
|
304
|
+
/**
|
|
305
|
+
* Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]
|
|
306
|
+
*
|
|
307
|
+
*/
|
|
308
|
+
target_unique?: string[];
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* example:
|
|
312
|
+
* [
|
|
313
|
+
* {
|
|
314
|
+
* "step_id": "xyh9t2ha",
|
|
315
|
+
* "step_name": "Lead Sales",
|
|
316
|
+
* "user_ids": [
|
|
317
|
+
* 10010729
|
|
318
|
+
* ]
|
|
319
|
+
* },
|
|
320
|
+
* {
|
|
321
|
+
* "step_id": "29jgasl",
|
|
322
|
+
* "step_name": "Operations",
|
|
323
|
+
* "user_ids": [
|
|
324
|
+
* 10010728,
|
|
325
|
+
* 10010729
|
|
326
|
+
* ]
|
|
327
|
+
* }
|
|
328
|
+
* ]
|
|
329
|
+
*/
|
|
330
|
+
export interface AssignUsersToStep {
|
|
331
|
+
step_id?: string;
|
|
332
|
+
step_name?: string;
|
|
333
|
+
user_ids?: number[];
|
|
334
|
+
}
|
|
335
|
+
export interface AutomationAction {
|
|
336
|
+
id?: /**
|
|
337
|
+
* example:
|
|
338
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
339
|
+
*/
|
|
340
|
+
AutomationActionId;
|
|
341
|
+
flow_action_id?: /**
|
|
342
|
+
* example:
|
|
343
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
344
|
+
*/
|
|
345
|
+
AutomationActionId;
|
|
346
|
+
name?: string;
|
|
347
|
+
type?: string;
|
|
348
|
+
config?: {
|
|
349
|
+
[name: string]: any;
|
|
350
|
+
};
|
|
351
|
+
execution_status?: ExecutionStatus;
|
|
352
|
+
started_at?: string;
|
|
353
|
+
updated_at?: string;
|
|
354
|
+
/**
|
|
355
|
+
* Whether to stop execution in a failed state if this action fails
|
|
356
|
+
*/
|
|
357
|
+
allow_failure?: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Flag indicating whether the action was created automatically or manually
|
|
360
|
+
*/
|
|
361
|
+
created_automatically?: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* example:
|
|
364
|
+
* {}
|
|
365
|
+
*/
|
|
366
|
+
outputs?: {
|
|
367
|
+
[name: string]: any;
|
|
368
|
+
};
|
|
369
|
+
error_output?: ErrorOutput;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* example:
|
|
373
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
374
|
+
*/
|
|
375
|
+
export type AutomationActionId = string;
|
|
376
|
+
export interface AutomationExecution {
|
|
377
|
+
id: /**
|
|
378
|
+
* example:
|
|
379
|
+
* 9baf184f-bc81-4128-bca3-d974c90a12c4
|
|
380
|
+
*/
|
|
381
|
+
AutomationExecutionId;
|
|
382
|
+
execution_status?: ExecutionStatus;
|
|
383
|
+
entity_id: /**
|
|
384
|
+
* example:
|
|
385
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
386
|
+
*/
|
|
387
|
+
EntityId;
|
|
388
|
+
entity_snapshot?: EntityItemSnapshot;
|
|
389
|
+
org_id: /**
|
|
390
|
+
* example:
|
|
391
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
392
|
+
*/
|
|
393
|
+
OrganizationId;
|
|
394
|
+
flow_id: /**
|
|
395
|
+
* example:
|
|
396
|
+
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
397
|
+
*/
|
|
398
|
+
AutomationFlowId;
|
|
399
|
+
/**
|
|
400
|
+
* example:
|
|
401
|
+
* Handle contact form
|
|
402
|
+
*/
|
|
403
|
+
flow_name?: string;
|
|
404
|
+
created_at?: string; // date-time
|
|
405
|
+
updated_at?: string; // date-time
|
|
406
|
+
current_action_id?: /**
|
|
407
|
+
* example:
|
|
408
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
409
|
+
*/
|
|
410
|
+
AutomationActionId;
|
|
411
|
+
actions: AnyAction[];
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* example:
|
|
415
|
+
* 9baf184f-bc81-4128-bca3-d974c90a12c4
|
|
416
|
+
*/
|
|
417
|
+
export type AutomationExecutionId = string;
|
|
418
|
+
export interface AutomationFlow {
|
|
419
|
+
id?: /**
|
|
420
|
+
* example:
|
|
421
|
+
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
422
|
+
*/
|
|
423
|
+
AutomationFlowId;
|
|
424
|
+
/**
|
|
425
|
+
* A descriptive name for the Automation
|
|
426
|
+
* example:
|
|
427
|
+
* Handle contact form
|
|
428
|
+
*/
|
|
429
|
+
flow_name: string;
|
|
430
|
+
/**
|
|
431
|
+
* Whether the automation is enabled or not
|
|
432
|
+
*/
|
|
433
|
+
enabled?: boolean;
|
|
434
|
+
triggers: AnyTrigger[];
|
|
435
|
+
trigger_conditions?: /**
|
|
436
|
+
* example:
|
|
437
|
+
* {
|
|
438
|
+
* "source": "billing_contact.email",
|
|
439
|
+
* "comparison": "exists"
|
|
440
|
+
* }
|
|
441
|
+
*/
|
|
442
|
+
TriggerCondition[];
|
|
443
|
+
/**
|
|
444
|
+
* The triggering entity schema
|
|
445
|
+
* example:
|
|
446
|
+
* submission
|
|
447
|
+
*/
|
|
448
|
+
entity_schema?: string;
|
|
449
|
+
actions: AnyAction[];
|
|
450
|
+
/**
|
|
451
|
+
* Number of automation executions that ran
|
|
452
|
+
* example:
|
|
453
|
+
* 7
|
|
454
|
+
*/
|
|
455
|
+
runs?: number;
|
|
456
|
+
created_at?: string; // date-time
|
|
457
|
+
updated_at?: string; // date-time
|
|
458
|
+
/**
|
|
459
|
+
* User / service who created automation flow
|
|
460
|
+
* example:
|
|
461
|
+
* user:123
|
|
462
|
+
*/
|
|
463
|
+
created_by?: string;
|
|
464
|
+
/**
|
|
465
|
+
* User / service who last updated automation flow
|
|
466
|
+
* example:
|
|
467
|
+
* user:123
|
|
468
|
+
*/
|
|
469
|
+
last_updated_by?: string;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* example:
|
|
473
|
+
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
474
|
+
*/
|
|
475
|
+
export type AutomationFlowId = string;
|
|
476
|
+
/**
|
|
477
|
+
* Creates an order entity with prices from journey
|
|
478
|
+
*/
|
|
479
|
+
export interface CartCheckoutAction {
|
|
480
|
+
id?: /**
|
|
481
|
+
* example:
|
|
482
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
483
|
+
*/
|
|
484
|
+
AutomationActionId;
|
|
485
|
+
flow_action_id?: /**
|
|
486
|
+
* example:
|
|
487
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
488
|
+
*/
|
|
489
|
+
AutomationActionId;
|
|
490
|
+
name?: string;
|
|
491
|
+
type?: "cart-checkout";
|
|
492
|
+
config?: CartCheckoutConfig;
|
|
493
|
+
execution_status?: ExecutionStatus;
|
|
494
|
+
started_at?: string;
|
|
495
|
+
updated_at?: string;
|
|
496
|
+
/**
|
|
497
|
+
* Whether to stop execution in a failed state if this action fails
|
|
498
|
+
*/
|
|
499
|
+
allow_failure?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Flag indicating whether the action was created automatically or manually
|
|
502
|
+
*/
|
|
503
|
+
created_automatically?: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* example:
|
|
506
|
+
* {}
|
|
507
|
+
*/
|
|
508
|
+
outputs?: {
|
|
509
|
+
[name: string]: any;
|
|
510
|
+
};
|
|
511
|
+
error_output?: ErrorOutput;
|
|
512
|
+
}
|
|
513
|
+
export interface CartCheckoutConfig {
|
|
514
|
+
/**
|
|
515
|
+
* Version of the config
|
|
516
|
+
*/
|
|
517
|
+
version?: string;
|
|
518
|
+
mapping_config?: MappingConfigRef;
|
|
519
|
+
relation_attributes?: RelationAttribute[];
|
|
520
|
+
mapping_attributes?: (/**
|
|
521
|
+
* example:
|
|
522
|
+
* {
|
|
523
|
+
* "target": "_tags",
|
|
524
|
+
* "operation": {
|
|
525
|
+
* "_append": [
|
|
526
|
+
* "new",
|
|
527
|
+
* "tags"
|
|
528
|
+
* ],
|
|
529
|
+
* "_uniq": true
|
|
530
|
+
* }
|
|
531
|
+
* }
|
|
532
|
+
*/
|
|
533
|
+
MappingAttributeV2 | MappingAttribute)[];
|
|
534
|
+
/**
|
|
535
|
+
* Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback
|
|
536
|
+
*
|
|
537
|
+
*/
|
|
538
|
+
linkback_relation_attribute?: string;
|
|
539
|
+
/**
|
|
540
|
+
* Relation tags (labels) to include in main entity linkback relation attribute
|
|
541
|
+
*/
|
|
542
|
+
linkback_relation_tags?: string[];
|
|
543
|
+
/**
|
|
544
|
+
* Unique key for target entity (see upsertEntity of Entity API)
|
|
545
|
+
*/
|
|
546
|
+
target_unique?: string[];
|
|
547
|
+
}
|
|
548
|
+
export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty";
|
|
549
|
+
export interface CopyValueMapper {
|
|
550
|
+
mode: /**
|
|
551
|
+
* - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.
|
|
552
|
+
*
|
|
553
|
+
*/
|
|
554
|
+
MappingAttributeMode;
|
|
555
|
+
/**
|
|
556
|
+
* JSON like target path for the attribute. Eg. last_name
|
|
557
|
+
*/
|
|
558
|
+
target: string;
|
|
559
|
+
/**
|
|
560
|
+
* JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price
|
|
561
|
+
*
|
|
562
|
+
*/
|
|
563
|
+
source: string;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* example:
|
|
567
|
+
* {
|
|
568
|
+
* "id": "08g988-ojt2jtaga-292h-8978gsaga",
|
|
569
|
+
* "name": "Create Document",
|
|
570
|
+
* "type": "create-document",
|
|
571
|
+
* "config": {
|
|
572
|
+
* "template_id": {
|
|
573
|
+
* "type": "string",
|
|
574
|
+
* "example": "112b08ba-789c-42f2-9940-43b302f641e8\""
|
|
575
|
+
* },
|
|
576
|
+
* "filename": {
|
|
577
|
+
* "type": "string",
|
|
578
|
+
* "example": "newsletter.pdf\""
|
|
579
|
+
* }
|
|
580
|
+
* }
|
|
581
|
+
* }
|
|
582
|
+
*/
|
|
583
|
+
export interface CreateDocumentAction {
|
|
584
|
+
id?: /**
|
|
585
|
+
* example:
|
|
586
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
587
|
+
*/
|
|
588
|
+
AutomationActionId;
|
|
589
|
+
flow_action_id?: /**
|
|
590
|
+
* example:
|
|
591
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
592
|
+
*/
|
|
593
|
+
AutomationActionId;
|
|
594
|
+
name?: string;
|
|
595
|
+
type?: "create-document";
|
|
596
|
+
config?: CreateDocumentConfig;
|
|
597
|
+
execution_status?: ExecutionStatus;
|
|
598
|
+
started_at?: string;
|
|
599
|
+
updated_at?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Whether to stop execution in a failed state if this action fails
|
|
602
|
+
*/
|
|
603
|
+
allow_failure?: boolean;
|
|
604
|
+
/**
|
|
605
|
+
* Flag indicating whether the action was created automatically or manually
|
|
606
|
+
*/
|
|
607
|
+
created_automatically?: boolean;
|
|
608
|
+
/**
|
|
609
|
+
* example:
|
|
610
|
+
* {}
|
|
611
|
+
*/
|
|
612
|
+
outputs?: {
|
|
613
|
+
[name: string]: any;
|
|
614
|
+
};
|
|
615
|
+
error_output?: ErrorOutput;
|
|
616
|
+
}
|
|
617
|
+
export interface CreateDocumentConfig {
|
|
618
|
+
template_id?: string;
|
|
619
|
+
filename?: string;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* example:
|
|
623
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
624
|
+
*/
|
|
625
|
+
export type EntityId = string;
|
|
626
|
+
export interface EntityItemSnapshot {
|
|
627
|
+
[name: string]: any;
|
|
628
|
+
_id: /**
|
|
629
|
+
* example:
|
|
630
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
631
|
+
*/
|
|
632
|
+
EntityId;
|
|
633
|
+
_title: string;
|
|
634
|
+
_org: string;
|
|
635
|
+
_schema: string;
|
|
636
|
+
_tags?: string[];
|
|
637
|
+
_created_at: string; // date-time
|
|
638
|
+
_updated_at: string; // date-time
|
|
639
|
+
}
|
|
640
|
+
export interface EntityManualTrigger {
|
|
641
|
+
type: "entity_manual";
|
|
642
|
+
configuration: {
|
|
643
|
+
/**
|
|
644
|
+
* Which entity type can this automation be triggered from
|
|
645
|
+
* example:
|
|
646
|
+
* submission
|
|
647
|
+
*/
|
|
648
|
+
schema?: string;
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
export interface EntityOperationTrigger {
|
|
652
|
+
type: "entity_operation";
|
|
653
|
+
configuration: {
|
|
654
|
+
/**
|
|
655
|
+
* example:
|
|
656
|
+
* submission
|
|
657
|
+
*/
|
|
658
|
+
schema?: string;
|
|
659
|
+
operations?: ("createEntity" | "updateEntity" | "deleteEntity")[];
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
export type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR";
|
|
663
|
+
export interface ErrorOutput {
|
|
664
|
+
error_code: ErrorCode;
|
|
665
|
+
error_reason: string;
|
|
666
|
+
}
|
|
667
|
+
export type ExecutionStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled";
|
|
668
|
+
export interface FillEntityAction {
|
|
669
|
+
id?: /**
|
|
670
|
+
* example:
|
|
671
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
672
|
+
*/
|
|
673
|
+
AutomationActionId;
|
|
674
|
+
flow_action_id?: /**
|
|
675
|
+
* example:
|
|
676
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
677
|
+
*/
|
|
678
|
+
AutomationActionId;
|
|
679
|
+
name?: string;
|
|
680
|
+
type?: "fill-entity";
|
|
681
|
+
config: FillEntityConfig;
|
|
682
|
+
execution_status?: ExecutionStatus;
|
|
683
|
+
started_at?: string;
|
|
684
|
+
updated_at?: string;
|
|
685
|
+
/**
|
|
686
|
+
* Whether to stop execution in a failed state if this action fails
|
|
687
|
+
*/
|
|
688
|
+
allow_failure?: boolean;
|
|
689
|
+
/**
|
|
690
|
+
* Flag indicating whether the action was created automatically or manually
|
|
691
|
+
*/
|
|
692
|
+
created_automatically?: boolean;
|
|
693
|
+
/**
|
|
694
|
+
* example:
|
|
695
|
+
* {}
|
|
696
|
+
*/
|
|
697
|
+
outputs?: {
|
|
698
|
+
[name: string]: any;
|
|
699
|
+
};
|
|
700
|
+
error_output?: ErrorOutput;
|
|
701
|
+
}
|
|
702
|
+
export interface FillEntityConfig {
|
|
703
|
+
mappings: /**
|
|
704
|
+
* example:
|
|
705
|
+
* {
|
|
706
|
+
* "target": {
|
|
707
|
+
* "schema": "contact",
|
|
708
|
+
* "tag": "primary",
|
|
709
|
+
* "key": "address",
|
|
710
|
+
* "value_json": "{\"_tags\": [\"billing\"],\"city\":\"steps[0][Adresse][city]\",\"country\":\"steps[0][Adresse][countryCode]\",\"postal_code\":\"steps[0][Adresse][zipCode]\",\"street\":\"steps[0][Adresse][streetName]\",\"street_number\":\"steps[0][Adresse][houseNumber]\",\"additional_info\":\"steps[0][Adresse][addressExtention]\"}",
|
|
711
|
+
* "target_unique": [
|
|
712
|
+
* "country",
|
|
713
|
+
* "city",
|
|
714
|
+
* "postal_code",
|
|
715
|
+
* "street",
|
|
716
|
+
* "street_number"
|
|
717
|
+
* ]
|
|
718
|
+
* },
|
|
719
|
+
* "reference": {
|
|
720
|
+
* "schema": "opportunity",
|
|
721
|
+
* "key": "billing_address"
|
|
722
|
+
* }
|
|
723
|
+
* }
|
|
724
|
+
*/
|
|
725
|
+
AddressMapper[];
|
|
726
|
+
}
|
|
727
|
+
export interface FrontendSubmitTrigger {
|
|
728
|
+
type: "frontend_submission";
|
|
729
|
+
configuration: {
|
|
730
|
+
/**
|
|
731
|
+
* example:
|
|
732
|
+
* 99
|
|
733
|
+
*/
|
|
734
|
+
source_id?: string;
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
export interface GetExecutionsResp {
|
|
738
|
+
total: number;
|
|
739
|
+
results: AutomationExecution[];
|
|
740
|
+
}
|
|
741
|
+
export interface JourneySubmitTrigger {
|
|
742
|
+
type: "journey_submission";
|
|
743
|
+
configuration: {
|
|
744
|
+
source_id: string; // uuid
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* example:
|
|
749
|
+
* {
|
|
750
|
+
* "id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
751
|
+
* "name": "Map Entity",
|
|
752
|
+
* "type": "map-entity",
|
|
753
|
+
* "config": {
|
|
754
|
+
* "target_schema": "contact",
|
|
755
|
+
* "target_unique": [
|
|
756
|
+
* "email.0.email"
|
|
757
|
+
* ],
|
|
758
|
+
* "relation_attributes": [
|
|
759
|
+
* {
|
|
760
|
+
* "target": "company",
|
|
761
|
+
* "mode": "append",
|
|
762
|
+
* "source_filter": {
|
|
763
|
+
* "schema": "account",
|
|
764
|
+
* "limit": 1
|
|
765
|
+
* }
|
|
766
|
+
* }
|
|
767
|
+
* ],
|
|
768
|
+
* "mapping_attributes": [
|
|
769
|
+
* {
|
|
770
|
+
* "target": "_tags",
|
|
771
|
+
* "operation": {
|
|
772
|
+
* "_append": [
|
|
773
|
+
* "primary",
|
|
774
|
+
* "payer"
|
|
775
|
+
* ],
|
|
776
|
+
* "_uniq": true
|
|
777
|
+
* }
|
|
778
|
+
* },
|
|
779
|
+
* {
|
|
780
|
+
* "target": "email",
|
|
781
|
+
* "operation": {
|
|
782
|
+
* "_append": [
|
|
783
|
+
* {
|
|
784
|
+
* "email": {
|
|
785
|
+
* "_copy": "billing_contact.email"
|
|
786
|
+
* }
|
|
787
|
+
* }
|
|
788
|
+
* ]
|
|
789
|
+
* }
|
|
790
|
+
* },
|
|
791
|
+
* {
|
|
792
|
+
* "target": "first_name",
|
|
793
|
+
* "operation": {
|
|
794
|
+
* "_copy": "billing_contact.first_name"
|
|
795
|
+
* }
|
|
796
|
+
* },
|
|
797
|
+
* {
|
|
798
|
+
* "target": "last_name",
|
|
799
|
+
* "operation": {
|
|
800
|
+
* "_copy": "billing_contact.last_name"
|
|
801
|
+
* }
|
|
802
|
+
* },
|
|
803
|
+
* {
|
|
804
|
+
* "target": "contact_type",
|
|
805
|
+
* "operation": {
|
|
806
|
+
* "_set": "customer"
|
|
807
|
+
* }
|
|
808
|
+
* },
|
|
809
|
+
* {
|
|
810
|
+
* "target": "address",
|
|
811
|
+
* "operation": {
|
|
812
|
+
* "_append": [
|
|
813
|
+
* {
|
|
814
|
+
* "_tags": [
|
|
815
|
+
* "billing",
|
|
816
|
+
* "primary"
|
|
817
|
+
* ],
|
|
818
|
+
* "street_name": {
|
|
819
|
+
* "_copy": "billing_contact.street_name"
|
|
820
|
+
* },
|
|
821
|
+
* "street_number": {
|
|
822
|
+
* "_copy": "billing_contact.street_number"
|
|
823
|
+
* },
|
|
824
|
+
* "city": {
|
|
825
|
+
* "_copy": "billing_contact.city"
|
|
826
|
+
* },
|
|
827
|
+
* "postal_code": {
|
|
828
|
+
* "_copy": "billing_contact.postal_code"
|
|
829
|
+
* },
|
|
830
|
+
* "country": {
|
|
831
|
+
* "_copy": "billing_contact.country"
|
|
832
|
+
* }
|
|
833
|
+
* },
|
|
834
|
+
* {
|
|
835
|
+
* "_tags": [
|
|
836
|
+
* "delivery"
|
|
837
|
+
* ],
|
|
838
|
+
* "street_name": {
|
|
839
|
+
* "_copy": "delivery_contact.street_name"
|
|
840
|
+
* },
|
|
841
|
+
* "street_number": {
|
|
842
|
+
* "_copy": "delivery_contact.street_number"
|
|
843
|
+
* },
|
|
844
|
+
* "city": {
|
|
845
|
+
* "_copy": "delivery_contact.city"
|
|
846
|
+
* },
|
|
847
|
+
* "postal_code": {
|
|
848
|
+
* "_copy": "delivery_contact.postal_code"
|
|
849
|
+
* },
|
|
850
|
+
* "country": {
|
|
851
|
+
* "_copy": "delivery_contact.country"
|
|
852
|
+
* }
|
|
853
|
+
* }
|
|
854
|
+
* ],
|
|
855
|
+
* "_uniq": [
|
|
856
|
+
* "street_name",
|
|
857
|
+
* "street_number",
|
|
858
|
+
* "postal_code",
|
|
859
|
+
* "country"
|
|
860
|
+
* ]
|
|
861
|
+
* }
|
|
862
|
+
* }
|
|
863
|
+
* ]
|
|
864
|
+
* }
|
|
865
|
+
* }
|
|
866
|
+
*/
|
|
867
|
+
export interface MapEntityAction {
|
|
868
|
+
id?: /**
|
|
869
|
+
* example:
|
|
870
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
871
|
+
*/
|
|
872
|
+
AutomationActionId;
|
|
873
|
+
flow_action_id?: /**
|
|
874
|
+
* example:
|
|
875
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
876
|
+
*/
|
|
877
|
+
AutomationActionId;
|
|
878
|
+
name?: string;
|
|
879
|
+
type?: "map-entity";
|
|
880
|
+
config?: MapEntityActionConfig;
|
|
881
|
+
execution_status?: ExecutionStatus;
|
|
882
|
+
started_at?: string;
|
|
883
|
+
updated_at?: string;
|
|
884
|
+
/**
|
|
885
|
+
* Whether to stop execution in a failed state if this action fails
|
|
886
|
+
*/
|
|
887
|
+
allow_failure?: boolean;
|
|
888
|
+
/**
|
|
889
|
+
* Flag indicating whether the action was created automatically or manually
|
|
890
|
+
*/
|
|
891
|
+
created_automatically?: boolean;
|
|
892
|
+
/**
|
|
893
|
+
* example:
|
|
894
|
+
* {}
|
|
895
|
+
*/
|
|
896
|
+
outputs?: {
|
|
897
|
+
[name: string]: any;
|
|
898
|
+
};
|
|
899
|
+
error_output?: ErrorOutput;
|
|
900
|
+
}
|
|
901
|
+
export interface MapEntityActionConfig {
|
|
902
|
+
mapping_config?: MappingConfigRef;
|
|
903
|
+
/**
|
|
904
|
+
* Schema of target entity
|
|
905
|
+
*/
|
|
906
|
+
target_schema: string;
|
|
907
|
+
/**
|
|
908
|
+
* Unique key for target entity (see upsertEntity of Entity API)
|
|
909
|
+
*/
|
|
910
|
+
target_unique?: string[];
|
|
911
|
+
/**
|
|
912
|
+
* Attribute mappings
|
|
913
|
+
*/
|
|
914
|
+
mapping_attributes?: (/**
|
|
915
|
+
* example:
|
|
916
|
+
* {
|
|
917
|
+
* "target": "_tags",
|
|
918
|
+
* "operation": {
|
|
919
|
+
* "_append": [
|
|
920
|
+
* "new",
|
|
921
|
+
* "tags"
|
|
922
|
+
* ],
|
|
923
|
+
* "_uniq": true
|
|
924
|
+
* }
|
|
925
|
+
* }
|
|
926
|
+
*/
|
|
927
|
+
MappingAttributeV2 | MappingAttribute)[];
|
|
928
|
+
/**
|
|
929
|
+
* Relation mappings
|
|
930
|
+
*/
|
|
931
|
+
relation_attributes?: RelationAttribute[];
|
|
932
|
+
/**
|
|
933
|
+
* Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback
|
|
934
|
+
*
|
|
935
|
+
*/
|
|
936
|
+
linkback_relation_attribute?: string;
|
|
937
|
+
/**
|
|
938
|
+
* Relation tags (labels) to include in main entity linkback relation attribute
|
|
939
|
+
*/
|
|
940
|
+
linkback_relation_tags?: string[];
|
|
941
|
+
}
|
|
942
|
+
export type MappingAttribute = SetValueMapper | CopyValueMapper | AppendValueMapper;
|
|
943
|
+
/**
|
|
944
|
+
* - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.
|
|
945
|
+
*
|
|
946
|
+
*/
|
|
947
|
+
export type MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value";
|
|
948
|
+
/**
|
|
949
|
+
* example:
|
|
950
|
+
* {
|
|
951
|
+
* "target": "_tags",
|
|
952
|
+
* "operation": {
|
|
953
|
+
* "_append": [
|
|
954
|
+
* "new",
|
|
955
|
+
* "tags"
|
|
956
|
+
* ],
|
|
957
|
+
* "_uniq": true
|
|
958
|
+
* }
|
|
959
|
+
* }
|
|
960
|
+
*/
|
|
961
|
+
export interface MappingAttributeV2 {
|
|
962
|
+
/**
|
|
963
|
+
* Target JSON path for the attribute to set
|
|
964
|
+
*/
|
|
965
|
+
target?: string;
|
|
966
|
+
operation: /* Mapping operation nodes are either primitive values or operation node objects */ OperationNode;
|
|
967
|
+
}
|
|
968
|
+
export interface MappingConfigRef {
|
|
969
|
+
/**
|
|
970
|
+
* Id of Entity Mapping Configuration to run for mapping.
|
|
971
|
+
*/
|
|
972
|
+
config_id: string;
|
|
973
|
+
/**
|
|
974
|
+
* Id of TargetConfig to run for mapping.
|
|
975
|
+
*/
|
|
976
|
+
target_id: string;
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Mapping operation nodes are either primitive values or operation node objects
|
|
980
|
+
*/
|
|
981
|
+
export type OperationNode = /* Mapping operation nodes are either primitive values or operation node objects */ OperationObjectNode | /* Represents any primitive JSON value */ PrimitiveJSONValue;
|
|
982
|
+
export interface OperationObjectNode {
|
|
983
|
+
[name: string]: any;
|
|
984
|
+
_set?: /* Represents any primitive JSON value */ PrimitiveJSONValue;
|
|
985
|
+
/**
|
|
986
|
+
* Append to array
|
|
987
|
+
*/
|
|
988
|
+
_append?: any;
|
|
989
|
+
/**
|
|
990
|
+
* Unique array
|
|
991
|
+
*/
|
|
992
|
+
_uniq?: /* Unique array */ boolean | string[];
|
|
993
|
+
/**
|
|
994
|
+
* Copy JSONPath value from source entity context
|
|
995
|
+
* example:
|
|
996
|
+
* contact.first_name
|
|
997
|
+
*/
|
|
998
|
+
_copy?: string;
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* example:
|
|
1002
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
1003
|
+
*/
|
|
1004
|
+
export type OrganizationId = string;
|
|
1005
|
+
/**
|
|
1006
|
+
* Represents any primitive JSON value
|
|
1007
|
+
*/
|
|
1008
|
+
export type PrimitiveJSONValue = /* Represents any primitive JSON value */ string | boolean | number | {
|
|
1009
|
+
[name: string]: any;
|
|
1010
|
+
} | any[];
|
|
1011
|
+
export interface ReceivedEmailTrigger {
|
|
1012
|
+
type: "received_email";
|
|
1013
|
+
configuration: {
|
|
1014
|
+
message_type?: "RECEIVED";
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
export interface RelationAttribute {
|
|
1018
|
+
/**
|
|
1019
|
+
* Target attribute to store the relation in
|
|
1020
|
+
*/
|
|
1021
|
+
target: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* Relation tags (labels) to set for the stored relations
|
|
1024
|
+
*/
|
|
1025
|
+
target_tags?: string[];
|
|
1026
|
+
/**
|
|
1027
|
+
* Include all relation tags (labels) present on the main entity relation
|
|
1028
|
+
*/
|
|
1029
|
+
target_tags_include_source?: boolean;
|
|
1030
|
+
/**
|
|
1031
|
+
* A filter to identify which source entities to pick as relations from main entity
|
|
1032
|
+
*/
|
|
1033
|
+
source_filter?: {
|
|
1034
|
+
/**
|
|
1035
|
+
* Limit relations to maximum number (default, all matched relations)
|
|
1036
|
+
*/
|
|
1037
|
+
limit?: number;
|
|
1038
|
+
/**
|
|
1039
|
+
* Filter by specific schema
|
|
1040
|
+
*/
|
|
1041
|
+
schema?: string;
|
|
1042
|
+
/**
|
|
1043
|
+
* Filter by a specific relation attribute on the main entity
|
|
1044
|
+
*/
|
|
1045
|
+
attribute?: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* Filter by relation tag (label) on the main entity
|
|
1048
|
+
*/
|
|
1049
|
+
relation_tag?: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* Filter by a specific tag on the related entity
|
|
1052
|
+
*/
|
|
1053
|
+
tag?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Picks main entity as relation (overrides other filters)
|
|
1056
|
+
*/
|
|
1057
|
+
self?: boolean;
|
|
1058
|
+
};
|
|
1059
|
+
related_to?: {
|
|
1060
|
+
[name: string]: any;
|
|
1061
|
+
};
|
|
1062
|
+
mode: "append" | "prepend" | "set";
|
|
1063
|
+
}
|
|
1064
|
+
export interface SearchAutomationsResp {
|
|
1065
|
+
total: number;
|
|
1066
|
+
results: AutomationFlow[];
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* example:
|
|
1070
|
+
* {
|
|
1071
|
+
* "id": "25jga0-gkasl26-0asg-908sgaj2",
|
|
1072
|
+
* "name": "Send Email",
|
|
1073
|
+
* "type": "send-email",
|
|
1074
|
+
* "config": {
|
|
1075
|
+
* "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2",
|
|
1076
|
+
* "language_code": "de"
|
|
1077
|
+
* }
|
|
1078
|
+
* }
|
|
1079
|
+
*/
|
|
1080
|
+
export interface SendEmailAction {
|
|
1081
|
+
id?: /**
|
|
1082
|
+
* example:
|
|
1083
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
1084
|
+
*/
|
|
1085
|
+
AutomationActionId;
|
|
1086
|
+
flow_action_id?: /**
|
|
1087
|
+
* example:
|
|
1088
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
1089
|
+
*/
|
|
1090
|
+
AutomationActionId;
|
|
1091
|
+
name?: string;
|
|
1092
|
+
type?: "send-email";
|
|
1093
|
+
config?: SendEmailActionConfig;
|
|
1094
|
+
execution_status?: ExecutionStatus;
|
|
1095
|
+
started_at?: string;
|
|
1096
|
+
updated_at?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Whether to stop execution in a failed state if this action fails
|
|
1099
|
+
*/
|
|
1100
|
+
allow_failure?: boolean;
|
|
1101
|
+
/**
|
|
1102
|
+
* Flag indicating whether the action was created automatically or manually
|
|
1103
|
+
*/
|
|
1104
|
+
created_automatically?: boolean;
|
|
1105
|
+
/**
|
|
1106
|
+
* example:
|
|
1107
|
+
* {}
|
|
1108
|
+
*/
|
|
1109
|
+
outputs?: {
|
|
1110
|
+
[name: string]: any;
|
|
1111
|
+
};
|
|
1112
|
+
error_output?: ErrorOutput;
|
|
1113
|
+
}
|
|
1114
|
+
export interface SendEmailActionConfig {
|
|
1115
|
+
email_template_id?: string;
|
|
1116
|
+
language_code?: "de" | "en";
|
|
1117
|
+
/**
|
|
1118
|
+
* Include extra file attachments in sent email.
|
|
1119
|
+
*
|
|
1120
|
+
* Attachments in email template will be sent regardless of this configuration.
|
|
1121
|
+
*
|
|
1122
|
+
*/
|
|
1123
|
+
attachments?: {
|
|
1124
|
+
/**
|
|
1125
|
+
* Specify filters to match file entities related to main entity
|
|
1126
|
+
*/
|
|
1127
|
+
source_filter?: {
|
|
1128
|
+
/**
|
|
1129
|
+
* Limit files to maximum number (default, all matched file relations)
|
|
1130
|
+
* example:
|
|
1131
|
+
* 1
|
|
1132
|
+
*/
|
|
1133
|
+
limit?: number;
|
|
1134
|
+
/**
|
|
1135
|
+
* Match by filename. Regex syntax supported
|
|
1136
|
+
* example:
|
|
1137
|
+
* .*
|
|
1138
|
+
*/
|
|
1139
|
+
filename_regex?: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* Filter by a specific relation attribute on the main entity
|
|
1142
|
+
* example:
|
|
1143
|
+
* _files
|
|
1144
|
+
*/
|
|
1145
|
+
attribute?: string;
|
|
1146
|
+
/**
|
|
1147
|
+
* Filter by relation tag (label) on the main entity
|
|
1148
|
+
* example:
|
|
1149
|
+
* contract
|
|
1150
|
+
*/
|
|
1151
|
+
relation_tag?: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* Filter by a specific tag on the related file entity
|
|
1154
|
+
*/
|
|
1155
|
+
tag?: string;
|
|
1156
|
+
/**
|
|
1157
|
+
* Filter by a specific document type (e.g. document)
|
|
1158
|
+
*/
|
|
1159
|
+
document_type?: "document" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown";
|
|
1160
|
+
/**
|
|
1161
|
+
* Picks main entity as file (only works if source entity is a file)
|
|
1162
|
+
*/
|
|
1163
|
+
self?: boolean;
|
|
1164
|
+
};
|
|
1165
|
+
}[];
|
|
1166
|
+
}
|
|
1167
|
+
export interface SetValueMapper {
|
|
1168
|
+
mode: /**
|
|
1169
|
+
* - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.
|
|
1170
|
+
*
|
|
1171
|
+
*/
|
|
1172
|
+
MappingAttributeMode;
|
|
1173
|
+
/**
|
|
1174
|
+
* JSON like target path for the attribute. Eg. last_name
|
|
1175
|
+
*/
|
|
1176
|
+
target: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.
|
|
1179
|
+
*
|
|
1180
|
+
*/
|
|
1181
|
+
value: any;
|
|
1182
|
+
}
|
|
1183
|
+
export interface StartExecutionRequest {
|
|
1184
|
+
entity_id?: /**
|
|
1185
|
+
* example:
|
|
1186
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
1187
|
+
*/
|
|
1188
|
+
EntityId;
|
|
1189
|
+
flow_id?: /**
|
|
1190
|
+
* example:
|
|
1191
|
+
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
1192
|
+
*/
|
|
1193
|
+
AutomationFlowId;
|
|
1194
|
+
}
|
|
1195
|
+
/**
|
|
1196
|
+
* example:
|
|
1197
|
+
* {
|
|
1198
|
+
* "source": "billing_contact.email",
|
|
1199
|
+
* "comparison": "exists"
|
|
1200
|
+
* }
|
|
1201
|
+
*/
|
|
1202
|
+
export interface TriggerCondition {
|
|
1203
|
+
source: string;
|
|
1204
|
+
comparison: Comparison;
|
|
1205
|
+
value?: string | number | string[] | number[];
|
|
1206
|
+
}
|
|
1207
|
+
/**
|
|
1208
|
+
* example:
|
|
1209
|
+
* {
|
|
1210
|
+
* "id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
1211
|
+
* "name": "Trigger Webhook",
|
|
1212
|
+
* "type": "trigger-webhook",
|
|
1213
|
+
* "config": {
|
|
1214
|
+
* "entity_sources": [
|
|
1215
|
+
* "contact",
|
|
1216
|
+
* "account"
|
|
1217
|
+
* ],
|
|
1218
|
+
* "target_webhook_id": "25jg9ag2ga"
|
|
1219
|
+
* }
|
|
1220
|
+
* }
|
|
1221
|
+
*/
|
|
1222
|
+
export interface TriggerWebhookAction {
|
|
1223
|
+
id?: /**
|
|
1224
|
+
* example:
|
|
1225
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
1226
|
+
*/
|
|
1227
|
+
AutomationActionId;
|
|
1228
|
+
flow_action_id?: /**
|
|
1229
|
+
* example:
|
|
1230
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
1231
|
+
*/
|
|
1232
|
+
AutomationActionId;
|
|
1233
|
+
name?: string;
|
|
1234
|
+
type?: "trigger-webhook";
|
|
1235
|
+
config?: TriggerWebhookActionConfig;
|
|
1236
|
+
execution_status?: ExecutionStatus;
|
|
1237
|
+
started_at?: string;
|
|
1238
|
+
updated_at?: string;
|
|
1239
|
+
/**
|
|
1240
|
+
* Whether to stop execution in a failed state if this action fails
|
|
1241
|
+
*/
|
|
1242
|
+
allow_failure?: boolean;
|
|
1243
|
+
/**
|
|
1244
|
+
* Flag indicating whether the action was created automatically or manually
|
|
1245
|
+
*/
|
|
1246
|
+
created_automatically?: boolean;
|
|
1247
|
+
/**
|
|
1248
|
+
* example:
|
|
1249
|
+
* {}
|
|
1250
|
+
*/
|
|
1251
|
+
outputs?: {
|
|
1252
|
+
[name: string]: any;
|
|
1253
|
+
};
|
|
1254
|
+
error_output?: ErrorOutput;
|
|
1255
|
+
}
|
|
1256
|
+
export interface TriggerWebhookActionConfig {
|
|
1257
|
+
entity_sources?: string[];
|
|
1258
|
+
target_webhook_id?: string;
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* example:
|
|
1262
|
+
* {
|
|
1263
|
+
* "id": "08g988-ojt2jtaga-292h-8978gsaga",
|
|
1264
|
+
* "name": "Trigger Workflow",
|
|
1265
|
+
* "type": "trigger-workflow",
|
|
1266
|
+
* "config": {
|
|
1267
|
+
* "target_workflow": "mfptvUMH",
|
|
1268
|
+
* "conditions": [
|
|
1269
|
+
* {
|
|
1270
|
+
* "schema": "ivy-opportunity",
|
|
1271
|
+
* "source": "customer.type",
|
|
1272
|
+
* "comparison": "equals",
|
|
1273
|
+
* "value": "PRIVATE"
|
|
1274
|
+
* }
|
|
1275
|
+
* ],
|
|
1276
|
+
* "assign_steps": [
|
|
1277
|
+
* {
|
|
1278
|
+
* "step_name": "Lead Sales",
|
|
1279
|
+
* "user_ids": [
|
|
1280
|
+
* 10010729
|
|
1281
|
+
* ]
|
|
1282
|
+
* },
|
|
1283
|
+
* {
|
|
1284
|
+
* "step_name": "Operations",
|
|
1285
|
+
* "user_ids": [
|
|
1286
|
+
* 10010728,
|
|
1287
|
+
* 10010729
|
|
1288
|
+
* ]
|
|
1289
|
+
* }
|
|
1290
|
+
* ]
|
|
1291
|
+
* }
|
|
1292
|
+
* }
|
|
1293
|
+
*/
|
|
1294
|
+
export interface TriggerWorkflowAction {
|
|
1295
|
+
id?: /**
|
|
1296
|
+
* example:
|
|
1297
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
1298
|
+
*/
|
|
1299
|
+
AutomationActionId;
|
|
1300
|
+
flow_action_id?: /**
|
|
1301
|
+
* example:
|
|
1302
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
1303
|
+
*/
|
|
1304
|
+
AutomationActionId;
|
|
1305
|
+
name?: string;
|
|
1306
|
+
type?: "trigger-workflow";
|
|
1307
|
+
config?: TriggerWorkflowConfig;
|
|
1308
|
+
execution_status?: ExecutionStatus;
|
|
1309
|
+
started_at?: string;
|
|
1310
|
+
updated_at?: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* Whether to stop execution in a failed state if this action fails
|
|
1313
|
+
*/
|
|
1314
|
+
allow_failure?: boolean;
|
|
1315
|
+
/**
|
|
1316
|
+
* Flag indicating whether the action was created automatically or manually
|
|
1317
|
+
*/
|
|
1318
|
+
created_automatically?: boolean;
|
|
1319
|
+
/**
|
|
1320
|
+
* example:
|
|
1321
|
+
* {}
|
|
1322
|
+
*/
|
|
1323
|
+
outputs?: {
|
|
1324
|
+
[name: string]: any;
|
|
1325
|
+
};
|
|
1326
|
+
error_output?: ErrorOutput;
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* example:
|
|
1330
|
+
* {
|
|
1331
|
+
* "source": "email",
|
|
1332
|
+
* "comparison": "equals",
|
|
1333
|
+
* "schema": "contact",
|
|
1334
|
+
* "value": "test@epilot.cloud"
|
|
1335
|
+
* }
|
|
1336
|
+
*/
|
|
1337
|
+
export interface TriggerWorkflowCondition {
|
|
1338
|
+
source: string;
|
|
1339
|
+
comparison: Comparison;
|
|
1340
|
+
value?: string | number | string[] | number[];
|
|
1341
|
+
schema: string;
|
|
1342
|
+
}
|
|
1343
|
+
export interface TriggerWorkflowConfig {
|
|
1344
|
+
target_workflow?: string;
|
|
1345
|
+
conditions?: /**
|
|
1346
|
+
* example:
|
|
1347
|
+
* {
|
|
1348
|
+
* "source": "email",
|
|
1349
|
+
* "comparison": "equals",
|
|
1350
|
+
* "schema": "contact",
|
|
1351
|
+
* "value": "test@epilot.cloud"
|
|
1352
|
+
* }
|
|
1353
|
+
*/
|
|
1354
|
+
TriggerWorkflowCondition[];
|
|
1355
|
+
assignees?: string[];
|
|
1356
|
+
assign_steps?: /**
|
|
1357
|
+
* example:
|
|
1358
|
+
* [
|
|
1359
|
+
* {
|
|
1360
|
+
* "step_id": "xyh9t2ha",
|
|
1361
|
+
* "step_name": "Lead Sales",
|
|
1362
|
+
* "user_ids": [
|
|
1363
|
+
* 10010729
|
|
1364
|
+
* ]
|
|
1365
|
+
* },
|
|
1366
|
+
* {
|
|
1367
|
+
* "step_id": "29jgasl",
|
|
1368
|
+
* "step_name": "Operations",
|
|
1369
|
+
* "user_ids": [
|
|
1370
|
+
* 10010728,
|
|
1371
|
+
* 10010729
|
|
1372
|
+
* ]
|
|
1373
|
+
* }
|
|
1374
|
+
* ]
|
|
1375
|
+
*/
|
|
1376
|
+
AssignUsersToStep[];
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
declare namespace Paths {
|
|
1381
|
+
namespace CancelExecution {
|
|
1382
|
+
namespace Parameters {
|
|
1383
|
+
export type ExecutionId = /**
|
|
1384
|
+
* example:
|
|
1385
|
+
* 9baf184f-bc81-4128-bca3-d974c90a12c4
|
|
1386
|
+
*/
|
|
1387
|
+
Components.Schemas.AutomationExecutionId;
|
|
1388
|
+
}
|
|
1389
|
+
export interface PathParameters {
|
|
1390
|
+
execution_id: Parameters.ExecutionId;
|
|
1391
|
+
}
|
|
1392
|
+
namespace Responses {
|
|
1393
|
+
export type $200 = Components.Schemas.AutomationExecution;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
namespace CreateFlow {
|
|
1397
|
+
export type RequestBody = Components.Schemas.AutomationFlow;
|
|
1398
|
+
namespace Responses {
|
|
1399
|
+
export type $201 = Components.Schemas.AutomationFlow;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
namespace DeleteFlow {
|
|
1403
|
+
namespace Parameters {
|
|
1404
|
+
export type FlowId = /**
|
|
1405
|
+
* example:
|
|
1406
|
+
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
1407
|
+
*/
|
|
1408
|
+
Components.Schemas.AutomationFlowId;
|
|
1409
|
+
}
|
|
1410
|
+
export interface PathParameters {
|
|
1411
|
+
flow_id: Parameters.FlowId;
|
|
1412
|
+
}
|
|
1413
|
+
namespace Responses {
|
|
1414
|
+
export type $200 = Components.Schemas.AutomationFlow;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
namespace GetExecution {
|
|
1418
|
+
namespace Parameters {
|
|
1419
|
+
export type ExecutionId = /**
|
|
1420
|
+
* example:
|
|
1421
|
+
* 9baf184f-bc81-4128-bca3-d974c90a12c4
|
|
1422
|
+
*/
|
|
1423
|
+
Components.Schemas.AutomationExecutionId;
|
|
1424
|
+
}
|
|
1425
|
+
export interface PathParameters {
|
|
1426
|
+
execution_id: Parameters.ExecutionId;
|
|
1427
|
+
}
|
|
1428
|
+
namespace Responses {
|
|
1429
|
+
export type $200 = Components.Schemas.AutomationExecution;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
namespace GetExecutions {
|
|
1433
|
+
namespace Parameters {
|
|
1434
|
+
export type EntityId = /**
|
|
1435
|
+
* example:
|
|
1436
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
1437
|
+
*/
|
|
1438
|
+
Components.Schemas.EntityId;
|
|
1439
|
+
export type From = number;
|
|
1440
|
+
export type Size = number;
|
|
1441
|
+
}
|
|
1442
|
+
export interface QueryParameters {
|
|
1443
|
+
entity_id?: Parameters.EntityId;
|
|
1444
|
+
size?: Parameters.Size;
|
|
1445
|
+
from?: Parameters.From;
|
|
1446
|
+
}
|
|
1447
|
+
namespace Responses {
|
|
1448
|
+
export type $200 = Components.Schemas.GetExecutionsResp;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
namespace GetFlow {
|
|
1452
|
+
namespace Parameters {
|
|
1453
|
+
export type FlowId = /**
|
|
1454
|
+
* example:
|
|
1455
|
+
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
1456
|
+
*/
|
|
1457
|
+
Components.Schemas.AutomationFlowId;
|
|
1458
|
+
}
|
|
1459
|
+
export interface PathParameters {
|
|
1460
|
+
flow_id: Parameters.FlowId;
|
|
1461
|
+
}
|
|
1462
|
+
namespace Responses {
|
|
1463
|
+
export type $200 = Components.Schemas.AutomationFlow;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
namespace PutFlow {
|
|
1467
|
+
namespace Parameters {
|
|
1468
|
+
export type FlowId = /**
|
|
1469
|
+
* example:
|
|
1470
|
+
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
1471
|
+
*/
|
|
1472
|
+
Components.Schemas.AutomationFlowId;
|
|
1473
|
+
}
|
|
1474
|
+
export interface PathParameters {
|
|
1475
|
+
flow_id: Parameters.FlowId;
|
|
1476
|
+
}
|
|
1477
|
+
export type RequestBody = Components.Schemas.AutomationFlow;
|
|
1478
|
+
namespace Responses {
|
|
1479
|
+
export type $200 = Components.Schemas.AutomationFlow;
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
namespace RetriggerAction {
|
|
1483
|
+
namespace Parameters {
|
|
1484
|
+
export type ActionId = /**
|
|
1485
|
+
* example:
|
|
1486
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
1487
|
+
*/
|
|
1488
|
+
Components.Schemas.AutomationActionId;
|
|
1489
|
+
export type ExecutionId = /**
|
|
1490
|
+
* example:
|
|
1491
|
+
* 9baf184f-bc81-4128-bca3-d974c90a12c4
|
|
1492
|
+
*/
|
|
1493
|
+
Components.Schemas.AutomationExecutionId;
|
|
1494
|
+
}
|
|
1495
|
+
export interface PathParameters {
|
|
1496
|
+
execution_id: Parameters.ExecutionId;
|
|
1497
|
+
action_id: Parameters.ActionId;
|
|
1498
|
+
}
|
|
1499
|
+
namespace Responses {
|
|
1500
|
+
export interface $200 {
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
namespace SearchFlows {
|
|
1505
|
+
namespace Parameters {
|
|
1506
|
+
export type From = number;
|
|
1507
|
+
/**
|
|
1508
|
+
* example:
|
|
1509
|
+
* submission
|
|
1510
|
+
*/
|
|
1511
|
+
export type Schema = string;
|
|
1512
|
+
export type Size = number;
|
|
1513
|
+
/**
|
|
1514
|
+
* example:
|
|
1515
|
+
* 600945fe-212e-4b97-acf7-391d64648384
|
|
1516
|
+
*/
|
|
1517
|
+
export type TriggerSourceId = string;
|
|
1518
|
+
}
|
|
1519
|
+
export interface QueryParameters {
|
|
1520
|
+
schema?: /**
|
|
1521
|
+
* example:
|
|
1522
|
+
* submission
|
|
1523
|
+
*/
|
|
1524
|
+
Parameters.Schema;
|
|
1525
|
+
size?: Parameters.Size;
|
|
1526
|
+
from?: Parameters.From;
|
|
1527
|
+
trigger_source_id?: /**
|
|
1528
|
+
* example:
|
|
1529
|
+
* 600945fe-212e-4b97-acf7-391d64648384
|
|
1530
|
+
*/
|
|
1531
|
+
Parameters.TriggerSourceId;
|
|
1532
|
+
}
|
|
1533
|
+
namespace Responses {
|
|
1534
|
+
export type $200 = Components.Schemas.SearchAutomationsResp;
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
namespace StartExecution {
|
|
1538
|
+
export type RequestBody = Components.Schemas.StartExecutionRequest;
|
|
1539
|
+
namespace Responses {
|
|
1540
|
+
export type $201 = Components.Schemas.AutomationExecution;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
export interface OperationMethods {
|
|
1546
|
+
/**
|
|
1547
|
+
* searchFlows - searchFlows
|
|
1548
|
+
*
|
|
1549
|
+
* Search available automation flows
|
|
1550
|
+
*/
|
|
1551
|
+
'searchFlows'(
|
|
1552
|
+
parameters?: Parameters<Paths.SearchFlows.QueryParameters> | null,
|
|
1553
|
+
data?: any,
|
|
1554
|
+
config?: AxiosRequestConfig
|
|
1555
|
+
): OperationResponse<Paths.SearchFlows.Responses.$200>
|
|
1556
|
+
/**
|
|
1557
|
+
* createFlow - createFlow
|
|
1558
|
+
*
|
|
1559
|
+
* Create new automation flow
|
|
1560
|
+
*/
|
|
1561
|
+
'createFlow'(
|
|
1562
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1563
|
+
data?: Paths.CreateFlow.RequestBody,
|
|
1564
|
+
config?: AxiosRequestConfig
|
|
1565
|
+
): OperationResponse<Paths.CreateFlow.Responses.$201>
|
|
1566
|
+
/**
|
|
1567
|
+
* getFlow - getFlow
|
|
1568
|
+
*
|
|
1569
|
+
* List available automation flows
|
|
1570
|
+
*/
|
|
1571
|
+
'getFlow'(
|
|
1572
|
+
parameters?: Parameters<Paths.GetFlow.PathParameters> | null,
|
|
1573
|
+
data?: any,
|
|
1574
|
+
config?: AxiosRequestConfig
|
|
1575
|
+
): OperationResponse<Paths.GetFlow.Responses.$200>
|
|
1576
|
+
/**
|
|
1577
|
+
* putFlow - putFlow
|
|
1578
|
+
*
|
|
1579
|
+
* Update automation flow by id
|
|
1580
|
+
*/
|
|
1581
|
+
'putFlow'(
|
|
1582
|
+
parameters?: Parameters<Paths.PutFlow.PathParameters> | null,
|
|
1583
|
+
data?: Paths.PutFlow.RequestBody,
|
|
1584
|
+
config?: AxiosRequestConfig
|
|
1585
|
+
): OperationResponse<Paths.PutFlow.Responses.$200>
|
|
1586
|
+
/**
|
|
1587
|
+
* deleteFlow - deleteFlow
|
|
1588
|
+
*
|
|
1589
|
+
* Update automation flow by id
|
|
1590
|
+
*/
|
|
1591
|
+
'deleteFlow'(
|
|
1592
|
+
parameters?: Parameters<Paths.DeleteFlow.PathParameters> | null,
|
|
1593
|
+
data?: any,
|
|
1594
|
+
config?: AxiosRequestConfig
|
|
1595
|
+
): OperationResponse<Paths.DeleteFlow.Responses.$200>
|
|
1596
|
+
/**
|
|
1597
|
+
* getExecutions - getExecutions
|
|
1598
|
+
*
|
|
1599
|
+
* List automation executions
|
|
1600
|
+
*/
|
|
1601
|
+
'getExecutions'(
|
|
1602
|
+
parameters?: Parameters<Paths.GetExecutions.QueryParameters> | null,
|
|
1603
|
+
data?: any,
|
|
1604
|
+
config?: AxiosRequestConfig
|
|
1605
|
+
): OperationResponse<Paths.GetExecutions.Responses.$200>
|
|
1606
|
+
/**
|
|
1607
|
+
* startExecution - startExecution
|
|
1608
|
+
*
|
|
1609
|
+
* Start new automation execution
|
|
1610
|
+
*/
|
|
1611
|
+
'startExecution'(
|
|
1612
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1613
|
+
data?: Paths.StartExecution.RequestBody,
|
|
1614
|
+
config?: AxiosRequestConfig
|
|
1615
|
+
): OperationResponse<Paths.StartExecution.Responses.$201>
|
|
1616
|
+
/**
|
|
1617
|
+
* getExecution - getExecution
|
|
1618
|
+
*
|
|
1619
|
+
* Get automation execution
|
|
1620
|
+
*/
|
|
1621
|
+
'getExecution'(
|
|
1622
|
+
parameters?: Parameters<Paths.GetExecution.PathParameters> | null,
|
|
1623
|
+
data?: any,
|
|
1624
|
+
config?: AxiosRequestConfig
|
|
1625
|
+
): OperationResponse<Paths.GetExecution.Responses.$200>
|
|
1626
|
+
/**
|
|
1627
|
+
* cancelExecution - cancelExecution
|
|
1628
|
+
*
|
|
1629
|
+
* Cancel automation execution
|
|
1630
|
+
*/
|
|
1631
|
+
'cancelExecution'(
|
|
1632
|
+
parameters?: Parameters<Paths.CancelExecution.PathParameters> | null,
|
|
1633
|
+
data?: any,
|
|
1634
|
+
config?: AxiosRequestConfig
|
|
1635
|
+
): OperationResponse<Paths.CancelExecution.Responses.$200>
|
|
1636
|
+
/**
|
|
1637
|
+
* retriggerAction - retriggerAction
|
|
1638
|
+
*
|
|
1639
|
+
* Retrigger a specific automation execution action
|
|
1640
|
+
*/
|
|
1641
|
+
'retriggerAction'(
|
|
1642
|
+
parameters?: Parameters<Paths.RetriggerAction.PathParameters> | null,
|
|
1643
|
+
data?: any,
|
|
1644
|
+
config?: AxiosRequestConfig
|
|
1645
|
+
): OperationResponse<Paths.RetriggerAction.Responses.$200>
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
export interface PathsDictionary {
|
|
1649
|
+
['/v1/automation/flows']: {
|
|
1650
|
+
/**
|
|
1651
|
+
* searchFlows - searchFlows
|
|
1652
|
+
*
|
|
1653
|
+
* Search available automation flows
|
|
1654
|
+
*/
|
|
1655
|
+
'get'(
|
|
1656
|
+
parameters?: Parameters<Paths.SearchFlows.QueryParameters> | null,
|
|
1657
|
+
data?: any,
|
|
1658
|
+
config?: AxiosRequestConfig
|
|
1659
|
+
): OperationResponse<Paths.SearchFlows.Responses.$200>
|
|
1660
|
+
/**
|
|
1661
|
+
* createFlow - createFlow
|
|
1662
|
+
*
|
|
1663
|
+
* Create new automation flow
|
|
1664
|
+
*/
|
|
1665
|
+
'post'(
|
|
1666
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1667
|
+
data?: Paths.CreateFlow.RequestBody,
|
|
1668
|
+
config?: AxiosRequestConfig
|
|
1669
|
+
): OperationResponse<Paths.CreateFlow.Responses.$201>
|
|
1670
|
+
}
|
|
1671
|
+
['/v1/automation/flows/{flow_id}']: {
|
|
1672
|
+
/**
|
|
1673
|
+
* getFlow - getFlow
|
|
1674
|
+
*
|
|
1675
|
+
* List available automation flows
|
|
1676
|
+
*/
|
|
1677
|
+
'get'(
|
|
1678
|
+
parameters?: Parameters<Paths.GetFlow.PathParameters> | null,
|
|
1679
|
+
data?: any,
|
|
1680
|
+
config?: AxiosRequestConfig
|
|
1681
|
+
): OperationResponse<Paths.GetFlow.Responses.$200>
|
|
1682
|
+
/**
|
|
1683
|
+
* putFlow - putFlow
|
|
1684
|
+
*
|
|
1685
|
+
* Update automation flow by id
|
|
1686
|
+
*/
|
|
1687
|
+
'put'(
|
|
1688
|
+
parameters?: Parameters<Paths.PutFlow.PathParameters> | null,
|
|
1689
|
+
data?: Paths.PutFlow.RequestBody,
|
|
1690
|
+
config?: AxiosRequestConfig
|
|
1691
|
+
): OperationResponse<Paths.PutFlow.Responses.$200>
|
|
1692
|
+
/**
|
|
1693
|
+
* deleteFlow - deleteFlow
|
|
1694
|
+
*
|
|
1695
|
+
* Update automation flow by id
|
|
1696
|
+
*/
|
|
1697
|
+
'delete'(
|
|
1698
|
+
parameters?: Parameters<Paths.DeleteFlow.PathParameters> | null,
|
|
1699
|
+
data?: any,
|
|
1700
|
+
config?: AxiosRequestConfig
|
|
1701
|
+
): OperationResponse<Paths.DeleteFlow.Responses.$200>
|
|
1702
|
+
}
|
|
1703
|
+
['/v1/automation/executions']: {
|
|
1704
|
+
/**
|
|
1705
|
+
* getExecutions - getExecutions
|
|
1706
|
+
*
|
|
1707
|
+
* List automation executions
|
|
1708
|
+
*/
|
|
1709
|
+
'get'(
|
|
1710
|
+
parameters?: Parameters<Paths.GetExecutions.QueryParameters> | null,
|
|
1711
|
+
data?: any,
|
|
1712
|
+
config?: AxiosRequestConfig
|
|
1713
|
+
): OperationResponse<Paths.GetExecutions.Responses.$200>
|
|
1714
|
+
/**
|
|
1715
|
+
* startExecution - startExecution
|
|
1716
|
+
*
|
|
1717
|
+
* Start new automation execution
|
|
1718
|
+
*/
|
|
1719
|
+
'post'(
|
|
1720
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1721
|
+
data?: Paths.StartExecution.RequestBody,
|
|
1722
|
+
config?: AxiosRequestConfig
|
|
1723
|
+
): OperationResponse<Paths.StartExecution.Responses.$201>
|
|
1724
|
+
}
|
|
1725
|
+
['/v1/automation/executions/{execution_id}']: {
|
|
1726
|
+
/**
|
|
1727
|
+
* getExecution - getExecution
|
|
1728
|
+
*
|
|
1729
|
+
* Get automation execution
|
|
1730
|
+
*/
|
|
1731
|
+
'get'(
|
|
1732
|
+
parameters?: Parameters<Paths.GetExecution.PathParameters> | null,
|
|
1733
|
+
data?: any,
|
|
1734
|
+
config?: AxiosRequestConfig
|
|
1735
|
+
): OperationResponse<Paths.GetExecution.Responses.$200>
|
|
1736
|
+
/**
|
|
1737
|
+
* cancelExecution - cancelExecution
|
|
1738
|
+
*
|
|
1739
|
+
* Cancel automation execution
|
|
1740
|
+
*/
|
|
1741
|
+
'delete'(
|
|
1742
|
+
parameters?: Parameters<Paths.CancelExecution.PathParameters> | null,
|
|
1743
|
+
data?: any,
|
|
1744
|
+
config?: AxiosRequestConfig
|
|
1745
|
+
): OperationResponse<Paths.CancelExecution.Responses.$200>
|
|
1746
|
+
}
|
|
1747
|
+
['/v1/automation/executions/{execution_id}/{action_id}/retrigger']: {
|
|
1748
|
+
/**
|
|
1749
|
+
* retriggerAction - retriggerAction
|
|
1750
|
+
*
|
|
1751
|
+
* Retrigger a specific automation execution action
|
|
1752
|
+
*/
|
|
1753
|
+
'post'(
|
|
1754
|
+
parameters?: Parameters<Paths.RetriggerAction.PathParameters> | null,
|
|
1755
|
+
data?: any,
|
|
1756
|
+
config?: AxiosRequestConfig
|
|
1757
|
+
): OperationResponse<Paths.RetriggerAction.Responses.$200>
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|