@epilot/automation-client 2.17.3 → 2.18.1
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 +18 -0
- package/dist/openapi.d.ts +352 -16
- package/dist/openapi.json +519 -13
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={914: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(240));t.default=r.default},240: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":{}}}}},"servers":[{"url":"https://automation.sls.epilot.io"}]}')}},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}(914),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{"use strict";var e={914: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(240));t.default=r.default},240: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":{}}},"/v1/automation/executions/{execution_id}/{schedule_id}":{"delete":{"operationId":"cancelSchedule","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"schedule_id","in":"path","required":true}],"responses":{}}}},"components":{"responses":{"NotFoundError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://automation.sls.epilot.io"}]}')}},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}(914),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
|
@@ -205,6 +205,24 @@
|
|
|
205
205
|
},
|
|
206
206
|
"responses": {}
|
|
207
207
|
}
|
|
208
|
+
},
|
|
209
|
+
"/v1/automation/executions/{execution_id}/{schedule_id}": {
|
|
210
|
+
"delete": {
|
|
211
|
+
"operationId": "cancelSchedule",
|
|
212
|
+
"parameters": [
|
|
213
|
+
{
|
|
214
|
+
"name": "execution_id",
|
|
215
|
+
"in": "path",
|
|
216
|
+
"required": true
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "schedule_id",
|
|
220
|
+
"in": "path",
|
|
221
|
+
"required": true
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"responses": {}
|
|
225
|
+
}
|
|
208
226
|
}
|
|
209
227
|
},
|
|
210
228
|
"components": {
|
package/dist/openapi.d.ts
CHANGED
|
@@ -126,7 +126,7 @@ declare namespace Components {
|
|
|
126
126
|
types?: (("CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal") | string)[];
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerShareEntityAction | TriggerWebhookAction | InformERPAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | CustomAction | AutomationAction;
|
|
129
|
+
export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerShareEntityAction | TriggerWebhookAction | InformERPAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | CustomAction | AutomationAction | FlowExecutionCancelAction;
|
|
130
130
|
export type AnyActionConfig = /**
|
|
131
131
|
* example:
|
|
132
132
|
* {
|
|
@@ -341,7 +341,28 @@ declare namespace Components {
|
|
|
341
341
|
* }
|
|
342
342
|
* }
|
|
343
343
|
*/
|
|
344
|
-
SendEmailActionConfig | /* Creates an order entity with prices from journey */ CartCheckoutActionConfig | CustomAction | AutomationActionConfig
|
|
344
|
+
SendEmailActionConfig | /* Creates an order entity with prices from journey */ CartCheckoutActionConfig | CustomAction | AutomationActionConfig | /**
|
|
345
|
+
* example:
|
|
346
|
+
* {
|
|
347
|
+
* "id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
348
|
+
* "name": "Cancel Flow Execution",
|
|
349
|
+
* "type": "cancel-flow-execution",
|
|
350
|
+
* "config": {
|
|
351
|
+
* "selected_reasons": [
|
|
352
|
+
* {
|
|
353
|
+
* "id": "_6kITMwkv_0Uo4i7fO7Ja",
|
|
354
|
+
* "title": "when you are done! that's when you close it."
|
|
355
|
+
* },
|
|
356
|
+
* {
|
|
357
|
+
* "id": "qgK9sGbKoS7NxlAbNReVn",
|
|
358
|
+
* "title": "Client didn't want our services"
|
|
359
|
+
* }
|
|
360
|
+
* ],
|
|
361
|
+
* "extra_description": "Test cancellation"
|
|
362
|
+
* }
|
|
363
|
+
* }
|
|
364
|
+
*/
|
|
365
|
+
FlowExecutionCancelActionConfig;
|
|
345
366
|
export type AnyTrigger = FrontendSubmitTrigger | JourneySubmitTrigger | ApiSubmissionTrigger | /**
|
|
346
367
|
* - If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.
|
|
347
368
|
* - The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`
|
|
@@ -745,6 +766,7 @@ declare namespace Components {
|
|
|
745
766
|
*/
|
|
746
767
|
OrganizationId;
|
|
747
768
|
flow_id: /**
|
|
769
|
+
* ID of the Automation Flow
|
|
748
770
|
* example:
|
|
749
771
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
750
772
|
*/
|
|
@@ -776,7 +798,7 @@ declare namespace Components {
|
|
|
776
798
|
* 2
|
|
777
799
|
*/
|
|
778
800
|
version?: number;
|
|
779
|
-
trigger_event?: TriggerEventManual | TriggerEventEntityActivity | TriggerEventEntityOperation;
|
|
801
|
+
trigger_event?: TriggerEventManual | TriggerEventEntityActivity | TriggerEventEntityOperation | TriggerEventFlowAutomationTask;
|
|
780
802
|
}
|
|
781
803
|
/**
|
|
782
804
|
* example:
|
|
@@ -785,6 +807,7 @@ declare namespace Components {
|
|
|
785
807
|
export type AutomationExecutionId = string;
|
|
786
808
|
export interface AutomationFlow {
|
|
787
809
|
id?: /**
|
|
810
|
+
* ID of the Automation Flow
|
|
788
811
|
* example:
|
|
789
812
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
790
813
|
*/
|
|
@@ -833,7 +856,7 @@ declare namespace Components {
|
|
|
833
856
|
/**
|
|
834
857
|
* The actions (nodes) of the automation flow
|
|
835
858
|
*/
|
|
836
|
-
actions:
|
|
859
|
+
actions: AnyAction[];
|
|
837
860
|
/**
|
|
838
861
|
* Number of automation executions that ran
|
|
839
862
|
* example:
|
|
@@ -893,6 +916,7 @@ declare namespace Components {
|
|
|
893
916
|
_manifest?: string /* uuid */[] | null;
|
|
894
917
|
}
|
|
895
918
|
/**
|
|
919
|
+
* ID of the Automation Flow
|
|
896
920
|
* example:
|
|
897
921
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
898
922
|
*/
|
|
@@ -917,6 +941,7 @@ declare namespace Components {
|
|
|
917
941
|
*/
|
|
918
942
|
OrganizationId;
|
|
919
943
|
flow_id: /**
|
|
944
|
+
* ID of the Automation Flow
|
|
920
945
|
* example:
|
|
921
946
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
922
947
|
*/
|
|
@@ -924,15 +949,17 @@ declare namespace Components {
|
|
|
924
949
|
/**
|
|
925
950
|
* Status of the bulk trigger automation job
|
|
926
951
|
* * approval: Waiting for user approval to start the bulk trigger automation
|
|
927
|
-
* *
|
|
928
|
-
* *
|
|
952
|
+
* * querying_entities: Loading entities in batches
|
|
953
|
+
* * entities_loaded: All entities have been loaded and stored
|
|
954
|
+
* * executing: Automation execution are currently running
|
|
955
|
+
* * monitoring: All executions have been started, now monitoring their completion
|
|
929
956
|
* * send_report: Automation executions finished running. Report is being created & sent to the user who initiated the bulk trigger automation
|
|
930
957
|
* * finished: Automation executions finished running. Some may have failed. Check the status of each entity.
|
|
931
958
|
* * failed: Bulk trigger automation execution failed. Some executions might have started. Check the status of each entity.
|
|
932
959
|
* * cancelled: Bulk trigger automation execution was cancelled
|
|
933
960
|
*
|
|
934
961
|
*/
|
|
935
|
-
status: "approval" | "
|
|
962
|
+
status: "approval" | "querying_entities" | "entities_loaded" | "executing" | "monitoring" | "send_report" | "finished" | "failed" | "cancelled";
|
|
936
963
|
/**
|
|
937
964
|
* User ID who created the bulk trigger automation job
|
|
938
965
|
* example:
|
|
@@ -955,13 +982,68 @@ declare namespace Components {
|
|
|
955
982
|
* Entity ID of the report file entity
|
|
956
983
|
*/
|
|
957
984
|
report_file_entity_id?: string;
|
|
985
|
+
/**
|
|
986
|
+
* Query configuration for loading entities
|
|
987
|
+
*/
|
|
988
|
+
entity_query?: {
|
|
989
|
+
type: "refs" | "query" | "filter";
|
|
990
|
+
data: EntityRef[] | string | /**
|
|
991
|
+
* A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.
|
|
992
|
+
* example:
|
|
993
|
+
* [
|
|
994
|
+
* {
|
|
995
|
+
* "term": {
|
|
996
|
+
* "_schema": "contact"
|
|
997
|
+
* }
|
|
998
|
+
* },
|
|
999
|
+
* {
|
|
1000
|
+
* "terms": {
|
|
1001
|
+
* "status": [
|
|
1002
|
+
* "active"
|
|
1003
|
+
* ]
|
|
1004
|
+
* }
|
|
1005
|
+
* }
|
|
1006
|
+
* ]
|
|
1007
|
+
*/
|
|
1008
|
+
EntitySearchFilter;
|
|
1009
|
+
};
|
|
1010
|
+
/**
|
|
1011
|
+
* Pagination state for entity loading
|
|
1012
|
+
*/
|
|
1013
|
+
pagination_state?: {
|
|
1014
|
+
/**
|
|
1015
|
+
* Number of entities per page
|
|
1016
|
+
*/
|
|
1017
|
+
page_size?: number;
|
|
1018
|
+
/**
|
|
1019
|
+
* Number of pages processed so far
|
|
1020
|
+
*/
|
|
1021
|
+
pages_processed?: number;
|
|
1022
|
+
/**
|
|
1023
|
+
* Total number of entities processed so far
|
|
1024
|
+
*/
|
|
1025
|
+
total_processed?: number;
|
|
1026
|
+
/**
|
|
1027
|
+
* Stable query ID for pagination
|
|
1028
|
+
*/
|
|
1029
|
+
stable_query_id?: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* Last sort value used for pagination
|
|
1032
|
+
*/
|
|
1033
|
+
search_after?: (string | number)[];
|
|
1034
|
+
/**
|
|
1035
|
+
* Whether there are more entities to load
|
|
1036
|
+
*/
|
|
1037
|
+
has_more?: boolean;
|
|
1038
|
+
};
|
|
958
1039
|
/**
|
|
959
1040
|
* List of entities & their automation execution id & status
|
|
960
1041
|
*/
|
|
961
|
-
execution_summary
|
|
1042
|
+
execution_summary?: /* Execution item for bulk trigger automation. It maps each entity to its automation execution id & status */ ExecItem[];
|
|
962
1043
|
}
|
|
963
1044
|
export type BulkTriggerRequest = {
|
|
964
1045
|
flow_id: /**
|
|
1046
|
+
* ID of the Automation Flow
|
|
965
1047
|
* example:
|
|
966
1048
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
967
1049
|
*/
|
|
@@ -969,6 +1051,7 @@ declare namespace Components {
|
|
|
969
1051
|
entities_refs: EntityRef[];
|
|
970
1052
|
} | {
|
|
971
1053
|
flow_id: /**
|
|
1054
|
+
* ID of the Automation Flow
|
|
972
1055
|
* example:
|
|
973
1056
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
974
1057
|
*/
|
|
@@ -976,6 +1059,7 @@ declare namespace Components {
|
|
|
976
1059
|
entities_query: string;
|
|
977
1060
|
} | {
|
|
978
1061
|
flow_id: /**
|
|
1062
|
+
* ID of the Automation Flow
|
|
979
1063
|
* example:
|
|
980
1064
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
981
1065
|
*/
|
|
@@ -1000,6 +1084,23 @@ declare namespace Components {
|
|
|
1000
1084
|
*/
|
|
1001
1085
|
EntitySearchFilter;
|
|
1002
1086
|
};
|
|
1087
|
+
/**
|
|
1088
|
+
* A reason for cancelling a flow execution
|
|
1089
|
+
*/
|
|
1090
|
+
export interface CancellationReason {
|
|
1091
|
+
/**
|
|
1092
|
+
* Unique identifier for the cancellation reason
|
|
1093
|
+
* example:
|
|
1094
|
+
* _6kITMwkv_0Uo4i7fO7Ja
|
|
1095
|
+
*/
|
|
1096
|
+
id: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Human-readable title for the cancellation reason
|
|
1099
|
+
* example:
|
|
1100
|
+
* Process completed successfully
|
|
1101
|
+
*/
|
|
1102
|
+
title: string;
|
|
1103
|
+
}
|
|
1003
1104
|
/**
|
|
1004
1105
|
* Creates an order entity with prices from journey
|
|
1005
1106
|
*/
|
|
@@ -1888,13 +1989,159 @@ declare namespace Components {
|
|
|
1888
1989
|
*/
|
|
1889
1990
|
error?: string;
|
|
1890
1991
|
}
|
|
1891
|
-
export type ExecutionStatus = "pending" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot";
|
|
1992
|
+
export type ExecutionStatus = "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot";
|
|
1892
1993
|
export interface ExistsCondition {
|
|
1893
1994
|
exists?: boolean;
|
|
1894
1995
|
}
|
|
1895
1996
|
export type FilterConditionOnEvent = OrCondition | {
|
|
1896
1997
|
[name: string]: (string | EqualsIgnoreCaseCondition | AnythingButCondition | NumericCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[];
|
|
1897
1998
|
};
|
|
1999
|
+
export interface FlowExecutionCancelAction {
|
|
2000
|
+
id?: /**
|
|
2001
|
+
* example:
|
|
2002
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2003
|
+
*/
|
|
2004
|
+
AutomationActionId;
|
|
2005
|
+
flow_action_id?: /**
|
|
2006
|
+
* example:
|
|
2007
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2008
|
+
*/
|
|
2009
|
+
AutomationActionId;
|
|
2010
|
+
name?: string;
|
|
2011
|
+
type?: "cancel-flow-execution";
|
|
2012
|
+
config?: /* Configuration for cancelling a flow execution with selected reasons */ FlowExecutionCancelConfig;
|
|
2013
|
+
/**
|
|
2014
|
+
* Whether to stop execution in a failed state if this action fails
|
|
2015
|
+
*/
|
|
2016
|
+
allow_failure?: boolean;
|
|
2017
|
+
/**
|
|
2018
|
+
* Flag indicating whether the action was created automatically or manually
|
|
2019
|
+
*/
|
|
2020
|
+
created_automatically?: boolean;
|
|
2021
|
+
/**
|
|
2022
|
+
* Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
|
|
2023
|
+
*/
|
|
2024
|
+
is_bulk_action?: boolean;
|
|
2025
|
+
reason?: {
|
|
2026
|
+
/**
|
|
2027
|
+
* Why the action has to be skipped/failed
|
|
2028
|
+
* example:
|
|
2029
|
+
* There are no registered portal users for the given emails, hence skipping the action
|
|
2030
|
+
*/
|
|
2031
|
+
message?: string;
|
|
2032
|
+
/**
|
|
2033
|
+
* Extra metadata about the skipping reason - such as a certain condition not met, etc.
|
|
2034
|
+
*/
|
|
2035
|
+
payload?: {
|
|
2036
|
+
[name: string]: any;
|
|
2037
|
+
};
|
|
2038
|
+
};
|
|
2039
|
+
/**
|
|
2040
|
+
* Condition Id to be checked before executing the action
|
|
2041
|
+
*/
|
|
2042
|
+
condition_id?: string;
|
|
2043
|
+
/**
|
|
2044
|
+
* Schedule Id which indicates the schedule of the action
|
|
2045
|
+
*/
|
|
2046
|
+
schedule_id?: string;
|
|
2047
|
+
execution_status?: ExecutionStatus;
|
|
2048
|
+
started_at?: string;
|
|
2049
|
+
updated_at?: string;
|
|
2050
|
+
/**
|
|
2051
|
+
* example:
|
|
2052
|
+
* {}
|
|
2053
|
+
*/
|
|
2054
|
+
outputs?: {
|
|
2055
|
+
[name: string]: any;
|
|
2056
|
+
};
|
|
2057
|
+
error_output?: ErrorOutput;
|
|
2058
|
+
retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* example:
|
|
2062
|
+
* {
|
|
2063
|
+
* "id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
2064
|
+
* "name": "Cancel Flow Execution",
|
|
2065
|
+
* "type": "cancel-flow-execution",
|
|
2066
|
+
* "config": {
|
|
2067
|
+
* "selected_reasons": [
|
|
2068
|
+
* {
|
|
2069
|
+
* "id": "_6kITMwkv_0Uo4i7fO7Ja",
|
|
2070
|
+
* "title": "when you are done! that's when you close it."
|
|
2071
|
+
* },
|
|
2072
|
+
* {
|
|
2073
|
+
* "id": "qgK9sGbKoS7NxlAbNReVn",
|
|
2074
|
+
* "title": "Client didn't want our services"
|
|
2075
|
+
* }
|
|
2076
|
+
* ],
|
|
2077
|
+
* "extra_description": "Test cancellation"
|
|
2078
|
+
* }
|
|
2079
|
+
* }
|
|
2080
|
+
*/
|
|
2081
|
+
export interface FlowExecutionCancelActionConfig {
|
|
2082
|
+
id?: /**
|
|
2083
|
+
* example:
|
|
2084
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2085
|
+
*/
|
|
2086
|
+
AutomationActionId;
|
|
2087
|
+
flow_action_id?: /**
|
|
2088
|
+
* example:
|
|
2089
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2090
|
+
*/
|
|
2091
|
+
AutomationActionId;
|
|
2092
|
+
name?: string;
|
|
2093
|
+
type?: "cancel-flow-execution";
|
|
2094
|
+
config?: /* Configuration for cancelling a flow execution with selected reasons */ FlowExecutionCancelConfig;
|
|
2095
|
+
/**
|
|
2096
|
+
* Whether to stop execution in a failed state if this action fails
|
|
2097
|
+
*/
|
|
2098
|
+
allow_failure?: boolean;
|
|
2099
|
+
/**
|
|
2100
|
+
* Flag indicating whether the action was created automatically or manually
|
|
2101
|
+
*/
|
|
2102
|
+
created_automatically?: boolean;
|
|
2103
|
+
/**
|
|
2104
|
+
* Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
|
|
2105
|
+
*/
|
|
2106
|
+
is_bulk_action?: boolean;
|
|
2107
|
+
reason?: {
|
|
2108
|
+
/**
|
|
2109
|
+
* Why the action has to be skipped/failed
|
|
2110
|
+
* example:
|
|
2111
|
+
* There are no registered portal users for the given emails, hence skipping the action
|
|
2112
|
+
*/
|
|
2113
|
+
message?: string;
|
|
2114
|
+
/**
|
|
2115
|
+
* Extra metadata about the skipping reason - such as a certain condition not met, etc.
|
|
2116
|
+
*/
|
|
2117
|
+
payload?: {
|
|
2118
|
+
[name: string]: any;
|
|
2119
|
+
};
|
|
2120
|
+
};
|
|
2121
|
+
/**
|
|
2122
|
+
* Condition Id to be checked before executing the action
|
|
2123
|
+
*/
|
|
2124
|
+
condition_id?: string;
|
|
2125
|
+
/**
|
|
2126
|
+
* Schedule Id which indicates the schedule of the action
|
|
2127
|
+
*/
|
|
2128
|
+
schedule_id?: string;
|
|
2129
|
+
}
|
|
2130
|
+
/**
|
|
2131
|
+
* Configuration for cancelling a flow execution with selected reasons
|
|
2132
|
+
*/
|
|
2133
|
+
export interface FlowExecutionCancelConfig {
|
|
2134
|
+
/**
|
|
2135
|
+
* List of reasons selected for this specific cancellation
|
|
2136
|
+
*/
|
|
2137
|
+
selected_reasons?: /* A reason for cancelling a flow execution */ CancellationReason[];
|
|
2138
|
+
/**
|
|
2139
|
+
* Additional description or notes for the cancellation
|
|
2140
|
+
* example:
|
|
2141
|
+
* Process completed successfully
|
|
2142
|
+
*/
|
|
2143
|
+
extra_description?: string;
|
|
2144
|
+
}
|
|
1898
2145
|
export interface FlowsTrigger {
|
|
1899
2146
|
/**
|
|
1900
2147
|
* example:
|
|
@@ -1903,14 +2150,7 @@ declare namespace Components {
|
|
|
1903
2150
|
id?: string; // uuid
|
|
1904
2151
|
type: "flows_trigger";
|
|
1905
2152
|
configuration: {
|
|
1906
|
-
/**
|
|
1907
|
-
* ID of the flow that triggers the automation
|
|
1908
|
-
*/
|
|
1909
2153
|
source_id: string; // uuid
|
|
1910
|
-
/**
|
|
1911
|
-
* Certain flows can be triggered automatically by a journey, this is the ID of that journey
|
|
1912
|
-
*/
|
|
1913
|
-
journey_id?: string; // uuid
|
|
1914
2154
|
};
|
|
1915
2155
|
}
|
|
1916
2156
|
export interface FrontendSubmitTrigger {
|
|
@@ -2750,10 +2990,19 @@ declare namespace Components {
|
|
|
2750
2990
|
*/
|
|
2751
2991
|
EntityId;
|
|
2752
2992
|
flow_id: /**
|
|
2993
|
+
* ID of the Automation Flow
|
|
2753
2994
|
* example:
|
|
2754
2995
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
2755
2996
|
*/
|
|
2756
2997
|
AutomationFlowId;
|
|
2998
|
+
/**
|
|
2999
|
+
* ID of the Flow Execution
|
|
3000
|
+
*/
|
|
3001
|
+
flow_execution_id?: string;
|
|
3002
|
+
/**
|
|
3003
|
+
* ID of the automated flow action
|
|
3004
|
+
*/
|
|
3005
|
+
flow_automation_task_id?: string; // UUID
|
|
2757
3006
|
}
|
|
2758
3007
|
export interface SuffixCondition {
|
|
2759
3008
|
suffix?: string;
|
|
@@ -2808,6 +3057,30 @@ declare namespace Components {
|
|
|
2808
3057
|
ActivityId;
|
|
2809
3058
|
operation_type: EntityOperation;
|
|
2810
3059
|
}
|
|
3060
|
+
export interface TriggerEventFlowAutomationTask {
|
|
3061
|
+
type?: "flow_automation_task";
|
|
3062
|
+
/**
|
|
3063
|
+
* example:
|
|
3064
|
+
* 123
|
|
3065
|
+
*/
|
|
3066
|
+
org_id: string;
|
|
3067
|
+
entity_id: /**
|
|
3068
|
+
* example:
|
|
3069
|
+
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
3070
|
+
*/
|
|
3071
|
+
EntityId;
|
|
3072
|
+
/**
|
|
3073
|
+
* example:
|
|
3074
|
+
* wfwAJoT_cK
|
|
3075
|
+
*/
|
|
3076
|
+
flow_execution_id: string;
|
|
3077
|
+
/**
|
|
3078
|
+
* example:
|
|
3079
|
+
* 2fa221ec-3aac-4655-ab8f-c062eca44a3
|
|
3080
|
+
*/
|
|
3081
|
+
flow_automation_task_id: string; // UUID
|
|
3082
|
+
caller?: ApiCallerContext;
|
|
3083
|
+
}
|
|
2811
3084
|
export interface TriggerEventManual {
|
|
2812
3085
|
type?: "manual";
|
|
2813
3086
|
/**
|
|
@@ -3314,6 +3587,39 @@ declare namespace Paths {
|
|
|
3314
3587
|
Components.Responses.NotFoundError;
|
|
3315
3588
|
}
|
|
3316
3589
|
}
|
|
3590
|
+
namespace CancelSchedule {
|
|
3591
|
+
namespace Parameters {
|
|
3592
|
+
export type ExecutionId = /**
|
|
3593
|
+
* example:
|
|
3594
|
+
* 9baf184f-bc81-4128-bca3-d974c90a12c4
|
|
3595
|
+
*/
|
|
3596
|
+
Components.Schemas.AutomationExecutionId;
|
|
3597
|
+
export type ScheduleId = string;
|
|
3598
|
+
}
|
|
3599
|
+
export interface PathParameters {
|
|
3600
|
+
execution_id: Parameters.ExecutionId;
|
|
3601
|
+
schedule_id: Parameters.ScheduleId;
|
|
3602
|
+
}
|
|
3603
|
+
namespace Responses {
|
|
3604
|
+
export type $200 = Components.Schemas.ActionSchedule;
|
|
3605
|
+
export type $403 = /**
|
|
3606
|
+
* example:
|
|
3607
|
+
* {
|
|
3608
|
+
* "status": 403,
|
|
3609
|
+
* "error": "Forbidden"
|
|
3610
|
+
* }
|
|
3611
|
+
*/
|
|
3612
|
+
Components.Responses.ForbiddenError;
|
|
3613
|
+
export type $404 = /**
|
|
3614
|
+
* example:
|
|
3615
|
+
* {
|
|
3616
|
+
* "status": 404,
|
|
3617
|
+
* "error": "Not Found"
|
|
3618
|
+
* }
|
|
3619
|
+
*/
|
|
3620
|
+
Components.Responses.NotFoundError;
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3317
3623
|
namespace CreateFlow {
|
|
3318
3624
|
export type RequestBody = Components.Schemas.AutomationFlow;
|
|
3319
3625
|
namespace Responses {
|
|
@@ -3331,6 +3637,7 @@ declare namespace Paths {
|
|
|
3331
3637
|
namespace DeleteFlow {
|
|
3332
3638
|
namespace Parameters {
|
|
3333
3639
|
export type FlowId = /**
|
|
3640
|
+
* ID of the Automation Flow
|
|
3334
3641
|
* example:
|
|
3335
3642
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
3336
3643
|
*/
|
|
@@ -3453,6 +3760,7 @@ declare namespace Paths {
|
|
|
3453
3760
|
namespace GetFlow {
|
|
3454
3761
|
namespace Parameters {
|
|
3455
3762
|
export type FlowId = /**
|
|
3763
|
+
* ID of the Automation Flow
|
|
3456
3764
|
* example:
|
|
3457
3765
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
3458
3766
|
*/
|
|
@@ -3517,6 +3825,7 @@ declare namespace Paths {
|
|
|
3517
3825
|
namespace PutFlow {
|
|
3518
3826
|
namespace Parameters {
|
|
3519
3827
|
export type FlowId = /**
|
|
3828
|
+
* ID of the Automation Flow
|
|
3520
3829
|
* example:
|
|
3521
3830
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
3522
3831
|
*/
|
|
@@ -3796,6 +4105,16 @@ export interface OperationMethods {
|
|
|
3796
4105
|
data?: Paths.ResumeExecutionWithToken.RequestBody,
|
|
3797
4106
|
config?: AxiosRequestConfig
|
|
3798
4107
|
): OperationResponse<Paths.ResumeExecutionWithToken.Responses.$200>
|
|
4108
|
+
/**
|
|
4109
|
+
* cancelSchedule - cancelSchedule
|
|
4110
|
+
*
|
|
4111
|
+
* Cancel a scheduled automation
|
|
4112
|
+
*/
|
|
4113
|
+
'cancelSchedule'(
|
|
4114
|
+
parameters?: Parameters<Paths.CancelSchedule.PathParameters> | null,
|
|
4115
|
+
data?: any,
|
|
4116
|
+
config?: AxiosRequestConfig
|
|
4117
|
+
): OperationResponse<Paths.CancelSchedule.Responses.$200>
|
|
3799
4118
|
}
|
|
3800
4119
|
|
|
3801
4120
|
export interface PathsDictionary {
|
|
@@ -3960,6 +4279,18 @@ export interface PathsDictionary {
|
|
|
3960
4279
|
config?: AxiosRequestConfig
|
|
3961
4280
|
): OperationResponse<Paths.ResumeExecutionWithToken.Responses.$200>
|
|
3962
4281
|
}
|
|
4282
|
+
['/v1/automation/executions/{execution_id}/{schedule_id}']: {
|
|
4283
|
+
/**
|
|
4284
|
+
* cancelSchedule - cancelSchedule
|
|
4285
|
+
*
|
|
4286
|
+
* Cancel a scheduled automation
|
|
4287
|
+
*/
|
|
4288
|
+
'delete'(
|
|
4289
|
+
parameters?: Parameters<Paths.CancelSchedule.PathParameters> | null,
|
|
4290
|
+
data?: any,
|
|
4291
|
+
config?: AxiosRequestConfig
|
|
4292
|
+
): OperationResponse<Paths.CancelSchedule.Responses.$200>
|
|
4293
|
+
}
|
|
3963
4294
|
}
|
|
3964
4295
|
|
|
3965
4296
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
@@ -3988,6 +4319,7 @@ export type AutomationFlowId = Components.Schemas.AutomationFlowId;
|
|
|
3988
4319
|
export type AutomationTrigger = Components.Schemas.AutomationTrigger;
|
|
3989
4320
|
export type BulkTriggerJob = Components.Schemas.BulkTriggerJob;
|
|
3990
4321
|
export type BulkTriggerRequest = Components.Schemas.BulkTriggerRequest;
|
|
4322
|
+
export type CancellationReason = Components.Schemas.CancellationReason;
|
|
3991
4323
|
export type CartCheckoutAction = Components.Schemas.CartCheckoutAction;
|
|
3992
4324
|
export type CartCheckoutActionConfig = Components.Schemas.CartCheckoutActionConfig;
|
|
3993
4325
|
export type CartCheckoutConfig = Components.Schemas.CartCheckoutConfig;
|
|
@@ -4018,6 +4350,9 @@ export type ExecItem = Components.Schemas.ExecItem;
|
|
|
4018
4350
|
export type ExecutionStatus = Components.Schemas.ExecutionStatus;
|
|
4019
4351
|
export type ExistsCondition = Components.Schemas.ExistsCondition;
|
|
4020
4352
|
export type FilterConditionOnEvent = Components.Schemas.FilterConditionOnEvent;
|
|
4353
|
+
export type FlowExecutionCancelAction = Components.Schemas.FlowExecutionCancelAction;
|
|
4354
|
+
export type FlowExecutionCancelActionConfig = Components.Schemas.FlowExecutionCancelActionConfig;
|
|
4355
|
+
export type FlowExecutionCancelConfig = Components.Schemas.FlowExecutionCancelConfig;
|
|
4021
4356
|
export type FlowsTrigger = Components.Schemas.FlowsTrigger;
|
|
4022
4357
|
export type FrontendSubmitTrigger = Components.Schemas.FrontendSubmitTrigger;
|
|
4023
4358
|
export type GetExecutionsResp = Components.Schemas.GetExecutionsResp;
|
|
@@ -4060,6 +4395,7 @@ export type SuffixCondition = Components.Schemas.SuffixCondition;
|
|
|
4060
4395
|
export type TriggerCondition = Components.Schemas.TriggerCondition;
|
|
4061
4396
|
export type TriggerEventEntityActivity = Components.Schemas.TriggerEventEntityActivity;
|
|
4062
4397
|
export type TriggerEventEntityOperation = Components.Schemas.TriggerEventEntityOperation;
|
|
4398
|
+
export type TriggerEventFlowAutomationTask = Components.Schemas.TriggerEventFlowAutomationTask;
|
|
4063
4399
|
export type TriggerEventManual = Components.Schemas.TriggerEventManual;
|
|
4064
4400
|
export type TriggerShareEntityAction = Components.Schemas.TriggerShareEntityAction;
|
|
4065
4401
|
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
|
}
|
|
@@ -618,6 +853,53 @@
|
|
|
618
853
|
}
|
|
619
854
|
}
|
|
620
855
|
}
|
|
856
|
+
},
|
|
857
|
+
"/v1/automation/executions/{execution_id}/{schedule_id}": {
|
|
858
|
+
"delete": {
|
|
859
|
+
"operationId": "cancelSchedule",
|
|
860
|
+
"summary": "cancelSchedule",
|
|
861
|
+
"description": "Cancel a scheduled automation",
|
|
862
|
+
"parameters": [
|
|
863
|
+
{
|
|
864
|
+
"name": "execution_id",
|
|
865
|
+
"in": "path",
|
|
866
|
+
"schema": {
|
|
867
|
+
"$ref": "#/components/schemas/AutomationExecutionId"
|
|
868
|
+
},
|
|
869
|
+
"required": true
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"name": "schedule_id",
|
|
873
|
+
"in": "path",
|
|
874
|
+
"schema": {
|
|
875
|
+
"type": "string"
|
|
876
|
+
},
|
|
877
|
+
"required": true,
|
|
878
|
+
"description": "ID of the schedule to cancel"
|
|
879
|
+
}
|
|
880
|
+
],
|
|
881
|
+
"tags": [
|
|
882
|
+
"executions"
|
|
883
|
+
],
|
|
884
|
+
"responses": {
|
|
885
|
+
"200": {
|
|
886
|
+
"description": "The schedule was successfully cancelled",
|
|
887
|
+
"content": {
|
|
888
|
+
"application/json": {
|
|
889
|
+
"schema": {
|
|
890
|
+
"$ref": "#/components/schemas/ActionSchedule"
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"403": {
|
|
896
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
897
|
+
},
|
|
898
|
+
"404": {
|
|
899
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
621
903
|
}
|
|
622
904
|
},
|
|
623
905
|
"components": {
|
|
@@ -631,6 +913,7 @@
|
|
|
631
913
|
"schemas": {
|
|
632
914
|
"AutomationFlowId": {
|
|
633
915
|
"type": "string",
|
|
916
|
+
"description": "ID of the Automation Flow",
|
|
634
917
|
"example": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
|
|
635
918
|
"readOnly": true
|
|
636
919
|
},
|
|
@@ -712,7 +995,7 @@
|
|
|
712
995
|
"type": "array",
|
|
713
996
|
"description": "The actions (nodes) of the automation flow",
|
|
714
997
|
"items": {
|
|
715
|
-
"$ref": "#/components/schemas/
|
|
998
|
+
"$ref": "#/components/schemas/AnyAction"
|
|
716
999
|
},
|
|
717
1000
|
"readOnly": true
|
|
718
1001
|
},
|
|
@@ -869,6 +1152,9 @@
|
|
|
869
1152
|
},
|
|
870
1153
|
{
|
|
871
1154
|
"$ref": "#/components/schemas/AutomationAction"
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"$ref": "#/components/schemas/FlowExecutionCancelAction"
|
|
872
1158
|
}
|
|
873
1159
|
]
|
|
874
1160
|
},
|
|
@@ -903,6 +1189,9 @@
|
|
|
903
1189
|
},
|
|
904
1190
|
{
|
|
905
1191
|
"$ref": "#/components/schemas/AutomationActionConfig"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"$ref": "#/components/schemas/FlowExecutionCancelActionConfig"
|
|
906
1195
|
}
|
|
907
1196
|
]
|
|
908
1197
|
},
|
|
@@ -2266,6 +2555,105 @@
|
|
|
2266
2555
|
}
|
|
2267
2556
|
}
|
|
2268
2557
|
},
|
|
2558
|
+
"FlowExecutionCancelActionConfig": {
|
|
2559
|
+
"allOf": [
|
|
2560
|
+
{
|
|
2561
|
+
"$ref": "#/components/schemas/AutomationActionConfig"
|
|
2562
|
+
},
|
|
2563
|
+
{
|
|
2564
|
+
"type": "object",
|
|
2565
|
+
"properties": {
|
|
2566
|
+
"type": {
|
|
2567
|
+
"enum": [
|
|
2568
|
+
"cancel-flow-execution"
|
|
2569
|
+
]
|
|
2570
|
+
},
|
|
2571
|
+
"config": {
|
|
2572
|
+
"$ref": "#/components/schemas/FlowExecutionCancelConfig"
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
],
|
|
2577
|
+
"example": {
|
|
2578
|
+
"id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
2579
|
+
"name": "Cancel Flow Execution",
|
|
2580
|
+
"type": "cancel-flow-execution",
|
|
2581
|
+
"config": {
|
|
2582
|
+
"selected_reasons": [
|
|
2583
|
+
{
|
|
2584
|
+
"id": "_6kITMwkv_0Uo4i7fO7Ja",
|
|
2585
|
+
"title": "when you are done! that's when you close it."
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
"id": "qgK9sGbKoS7NxlAbNReVn",
|
|
2589
|
+
"title": "Client didn't want our services"
|
|
2590
|
+
}
|
|
2591
|
+
],
|
|
2592
|
+
"extra_description": "Test cancellation"
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
},
|
|
2596
|
+
"FlowExecutionCancelAction": {
|
|
2597
|
+
"allOf": [
|
|
2598
|
+
{
|
|
2599
|
+
"$ref": "#/components/schemas/AutomationAction"
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
"type": "object",
|
|
2603
|
+
"properties": {
|
|
2604
|
+
"type": {
|
|
2605
|
+
"enum": [
|
|
2606
|
+
"cancel-flow-execution"
|
|
2607
|
+
]
|
|
2608
|
+
},
|
|
2609
|
+
"config": {
|
|
2610
|
+
"$ref": "#/components/schemas/FlowExecutionCancelConfig"
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
]
|
|
2615
|
+
},
|
|
2616
|
+
"FlowExecutionCancelConfig": {
|
|
2617
|
+
"type": "object",
|
|
2618
|
+
"description": "Configuration for cancelling a flow execution with selected reasons",
|
|
2619
|
+
"properties": {
|
|
2620
|
+
"selected_reasons": {
|
|
2621
|
+
"type": "array",
|
|
2622
|
+
"description": "List of reasons selected for this specific cancellation",
|
|
2623
|
+
"items": {
|
|
2624
|
+
"$ref": "#/components/schemas/CancellationReason"
|
|
2625
|
+
}
|
|
2626
|
+
},
|
|
2627
|
+
"extra_description": {
|
|
2628
|
+
"type": "string",
|
|
2629
|
+
"description": "Additional description or notes for the cancellation",
|
|
2630
|
+
"example": "Process completed successfully"
|
|
2631
|
+
}
|
|
2632
|
+
},
|
|
2633
|
+
"required": [
|
|
2634
|
+
"configured_reasons"
|
|
2635
|
+
]
|
|
2636
|
+
},
|
|
2637
|
+
"CancellationReason": {
|
|
2638
|
+
"type": "object",
|
|
2639
|
+
"description": "A reason for cancelling a flow execution",
|
|
2640
|
+
"properties": {
|
|
2641
|
+
"id": {
|
|
2642
|
+
"type": "string",
|
|
2643
|
+
"description": "Unique identifier for the cancellation reason",
|
|
2644
|
+
"example": "_6kITMwkv_0Uo4i7fO7Ja"
|
|
2645
|
+
},
|
|
2646
|
+
"title": {
|
|
2647
|
+
"type": "string",
|
|
2648
|
+
"description": "Human-readable title for the cancellation reason",
|
|
2649
|
+
"example": "Process completed successfully"
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
"required": [
|
|
2653
|
+
"id",
|
|
2654
|
+
"title"
|
|
2655
|
+
]
|
|
2656
|
+
},
|
|
2269
2657
|
"ConditionStatement": {
|
|
2270
2658
|
"type": "object",
|
|
2271
2659
|
"properties": {
|
|
@@ -2551,6 +2939,9 @@
|
|
|
2551
2939
|
},
|
|
2552
2940
|
{
|
|
2553
2941
|
"$ref": "#/components/schemas/TriggerEventEntityOperation"
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
"$ref": "#/components/schemas/TriggerEventFlowAutomationTask"
|
|
2554
2945
|
}
|
|
2555
2946
|
]
|
|
2556
2947
|
}
|
|
@@ -2589,6 +2980,42 @@
|
|
|
2589
2980
|
"entity_id"
|
|
2590
2981
|
]
|
|
2591
2982
|
},
|
|
2983
|
+
"TriggerEventFlowAutomationTask": {
|
|
2984
|
+
"type": "object",
|
|
2985
|
+
"properties": {
|
|
2986
|
+
"type": {
|
|
2987
|
+
"type": "string",
|
|
2988
|
+
"enum": [
|
|
2989
|
+
"flow_automation_task"
|
|
2990
|
+
]
|
|
2991
|
+
},
|
|
2992
|
+
"org_id": {
|
|
2993
|
+
"type": "string",
|
|
2994
|
+
"example": "123"
|
|
2995
|
+
},
|
|
2996
|
+
"entity_id": {
|
|
2997
|
+
"$ref": "#/components/schemas/EntityId"
|
|
2998
|
+
},
|
|
2999
|
+
"flow_execution_id": {
|
|
3000
|
+
"type": "string",
|
|
3001
|
+
"example": "wfwAJoT_cK"
|
|
3002
|
+
},
|
|
3003
|
+
"flow_automation_task_id": {
|
|
3004
|
+
"type": "string",
|
|
3005
|
+
"format": "UUID",
|
|
3006
|
+
"example": "2fa221ec-3aac-4655-ab8f-c062eca44a3"
|
|
3007
|
+
},
|
|
3008
|
+
"caller": {
|
|
3009
|
+
"$ref": "#/components/schemas/ApiCallerContext"
|
|
3010
|
+
}
|
|
3011
|
+
},
|
|
3012
|
+
"required": [
|
|
3013
|
+
"org_id",
|
|
3014
|
+
"entity_id",
|
|
3015
|
+
"flow_execution_id",
|
|
3016
|
+
"flow_automation_task_id"
|
|
3017
|
+
]
|
|
3018
|
+
},
|
|
2592
3019
|
"TriggerEventEntityActivity": {
|
|
2593
3020
|
"type": "object",
|
|
2594
3021
|
"properties": {
|
|
@@ -2714,6 +3141,7 @@
|
|
|
2714
3141
|
"type": "string",
|
|
2715
3142
|
"enum": [
|
|
2716
3143
|
"pending",
|
|
3144
|
+
"starting",
|
|
2717
3145
|
"in_progress",
|
|
2718
3146
|
"paused",
|
|
2719
3147
|
"success",
|
|
@@ -2750,6 +3178,15 @@
|
|
|
2750
3178
|
},
|
|
2751
3179
|
"flow_id": {
|
|
2752
3180
|
"$ref": "#/components/schemas/AutomationFlowId"
|
|
3181
|
+
},
|
|
3182
|
+
"flow_execution_id": {
|
|
3183
|
+
"type": "string",
|
|
3184
|
+
"description": "ID of the Flow Execution"
|
|
3185
|
+
},
|
|
3186
|
+
"flow_automation_task_id": {
|
|
3187
|
+
"type": "string",
|
|
3188
|
+
"format": "UUID",
|
|
3189
|
+
"description": "ID of the automated flow action"
|
|
2753
3190
|
}
|
|
2754
3191
|
},
|
|
2755
3192
|
"required": [
|
|
@@ -2855,8 +3292,7 @@
|
|
|
2855
3292
|
"status",
|
|
2856
3293
|
"created_by",
|
|
2857
3294
|
"created_at",
|
|
2858
|
-
"updated_at"
|
|
2859
|
-
"execution_summary"
|
|
3295
|
+
"updated_at"
|
|
2860
3296
|
],
|
|
2861
3297
|
"properties": {
|
|
2862
3298
|
"job_id": {
|
|
@@ -2870,11 +3306,13 @@
|
|
|
2870
3306
|
},
|
|
2871
3307
|
"status": {
|
|
2872
3308
|
"type": "string",
|
|
2873
|
-
"description": "Status of the bulk trigger automation job\n* approval: Waiting for user approval to start the bulk trigger automation\n*
|
|
3309
|
+
"description": "Status of the bulk trigger automation job\n* approval: Waiting for user approval to start the bulk trigger automation\n* querying_entities: Loading entities in batches\n* entities_loaded: All entities have been loaded and stored\n* executing: Automation execution are currently running\n* monitoring: All executions have been started, now monitoring their completion\n* send_report: Automation executions finished running. Report is being created & sent to the user who initiated the bulk trigger automation\n* finished: Automation executions finished running. Some may have failed. Check the status of each entity.\n* failed: Bulk trigger automation execution failed. Some executions might have started. Check the status of each entity.\n* cancelled: Bulk trigger automation execution was cancelled\n",
|
|
2874
3310
|
"enum": [
|
|
2875
3311
|
"approval",
|
|
2876
|
-
"
|
|
2877
|
-
"
|
|
3312
|
+
"querying_entities",
|
|
3313
|
+
"entities_loaded",
|
|
3314
|
+
"executing",
|
|
3315
|
+
"monitoring",
|
|
2878
3316
|
"send_report",
|
|
2879
3317
|
"finished",
|
|
2880
3318
|
"failed",
|
|
@@ -2908,6 +3346,80 @@
|
|
|
2908
3346
|
"type": "string",
|
|
2909
3347
|
"description": "Entity ID of the report file entity"
|
|
2910
3348
|
},
|
|
3349
|
+
"entity_query": {
|
|
3350
|
+
"type": "object",
|
|
3351
|
+
"description": "Query configuration for loading entities",
|
|
3352
|
+
"properties": {
|
|
3353
|
+
"type": {
|
|
3354
|
+
"type": "string",
|
|
3355
|
+
"enum": [
|
|
3356
|
+
"refs",
|
|
3357
|
+
"query",
|
|
3358
|
+
"filter"
|
|
3359
|
+
]
|
|
3360
|
+
},
|
|
3361
|
+
"data": {
|
|
3362
|
+
"oneOf": [
|
|
3363
|
+
{
|
|
3364
|
+
"type": "array",
|
|
3365
|
+
"items": {
|
|
3366
|
+
"$ref": "#/components/schemas/EntityRef"
|
|
3367
|
+
}
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
"type": "string"
|
|
3371
|
+
},
|
|
3372
|
+
{
|
|
3373
|
+
"$ref": "#/components/schemas/EntitySearchFilter"
|
|
3374
|
+
}
|
|
3375
|
+
]
|
|
3376
|
+
}
|
|
3377
|
+
},
|
|
3378
|
+
"required": [
|
|
3379
|
+
"type",
|
|
3380
|
+
"data"
|
|
3381
|
+
]
|
|
3382
|
+
},
|
|
3383
|
+
"pagination_state": {
|
|
3384
|
+
"type": "object",
|
|
3385
|
+
"description": "Pagination state for entity loading",
|
|
3386
|
+
"properties": {
|
|
3387
|
+
"page_size": {
|
|
3388
|
+
"type": "integer",
|
|
3389
|
+
"description": "Number of entities per page"
|
|
3390
|
+
},
|
|
3391
|
+
"pages_processed": {
|
|
3392
|
+
"type": "integer",
|
|
3393
|
+
"description": "Number of pages processed so far"
|
|
3394
|
+
},
|
|
3395
|
+
"total_processed": {
|
|
3396
|
+
"type": "integer",
|
|
3397
|
+
"description": "Total number of entities processed so far"
|
|
3398
|
+
},
|
|
3399
|
+
"stable_query_id": {
|
|
3400
|
+
"type": "string",
|
|
3401
|
+
"description": "Stable query ID for pagination"
|
|
3402
|
+
},
|
|
3403
|
+
"search_after": {
|
|
3404
|
+
"type": "array",
|
|
3405
|
+
"description": "Last sort value used for pagination",
|
|
3406
|
+
"items": {
|
|
3407
|
+
"oneOf": [
|
|
3408
|
+
{
|
|
3409
|
+
"type": "string"
|
|
3410
|
+
},
|
|
3411
|
+
{
|
|
3412
|
+
"type": "number"
|
|
3413
|
+
}
|
|
3414
|
+
]
|
|
3415
|
+
}
|
|
3416
|
+
},
|
|
3417
|
+
"has_more": {
|
|
3418
|
+
"type": "boolean",
|
|
3419
|
+
"description": "Whether there are more entities to load"
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
},
|
|
2911
3423
|
"execution_summary": {
|
|
2912
3424
|
"type": "array",
|
|
2913
3425
|
"description": "List of entities & their automation execution id & status",
|
|
@@ -2989,13 +3501,7 @@
|
|
|
2989
3501
|
"properties": {
|
|
2990
3502
|
"source_id": {
|
|
2991
3503
|
"type": "string",
|
|
2992
|
-
"format": "uuid"
|
|
2993
|
-
"description": "ID of the flow that triggers the automation"
|
|
2994
|
-
},
|
|
2995
|
-
"journey_id": {
|
|
2996
|
-
"type": "string",
|
|
2997
|
-
"format": "uuid",
|
|
2998
|
-
"description": "Certain flows can be triggered automatically by a journey, this is the ID of that journey"
|
|
3504
|
+
"format": "uuid"
|
|
2999
3505
|
}
|
|
3000
3506
|
},
|
|
3001
3507
|
"required": [
|