@epilot/automation-client 2.18.0 → 2.19.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/definition.js +1 -1
- package/dist/openapi-runtime.json +1 -6
- package/dist/openapi.d.ts +47 -3
- package/dist/openapi.json +298 -9
- package/package.json +2 -2
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={187:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(466));t.default=r.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","parameters":[{"name":"schema","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"},{"name":"trigger_source_id","in":"query"}],"responses":{}},"post":{"operationId":"createFlow","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}},"put":{"operationId":"putFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","parameters":[{"name":"entity_id","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"}],"responses":{}},"post":{"operationId":"startExecution","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs":{"post":{"operationId":"bulkTriggerExecutions","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs/{job_id}":{"get":{"operationId":"getBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"cancelExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions/{execution_id}/{action_id}/retrigger":{"post":{"operationId":"retriggerAction","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"action_id","in":"path","required":true}],"requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/automation/public/executions:resume":{"post":{"operationId":"resumeExecutionWithToken","requestBody":{"content":{"application/json":{}}},"responses":{}}}},"components":{"responses":{"NotFoundError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}}}}
|
|
1
|
+
(()=>{"use strict";var e={187:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(466));t.default=r.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","parameters":[{"name":"schema","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"},{"name":"trigger_source_id","in":"query"}],"responses":{}},"post":{"operationId":"createFlow","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}},"put":{"operationId":"putFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","parameters":[{"name":"entity_id","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"}],"responses":{}},"post":{"operationId":"startExecution","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs":{"post":{"operationId":"bulkTriggerExecutions","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs/{job_id}":{"get":{"operationId":"getBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"cancelExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions/{execution_id}/{action_id}/retrigger":{"post":{"operationId":"retriggerAction","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"action_id","in":"path","required":true}],"requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/automation/public/executions:resume":{"post":{"operationId":"resumeExecutionWithToken","requestBody":{"content":{"application/json":{}}},"responses":{}}}},"components":{"responses":{"NotFoundError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}}}}}')}},t={},o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}(187),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
package/dist/openapi.d.ts
CHANGED
|
@@ -745,6 +745,7 @@ declare namespace Components {
|
|
|
745
745
|
*/
|
|
746
746
|
OrganizationId;
|
|
747
747
|
flow_id: /**
|
|
748
|
+
* ID of the Automation Flow
|
|
748
749
|
* example:
|
|
749
750
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
750
751
|
*/
|
|
@@ -776,7 +777,7 @@ declare namespace Components {
|
|
|
776
777
|
* 2
|
|
777
778
|
*/
|
|
778
779
|
version?: number;
|
|
779
|
-
trigger_event?: TriggerEventManual | TriggerEventEntityActivity | TriggerEventEntityOperation;
|
|
780
|
+
trigger_event?: TriggerEventManual | TriggerEventEntityActivity | TriggerEventEntityOperation | TriggerEventFlowAutomationTask;
|
|
780
781
|
}
|
|
781
782
|
/**
|
|
782
783
|
* example:
|
|
@@ -785,6 +786,7 @@ declare namespace Components {
|
|
|
785
786
|
export type AutomationExecutionId = string;
|
|
786
787
|
export interface AutomationFlow {
|
|
787
788
|
id?: /**
|
|
789
|
+
* ID of the Automation Flow
|
|
788
790
|
* example:
|
|
789
791
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
790
792
|
*/
|
|
@@ -833,7 +835,7 @@ declare namespace Components {
|
|
|
833
835
|
/**
|
|
834
836
|
* The actions (nodes) of the automation flow
|
|
835
837
|
*/
|
|
836
|
-
actions:
|
|
838
|
+
actions: AnyAction[];
|
|
837
839
|
/**
|
|
838
840
|
* Number of automation executions that ran
|
|
839
841
|
* example:
|
|
@@ -893,6 +895,7 @@ declare namespace Components {
|
|
|
893
895
|
_manifest?: string /* uuid */[] | null;
|
|
894
896
|
}
|
|
895
897
|
/**
|
|
898
|
+
* ID of the Automation Flow
|
|
896
899
|
* example:
|
|
897
900
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
898
901
|
*/
|
|
@@ -917,6 +920,7 @@ declare namespace Components {
|
|
|
917
920
|
*/
|
|
918
921
|
OrganizationId;
|
|
919
922
|
flow_id: /**
|
|
923
|
+
* ID of the Automation Flow
|
|
920
924
|
* example:
|
|
921
925
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
922
926
|
*/
|
|
@@ -1005,7 +1009,7 @@ declare namespace Components {
|
|
|
1005
1009
|
/**
|
|
1006
1010
|
* Last sort value used for pagination
|
|
1007
1011
|
*/
|
|
1008
|
-
search_after?: string;
|
|
1012
|
+
search_after?: (string | number)[];
|
|
1009
1013
|
/**
|
|
1010
1014
|
* Whether there are more entities to load
|
|
1011
1015
|
*/
|
|
@@ -1018,6 +1022,7 @@ declare namespace Components {
|
|
|
1018
1022
|
}
|
|
1019
1023
|
export type BulkTriggerRequest = {
|
|
1020
1024
|
flow_id: /**
|
|
1025
|
+
* ID of the Automation Flow
|
|
1021
1026
|
* example:
|
|
1022
1027
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
1023
1028
|
*/
|
|
@@ -1025,6 +1030,7 @@ declare namespace Components {
|
|
|
1025
1030
|
entities_refs: EntityRef[];
|
|
1026
1031
|
} | {
|
|
1027
1032
|
flow_id: /**
|
|
1033
|
+
* ID of the Automation Flow
|
|
1028
1034
|
* example:
|
|
1029
1035
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
1030
1036
|
*/
|
|
@@ -1032,6 +1038,7 @@ declare namespace Components {
|
|
|
1032
1038
|
entities_query: string;
|
|
1033
1039
|
} | {
|
|
1034
1040
|
flow_id: /**
|
|
1041
|
+
* ID of the Automation Flow
|
|
1035
1042
|
* example:
|
|
1036
1043
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
1037
1044
|
*/
|
|
@@ -2799,10 +2806,19 @@ declare namespace Components {
|
|
|
2799
2806
|
*/
|
|
2800
2807
|
EntityId;
|
|
2801
2808
|
flow_id: /**
|
|
2809
|
+
* ID of the Automation Flow
|
|
2802
2810
|
* example:
|
|
2803
2811
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
2804
2812
|
*/
|
|
2805
2813
|
AutomationFlowId;
|
|
2814
|
+
/**
|
|
2815
|
+
* ID of the Flow Execution
|
|
2816
|
+
*/
|
|
2817
|
+
flow_execution_id?: string;
|
|
2818
|
+
/**
|
|
2819
|
+
* ID of the automated flow action
|
|
2820
|
+
*/
|
|
2821
|
+
flow_automation_task_id?: string; // UUID
|
|
2806
2822
|
}
|
|
2807
2823
|
export interface SuffixCondition {
|
|
2808
2824
|
suffix?: string;
|
|
@@ -2857,6 +2873,30 @@ declare namespace Components {
|
|
|
2857
2873
|
ActivityId;
|
|
2858
2874
|
operation_type: EntityOperation;
|
|
2859
2875
|
}
|
|
2876
|
+
export interface TriggerEventFlowAutomationTask {
|
|
2877
|
+
type?: "flow_automation_task";
|
|
2878
|
+
/**
|
|
2879
|
+
* example:
|
|
2880
|
+
* 123
|
|
2881
|
+
*/
|
|
2882
|
+
org_id: string;
|
|
2883
|
+
entity_id: /**
|
|
2884
|
+
* example:
|
|
2885
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
2886
|
+
*/
|
|
2887
|
+
EntityId;
|
|
2888
|
+
/**
|
|
2889
|
+
* example:
|
|
2890
|
+
* wfwAJoT_cK
|
|
2891
|
+
*/
|
|
2892
|
+
flow_execution_id: string;
|
|
2893
|
+
/**
|
|
2894
|
+
* example:
|
|
2895
|
+
* 2fa221ec-3aac-4655-ab8f-c062eca44a3
|
|
2896
|
+
*/
|
|
2897
|
+
flow_automation_task_id: string; // UUID
|
|
2898
|
+
caller?: ApiCallerContext;
|
|
2899
|
+
}
|
|
2860
2900
|
export interface TriggerEventManual {
|
|
2861
2901
|
type?: "manual";
|
|
2862
2902
|
/**
|
|
@@ -3380,6 +3420,7 @@ declare namespace Paths {
|
|
|
3380
3420
|
namespace DeleteFlow {
|
|
3381
3421
|
namespace Parameters {
|
|
3382
3422
|
export type FlowId = /**
|
|
3423
|
+
* ID of the Automation Flow
|
|
3383
3424
|
* example:
|
|
3384
3425
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
3385
3426
|
*/
|
|
@@ -3502,6 +3543,7 @@ declare namespace Paths {
|
|
|
3502
3543
|
namespace GetFlow {
|
|
3503
3544
|
namespace Parameters {
|
|
3504
3545
|
export type FlowId = /**
|
|
3546
|
+
* ID of the Automation Flow
|
|
3505
3547
|
* example:
|
|
3506
3548
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
3507
3549
|
*/
|
|
@@ -3566,6 +3608,7 @@ declare namespace Paths {
|
|
|
3566
3608
|
namespace PutFlow {
|
|
3567
3609
|
namespace Parameters {
|
|
3568
3610
|
export type FlowId = /**
|
|
3611
|
+
* ID of the Automation Flow
|
|
3569
3612
|
* example:
|
|
3570
3613
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
3571
3614
|
*/
|
|
@@ -4111,6 +4154,7 @@ export type SuffixCondition = Components.Schemas.SuffixCondition;
|
|
|
4111
4154
|
export type TriggerCondition = Components.Schemas.TriggerCondition;
|
|
4112
4155
|
export type TriggerEventEntityActivity = Components.Schemas.TriggerEventEntityActivity;
|
|
4113
4156
|
export type TriggerEventEntityOperation = Components.Schemas.TriggerEventEntityOperation;
|
|
4157
|
+
export type TriggerEventFlowAutomationTask = Components.Schemas.TriggerEventFlowAutomationTask;
|
|
4114
4158
|
export type TriggerEventManual = Components.Schemas.TriggerEventManual;
|
|
4115
4159
|
export type TriggerShareEntityAction = Components.Schemas.TriggerShareEntityAction;
|
|
4116
4160
|
export type TriggerShareEntityActionConfig = Components.Schemas.TriggerShareEntityActionConfig;
|
package/dist/openapi.json
CHANGED
|
@@ -273,6 +273,241 @@
|
|
|
273
273
|
"application/json": {
|
|
274
274
|
"schema": {
|
|
275
275
|
"$ref": "#/components/schemas/GetExecutionsResp"
|
|
276
|
+
},
|
|
277
|
+
"examples": {
|
|
278
|
+
"manual_trigger": {
|
|
279
|
+
"summary": "Manual trigger execution",
|
|
280
|
+
"value": {
|
|
281
|
+
"total": 1,
|
|
282
|
+
"results": [
|
|
283
|
+
{
|
|
284
|
+
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
|
|
285
|
+
"execution_status": "success",
|
|
286
|
+
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
|
|
287
|
+
"org_id": "123",
|
|
288
|
+
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
|
|
289
|
+
"flow_name": "Handle contact form",
|
|
290
|
+
"created_at": "2023-01-01T10:00:00Z",
|
|
291
|
+
"updated_at": "2023-01-01T10:05:00Z",
|
|
292
|
+
"actions": [],
|
|
293
|
+
"version": 1,
|
|
294
|
+
"trigger_event": {
|
|
295
|
+
"type": "manual",
|
|
296
|
+
"org_id": "123",
|
|
297
|
+
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
|
|
298
|
+
"caller": {
|
|
299
|
+
"EpilotAuth": {
|
|
300
|
+
"claims": {
|
|
301
|
+
"userId": "10006129",
|
|
302
|
+
"email": "user@epilot.cloud"
|
|
303
|
+
},
|
|
304
|
+
"userId": "10006129",
|
|
305
|
+
"organizationId": "123"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"entity_operation_trigger": {
|
|
314
|
+
"summary": "Entity operation trigger execution",
|
|
315
|
+
"value": {
|
|
316
|
+
"total": 1,
|
|
317
|
+
"results": [
|
|
318
|
+
{
|
|
319
|
+
"id": "8cdf274e-ab70-4029-9ca2-c863b80a11c3",
|
|
320
|
+
"execution_status": "in_progress",
|
|
321
|
+
"entity_id": "f4e4fcbd-cbcc-4496-bf5f-60c6ce2c621e",
|
|
322
|
+
"activity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
|
|
323
|
+
"org_id": "123",
|
|
324
|
+
"flow_id": "8e2e067e-3c63-4b1a-8e02-6150a3d1fd89",
|
|
325
|
+
"flow_name": "Contact updated automation",
|
|
326
|
+
"created_at": "2023-01-01T12:00:00Z",
|
|
327
|
+
"updated_at": "2023-01-01T12:02:00Z",
|
|
328
|
+
"actions": [],
|
|
329
|
+
"version": 1,
|
|
330
|
+
"trigger_event": {
|
|
331
|
+
"type": "entity_operation",
|
|
332
|
+
"entity_id": "f4e4fcbd-cbcc-4496-bf5f-60c6ce2c621e",
|
|
333
|
+
"org_id": "123",
|
|
334
|
+
"activity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
|
|
335
|
+
"operation_type": "updateEntity"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"entity_activity_trigger": {
|
|
342
|
+
"summary": "Entity activity trigger execution",
|
|
343
|
+
"value": {
|
|
344
|
+
"total": 1,
|
|
345
|
+
"results": [
|
|
346
|
+
{
|
|
347
|
+
"id": "7bde163d-9a5f-3f18-8b92-d752a79a10b2",
|
|
348
|
+
"execution_status": "failed",
|
|
349
|
+
"entity_id": "c2b1a9d8-7e6f-5040-3029-180716253f4e",
|
|
350
|
+
"activity_id": "b3c4d5e6-f7a8-9012-3456-789012bcdef0",
|
|
351
|
+
"org_id": "123",
|
|
352
|
+
"flow_id": "6d1d956d-2b52-4a0a-9e01-5049a2c0ee78",
|
|
353
|
+
"flow_name": "Document upload handler",
|
|
354
|
+
"created_at": "2023-01-01T14:00:00Z",
|
|
355
|
+
"updated_at": "2023-01-01T14:01:30Z",
|
|
356
|
+
"actions": [],
|
|
357
|
+
"version": 1,
|
|
358
|
+
"trigger_event": {
|
|
359
|
+
"type": "entity_activity",
|
|
360
|
+
"org_id": "123",
|
|
361
|
+
"activity_id": "b3c4d5e6-f7a8-9012-3456-789012bcdef0",
|
|
362
|
+
"activity_type": "DocUploadedFromPortal",
|
|
363
|
+
"entity_id": "c2b1a9d8-7e6f-5040-3029-180716253f4e"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"flow_automation_task_trigger": {
|
|
370
|
+
"summary": "Flow automation task trigger execution",
|
|
371
|
+
"value": {
|
|
372
|
+
"total": 1,
|
|
373
|
+
"results": [
|
|
374
|
+
{
|
|
375
|
+
"id": "5ade051c-8a4e-2e07-7a81-c641968a0fa1",
|
|
376
|
+
"execution_status": "paused",
|
|
377
|
+
"entity_id": "d3c2b1a0-8f7e-6d5c-4b3a-291807364e5f",
|
|
378
|
+
"org_id": "123",
|
|
379
|
+
"flow_id": "9f0f178f-4c74-5b2b-af12-6160b3d1ee89",
|
|
380
|
+
"flow_name": "Journey completion follow-up",
|
|
381
|
+
"created_at": "2023-01-01T16:00:00Z",
|
|
382
|
+
"updated_at": "2023-01-01T16:03:00Z",
|
|
383
|
+
"actions": [],
|
|
384
|
+
"version": 1,
|
|
385
|
+
"resume_token": "eyJraWQiOiJrZXkifQ==",
|
|
386
|
+
"trigger_event": {
|
|
387
|
+
"type": "flow_automation_task",
|
|
388
|
+
"org_id": "123",
|
|
389
|
+
"entity_id": "d3c2b1a0-8f7e-6d5c-4b3a-291807364e5f",
|
|
390
|
+
"flow_execution_id": "wfwAJoT_cK",
|
|
391
|
+
"flow_automation_task_id": "2fa221ec-3aac-4655-ab8f-c062eca44a3",
|
|
392
|
+
"caller": {
|
|
393
|
+
"EpilotAuth": {
|
|
394
|
+
"claims": {
|
|
395
|
+
"userId": "10006129",
|
|
396
|
+
"email": "user@epilot.cloud"
|
|
397
|
+
},
|
|
398
|
+
"userId": "10006129",
|
|
399
|
+
"organizationId": "123"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"mixed_execution_statuses": {
|
|
408
|
+
"summary": "Multiple executions with different trigger types and statuses",
|
|
409
|
+
"value": {
|
|
410
|
+
"total": 4,
|
|
411
|
+
"results": [
|
|
412
|
+
{
|
|
413
|
+
"id": "1aef262e-9b5f-4f29-8c93-e763b90b21d3",
|
|
414
|
+
"execution_status": "success",
|
|
415
|
+
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
|
|
416
|
+
"org_id": "123",
|
|
417
|
+
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
|
|
418
|
+
"flow_name": "Send welcome email",
|
|
419
|
+
"created_at": "2023-01-01T09:00:00Z",
|
|
420
|
+
"updated_at": "2023-01-01T09:02:00Z",
|
|
421
|
+
"actions": [],
|
|
422
|
+
"version": 2,
|
|
423
|
+
"trigger_event": {
|
|
424
|
+
"type": "manual",
|
|
425
|
+
"org_id": "123",
|
|
426
|
+
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
|
|
427
|
+
"caller": {
|
|
428
|
+
"EpilotAuth": {
|
|
429
|
+
"claims": {
|
|
430
|
+
"userId": "10006129",
|
|
431
|
+
"email": "admin@epilot.cloud"
|
|
432
|
+
},
|
|
433
|
+
"userId": "10006129",
|
|
434
|
+
"organizationId": "123"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"id": "2bef373f-ac60-5039-9da4-f874ca1c32e4",
|
|
441
|
+
"execution_status": "in_progress",
|
|
442
|
+
"entity_id": "f4e4fcbd-cbcc-4496-bf5f-60c6ce2c621e",
|
|
443
|
+
"activity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
|
|
444
|
+
"org_id": "123",
|
|
445
|
+
"flow_id": "8e2e067e-3c63-4b1a-8e02-6150a3d1fd89",
|
|
446
|
+
"flow_name": "Update CRM system",
|
|
447
|
+
"created_at": "2023-01-01T10:30:00Z",
|
|
448
|
+
"updated_at": "2023-01-01T10:31:00Z",
|
|
449
|
+
"actions": [],
|
|
450
|
+
"version": 1,
|
|
451
|
+
"trigger_event": {
|
|
452
|
+
"type": "entity_operation",
|
|
453
|
+
"entity_id": "f4e4fcbd-cbcc-4496-bf5f-60c6ce2c621e",
|
|
454
|
+
"org_id": "123",
|
|
455
|
+
"activity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
|
|
456
|
+
"operation_type": "createEntity"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"id": "3cef484g-bd71-6149-ae04-0985db2d43f5",
|
|
461
|
+
"execution_status": "failed",
|
|
462
|
+
"entity_id": "c2b1a9d8-7e6f-5040-3029-180716253f4e",
|
|
463
|
+
"activity_id": "b3c4d5e6-f7a8-9012-3456-789012bcdef0",
|
|
464
|
+
"org_id": "123",
|
|
465
|
+
"flow_id": "6d1d956d-2b52-4a0a-9e01-5049a2c0ee78",
|
|
466
|
+
"flow_name": "Generate invoice",
|
|
467
|
+
"created_at": "2023-01-01T11:15:00Z",
|
|
468
|
+
"updated_at": "2023-01-01T11:16:30Z",
|
|
469
|
+
"actions": [],
|
|
470
|
+
"version": 1,
|
|
471
|
+
"trigger_event": {
|
|
472
|
+
"type": "entity_activity",
|
|
473
|
+
"org_id": "123",
|
|
474
|
+
"activity_id": "b3c4d5e6-f7a8-9012-3456-789012bcdef0",
|
|
475
|
+
"activity_type": "CreateMeterReading",
|
|
476
|
+
"entity_id": "c2b1a9d8-7e6f-5040-3029-180716253f4e"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"id": "4def595h-ce82-7259-bf15-1a96ec3e54g6",
|
|
481
|
+
"execution_status": "scheduled",
|
|
482
|
+
"entity_id": "d3c2b1a0-8f7e-6d5c-4b3a-291807364e5f",
|
|
483
|
+
"org_id": "123",
|
|
484
|
+
"flow_id": "9f0f178f-4c74-5b2b-af12-6160b3d1ee89",
|
|
485
|
+
"flow_name": "Scheduled reminder",
|
|
486
|
+
"created_at": "2023-01-01T12:45:00Z",
|
|
487
|
+
"updated_at": "2023-01-01T12:45:00Z",
|
|
488
|
+
"actions": [],
|
|
489
|
+
"version": 1,
|
|
490
|
+
"trigger_event": {
|
|
491
|
+
"type": "flow_automation_task",
|
|
492
|
+
"org_id": "123",
|
|
493
|
+
"entity_id": "d3c2b1a0-8f7e-6d5c-4b3a-291807364e5f",
|
|
494
|
+
"flow_execution_id": "xgxBKpU_dL",
|
|
495
|
+
"flow_automation_task_id": "3gb332fd-4bbd-5766-bc9g-d173fdb55b4",
|
|
496
|
+
"caller": {
|
|
497
|
+
"EpilotAuth": {
|
|
498
|
+
"claims": {
|
|
499
|
+
"userId": "10006130",
|
|
500
|
+
"email": "scheduler@epilot.cloud"
|
|
501
|
+
},
|
|
502
|
+
"userId": "10006130",
|
|
503
|
+
"organizationId": "123"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
}
|
|
510
|
+
}
|
|
276
511
|
}
|
|
277
512
|
}
|
|
278
513
|
}
|
|
@@ -631,6 +866,7 @@
|
|
|
631
866
|
"schemas": {
|
|
632
867
|
"AutomationFlowId": {
|
|
633
868
|
"type": "string",
|
|
869
|
+
"description": "ID of the Automation Flow",
|
|
634
870
|
"example": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
|
|
635
871
|
"readOnly": true
|
|
636
872
|
},
|
|
@@ -712,7 +948,7 @@
|
|
|
712
948
|
"type": "array",
|
|
713
949
|
"description": "The actions (nodes) of the automation flow",
|
|
714
950
|
"items": {
|
|
715
|
-
"$ref": "#/components/schemas/
|
|
951
|
+
"$ref": "#/components/schemas/AnyAction"
|
|
716
952
|
},
|
|
717
953
|
"readOnly": true
|
|
718
954
|
},
|
|
@@ -2551,6 +2787,9 @@
|
|
|
2551
2787
|
},
|
|
2552
2788
|
{
|
|
2553
2789
|
"$ref": "#/components/schemas/TriggerEventEntityOperation"
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
"$ref": "#/components/schemas/TriggerEventFlowAutomationTask"
|
|
2554
2793
|
}
|
|
2555
2794
|
]
|
|
2556
2795
|
}
|
|
@@ -2589,6 +2828,42 @@
|
|
|
2589
2828
|
"entity_id"
|
|
2590
2829
|
]
|
|
2591
2830
|
},
|
|
2831
|
+
"TriggerEventFlowAutomationTask": {
|
|
2832
|
+
"type": "object",
|
|
2833
|
+
"properties": {
|
|
2834
|
+
"type": {
|
|
2835
|
+
"type": "string",
|
|
2836
|
+
"enum": [
|
|
2837
|
+
"flow_automation_task"
|
|
2838
|
+
]
|
|
2839
|
+
},
|
|
2840
|
+
"org_id": {
|
|
2841
|
+
"type": "string",
|
|
2842
|
+
"example": "123"
|
|
2843
|
+
},
|
|
2844
|
+
"entity_id": {
|
|
2845
|
+
"$ref": "#/components/schemas/EntityId"
|
|
2846
|
+
},
|
|
2847
|
+
"flow_execution_id": {
|
|
2848
|
+
"type": "string",
|
|
2849
|
+
"example": "wfwAJoT_cK"
|
|
2850
|
+
},
|
|
2851
|
+
"flow_automation_task_id": {
|
|
2852
|
+
"type": "string",
|
|
2853
|
+
"format": "UUID",
|
|
2854
|
+
"example": "2fa221ec-3aac-4655-ab8f-c062eca44a3"
|
|
2855
|
+
},
|
|
2856
|
+
"caller": {
|
|
2857
|
+
"$ref": "#/components/schemas/ApiCallerContext"
|
|
2858
|
+
}
|
|
2859
|
+
},
|
|
2860
|
+
"required": [
|
|
2861
|
+
"org_id",
|
|
2862
|
+
"entity_id",
|
|
2863
|
+
"flow_execution_id",
|
|
2864
|
+
"flow_automation_task_id"
|
|
2865
|
+
]
|
|
2866
|
+
},
|
|
2592
2867
|
"TriggerEventEntityActivity": {
|
|
2593
2868
|
"type": "object",
|
|
2594
2869
|
"properties": {
|
|
@@ -2751,6 +3026,15 @@
|
|
|
2751
3026
|
},
|
|
2752
3027
|
"flow_id": {
|
|
2753
3028
|
"$ref": "#/components/schemas/AutomationFlowId"
|
|
3029
|
+
},
|
|
3030
|
+
"flow_execution_id": {
|
|
3031
|
+
"type": "string",
|
|
3032
|
+
"description": "ID of the Flow Execution"
|
|
3033
|
+
},
|
|
3034
|
+
"flow_automation_task_id": {
|
|
3035
|
+
"type": "string",
|
|
3036
|
+
"format": "UUID",
|
|
3037
|
+
"description": "ID of the automated flow action"
|
|
2754
3038
|
}
|
|
2755
3039
|
},
|
|
2756
3040
|
"required": [
|
|
@@ -2965,8 +3249,18 @@
|
|
|
2965
3249
|
"description": "Stable query ID for pagination"
|
|
2966
3250
|
},
|
|
2967
3251
|
"search_after": {
|
|
2968
|
-
"type": "
|
|
2969
|
-
"description": "Last sort value used for pagination"
|
|
3252
|
+
"type": "array",
|
|
3253
|
+
"description": "Last sort value used for pagination",
|
|
3254
|
+
"items": {
|
|
3255
|
+
"oneOf": [
|
|
3256
|
+
{
|
|
3257
|
+
"type": "string"
|
|
3258
|
+
},
|
|
3259
|
+
{
|
|
3260
|
+
"type": "number"
|
|
3261
|
+
}
|
|
3262
|
+
]
|
|
3263
|
+
}
|
|
2970
3264
|
},
|
|
2971
3265
|
"has_more": {
|
|
2972
3266
|
"type": "boolean",
|
|
@@ -3962,10 +4256,5 @@
|
|
|
3962
4256
|
}
|
|
3963
4257
|
}
|
|
3964
4258
|
}
|
|
3965
|
-
}
|
|
3966
|
-
"servers": [
|
|
3967
|
-
{
|
|
3968
|
-
"url": "https://automation.sls.epilot.io"
|
|
3969
|
-
}
|
|
3970
|
-
]
|
|
4259
|
+
}
|
|
3971
4260
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/automation-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "Client library for epilot automation API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test": "jest",
|
|
26
26
|
"typescript": "tsc",
|
|
27
27
|
"bundle-definition": "webpack",
|
|
28
|
-
"openapi": "node ../../scripts/update-openapi.js
|
|
28
|
+
"openapi": "node ../../scripts/update-openapi.js /Users/sureshs/workspace/automation-api/lambda/ApiHandlerFunction/openapi.yml",
|
|
29
29
|
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
30
30
|
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
31
31
|
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|