@epilot/automation-client 2.3.0 → 2.5.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/client.d.ts +0 -0
- package/dist/client.js +0 -0
- package/dist/definition.d.ts +0 -0
- package/dist/definition.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/openapi.d.ts +337 -4
- package/dist/openapi.json +220 -10
- package/package-lock.json +19937 -0
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -1846,9 +1846,13 @@
|
|
|
1846
1846
|
"EpilotAuth": {
|
|
1847
1847
|
"type": "object",
|
|
1848
1848
|
"properties": {
|
|
1849
|
-
"
|
|
1849
|
+
"claims": {
|
|
1850
1850
|
"type": "object",
|
|
1851
1851
|
"properties": {
|
|
1852
|
+
"userId": {
|
|
1853
|
+
"type": "string",
|
|
1854
|
+
"example": "10006129"
|
|
1855
|
+
},
|
|
1852
1856
|
"sub": {
|
|
1853
1857
|
"type": "string",
|
|
1854
1858
|
"example": "476e9b48-42f4-4234-a2b0-4668b34626ce"
|
|
@@ -1880,6 +1884,18 @@
|
|
|
1880
1884
|
"iat": 1614333023,
|
|
1881
1885
|
"email": "n.ahmad@epilot.cloud"
|
|
1882
1886
|
}
|
|
1887
|
+
},
|
|
1888
|
+
"userId": {
|
|
1889
|
+
"type": "string",
|
|
1890
|
+
"example": "10006129"
|
|
1891
|
+
},
|
|
1892
|
+
"organizationId": {
|
|
1893
|
+
"type": "string",
|
|
1894
|
+
"example": "739224"
|
|
1895
|
+
},
|
|
1896
|
+
"token": {
|
|
1897
|
+
"type": "string",
|
|
1898
|
+
"example": "eyJraWQiOi..."
|
|
1883
1899
|
}
|
|
1884
1900
|
}
|
|
1885
1901
|
}
|
|
@@ -2076,18 +2092,74 @@
|
|
|
2076
2092
|
"SyncEntity"
|
|
2077
2093
|
]
|
|
2078
2094
|
}
|
|
2095
|
+
},
|
|
2096
|
+
"filter_config": {
|
|
2097
|
+
"type": "object",
|
|
2098
|
+
"properties": {
|
|
2099
|
+
"operation": {
|
|
2100
|
+
"type": "object",
|
|
2101
|
+
"properties": {
|
|
2102
|
+
"operation": {
|
|
2103
|
+
"type": "array",
|
|
2104
|
+
"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",
|
|
2105
|
+
"items": {
|
|
2106
|
+
"$ref": "#/components/schemas/EntityOperation"
|
|
2107
|
+
}
|
|
2108
|
+
},
|
|
2109
|
+
"payload": {
|
|
2110
|
+
"$ref": "#/components/schemas/FilterConditionOnEvent"
|
|
2111
|
+
},
|
|
2112
|
+
"diff": {
|
|
2113
|
+
"anyOf": [
|
|
2114
|
+
{
|
|
2115
|
+
"$ref": "#/components/schemas/OrConditionForDiff"
|
|
2116
|
+
},
|
|
2117
|
+
{
|
|
2118
|
+
"type": "object",
|
|
2119
|
+
"description": "Diff to it's prior state when an entity is updated",
|
|
2120
|
+
"properties": {
|
|
2121
|
+
"added": {
|
|
2122
|
+
"$ref": "#/components/schemas/DiffAdded"
|
|
2123
|
+
},
|
|
2124
|
+
"updated": {
|
|
2125
|
+
"$ref": "#/components/schemas/DiffUpdated"
|
|
2126
|
+
},
|
|
2127
|
+
"deleted": {
|
|
2128
|
+
"$ref": "#/components/schemas/DiffDeleted"
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
]
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
2136
|
+
"activity": {
|
|
2137
|
+
"type": "object",
|
|
2138
|
+
"properties": {
|
|
2139
|
+
"type": {
|
|
2140
|
+
"type": "array",
|
|
2141
|
+
"items": {
|
|
2142
|
+
"type": "string",
|
|
2143
|
+
"example": "EntityUpdatedFromPortal"
|
|
2144
|
+
},
|
|
2145
|
+
"example": [
|
|
2146
|
+
"EntityUpdatedFromPortal",
|
|
2147
|
+
"EntityUpdatedFromPortal"
|
|
2148
|
+
],
|
|
2149
|
+
"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"
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2079
2154
|
}
|
|
2080
|
-
}
|
|
2081
|
-
"required": [
|
|
2082
|
-
"schema",
|
|
2083
|
-
"operations"
|
|
2084
|
-
]
|
|
2155
|
+
}
|
|
2085
2156
|
}
|
|
2086
2157
|
},
|
|
2087
2158
|
"required": [
|
|
2088
2159
|
"type",
|
|
2089
2160
|
"configuration"
|
|
2090
|
-
]
|
|
2161
|
+
],
|
|
2162
|
+
"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"
|
|
2091
2163
|
},
|
|
2092
2164
|
"ActivityTrigger": {
|
|
2093
2165
|
"type": "object",
|
|
@@ -2208,6 +2280,147 @@
|
|
|
2208
2280
|
"is_empty"
|
|
2209
2281
|
]
|
|
2210
2282
|
},
|
|
2283
|
+
"FilterConditionOnEvent": {
|
|
2284
|
+
"anyOf": [
|
|
2285
|
+
{
|
|
2286
|
+
"$ref": "#/components/schemas/OrCondition"
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
"type": "object",
|
|
2290
|
+
"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",
|
|
2291
|
+
"additionalProperties": {
|
|
2292
|
+
"type": "array",
|
|
2293
|
+
"items": {
|
|
2294
|
+
"oneOf": [
|
|
2295
|
+
{
|
|
2296
|
+
"type": "string"
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
"$ref": "#/components/schemas/EqualsIgnoreCaseCondition"
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
"$ref": "#/components/schemas/AnythingButCondition"
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
"$ref": "#/components/schemas/NumericCondition"
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
"$ref": "#/components/schemas/ExistsCondition"
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
"$ref": "#/components/schemas/PrefixCondition"
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"$ref": "#/components/schemas/SuffixCondition"
|
|
2315
|
+
}
|
|
2316
|
+
]
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
]
|
|
2321
|
+
},
|
|
2322
|
+
"EqualsIgnoreCaseCondition": {
|
|
2323
|
+
"type": "object",
|
|
2324
|
+
"properties": {
|
|
2325
|
+
"equals-ignore-case": {
|
|
2326
|
+
"type": "string"
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
},
|
|
2330
|
+
"AnythingButCondition": {
|
|
2331
|
+
"type": "object",
|
|
2332
|
+
"properties": {
|
|
2333
|
+
"anything-but": {
|
|
2334
|
+
"type": "array",
|
|
2335
|
+
"items": {
|
|
2336
|
+
"type": "string"
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
},
|
|
2341
|
+
"NumericCondition": {
|
|
2342
|
+
"type": "object",
|
|
2343
|
+
"properties": {
|
|
2344
|
+
"numeric": {
|
|
2345
|
+
"type": "array",
|
|
2346
|
+
"items": {
|
|
2347
|
+
"oneOf": [
|
|
2348
|
+
{
|
|
2349
|
+
"type": "string"
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
"type": "integer"
|
|
2353
|
+
}
|
|
2354
|
+
]
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
},
|
|
2359
|
+
"ExistsCondition": {
|
|
2360
|
+
"type": "object",
|
|
2361
|
+
"properties": {
|
|
2362
|
+
"exists": {
|
|
2363
|
+
"type": "boolean"
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
},
|
|
2367
|
+
"PrefixCondition": {
|
|
2368
|
+
"type": "object",
|
|
2369
|
+
"properties": {
|
|
2370
|
+
"prefix": {
|
|
2371
|
+
"type": "string"
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
"SuffixCondition": {
|
|
2376
|
+
"type": "object",
|
|
2377
|
+
"properties": {
|
|
2378
|
+
"suffix": {
|
|
2379
|
+
"type": "string"
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
},
|
|
2383
|
+
"OrCondition": {
|
|
2384
|
+
"type": "object",
|
|
2385
|
+
"properties": {
|
|
2386
|
+
"$or": {
|
|
2387
|
+
"type": "array",
|
|
2388
|
+
"items": {
|
|
2389
|
+
"$ref": "#/components/schemas/FilterConditionOnEvent"
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
},
|
|
2394
|
+
"DiffAdded": {
|
|
2395
|
+
"$ref": "#/components/schemas/FilterConditionOnEvent"
|
|
2396
|
+
},
|
|
2397
|
+
"DiffUpdated": {
|
|
2398
|
+
"$ref": "#/components/schemas/FilterConditionOnEvent"
|
|
2399
|
+
},
|
|
2400
|
+
"DiffDeleted": {
|
|
2401
|
+
"$ref": "#/components/schemas/FilterConditionOnEvent"
|
|
2402
|
+
},
|
|
2403
|
+
"OrConditionForDiff": {
|
|
2404
|
+
"type": "object",
|
|
2405
|
+
"properties": {
|
|
2406
|
+
"$or": {
|
|
2407
|
+
"type": "array",
|
|
2408
|
+
"items": {
|
|
2409
|
+
"anyOf": [
|
|
2410
|
+
{
|
|
2411
|
+
"$ref": "#/components/schemas/DiffAdded"
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
"$ref": "#/components/schemas/DiffUpdated"
|
|
2415
|
+
},
|
|
2416
|
+
{
|
|
2417
|
+
"$ref": "#/components/schemas/DiffDeleted"
|
|
2418
|
+
}
|
|
2419
|
+
]
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
},
|
|
2211
2424
|
"EntityItemSnapshot": {
|
|
2212
2425
|
"type": "object",
|
|
2213
2426
|
"properties": {
|
|
@@ -2259,9 +2472,6 @@
|
|
|
2259
2472
|
}
|
|
2260
2473
|
},
|
|
2261
2474
|
"servers": [
|
|
2262
|
-
{
|
|
2263
|
-
"url": "https://automation.sls.epilot.io"
|
|
2264
|
-
},
|
|
2265
2475
|
{
|
|
2266
2476
|
"url": "https://automation.sls.epilot.io"
|
|
2267
2477
|
}
|