@epilot/automation-client 2.5.7 → 2.7.0

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 CHANGED
@@ -22,7 +22,7 @@ declare namespace Components {
22
22
  * submission
23
23
  */
24
24
  schema?: string;
25
- types?: ("CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "MessageActivity" | "SyncActivity" | "EntityAccessFromPortal")[];
25
+ types?: ("CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal")[];
26
26
  };
27
27
  }
28
28
  export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | AutomationAction;
@@ -245,6 +245,7 @@ declare namespace Components {
245
245
  * | Does not exist | ProductName does not exist | `"ProductName": [ { "exists": false } ]` |
246
246
  * | Begins with | OpportunityNumber starts with OPP- | `"opportunity_number": [ { "prefix": "OPP-" } ]` |
247
247
  * | Ends with | FileName ends with a .png extension | `"filename": [ { "suffix": ".png" } ]` |
248
+ * | Wildcard | search a string using a wildcard | `"email": [ { "wildcard": "*@doe.com" } ]` |
248
249
  * - To run the execution on all update events
249
250
  * ```
250
251
  * {
@@ -996,6 +997,7 @@ declare namespace Components {
996
997
  * | Does not exist | ProductName does not exist | `"ProductName": [ { "exists": false } ]` |
997
998
  * | Begins with | OpportunityNumber starts with OPP- | `"opportunity_number": [ { "prefix": "OPP-" } ]` |
998
999
  * | Ends with | FileName ends with a .png extension | `"filename": [ { "suffix": ".png" } ]` |
1000
+ * | Wildcard | search a string using a wildcard | `"email": [ { "wildcard": "*@doe.com" } ]` |
999
1001
  * - To run the execution on all update events
1000
1002
  * ```
1001
1003
  * {
@@ -1157,7 +1159,7 @@ declare namespace Components {
1157
1159
  * "DocUploadedFromPortal"
1158
1160
  * ]
1159
1161
  */
1160
- type?: (string | EqualsIgnoreCaseCondition | AnythingButCondition | ExistsCondition | PrefixCondition | SuffixCondition)[];
1162
+ type?: (string | EqualsIgnoreCaseCondition | AnythingButCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[];
1161
1163
  };
1162
1164
  };
1163
1165
  };
@@ -1169,13 +1171,16 @@ declare namespace Components {
1169
1171
  export interface ErrorOutput {
1170
1172
  error_code: ErrorCode;
1171
1173
  error_reason: string;
1174
+ error_info?: {
1175
+ [name: string]: any;
1176
+ };
1172
1177
  }
1173
1178
  export type ExecutionStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled" | "skipped";
1174
1179
  export interface ExistsCondition {
1175
1180
  exists?: boolean;
1176
1181
  }
1177
1182
  export type FilterConditionOnEvent = OrCondition | {
1178
- [name: string]: (string | EqualsIgnoreCaseCondition | AnythingButCondition | NumericCondition | ExistsCondition | PrefixCondition | SuffixCondition)[];
1183
+ [name: string]: (string | EqualsIgnoreCaseCondition | AnythingButCondition | NumericCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[];
1179
1184
  };
1180
1185
  export interface FrontendSubmitTrigger {
1181
1186
  type: "frontend_submission";
@@ -2113,6 +2118,9 @@ declare namespace Components {
2113
2118
  */
2114
2119
  AssignUsersToStep[];
2115
2120
  }
2121
+ export interface WildcardCondition {
2122
+ wildcard?: string;
2123
+ }
2116
2124
  }
2117
2125
  }
2118
2126
  declare namespace Paths {
package/dist/openapi.json CHANGED
@@ -694,6 +694,10 @@
694
694
  },
695
695
  "error_reason": {
696
696
  "type": "string"
697
+ },
698
+ "error_info": {
699
+ "type": "object",
700
+ "additionalProperties": true
697
701
  }
698
702
  },
699
703
  "required": [
@@ -2126,7 +2130,7 @@
2126
2130
  "properties": {
2127
2131
  "operation": {
2128
2132
  "type": "array",
2129
- "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",
2133
+ "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",
2130
2134
  "items": {
2131
2135
  "$ref": "#/components/schemas/EntityOperation"
2132
2136
  }
@@ -2182,6 +2186,9 @@
2182
2186
  },
2183
2187
  {
2184
2188
  "$ref": "#/components/schemas/SuffixCondition"
2189
+ },
2190
+ {
2191
+ "$ref": "#/components/schemas/WildcardCondition"
2185
2192
  }
2186
2193
  ]
2187
2194
  },
@@ -2190,7 +2197,7 @@
2190
2197
  "EntityUpdated",
2191
2198
  "DocUploadedFromPortal"
2192
2199
  ],
2193
- "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"
2200
+ "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"
2194
2201
  }
2195
2202
  }
2196
2203
  }
@@ -2203,7 +2210,7 @@
2203
2210
  "type",
2204
2211
  "configuration"
2205
2212
  ],
2206
- "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 - 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"
2213
+ "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"
2207
2214
  },
2208
2215
  "ActivityTrigger": {
2209
2216
  "type": "object",
@@ -2228,10 +2235,7 @@
2228
2235
  "enum": [
2229
2236
  "CreateMeterReading",
2230
2237
  "UpdateMeterReading",
2231
- "DocDownloadedFromPortal",
2232
- "MessageActivity",
2233
- "SyncActivity",
2234
- "EntityAccessFromPortal"
2238
+ "DocDownloadedFromPortal"
2235
2239
  ]
2236
2240
  }
2237
2241
  }
@@ -2333,7 +2337,7 @@
2333
2337
  },
2334
2338
  {
2335
2339
  "type": "object",
2336
- "description": "- Filter on entity payload that is modified. If not specified, entire entity be matched on execution.\n Example:\n ```\n {\n \"operation\": {\n \"payload\": {\n \"_schema\": [\"contact\"]\n \"address\": { \n \"country\": [\"Germany\"] \n }\n age: [ { \"numeric\": [ \">\", 25, \"<=\", 35 ] } ]\n }\n }\n }\n",
2340
+ "description": "- Filter on entity payload that is modified. If not specified, entire entity be matched on execution.\n Example:\n ```\n {\n \"operation\": {\n \"payload\": {\n \"_schema\": [\"contact\"]\n \"address\": {\n \"country\": [\"Germany\"]\n }\n age: [ { \"numeric\": [ \">\", 25, \"<=\", 35 ] } ]\n }\n }\n }\n",
2337
2341
  "additionalProperties": {
2338
2342
  "type": "array",
2339
2343
  "items": {
@@ -2358,6 +2362,9 @@
2358
2362
  },
2359
2363
  {
2360
2364
  "$ref": "#/components/schemas/SuffixCondition"
2365
+ },
2366
+ {
2367
+ "$ref": "#/components/schemas/WildcardCondition"
2361
2368
  }
2362
2369
  ]
2363
2370
  }
@@ -2426,6 +2433,14 @@
2426
2433
  }
2427
2434
  }
2428
2435
  },
2436
+ "WildcardCondition": {
2437
+ "type": "object",
2438
+ "properties": {
2439
+ "wildcard": {
2440
+ "type": "string"
2441
+ }
2442
+ }
2443
+ },
2429
2444
  "OrCondition": {
2430
2445
  "type": "object",
2431
2446
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.5.7",
3
+ "version": "2.7.0",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -64,12 +64,12 @@
64
64
  "jest": "^26.6.3",
65
65
  "json-loader": "^0.5.7",
66
66
  "node-fetch": "^3.2.10",
67
- "openapi-client-axios": "^6.0.0",
68
- "openapi-client-axios-typegen": "^7.2.0",
67
+ "openapi-client-axios": "^7.1.3",
68
+ "openapi-client-axios-typegen": "^7.4.1",
69
69
  "openapicmd": "^1.16.2",
70
70
  "ts-jest": "^26.5.0",
71
71
  "ts-loader": "^8.0.14",
72
- "ts-node": "^9.1.1",
72
+ "ts-node": "^10.9.1",
73
73
  "typescript": "^4.1.3",
74
74
  "webpack": "^5.18.0",
75
75
  "webpack-cli": "^4.4.0",