@epilot/automation-client 2.9.5 → 2.9.7
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 +47 -0
- package/dist/openapi.json +290 -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
|
/**
|
|
@@ -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
|
@@ -1771,6 +1771,11 @@
|
|
|
1771
1771
|
"Condition": {
|
|
1772
1772
|
"type": "object",
|
|
1773
1773
|
"properties": {
|
|
1774
|
+
"id": {
|
|
1775
|
+
"type": "string",
|
|
1776
|
+
"format": "uuid",
|
|
1777
|
+
"example": "1c8d3d9c-6d4c-4a83-aa22-aa0d630cbc2d"
|
|
1778
|
+
},
|
|
1774
1779
|
"source": {
|
|
1775
1780
|
"type": "object",
|
|
1776
1781
|
"properties": {
|
|
@@ -2153,297 +2158,349 @@
|
|
|
2153
2158
|
"type": "string",
|
|
2154
2159
|
"example": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74"
|
|
2155
2160
|
},
|
|
2156
|
-
"
|
|
2161
|
+
"AutomationTrigger": {
|
|
2157
2162
|
"type": "object",
|
|
2158
2163
|
"properties": {
|
|
2159
|
-
"
|
|
2164
|
+
"id": {
|
|
2160
2165
|
"type": "string",
|
|
2161
|
-
"
|
|
2162
|
-
|
|
2163
|
-
|
|
2166
|
+
"format": "uuid",
|
|
2167
|
+
"example": "12d4f45a-1883-4841-a94c-5928cb338a94"
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
},
|
|
2171
|
+
"JourneySubmitTrigger": {
|
|
2172
|
+
"allOf": [
|
|
2173
|
+
{
|
|
2174
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2164
2175
|
},
|
|
2165
|
-
|
|
2176
|
+
{
|
|
2166
2177
|
"type": "object",
|
|
2167
2178
|
"properties": {
|
|
2168
|
-
"
|
|
2179
|
+
"type": {
|
|
2169
2180
|
"type": "string",
|
|
2170
|
-
"
|
|
2181
|
+
"enum": [
|
|
2182
|
+
"journey_submission"
|
|
2183
|
+
]
|
|
2184
|
+
},
|
|
2185
|
+
"configuration": {
|
|
2186
|
+
"type": "object",
|
|
2187
|
+
"properties": {
|
|
2188
|
+
"source_id": {
|
|
2189
|
+
"type": "string",
|
|
2190
|
+
"format": "uuid"
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
"required": [
|
|
2194
|
+
"source_id"
|
|
2195
|
+
]
|
|
2171
2196
|
}
|
|
2172
2197
|
},
|
|
2173
2198
|
"required": [
|
|
2174
|
-
"
|
|
2199
|
+
"type",
|
|
2200
|
+
"configuration"
|
|
2175
2201
|
]
|
|
2176
2202
|
}
|
|
2177
|
-
},
|
|
2178
|
-
"required": [
|
|
2179
|
-
"type",
|
|
2180
|
-
"configuration"
|
|
2181
2203
|
]
|
|
2182
2204
|
},
|
|
2183
2205
|
"FrontendSubmitTrigger": {
|
|
2184
|
-
"
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
"type": "string",
|
|
2188
|
-
"enum": [
|
|
2189
|
-
"frontend_submission"
|
|
2190
|
-
]
|
|
2206
|
+
"allOf": [
|
|
2207
|
+
{
|
|
2208
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2191
2209
|
},
|
|
2192
|
-
|
|
2210
|
+
{
|
|
2193
2211
|
"type": "object",
|
|
2194
2212
|
"properties": {
|
|
2195
|
-
"
|
|
2213
|
+
"type": {
|
|
2196
2214
|
"type": "string",
|
|
2197
|
-
"
|
|
2215
|
+
"enum": [
|
|
2216
|
+
"frontend_submission"
|
|
2217
|
+
]
|
|
2218
|
+
},
|
|
2219
|
+
"configuration": {
|
|
2220
|
+
"type": "object",
|
|
2221
|
+
"properties": {
|
|
2222
|
+
"source_id": {
|
|
2223
|
+
"type": "string",
|
|
2224
|
+
"example": "99"
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2198
2227
|
}
|
|
2199
|
-
}
|
|
2228
|
+
},
|
|
2229
|
+
"required": [
|
|
2230
|
+
"type",
|
|
2231
|
+
"configuration"
|
|
2232
|
+
]
|
|
2200
2233
|
}
|
|
2201
|
-
},
|
|
2202
|
-
"required": [
|
|
2203
|
-
"type",
|
|
2204
|
-
"configuration"
|
|
2205
2234
|
]
|
|
2206
2235
|
},
|
|
2207
2236
|
"ApiSubmissionTrigger": {
|
|
2208
|
-
"
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
"type": "string",
|
|
2212
|
-
"enum": [
|
|
2213
|
-
"api_submission"
|
|
2214
|
-
]
|
|
2237
|
+
"allOf": [
|
|
2238
|
+
{
|
|
2239
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2215
2240
|
},
|
|
2216
|
-
|
|
2241
|
+
{
|
|
2217
2242
|
"type": "object",
|
|
2218
2243
|
"properties": {
|
|
2219
|
-
"
|
|
2220
|
-
"type": "string"
|
|
2244
|
+
"type": {
|
|
2245
|
+
"type": "string",
|
|
2246
|
+
"enum": [
|
|
2247
|
+
"api_submission"
|
|
2248
|
+
]
|
|
2249
|
+
},
|
|
2250
|
+
"configuration": {
|
|
2251
|
+
"type": "object",
|
|
2252
|
+
"properties": {
|
|
2253
|
+
"source_id": {
|
|
2254
|
+
"type": "string"
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2221
2257
|
}
|
|
2222
|
-
}
|
|
2258
|
+
},
|
|
2259
|
+
"required": [
|
|
2260
|
+
"type",
|
|
2261
|
+
"configuration"
|
|
2262
|
+
]
|
|
2223
2263
|
}
|
|
2224
|
-
},
|
|
2225
|
-
"required": [
|
|
2226
|
-
"type",
|
|
2227
|
-
"configuration"
|
|
2228
2264
|
]
|
|
2229
2265
|
},
|
|
2230
2266
|
"ReceivedEmailTrigger": {
|
|
2231
|
-
"
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
"type": "string",
|
|
2235
|
-
"enum": [
|
|
2236
|
-
"received_email"
|
|
2237
|
-
]
|
|
2267
|
+
"allOf": [
|
|
2268
|
+
{
|
|
2269
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2238
2270
|
},
|
|
2239
|
-
|
|
2271
|
+
{
|
|
2240
2272
|
"type": "object",
|
|
2241
2273
|
"properties": {
|
|
2242
|
-
"
|
|
2274
|
+
"type": {
|
|
2243
2275
|
"type": "string",
|
|
2244
2276
|
"enum": [
|
|
2245
|
-
"
|
|
2277
|
+
"received_email"
|
|
2246
2278
|
]
|
|
2279
|
+
},
|
|
2280
|
+
"configuration": {
|
|
2281
|
+
"type": "object",
|
|
2282
|
+
"properties": {
|
|
2283
|
+
"message_type": {
|
|
2284
|
+
"type": "string",
|
|
2285
|
+
"enum": [
|
|
2286
|
+
"RECEIVED"
|
|
2287
|
+
]
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2247
2290
|
}
|
|
2248
|
-
}
|
|
2291
|
+
},
|
|
2292
|
+
"required": [
|
|
2293
|
+
"type",
|
|
2294
|
+
"configuration"
|
|
2295
|
+
]
|
|
2249
2296
|
}
|
|
2250
|
-
},
|
|
2251
|
-
"required": [
|
|
2252
|
-
"type",
|
|
2253
|
-
"configuration"
|
|
2254
2297
|
]
|
|
2255
2298
|
},
|
|
2256
2299
|
"EntityOperationTrigger": {
|
|
2257
|
-
"type": "
|
|
2258
|
-
"
|
|
2259
|
-
|
|
2260
|
-
"
|
|
2261
|
-
"enum": [
|
|
2262
|
-
"entity_operation"
|
|
2263
|
-
]
|
|
2300
|
+
"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",
|
|
2301
|
+
"allOf": [
|
|
2302
|
+
{
|
|
2303
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2264
2304
|
},
|
|
2265
|
-
|
|
2305
|
+
{
|
|
2266
2306
|
"type": "object",
|
|
2267
2307
|
"properties": {
|
|
2268
|
-
"
|
|
2308
|
+
"type": {
|
|
2269
2309
|
"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
|
-
}
|
|
2310
|
+
"enum": [
|
|
2311
|
+
"entity_operation"
|
|
2312
|
+
]
|
|
2296
2313
|
},
|
|
2297
|
-
"
|
|
2314
|
+
"configuration": {
|
|
2298
2315
|
"type": "object",
|
|
2299
2316
|
"properties": {
|
|
2300
|
-
"
|
|
2317
|
+
"schema": {
|
|
2318
|
+
"type": "string",
|
|
2319
|
+
"example": "submission"
|
|
2320
|
+
},
|
|
2321
|
+
"operations": {
|
|
2322
|
+
"type": "array",
|
|
2323
|
+
"minItems": 1,
|
|
2324
|
+
"items": {
|
|
2325
|
+
"$ref": "#/components/schemas/EntityOperation"
|
|
2326
|
+
}
|
|
2327
|
+
},
|
|
2328
|
+
"include_activities": {
|
|
2329
|
+
"type": "array",
|
|
2330
|
+
"items": {
|
|
2331
|
+
"type": "string",
|
|
2332
|
+
"example": [
|
|
2333
|
+
"CreateEntity"
|
|
2334
|
+
]
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2337
|
+
"exclude_activities": {
|
|
2338
|
+
"type": "array",
|
|
2339
|
+
"items": {
|
|
2340
|
+
"type": "string",
|
|
2341
|
+
"example": [
|
|
2342
|
+
"SyncEntity"
|
|
2343
|
+
]
|
|
2344
|
+
}
|
|
2345
|
+
},
|
|
2346
|
+
"filter_config": {
|
|
2301
2347
|
"type": "object",
|
|
2302
2348
|
"properties": {
|
|
2303
2349
|
"operation": {
|
|
2304
|
-
"type": "
|
|
2305
|
-
"
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
},
|
|
2313
|
-
"diff": {
|
|
2314
|
-
"anyOf": [
|
|
2315
|
-
{
|
|
2316
|
-
"$ref": "#/components/schemas/OrConditionForDiff"
|
|
2350
|
+
"type": "object",
|
|
2351
|
+
"properties": {
|
|
2352
|
+
"operation": {
|
|
2353
|
+
"type": "array",
|
|
2354
|
+
"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",
|
|
2355
|
+
"items": {
|
|
2356
|
+
"$ref": "#/components/schemas/EntityOperation"
|
|
2357
|
+
}
|
|
2317
2358
|
},
|
|
2318
|
-
{
|
|
2319
|
-
"
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
"updated": {
|
|
2326
|
-
"$ref": "#/components/schemas/DiffUpdated"
|
|
2359
|
+
"payload": {
|
|
2360
|
+
"$ref": "#/components/schemas/FilterConditionOnEvent"
|
|
2361
|
+
},
|
|
2362
|
+
"diff": {
|
|
2363
|
+
"anyOf": [
|
|
2364
|
+
{
|
|
2365
|
+
"$ref": "#/components/schemas/OrConditionForDiff"
|
|
2327
2366
|
},
|
|
2328
|
-
|
|
2329
|
-
"
|
|
2367
|
+
{
|
|
2368
|
+
"type": "object",
|
|
2369
|
+
"description": "Diff to it's prior state when an entity is updated",
|
|
2370
|
+
"properties": {
|
|
2371
|
+
"added": {
|
|
2372
|
+
"$ref": "#/components/schemas/DiffAdded"
|
|
2373
|
+
},
|
|
2374
|
+
"updated": {
|
|
2375
|
+
"$ref": "#/components/schemas/DiffUpdated"
|
|
2376
|
+
},
|
|
2377
|
+
"deleted": {
|
|
2378
|
+
"$ref": "#/components/schemas/DiffDeleted"
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2330
2381
|
}
|
|
2331
|
-
|
|
2382
|
+
]
|
|
2332
2383
|
}
|
|
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
|
-
|
|
2384
|
+
}
|
|
2385
|
+
},
|
|
2386
|
+
"activity": {
|
|
2387
|
+
"type": "object",
|
|
2388
|
+
"properties": {
|
|
2389
|
+
"type": {
|
|
2390
|
+
"type": "array",
|
|
2391
|
+
"items": {
|
|
2392
|
+
"anyOf": [
|
|
2393
|
+
{
|
|
2394
|
+
"type": "string"
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
"$ref": "#/components/schemas/EqualsIgnoreCaseCondition"
|
|
2398
|
+
},
|
|
2399
|
+
{
|
|
2400
|
+
"$ref": "#/components/schemas/AnythingButCondition"
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
"$ref": "#/components/schemas/ExistsCondition"
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
"$ref": "#/components/schemas/PrefixCondition"
|
|
2407
|
+
},
|
|
2408
|
+
{
|
|
2409
|
+
"$ref": "#/components/schemas/SuffixCondition"
|
|
2410
|
+
},
|
|
2411
|
+
{
|
|
2412
|
+
"$ref": "#/components/schemas/WildcardCondition"
|
|
2413
|
+
}
|
|
2414
|
+
]
|
|
2361
2415
|
},
|
|
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"
|
|
2416
|
+
"example": [
|
|
2417
|
+
"EntityUpdatedFromPortal",
|
|
2418
|
+
"EntityUpdated",
|
|
2419
|
+
"DocUploadedFromPortal"
|
|
2420
|
+
],
|
|
2421
|
+
"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"
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2373
2424
|
}
|
|
2374
2425
|
}
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
},
|
|
2378
|
-
"ecp_config": {
|
|
2379
|
-
"type": "object",
|
|
2380
|
-
"properties": {
|
|
2381
|
-
"origin": {
|
|
2382
|
-
"type": "string",
|
|
2383
|
-
"example": "END_CUSTOMER_PORTAL"
|
|
2384
2426
|
},
|
|
2385
|
-
"
|
|
2427
|
+
"ecp_config": {
|
|
2386
2428
|
"type": "object",
|
|
2387
2429
|
"properties": {
|
|
2388
|
-
"
|
|
2389
|
-
"type": "
|
|
2390
|
-
"example":
|
|
2430
|
+
"origin": {
|
|
2431
|
+
"type": "string",
|
|
2432
|
+
"example": "END_CUSTOMER_PORTAL"
|
|
2433
|
+
},
|
|
2434
|
+
"file_config": {
|
|
2435
|
+
"type": "object",
|
|
2436
|
+
"properties": {
|
|
2437
|
+
"shared_with_end_customer": {
|
|
2438
|
+
"type": "boolean",
|
|
2439
|
+
"example": true
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2391
2442
|
}
|
|
2392
2443
|
}
|
|
2393
2444
|
}
|
|
2394
2445
|
}
|
|
2395
2446
|
}
|
|
2396
|
-
}
|
|
2447
|
+
},
|
|
2448
|
+
"required": [
|
|
2449
|
+
"type",
|
|
2450
|
+
"configuration"
|
|
2451
|
+
]
|
|
2397
2452
|
}
|
|
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"
|
|
2453
|
+
]
|
|
2404
2454
|
},
|
|
2405
2455
|
"ActivityTrigger": {
|
|
2406
|
-
"
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
"type": "string",
|
|
2410
|
-
"enum": [
|
|
2411
|
-
"activity"
|
|
2412
|
-
]
|
|
2456
|
+
"allOf": [
|
|
2457
|
+
{
|
|
2458
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2413
2459
|
},
|
|
2414
|
-
|
|
2460
|
+
{
|
|
2415
2461
|
"type": "object",
|
|
2416
2462
|
"properties": {
|
|
2417
|
-
"
|
|
2463
|
+
"type": {
|
|
2418
2464
|
"type": "string",
|
|
2419
|
-
"
|
|
2465
|
+
"enum": [
|
|
2466
|
+
"activity"
|
|
2467
|
+
]
|
|
2420
2468
|
},
|
|
2421
|
-
"
|
|
2422
|
-
"type": "
|
|
2423
|
-
"
|
|
2424
|
-
"
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2469
|
+
"configuration": {
|
|
2470
|
+
"type": "object",
|
|
2471
|
+
"properties": {
|
|
2472
|
+
"schema": {
|
|
2473
|
+
"type": "string",
|
|
2474
|
+
"example": "submission"
|
|
2475
|
+
},
|
|
2476
|
+
"types": {
|
|
2477
|
+
"type": "array",
|
|
2478
|
+
"items": {
|
|
2479
|
+
"anyOf": [
|
|
2480
|
+
{
|
|
2481
|
+
"type": "string",
|
|
2482
|
+
"enum": [
|
|
2483
|
+
"CreateMeterReading",
|
|
2484
|
+
"UpdateMeterReading",
|
|
2485
|
+
"DocDownloadedFromPortal",
|
|
2486
|
+
"PortalUserResetPassword",
|
|
2487
|
+
"PortalUserResetForgotPassword"
|
|
2488
|
+
]
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
"type": "string"
|
|
2492
|
+
}
|
|
2433
2493
|
]
|
|
2434
|
-
},
|
|
2435
|
-
{
|
|
2436
|
-
"type": "string"
|
|
2437
2494
|
}
|
|
2438
|
-
|
|
2495
|
+
}
|
|
2439
2496
|
}
|
|
2440
2497
|
}
|
|
2441
|
-
}
|
|
2498
|
+
},
|
|
2499
|
+
"required": [
|
|
2500
|
+
"type",
|
|
2501
|
+
"configuration"
|
|
2502
|
+
]
|
|
2442
2503
|
}
|
|
2443
|
-
},
|
|
2444
|
-
"required": [
|
|
2445
|
-
"type",
|
|
2446
|
-
"configuration"
|
|
2447
2504
|
]
|
|
2448
2505
|
},
|
|
2449
2506
|
"EntityOperation": {
|
|
@@ -2455,28 +2512,35 @@
|
|
|
2455
2512
|
]
|
|
2456
2513
|
},
|
|
2457
2514
|
"EntityManualTrigger": {
|
|
2458
|
-
"
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
"type": "string",
|
|
2462
|
-
"enum": [
|
|
2463
|
-
"entity_manual"
|
|
2464
|
-
]
|
|
2515
|
+
"allOf": [
|
|
2516
|
+
{
|
|
2517
|
+
"$ref": "#/components/schemas/AutomationTrigger"
|
|
2465
2518
|
},
|
|
2466
|
-
|
|
2519
|
+
{
|
|
2467
2520
|
"type": "object",
|
|
2468
2521
|
"properties": {
|
|
2469
|
-
"
|
|
2470
|
-
"description": "Which entity type can this automation be triggered from",
|
|
2522
|
+
"type": {
|
|
2471
2523
|
"type": "string",
|
|
2472
|
-
"
|
|
2524
|
+
"enum": [
|
|
2525
|
+
"entity_manual"
|
|
2526
|
+
]
|
|
2527
|
+
},
|
|
2528
|
+
"configuration": {
|
|
2529
|
+
"type": "object",
|
|
2530
|
+
"properties": {
|
|
2531
|
+
"schema": {
|
|
2532
|
+
"description": "Which entity type can this automation be triggered from",
|
|
2533
|
+
"type": "string",
|
|
2534
|
+
"example": "submission"
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2473
2537
|
}
|
|
2474
|
-
}
|
|
2538
|
+
},
|
|
2539
|
+
"required": [
|
|
2540
|
+
"type",
|
|
2541
|
+
"configuration"
|
|
2542
|
+
]
|
|
2475
2543
|
}
|
|
2476
|
-
},
|
|
2477
|
-
"required": [
|
|
2478
|
-
"type",
|
|
2479
|
-
"configuration"
|
|
2480
2544
|
]
|
|
2481
2545
|
},
|
|
2482
2546
|
"TriggerCondition": {
|