@epilot/automation-client 2.9.5 → 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi.d.ts +48 -1
- package/dist/openapi.json +293 -226
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ declare namespace Components {
|
|
|
40
40
|
*/
|
|
41
41
|
export type ActivityId = string;
|
|
42
42
|
export interface ActivityTrigger {
|
|
43
|
+
/**
|
|
44
|
+
* example:
|
|
45
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
46
|
+
*/
|
|
47
|
+
id?: string; // uuid
|
|
43
48
|
type: "activity";
|
|
44
49
|
configuration: {
|
|
45
50
|
/**
|
|
@@ -367,7 +372,7 @@ declare namespace Components {
|
|
|
367
372
|
* ```
|
|
368
373
|
*
|
|
369
374
|
*/
|
|
370
|
-
EntityOperationTrigger | ActivityTrigger | EntityManualTrigger | ReceivedEmailTrigger;
|
|
375
|
+
EntityOperationTrigger | ActivityTrigger | EntityManualTrigger | ReceivedEmailTrigger | AutomationTrigger;
|
|
371
376
|
export interface AnythingButCondition {
|
|
372
377
|
"anything-but"?: string[];
|
|
373
378
|
}
|
|
@@ -436,6 +441,11 @@ declare namespace Components {
|
|
|
436
441
|
};
|
|
437
442
|
}
|
|
438
443
|
export interface ApiSubmissionTrigger {
|
|
444
|
+
/**
|
|
445
|
+
* example:
|
|
446
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
447
|
+
*/
|
|
448
|
+
id?: string; // uuid
|
|
439
449
|
type: "api_submission";
|
|
440
450
|
configuration: {
|
|
441
451
|
source_id?: string;
|
|
@@ -750,6 +760,13 @@ declare namespace Components {
|
|
|
750
760
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
751
761
|
*/
|
|
752
762
|
export type AutomationFlowId = string;
|
|
763
|
+
export interface AutomationTrigger {
|
|
764
|
+
/**
|
|
765
|
+
* example:
|
|
766
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
767
|
+
*/
|
|
768
|
+
id?: string; // uuid
|
|
769
|
+
}
|
|
753
770
|
/**
|
|
754
771
|
* Creates an order entity with prices from journey
|
|
755
772
|
*/
|
|
@@ -912,6 +929,11 @@ declare namespace Components {
|
|
|
912
929
|
* }
|
|
913
930
|
*/
|
|
914
931
|
export interface Condition {
|
|
932
|
+
/**
|
|
933
|
+
* example:
|
|
934
|
+
* 1c8d3d9c-6d4c-4a83-aa22-aa0d630cbc2d
|
|
935
|
+
*/
|
|
936
|
+
id?: string; // uuid
|
|
915
937
|
source?: {
|
|
916
938
|
origin?: "trigger" | "action";
|
|
917
939
|
originType?: "entity" | "workflow" | "journey_block";
|
|
@@ -1086,6 +1108,11 @@ declare namespace Components {
|
|
|
1086
1108
|
_updated_at: string; // date-time
|
|
1087
1109
|
}
|
|
1088
1110
|
export interface EntityManualTrigger {
|
|
1111
|
+
/**
|
|
1112
|
+
* example:
|
|
1113
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1114
|
+
*/
|
|
1115
|
+
id?: string; // uuid
|
|
1089
1116
|
type: "entity_manual";
|
|
1090
1117
|
configuration: {
|
|
1091
1118
|
/**
|
|
@@ -1214,6 +1241,11 @@ declare namespace Components {
|
|
|
1214
1241
|
*
|
|
1215
1242
|
*/
|
|
1216
1243
|
export interface EntityOperationTrigger {
|
|
1244
|
+
/**
|
|
1245
|
+
* example:
|
|
1246
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1247
|
+
*/
|
|
1248
|
+
id?: string; // uuid
|
|
1217
1249
|
type: "entity_operation";
|
|
1218
1250
|
configuration: {
|
|
1219
1251
|
/**
|
|
@@ -1322,6 +1354,11 @@ declare namespace Components {
|
|
|
1322
1354
|
[name: string]: (string | EqualsIgnoreCaseCondition | AnythingButCondition | NumericCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[];
|
|
1323
1355
|
};
|
|
1324
1356
|
export interface FrontendSubmitTrigger {
|
|
1357
|
+
/**
|
|
1358
|
+
* example:
|
|
1359
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1360
|
+
*/
|
|
1361
|
+
id?: string; // uuid
|
|
1325
1362
|
type: "frontend_submission";
|
|
1326
1363
|
configuration: {
|
|
1327
1364
|
/**
|
|
@@ -1336,6 +1373,11 @@ declare namespace Components {
|
|
|
1336
1373
|
results: AutomationExecution[];
|
|
1337
1374
|
}
|
|
1338
1375
|
export interface JourneySubmitTrigger {
|
|
1376
|
+
/**
|
|
1377
|
+
* example:
|
|
1378
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1379
|
+
*/
|
|
1380
|
+
id?: string; // uuid
|
|
1339
1381
|
type: "journey_submission";
|
|
1340
1382
|
configuration: {
|
|
1341
1383
|
source_id: string; // uuid
|
|
@@ -1685,6 +1727,11 @@ declare namespace Components {
|
|
|
1685
1727
|
}
|
|
1686
1728
|
export type PrimitiveJSONValue = any;
|
|
1687
1729
|
export interface ReceivedEmailTrigger {
|
|
1730
|
+
/**
|
|
1731
|
+
* example:
|
|
1732
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1733
|
+
*/
|
|
1734
|
+
id?: string; // uuid
|
|
1688
1735
|
type: "received_email";
|
|
1689
1736
|
configuration: {
|
|
1690
1737
|
message_type?: "RECEIVED";
|
package/dist/openapi.json
CHANGED
|
@@ -558,6 +558,9 @@
|
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
"$ref": "#/components/schemas/ReceivedEmailTrigger"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
561
564
|
}
|
|
562
565
|
]
|
|
563
566
|
},
|
|
@@ -1771,6 +1774,11 @@
|
|
|
1771
1774
|
"Condition": {
|
|
1772
1775
|
"type": "object",
|
|
1773
1776
|
"properties": {
|
|
1777
|
+
"id": {
|
|
1778
|
+
"type": "string",
|
|
1779
|
+
"format": "uuid",
|
|
1780
|
+
"example": "1c8d3d9c-6d4c-4a83-aa22-aa0d630cbc2d"
|
|
1781
|
+
},
|
|
1774
1782
|
"source": {
|
|
1775
1783
|
"type": "object",
|
|
1776
1784
|
"properties": {
|
|
@@ -2153,297 +2161,349 @@
|
|
|
2153
2161
|
"type": "string",
|
|
2154
2162
|
"example": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74"
|
|
2155
2163
|
},
|
|
2156
|
-
"
|
|
2164
|
+
"AutomationTrigger": {
|
|
2157
2165
|
"type": "object",
|
|
2158
2166
|
"properties": {
|
|
2159
|
-
"
|
|
2167
|
+
"id": {
|
|
2160
2168
|
"type": "string",
|
|
2161
|
-
"
|
|
2162
|
-
|
|
2163
|
-
|
|
2169
|
+
"format": "uuid",
|
|
2170
|
+
"example": "12d4f45a-1883-4841-a94c-5928cb338a94"
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
},
|
|
2174
|
+
"JourneySubmitTrigger": {
|
|
2175
|
+
"allOf": [
|
|
2176
|
+
{
|
|
2177
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2164
2178
|
},
|
|
2165
|
-
|
|
2179
|
+
{
|
|
2166
2180
|
"type": "object",
|
|
2167
2181
|
"properties": {
|
|
2168
|
-
"
|
|
2182
|
+
"type": {
|
|
2169
2183
|
"type": "string",
|
|
2170
|
-
"
|
|
2184
|
+
"enum": [
|
|
2185
|
+
"journey_submission"
|
|
2186
|
+
]
|
|
2187
|
+
},
|
|
2188
|
+
"configuration": {
|
|
2189
|
+
"type": "object",
|
|
2190
|
+
"properties": {
|
|
2191
|
+
"source_id": {
|
|
2192
|
+
"type": "string",
|
|
2193
|
+
"format": "uuid"
|
|
2194
|
+
}
|
|
2195
|
+
},
|
|
2196
|
+
"required": [
|
|
2197
|
+
"source_id"
|
|
2198
|
+
]
|
|
2171
2199
|
}
|
|
2172
2200
|
},
|
|
2173
2201
|
"required": [
|
|
2174
|
-
"
|
|
2202
|
+
"type",
|
|
2203
|
+
"configuration"
|
|
2175
2204
|
]
|
|
2176
2205
|
}
|
|
2177
|
-
},
|
|
2178
|
-
"required": [
|
|
2179
|
-
"type",
|
|
2180
|
-
"configuration"
|
|
2181
2206
|
]
|
|
2182
2207
|
},
|
|
2183
2208
|
"FrontendSubmitTrigger": {
|
|
2184
|
-
"
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
"type": "string",
|
|
2188
|
-
"enum": [
|
|
2189
|
-
"frontend_submission"
|
|
2190
|
-
]
|
|
2209
|
+
"allOf": [
|
|
2210
|
+
{
|
|
2211
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2191
2212
|
},
|
|
2192
|
-
|
|
2213
|
+
{
|
|
2193
2214
|
"type": "object",
|
|
2194
2215
|
"properties": {
|
|
2195
|
-
"
|
|
2216
|
+
"type": {
|
|
2196
2217
|
"type": "string",
|
|
2197
|
-
"
|
|
2218
|
+
"enum": [
|
|
2219
|
+
"frontend_submission"
|
|
2220
|
+
]
|
|
2221
|
+
},
|
|
2222
|
+
"configuration": {
|
|
2223
|
+
"type": "object",
|
|
2224
|
+
"properties": {
|
|
2225
|
+
"source_id": {
|
|
2226
|
+
"type": "string",
|
|
2227
|
+
"example": "99"
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2198
2230
|
}
|
|
2199
|
-
}
|
|
2231
|
+
},
|
|
2232
|
+
"required": [
|
|
2233
|
+
"type",
|
|
2234
|
+
"configuration"
|
|
2235
|
+
]
|
|
2200
2236
|
}
|
|
2201
|
-
},
|
|
2202
|
-
"required": [
|
|
2203
|
-
"type",
|
|
2204
|
-
"configuration"
|
|
2205
2237
|
]
|
|
2206
2238
|
},
|
|
2207
2239
|
"ApiSubmissionTrigger": {
|
|
2208
|
-
"
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
"type": "string",
|
|
2212
|
-
"enum": [
|
|
2213
|
-
"api_submission"
|
|
2214
|
-
]
|
|
2240
|
+
"allOf": [
|
|
2241
|
+
{
|
|
2242
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2215
2243
|
},
|
|
2216
|
-
|
|
2244
|
+
{
|
|
2217
2245
|
"type": "object",
|
|
2218
2246
|
"properties": {
|
|
2219
|
-
"
|
|
2220
|
-
"type": "string"
|
|
2247
|
+
"type": {
|
|
2248
|
+
"type": "string",
|
|
2249
|
+
"enum": [
|
|
2250
|
+
"api_submission"
|
|
2251
|
+
]
|
|
2252
|
+
},
|
|
2253
|
+
"configuration": {
|
|
2254
|
+
"type": "object",
|
|
2255
|
+
"properties": {
|
|
2256
|
+
"source_id": {
|
|
2257
|
+
"type": "string"
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2221
2260
|
}
|
|
2222
|
-
}
|
|
2261
|
+
},
|
|
2262
|
+
"required": [
|
|
2263
|
+
"type",
|
|
2264
|
+
"configuration"
|
|
2265
|
+
]
|
|
2223
2266
|
}
|
|
2224
|
-
},
|
|
2225
|
-
"required": [
|
|
2226
|
-
"type",
|
|
2227
|
-
"configuration"
|
|
2228
2267
|
]
|
|
2229
2268
|
},
|
|
2230
2269
|
"ReceivedEmailTrigger": {
|
|
2231
|
-
"
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
"type": "string",
|
|
2235
|
-
"enum": [
|
|
2236
|
-
"received_email"
|
|
2237
|
-
]
|
|
2270
|
+
"allOf": [
|
|
2271
|
+
{
|
|
2272
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2238
2273
|
},
|
|
2239
|
-
|
|
2274
|
+
{
|
|
2240
2275
|
"type": "object",
|
|
2241
2276
|
"properties": {
|
|
2242
|
-
"
|
|
2277
|
+
"type": {
|
|
2243
2278
|
"type": "string",
|
|
2244
2279
|
"enum": [
|
|
2245
|
-
"
|
|
2280
|
+
"received_email"
|
|
2246
2281
|
]
|
|
2282
|
+
},
|
|
2283
|
+
"configuration": {
|
|
2284
|
+
"type": "object",
|
|
2285
|
+
"properties": {
|
|
2286
|
+
"message_type": {
|
|
2287
|
+
"type": "string",
|
|
2288
|
+
"enum": [
|
|
2289
|
+
"RECEIVED"
|
|
2290
|
+
]
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2247
2293
|
}
|
|
2248
|
-
}
|
|
2294
|
+
},
|
|
2295
|
+
"required": [
|
|
2296
|
+
"type",
|
|
2297
|
+
"configuration"
|
|
2298
|
+
]
|
|
2249
2299
|
}
|
|
2250
|
-
},
|
|
2251
|
-
"required": [
|
|
2252
|
-
"type",
|
|
2253
|
-
"configuration"
|
|
2254
2300
|
]
|
|
2255
2301
|
},
|
|
2256
2302
|
"EntityOperationTrigger": {
|
|
2257
|
-
"type": "
|
|
2258
|
-
"
|
|
2259
|
-
|
|
2260
|
-
"
|
|
2261
|
-
"enum": [
|
|
2262
|
-
"entity_operation"
|
|
2263
|
-
]
|
|
2303
|
+
"description": "- If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.\n- The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`\n | Comparison | Example | Rule syntax |\n |------------------------|-----------------------------------------------------|----------------------------------------------------------|\n | Null | first_name is null | `\"first_name\": [ null ]` |\n | Empty | last_name is empty | `\"last_name\": [\"\"]` |\n | Equals | email is \"j.doe@email.com\" | `\"email\": [ \"j.doe@email.com\" ]` |\n | Equals (ignore case) | first_name is \"John\" | `\"first_name\": [ { \"equals-ignore-case\": \"john\" } ]` |\n | And | fist_name is \"John\" and last_name is \"Doe\" | `\"first_name\": [ \"John\" ], \"last_name\": [\"Doe\"]` |\n | Or | PaymentType is \"Invoice\" or \"SEPA\" | `\"PaymentType\": [ \"invoice\", \"sepa\"]` |\n | Or (multiple fields) | first_name is \"John\", or last_name is \"Doe\". | `\"$or\": [ { \"first_name\": [ \"John\" ] }, { \"last_name\": [ \"Doe\" ] } ]` |\n | Not | status is anything but \"cancelled\" | `\"status\": [ { \"anything-but\": [ \"cancelled\" ] } ]` |\n | Numeric (equals) | Price is 100 | `\"Price\": [ { \"numeric\": [ \"=\", 100 ] } ]` |\n | Numeric (range) | Price is more than 10, and less than or equal to 20 | `\"Price\": [ { \"numeric\": [ \">\", 10, \"<=\", 20 ] } ]` |\n | Exists | ProductName exists | `\"ProductName\": [ { \"exists\": true } ]` |\n | Does not exist | ProductName does not exist | `\"ProductName\": [ { \"exists\": false } ]` |\n | Begins with | OpportunityNumber starts with OPP- | `\"opportunity_number\": [ { \"prefix\": \"OPP-\" } ]` |\n | Ends with | FileName ends with a .png extension | `\"filename\": [ { \"suffix\": \".png\" } ]` |\n | Wildcard | search a string using a wildcard | `\"email\": [ { \"wildcard\": \"*@doe.com\" } ]` |\n - To run the execution on all update events\n ```\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"]\n }\n }\n }\n ```\n - To run the execution only when the updates are from a portal user\n ```\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"]\n },\n \"activity\": {\n \"type\": \"EntityUpdatedFromPortal\"\n }\n }\n }\n ```\n - To run the execution only when there is an update on a specific attribute\n ```\n Only starts the automation when the email on a contact is changed\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"],\n \"payload\": {\n \"_schema\": [\"contact\"]\n },\n \"diff\": {\n \"updated\": {\n \"email\": [{ \"exists\": true }]\n }\n }\n }\n }\n }\n ```\n - To run the execution only when a specific attribute is altered(created/updated/deleted)\n ```\n Only starts the automation when a price is altered on a contract\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"payload\": {\n \"_schema\": [\"contract\"]\n },\n \"diff\": {\n // Whether he first_name has been added, updated, or removed\n $or: [\n {\n 'added.first_name': [{ exists: true }]\n },\n {\n 'updated.first_name': [{ exists: true }]\n },\n {\n 'deleted.first_name': [{ exists: true }]\n }\n ]\n }\n }\n }\n }\n ```\n - To run the execution if an attribute is changed from one state to another\n ```\n Only starts the automation when the order status changes from `open_for_acceptance` to `placed`\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"],\n \"payload\": {\n \"_schema\": [\"order\"],\n \"status\": [\"placed\"]\n },\n \"diff\": {\n \"updated\": {\n \"status\": [\"open_for_acceptance\"]\n }\n }\n }\n }\n }\n ```\n",
|
|
2304
|
+
"allOf": [
|
|
2305
|
+
{
|
|
2306
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2264
2307
|
},
|
|
2265
|
-
|
|
2308
|
+
{
|
|
2266
2309
|
"type": "object",
|
|
2267
2310
|
"properties": {
|
|
2268
|
-
"
|
|
2311
|
+
"type": {
|
|
2269
2312
|
"type": "string",
|
|
2270
|
-
"
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
"type": "array",
|
|
2274
|
-
"minItems": 1,
|
|
2275
|
-
"items": {
|
|
2276
|
-
"$ref": "#/components/schemas/EntityOperation"
|
|
2277
|
-
}
|
|
2278
|
-
},
|
|
2279
|
-
"include_activities": {
|
|
2280
|
-
"type": "array",
|
|
2281
|
-
"items": {
|
|
2282
|
-
"type": "string",
|
|
2283
|
-
"example": [
|
|
2284
|
-
"CreateEntity"
|
|
2285
|
-
]
|
|
2286
|
-
}
|
|
2287
|
-
},
|
|
2288
|
-
"exclude_activities": {
|
|
2289
|
-
"type": "array",
|
|
2290
|
-
"items": {
|
|
2291
|
-
"type": "string",
|
|
2292
|
-
"example": [
|
|
2293
|
-
"SyncEntity"
|
|
2294
|
-
]
|
|
2295
|
-
}
|
|
2313
|
+
"enum": [
|
|
2314
|
+
"entity_operation"
|
|
2315
|
+
]
|
|
2296
2316
|
},
|
|
2297
|
-
"
|
|
2317
|
+
"configuration": {
|
|
2298
2318
|
"type": "object",
|
|
2299
2319
|
"properties": {
|
|
2300
|
-
"
|
|
2320
|
+
"schema": {
|
|
2321
|
+
"type": "string",
|
|
2322
|
+
"example": "submission"
|
|
2323
|
+
},
|
|
2324
|
+
"operations": {
|
|
2325
|
+
"type": "array",
|
|
2326
|
+
"minItems": 1,
|
|
2327
|
+
"items": {
|
|
2328
|
+
"$ref": "#/components/schemas/EntityOperation"
|
|
2329
|
+
}
|
|
2330
|
+
},
|
|
2331
|
+
"include_activities": {
|
|
2332
|
+
"type": "array",
|
|
2333
|
+
"items": {
|
|
2334
|
+
"type": "string",
|
|
2335
|
+
"example": [
|
|
2336
|
+
"CreateEntity"
|
|
2337
|
+
]
|
|
2338
|
+
}
|
|
2339
|
+
},
|
|
2340
|
+
"exclude_activities": {
|
|
2341
|
+
"type": "array",
|
|
2342
|
+
"items": {
|
|
2343
|
+
"type": "string",
|
|
2344
|
+
"example": [
|
|
2345
|
+
"SyncEntity"
|
|
2346
|
+
]
|
|
2347
|
+
}
|
|
2348
|
+
},
|
|
2349
|
+
"filter_config": {
|
|
2301
2350
|
"type": "object",
|
|
2302
2351
|
"properties": {
|
|
2303
2352
|
"operation": {
|
|
2304
|
-
"type": "
|
|
2305
|
-
"
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
},
|
|
2313
|
-
"diff": {
|
|
2314
|
-
"anyOf": [
|
|
2315
|
-
{
|
|
2316
|
-
"$ref": "#/components/schemas/OrConditionForDiff"
|
|
2353
|
+
"type": "object",
|
|
2354
|
+
"properties": {
|
|
2355
|
+
"operation": {
|
|
2356
|
+
"type": "array",
|
|
2357
|
+
"description": "Filter on operation type. If not specified, all operations will be matched on execution.\nExample:\n 1. Filter all the createEntity/updateEntity operations\n ```\n {\n \"operation\":{\n \"operation\": [\"createEntity\", \"updateEntity\"]\n }\n }\n ```\n",
|
|
2358
|
+
"items": {
|
|
2359
|
+
"$ref": "#/components/schemas/EntityOperation"
|
|
2360
|
+
}
|
|
2317
2361
|
},
|
|
2318
|
-
{
|
|
2319
|
-
"
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
"updated": {
|
|
2326
|
-
"$ref": "#/components/schemas/DiffUpdated"
|
|
2362
|
+
"payload": {
|
|
2363
|
+
"$ref": "#/components/schemas/FilterConditionOnEvent"
|
|
2364
|
+
},
|
|
2365
|
+
"diff": {
|
|
2366
|
+
"anyOf": [
|
|
2367
|
+
{
|
|
2368
|
+
"$ref": "#/components/schemas/OrConditionForDiff"
|
|
2327
2369
|
},
|
|
2328
|
-
|
|
2329
|
-
"
|
|
2370
|
+
{
|
|
2371
|
+
"type": "object",
|
|
2372
|
+
"description": "Diff to it's prior state when an entity is updated",
|
|
2373
|
+
"properties": {
|
|
2374
|
+
"added": {
|
|
2375
|
+
"$ref": "#/components/schemas/DiffAdded"
|
|
2376
|
+
},
|
|
2377
|
+
"updated": {
|
|
2378
|
+
"$ref": "#/components/schemas/DiffUpdated"
|
|
2379
|
+
},
|
|
2380
|
+
"deleted": {
|
|
2381
|
+
"$ref": "#/components/schemas/DiffDeleted"
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2330
2384
|
}
|
|
2331
|
-
|
|
2385
|
+
]
|
|
2332
2386
|
}
|
|
2333
|
-
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2387
|
+
}
|
|
2388
|
+
},
|
|
2389
|
+
"activity": {
|
|
2390
|
+
"type": "object",
|
|
2391
|
+
"properties": {
|
|
2392
|
+
"type": {
|
|
2393
|
+
"type": "array",
|
|
2394
|
+
"items": {
|
|
2395
|
+
"anyOf": [
|
|
2396
|
+
{
|
|
2397
|
+
"type": "string"
|
|
2398
|
+
},
|
|
2399
|
+
{
|
|
2400
|
+
"$ref": "#/components/schemas/EqualsIgnoreCaseCondition"
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
"$ref": "#/components/schemas/AnythingButCondition"
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
"$ref": "#/components/schemas/ExistsCondition"
|
|
2407
|
+
},
|
|
2408
|
+
{
|
|
2409
|
+
"$ref": "#/components/schemas/PrefixCondition"
|
|
2410
|
+
},
|
|
2411
|
+
{
|
|
2412
|
+
"$ref": "#/components/schemas/SuffixCondition"
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
"$ref": "#/components/schemas/WildcardCondition"
|
|
2416
|
+
}
|
|
2417
|
+
]
|
|
2361
2418
|
},
|
|
2362
|
-
|
|
2363
|
-
"
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
"DocUploadedFromPortal"
|
|
2371
|
-
],
|
|
2372
|
-
"description": "Filter on activity type. If not specified, all activities will be matched on execution.\nExample:\n 1. Filter the events when an entity is updated from portal\n ```\n {\n \"activity\":{\n \"type\": [\"EntityUpdatedFromPortal\"]\n }\n }\n ```\n 2. Filter the events when either a doc is uploaded/removed on an entity from a portal\n ```\n {\n \"activity\":{\n \"type\": [\"DocUploadedFromPortal\", \"DocRemovedFromPortal\"]\n }\n }\n ```\n"
|
|
2419
|
+
"example": [
|
|
2420
|
+
"EntityUpdatedFromPortal",
|
|
2421
|
+
"EntityUpdated",
|
|
2422
|
+
"DocUploadedFromPortal"
|
|
2423
|
+
],
|
|
2424
|
+
"description": "Filter on activity type. If not specified, all activities will be matched on execution.\nExample:\n 1. Filter the events when an entity is updated from portal\n ```\n {\n \"activity\":{\n \"type\": [\"EntityUpdatedFromPortal\"]\n }\n }\n ```\n 2. Filter the events when either a doc is uploaded/removed on an entity from a portal\n ```\n {\n \"activity\":{\n \"type\": [\"DocUploadedFromPortal\", \"DocRemovedFromPortal\"]\n }\n }\n ```\n"
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2373
2427
|
}
|
|
2374
2428
|
}
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
},
|
|
2378
|
-
"ecp_config": {
|
|
2379
|
-
"type": "object",
|
|
2380
|
-
"properties": {
|
|
2381
|
-
"origin": {
|
|
2382
|
-
"type": "string",
|
|
2383
|
-
"example": "END_CUSTOMER_PORTAL"
|
|
2384
2429
|
},
|
|
2385
|
-
"
|
|
2430
|
+
"ecp_config": {
|
|
2386
2431
|
"type": "object",
|
|
2387
2432
|
"properties": {
|
|
2388
|
-
"
|
|
2389
|
-
"type": "
|
|
2390
|
-
"example":
|
|
2433
|
+
"origin": {
|
|
2434
|
+
"type": "string",
|
|
2435
|
+
"example": "END_CUSTOMER_PORTAL"
|
|
2436
|
+
},
|
|
2437
|
+
"file_config": {
|
|
2438
|
+
"type": "object",
|
|
2439
|
+
"properties": {
|
|
2440
|
+
"shared_with_end_customer": {
|
|
2441
|
+
"type": "boolean",
|
|
2442
|
+
"example": true
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2391
2445
|
}
|
|
2392
2446
|
}
|
|
2393
2447
|
}
|
|
2394
2448
|
}
|
|
2395
2449
|
}
|
|
2396
|
-
}
|
|
2450
|
+
},
|
|
2451
|
+
"required": [
|
|
2452
|
+
"type",
|
|
2453
|
+
"configuration"
|
|
2454
|
+
]
|
|
2397
2455
|
}
|
|
2398
|
-
|
|
2399
|
-
"required": [
|
|
2400
|
-
"type",
|
|
2401
|
-
"configuration"
|
|
2402
|
-
],
|
|
2403
|
-
"description": "- If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.\n- The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`\n | Comparison | Example | Rule syntax |\n |------------------------|-----------------------------------------------------|----------------------------------------------------------|\n | Null | first_name is null | `\"first_name\": [ null ]` |\n | Empty | last_name is empty | `\"last_name\": [\"\"]` |\n | Equals | email is \"j.doe@email.com\" | `\"email\": [ \"j.doe@email.com\" ]` |\n | Equals (ignore case) | first_name is \"John\" | `\"first_name\": [ { \"equals-ignore-case\": \"john\" } ]` |\n | And | fist_name is \"John\" and last_name is \"Doe\" | `\"first_name\": [ \"John\" ], \"last_name\": [\"Doe\"]` |\n | Or | PaymentType is \"Invoice\" or \"SEPA\" | `\"PaymentType\": [ \"invoice\", \"sepa\"]` |\n | Or (multiple fields) | first_name is \"John\", or last_name is \"Doe\". | `\"$or\": [ { \"first_name\": [ \"John\" ] }, { \"last_name\": [ \"Doe\" ] } ]` |\n | Not | status is anything but \"cancelled\" | `\"status\": [ { \"anything-but\": [ \"cancelled\" ] } ]` |\n | Numeric (equals) | Price is 100 | `\"Price\": [ { \"numeric\": [ \"=\", 100 ] } ]` |\n | Numeric (range) | Price is more than 10, and less than or equal to 20 | `\"Price\": [ { \"numeric\": [ \">\", 10, \"<=\", 20 ] } ]` |\n | Exists | ProductName exists | `\"ProductName\": [ { \"exists\": true } ]` |\n | Does not exist | ProductName does not exist | `\"ProductName\": [ { \"exists\": false } ]` |\n | Begins with | OpportunityNumber starts with OPP- | `\"opportunity_number\": [ { \"prefix\": \"OPP-\" } ]` |\n | Ends with | FileName ends with a .png extension | `\"filename\": [ { \"suffix\": \".png\" } ]` |\n | Wildcard | search a string using a wildcard | `\"email\": [ { \"wildcard\": \"*@doe.com\" } ]` |\n - To run the execution on all update events\n ```\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"]\n }\n }\n }\n ```\n - To run the execution only when the updates are from a portal user\n ```\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"]\n },\n \"activity\": {\n \"type\": \"EntityUpdatedFromPortal\"\n }\n }\n }\n ```\n - To run the execution only when there is an update on a specific attribute\n ```\n Only starts the automation when the email on a contact is changed\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"],\n \"payload\": {\n \"_schema\": [\"contact\"]\n },\n \"diff\": {\n \"updated\": {\n \"email\": [{ \"exists\": true }]\n }\n }\n }\n }\n }\n ```\n - To run the execution only when a specific attribute is altered(created/updated/deleted)\n ```\n Only starts the automation when a price is altered on a contract\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"payload\": {\n \"_schema\": [\"contract\"]\n },\n \"diff\": {\n // Whether he first_name has been added, updated, or removed\n $or: [\n {\n 'added.first_name': [{ exists: true }]\n },\n {\n 'updated.first_name': [{ exists: true }]\n },\n {\n 'deleted.first_name': [{ exists: true }]\n }\n ]\n }\n }\n }\n }\n ```\n - To run the execution if an attribute is changed from one state to another\n ```\n Only starts the automation when the order status changes from `open_for_acceptance` to `placed`\n {\n \"type\": \"filter_entity_event\",\n \"configuration\": {\n \"operation\": {\n \"operation\": [\"updateEntity\"],\n \"payload\": {\n \"_schema\": [\"order\"],\n \"status\": [\"placed\"]\n },\n \"diff\": {\n \"updated\": {\n \"status\": [\"open_for_acceptance\"]\n }\n }\n }\n }\n }\n ```\n"
|
|
2456
|
+
]
|
|
2404
2457
|
},
|
|
2405
2458
|
"ActivityTrigger": {
|
|
2406
|
-
"
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
"type": "string",
|
|
2410
|
-
"enum": [
|
|
2411
|
-
"activity"
|
|
2412
|
-
]
|
|
2459
|
+
"allOf": [
|
|
2460
|
+
{
|
|
2461
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2413
2462
|
},
|
|
2414
|
-
|
|
2463
|
+
{
|
|
2415
2464
|
"type": "object",
|
|
2416
2465
|
"properties": {
|
|
2417
|
-
"
|
|
2466
|
+
"type": {
|
|
2418
2467
|
"type": "string",
|
|
2419
|
-
"
|
|
2468
|
+
"enum": [
|
|
2469
|
+
"activity"
|
|
2470
|
+
]
|
|
2420
2471
|
},
|
|
2421
|
-
"
|
|
2422
|
-
"type": "
|
|
2423
|
-
"
|
|
2424
|
-
"
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2472
|
+
"configuration": {
|
|
2473
|
+
"type": "object",
|
|
2474
|
+
"properties": {
|
|
2475
|
+
"schema": {
|
|
2476
|
+
"type": "string",
|
|
2477
|
+
"example": "submission"
|
|
2478
|
+
},
|
|
2479
|
+
"types": {
|
|
2480
|
+
"type": "array",
|
|
2481
|
+
"items": {
|
|
2482
|
+
"anyOf": [
|
|
2483
|
+
{
|
|
2484
|
+
"type": "string",
|
|
2485
|
+
"enum": [
|
|
2486
|
+
"CreateMeterReading",
|
|
2487
|
+
"UpdateMeterReading",
|
|
2488
|
+
"DocDownloadedFromPortal",
|
|
2489
|
+
"PortalUserResetPassword",
|
|
2490
|
+
"PortalUserResetForgotPassword"
|
|
2491
|
+
]
|
|
2492
|
+
},
|
|
2493
|
+
{
|
|
2494
|
+
"type": "string"
|
|
2495
|
+
}
|
|
2433
2496
|
]
|
|
2434
|
-
},
|
|
2435
|
-
{
|
|
2436
|
-
"type": "string"
|
|
2437
2497
|
}
|
|
2438
|
-
|
|
2498
|
+
}
|
|
2439
2499
|
}
|
|
2440
2500
|
}
|
|
2441
|
-
}
|
|
2501
|
+
},
|
|
2502
|
+
"required": [
|
|
2503
|
+
"type",
|
|
2504
|
+
"configuration"
|
|
2505
|
+
]
|
|
2442
2506
|
}
|
|
2443
|
-
},
|
|
2444
|
-
"required": [
|
|
2445
|
-
"type",
|
|
2446
|
-
"configuration"
|
|
2447
2507
|
]
|
|
2448
2508
|
},
|
|
2449
2509
|
"EntityOperation": {
|
|
@@ -2455,28 +2515,35 @@
|
|
|
2455
2515
|
]
|
|
2456
2516
|
},
|
|
2457
2517
|
"EntityManualTrigger": {
|
|
2458
|
-
"
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
"type": "string",
|
|
2462
|
-
"enum": [
|
|
2463
|
-
"entity_manual"
|
|
2464
|
-
]
|
|
2518
|
+
"allOf": [
|
|
2519
|
+
{
|
|
2520
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2465
2521
|
},
|
|
2466
|
-
|
|
2522
|
+
{
|
|
2467
2523
|
"type": "object",
|
|
2468
2524
|
"properties": {
|
|
2469
|
-
"
|
|
2470
|
-
"description": "Which entity type can this automation be triggered from",
|
|
2525
|
+
"type": {
|
|
2471
2526
|
"type": "string",
|
|
2472
|
-
"
|
|
2527
|
+
"enum": [
|
|
2528
|
+
"entity_manual"
|
|
2529
|
+
]
|
|
2530
|
+
},
|
|
2531
|
+
"configuration": {
|
|
2532
|
+
"type": "object",
|
|
2533
|
+
"properties": {
|
|
2534
|
+
"schema": {
|
|
2535
|
+
"description": "Which entity type can this automation be triggered from",
|
|
2536
|
+
"type": "string",
|
|
2537
|
+
"example": "submission"
|
|
2538
|
+
}
|
|
2539
|
+
}
|
|
2473
2540
|
}
|
|
2474
|
-
}
|
|
2541
|
+
},
|
|
2542
|
+
"required": [
|
|
2543
|
+
"type",
|
|
2544
|
+
"configuration"
|
|
2545
|
+
]
|
|
2475
2546
|
}
|
|
2476
|
-
},
|
|
2477
|
-
"required": [
|
|
2478
|
-
"type",
|
|
2479
|
-
"configuration"
|
|
2480
2547
|
]
|
|
2481
2548
|
},
|
|
2482
2549
|
"TriggerCondition": {
|