@epilot/automation-client 2.9.4 → 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 +49 -6
- package/dist/openapi.json +305 -227
- 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,17 +929,18 @@ 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";
|
|
918
940
|
id?: string;
|
|
919
941
|
schema?: string;
|
|
920
942
|
attribute?: string;
|
|
921
|
-
|
|
922
|
-
* example:
|
|
923
|
-
* text | boolean | date | number
|
|
924
|
-
*/
|
|
925
|
-
attributeType?: string;
|
|
943
|
+
attributeType?: "text" | "number" | "boolean" | "date" | "tag" | "country" | "email" | "phone" | "product" | "price";
|
|
926
944
|
};
|
|
927
945
|
operation?: "equals" | "not_equals" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty";
|
|
928
946
|
values?: string[];
|
|
@@ -1090,6 +1108,11 @@ declare namespace Components {
|
|
|
1090
1108
|
_updated_at: string; // date-time
|
|
1091
1109
|
}
|
|
1092
1110
|
export interface EntityManualTrigger {
|
|
1111
|
+
/**
|
|
1112
|
+
* example:
|
|
1113
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1114
|
+
*/
|
|
1115
|
+
id?: string; // uuid
|
|
1093
1116
|
type: "entity_manual";
|
|
1094
1117
|
configuration: {
|
|
1095
1118
|
/**
|
|
@@ -1218,6 +1241,11 @@ declare namespace Components {
|
|
|
1218
1241
|
*
|
|
1219
1242
|
*/
|
|
1220
1243
|
export interface EntityOperationTrigger {
|
|
1244
|
+
/**
|
|
1245
|
+
* example:
|
|
1246
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1247
|
+
*/
|
|
1248
|
+
id?: string; // uuid
|
|
1221
1249
|
type: "entity_operation";
|
|
1222
1250
|
configuration: {
|
|
1223
1251
|
/**
|
|
@@ -1326,6 +1354,11 @@ declare namespace Components {
|
|
|
1326
1354
|
[name: string]: (string | EqualsIgnoreCaseCondition | AnythingButCondition | NumericCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[];
|
|
1327
1355
|
};
|
|
1328
1356
|
export interface FrontendSubmitTrigger {
|
|
1357
|
+
/**
|
|
1358
|
+
* example:
|
|
1359
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1360
|
+
*/
|
|
1361
|
+
id?: string; // uuid
|
|
1329
1362
|
type: "frontend_submission";
|
|
1330
1363
|
configuration: {
|
|
1331
1364
|
/**
|
|
@@ -1340,6 +1373,11 @@ declare namespace Components {
|
|
|
1340
1373
|
results: AutomationExecution[];
|
|
1341
1374
|
}
|
|
1342
1375
|
export interface JourneySubmitTrigger {
|
|
1376
|
+
/**
|
|
1377
|
+
* example:
|
|
1378
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1379
|
+
*/
|
|
1380
|
+
id?: string; // uuid
|
|
1343
1381
|
type: "journey_submission";
|
|
1344
1382
|
configuration: {
|
|
1345
1383
|
source_id: string; // uuid
|
|
@@ -1689,6 +1727,11 @@ declare namespace Components {
|
|
|
1689
1727
|
}
|
|
1690
1728
|
export type PrimitiveJSONValue = any;
|
|
1691
1729
|
export interface ReceivedEmailTrigger {
|
|
1730
|
+
/**
|
|
1731
|
+
* example:
|
|
1732
|
+
* 12d4f45a-1883-4841-a94c-5928cb338a94
|
|
1733
|
+
*/
|
|
1734
|
+
id?: string; // uuid
|
|
1692
1735
|
type: "received_email";
|
|
1693
1736
|
configuration: {
|
|
1694
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": {
|
|
@@ -1800,7 +1808,18 @@
|
|
|
1800
1808
|
},
|
|
1801
1809
|
"attributeType": {
|
|
1802
1810
|
"type": "string",
|
|
1803
|
-
"
|
|
1811
|
+
"enum": [
|
|
1812
|
+
"text",
|
|
1813
|
+
"number",
|
|
1814
|
+
"boolean",
|
|
1815
|
+
"date",
|
|
1816
|
+
"tag",
|
|
1817
|
+
"country",
|
|
1818
|
+
"email",
|
|
1819
|
+
"phone",
|
|
1820
|
+
"product",
|
|
1821
|
+
"price"
|
|
1822
|
+
]
|
|
1804
1823
|
}
|
|
1805
1824
|
}
|
|
1806
1825
|
},
|
|
@@ -2142,297 +2161,349 @@
|
|
|
2142
2161
|
"type": "string",
|
|
2143
2162
|
"example": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74"
|
|
2144
2163
|
},
|
|
2145
|
-
"
|
|
2164
|
+
"AutomationTrigger": {
|
|
2146
2165
|
"type": "object",
|
|
2147
2166
|
"properties": {
|
|
2148
|
-
"
|
|
2167
|
+
"id": {
|
|
2149
2168
|
"type": "string",
|
|
2150
|
-
"
|
|
2151
|
-
|
|
2152
|
-
|
|
2169
|
+
"format": "uuid",
|
|
2170
|
+
"example": "12d4f45a-1883-4841-a94c-5928cb338a94"
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
},
|
|
2174
|
+
"JourneySubmitTrigger": {
|
|
2175
|
+
"allOf": [
|
|
2176
|
+
{
|
|
2177
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2153
2178
|
},
|
|
2154
|
-
|
|
2179
|
+
{
|
|
2155
2180
|
"type": "object",
|
|
2156
2181
|
"properties": {
|
|
2157
|
-
"
|
|
2182
|
+
"type": {
|
|
2158
2183
|
"type": "string",
|
|
2159
|
-
"
|
|
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
|
+
]
|
|
2160
2199
|
}
|
|
2161
2200
|
},
|
|
2162
2201
|
"required": [
|
|
2163
|
-
"
|
|
2202
|
+
"type",
|
|
2203
|
+
"configuration"
|
|
2164
2204
|
]
|
|
2165
2205
|
}
|
|
2166
|
-
},
|
|
2167
|
-
"required": [
|
|
2168
|
-
"type",
|
|
2169
|
-
"configuration"
|
|
2170
2206
|
]
|
|
2171
2207
|
},
|
|
2172
2208
|
"FrontendSubmitTrigger": {
|
|
2173
|
-
"
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
"type": "string",
|
|
2177
|
-
"enum": [
|
|
2178
|
-
"frontend_submission"
|
|
2179
|
-
]
|
|
2209
|
+
"allOf": [
|
|
2210
|
+
{
|
|
2211
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2180
2212
|
},
|
|
2181
|
-
|
|
2213
|
+
{
|
|
2182
2214
|
"type": "object",
|
|
2183
2215
|
"properties": {
|
|
2184
|
-
"
|
|
2216
|
+
"type": {
|
|
2185
2217
|
"type": "string",
|
|
2186
|
-
"
|
|
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
|
+
}
|
|
2187
2230
|
}
|
|
2188
|
-
}
|
|
2231
|
+
},
|
|
2232
|
+
"required": [
|
|
2233
|
+
"type",
|
|
2234
|
+
"configuration"
|
|
2235
|
+
]
|
|
2189
2236
|
}
|
|
2190
|
-
},
|
|
2191
|
-
"required": [
|
|
2192
|
-
"type",
|
|
2193
|
-
"configuration"
|
|
2194
2237
|
]
|
|
2195
2238
|
},
|
|
2196
2239
|
"ApiSubmissionTrigger": {
|
|
2197
|
-
"
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
"type": "string",
|
|
2201
|
-
"enum": [
|
|
2202
|
-
"api_submission"
|
|
2203
|
-
]
|
|
2240
|
+
"allOf": [
|
|
2241
|
+
{
|
|
2242
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2204
2243
|
},
|
|
2205
|
-
|
|
2244
|
+
{
|
|
2206
2245
|
"type": "object",
|
|
2207
2246
|
"properties": {
|
|
2208
|
-
"
|
|
2209
|
-
"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
|
+
}
|
|
2210
2260
|
}
|
|
2211
|
-
}
|
|
2261
|
+
},
|
|
2262
|
+
"required": [
|
|
2263
|
+
"type",
|
|
2264
|
+
"configuration"
|
|
2265
|
+
]
|
|
2212
2266
|
}
|
|
2213
|
-
},
|
|
2214
|
-
"required": [
|
|
2215
|
-
"type",
|
|
2216
|
-
"configuration"
|
|
2217
2267
|
]
|
|
2218
2268
|
},
|
|
2219
2269
|
"ReceivedEmailTrigger": {
|
|
2220
|
-
"
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
"type": "string",
|
|
2224
|
-
"enum": [
|
|
2225
|
-
"received_email"
|
|
2226
|
-
]
|
|
2270
|
+
"allOf": [
|
|
2271
|
+
{
|
|
2272
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2227
2273
|
},
|
|
2228
|
-
|
|
2274
|
+
{
|
|
2229
2275
|
"type": "object",
|
|
2230
2276
|
"properties": {
|
|
2231
|
-
"
|
|
2277
|
+
"type": {
|
|
2232
2278
|
"type": "string",
|
|
2233
2279
|
"enum": [
|
|
2234
|
-
"
|
|
2280
|
+
"received_email"
|
|
2235
2281
|
]
|
|
2282
|
+
},
|
|
2283
|
+
"configuration": {
|
|
2284
|
+
"type": "object",
|
|
2285
|
+
"properties": {
|
|
2286
|
+
"message_type": {
|
|
2287
|
+
"type": "string",
|
|
2288
|
+
"enum": [
|
|
2289
|
+
"RECEIVED"
|
|
2290
|
+
]
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2236
2293
|
}
|
|
2237
|
-
}
|
|
2294
|
+
},
|
|
2295
|
+
"required": [
|
|
2296
|
+
"type",
|
|
2297
|
+
"configuration"
|
|
2298
|
+
]
|
|
2238
2299
|
}
|
|
2239
|
-
},
|
|
2240
|
-
"required": [
|
|
2241
|
-
"type",
|
|
2242
|
-
"configuration"
|
|
2243
2300
|
]
|
|
2244
2301
|
},
|
|
2245
2302
|
"EntityOperationTrigger": {
|
|
2246
|
-
"type": "
|
|
2247
|
-
"
|
|
2248
|
-
|
|
2249
|
-
"
|
|
2250
|
-
"enum": [
|
|
2251
|
-
"entity_operation"
|
|
2252
|
-
]
|
|
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"
|
|
2253
2307
|
},
|
|
2254
|
-
|
|
2308
|
+
{
|
|
2255
2309
|
"type": "object",
|
|
2256
2310
|
"properties": {
|
|
2257
|
-
"
|
|
2311
|
+
"type": {
|
|
2258
2312
|
"type": "string",
|
|
2259
|
-
"
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
"type": "array",
|
|
2263
|
-
"minItems": 1,
|
|
2264
|
-
"items": {
|
|
2265
|
-
"$ref": "#/components/schemas/EntityOperation"
|
|
2266
|
-
}
|
|
2267
|
-
},
|
|
2268
|
-
"include_activities": {
|
|
2269
|
-
"type": "array",
|
|
2270
|
-
"items": {
|
|
2271
|
-
"type": "string",
|
|
2272
|
-
"example": [
|
|
2273
|
-
"CreateEntity"
|
|
2274
|
-
]
|
|
2275
|
-
}
|
|
2276
|
-
},
|
|
2277
|
-
"exclude_activities": {
|
|
2278
|
-
"type": "array",
|
|
2279
|
-
"items": {
|
|
2280
|
-
"type": "string",
|
|
2281
|
-
"example": [
|
|
2282
|
-
"SyncEntity"
|
|
2283
|
-
]
|
|
2284
|
-
}
|
|
2313
|
+
"enum": [
|
|
2314
|
+
"entity_operation"
|
|
2315
|
+
]
|
|
2285
2316
|
},
|
|
2286
|
-
"
|
|
2317
|
+
"configuration": {
|
|
2287
2318
|
"type": "object",
|
|
2288
2319
|
"properties": {
|
|
2289
|
-
"
|
|
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": {
|
|
2290
2350
|
"type": "object",
|
|
2291
2351
|
"properties": {
|
|
2292
2352
|
"operation": {
|
|
2293
|
-
"type": "
|
|
2294
|
-
"
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
},
|
|
2302
|
-
"diff": {
|
|
2303
|
-
"anyOf": [
|
|
2304
|
-
{
|
|
2305
|
-
"$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
|
+
}
|
|
2306
2361
|
},
|
|
2307
|
-
{
|
|
2308
|
-
"
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
"updated": {
|
|
2315
|
-
"$ref": "#/components/schemas/DiffUpdated"
|
|
2362
|
+
"payload": {
|
|
2363
|
+
"$ref": "#/components/schemas/FilterConditionOnEvent"
|
|
2364
|
+
},
|
|
2365
|
+
"diff": {
|
|
2366
|
+
"anyOf": [
|
|
2367
|
+
{
|
|
2368
|
+
"$ref": "#/components/schemas/OrConditionForDiff"
|
|
2316
2369
|
},
|
|
2317
|
-
|
|
2318
|
-
"
|
|
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
|
+
}
|
|
2319
2384
|
}
|
|
2320
|
-
|
|
2385
|
+
]
|
|
2321
2386
|
}
|
|
2322
|
-
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
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
|
+
]
|
|
2350
2418
|
},
|
|
2351
|
-
|
|
2352
|
-
"
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
"DocUploadedFromPortal"
|
|
2360
|
-
],
|
|
2361
|
-
"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
|
+
}
|
|
2362
2427
|
}
|
|
2363
2428
|
}
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
},
|
|
2367
|
-
"ecp_config": {
|
|
2368
|
-
"type": "object",
|
|
2369
|
-
"properties": {
|
|
2370
|
-
"origin": {
|
|
2371
|
-
"type": "string",
|
|
2372
|
-
"example": "END_CUSTOMER_PORTAL"
|
|
2373
2429
|
},
|
|
2374
|
-
"
|
|
2430
|
+
"ecp_config": {
|
|
2375
2431
|
"type": "object",
|
|
2376
2432
|
"properties": {
|
|
2377
|
-
"
|
|
2378
|
-
"type": "
|
|
2379
|
-
"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
|
+
}
|
|
2380
2445
|
}
|
|
2381
2446
|
}
|
|
2382
2447
|
}
|
|
2383
2448
|
}
|
|
2384
2449
|
}
|
|
2385
|
-
}
|
|
2450
|
+
},
|
|
2451
|
+
"required": [
|
|
2452
|
+
"type",
|
|
2453
|
+
"configuration"
|
|
2454
|
+
]
|
|
2386
2455
|
}
|
|
2387
|
-
|
|
2388
|
-
"required": [
|
|
2389
|
-
"type",
|
|
2390
|
-
"configuration"
|
|
2391
|
-
],
|
|
2392
|
-
"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
|
+
]
|
|
2393
2457
|
},
|
|
2394
2458
|
"ActivityTrigger": {
|
|
2395
|
-
"
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
"type": "string",
|
|
2399
|
-
"enum": [
|
|
2400
|
-
"activity"
|
|
2401
|
-
]
|
|
2459
|
+
"allOf": [
|
|
2460
|
+
{
|
|
2461
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2402
2462
|
},
|
|
2403
|
-
|
|
2463
|
+
{
|
|
2404
2464
|
"type": "object",
|
|
2405
2465
|
"properties": {
|
|
2406
|
-
"
|
|
2466
|
+
"type": {
|
|
2407
2467
|
"type": "string",
|
|
2408
|
-
"
|
|
2468
|
+
"enum": [
|
|
2469
|
+
"activity"
|
|
2470
|
+
]
|
|
2409
2471
|
},
|
|
2410
|
-
"
|
|
2411
|
-
"type": "
|
|
2412
|
-
"
|
|
2413
|
-
"
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
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
|
+
}
|
|
2422
2496
|
]
|
|
2423
|
-
},
|
|
2424
|
-
{
|
|
2425
|
-
"type": "string"
|
|
2426
2497
|
}
|
|
2427
|
-
|
|
2498
|
+
}
|
|
2428
2499
|
}
|
|
2429
2500
|
}
|
|
2430
|
-
}
|
|
2501
|
+
},
|
|
2502
|
+
"required": [
|
|
2503
|
+
"type",
|
|
2504
|
+
"configuration"
|
|
2505
|
+
]
|
|
2431
2506
|
}
|
|
2432
|
-
},
|
|
2433
|
-
"required": [
|
|
2434
|
-
"type",
|
|
2435
|
-
"configuration"
|
|
2436
2507
|
]
|
|
2437
2508
|
},
|
|
2438
2509
|
"EntityOperation": {
|
|
@@ -2444,28 +2515,35 @@
|
|
|
2444
2515
|
]
|
|
2445
2516
|
},
|
|
2446
2517
|
"EntityManualTrigger": {
|
|
2447
|
-
"
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
"type": "string",
|
|
2451
|
-
"enum": [
|
|
2452
|
-
"entity_manual"
|
|
2453
|
-
]
|
|
2518
|
+
"allOf": [
|
|
2519
|
+
{
|
|
2520
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2454
2521
|
},
|
|
2455
|
-
|
|
2522
|
+
{
|
|
2456
2523
|
"type": "object",
|
|
2457
2524
|
"properties": {
|
|
2458
|
-
"
|
|
2459
|
-
"description": "Which entity type can this automation be triggered from",
|
|
2525
|
+
"type": {
|
|
2460
2526
|
"type": "string",
|
|
2461
|
-
"
|
|
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
|
+
}
|
|
2462
2540
|
}
|
|
2463
|
-
}
|
|
2541
|
+
},
|
|
2542
|
+
"required": [
|
|
2543
|
+
"type",
|
|
2544
|
+
"configuration"
|
|
2545
|
+
]
|
|
2464
2546
|
}
|
|
2465
|
-
},
|
|
2466
|
-
"required": [
|
|
2467
|
-
"type",
|
|
2468
|
-
"configuration"
|
|
2469
2547
|
]
|
|
2470
2548
|
},
|
|
2471
2549
|
"TriggerCondition": {
|