@epilot/automation-client 2.20.0 → 2.22.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.js +1 -2
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +32 -1
- package/dist/openapi.d.ts +333 -6
- package/dist/openapi.json +279 -12
- package/package.json +5 -6
package/dist/client.js
CHANGED
|
@@ -15,7 +15,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.createClient = exports.getClient = void 0;
|
|
18
|
-
var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
|
|
19
18
|
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
20
19
|
var definition_1 = __importDefault(require("./definition"));
|
|
21
20
|
var client;
|
|
@@ -30,7 +29,7 @@ var createClient = function () {
|
|
|
30
29
|
var _a;
|
|
31
30
|
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
32
31
|
var apiClient = api.initSync();
|
|
33
|
-
apiClient.defaults.headers.common = __assign(
|
|
32
|
+
apiClient.defaults.headers.common = __assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {}));
|
|
34
33
|
return apiClient;
|
|
35
34
|
};
|
|
36
35
|
exports.createClient = createClient;
|
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={330: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"},{"name":"include_flows","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"},{"name":"include_flows","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}/schedules/{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}(330),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
{
|
|
25
25
|
"name": "trigger_source_id",
|
|
26
26
|
"in": "query"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "include_flows",
|
|
30
|
+
"in": "query"
|
|
27
31
|
}
|
|
28
32
|
],
|
|
29
33
|
"responses": {}
|
|
@@ -93,6 +97,10 @@
|
|
|
93
97
|
{
|
|
94
98
|
"name": "from",
|
|
95
99
|
"in": "query"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "include_flows",
|
|
103
|
+
"in": "query"
|
|
96
104
|
}
|
|
97
105
|
],
|
|
98
106
|
"responses": {}
|
|
@@ -205,6 +213,24 @@
|
|
|
205
213
|
},
|
|
206
214
|
"responses": {}
|
|
207
215
|
}
|
|
216
|
+
},
|
|
217
|
+
"/v1/automation/executions/{execution_id}/schedules/{schedule_id}": {
|
|
218
|
+
"delete": {
|
|
219
|
+
"operationId": "cancelSchedule",
|
|
220
|
+
"parameters": [
|
|
221
|
+
{
|
|
222
|
+
"name": "execution_id",
|
|
223
|
+
"in": "path",
|
|
224
|
+
"required": true
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "schedule_id",
|
|
228
|
+
"in": "path",
|
|
229
|
+
"required": true
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"responses": {}
|
|
233
|
+
}
|
|
208
234
|
}
|
|
209
235
|
},
|
|
210
236
|
"components": {
|
|
@@ -220,5 +246,10 @@
|
|
|
220
246
|
}
|
|
221
247
|
}
|
|
222
248
|
}
|
|
223
|
-
}
|
|
249
|
+
},
|
|
250
|
+
"servers": [
|
|
251
|
+
{
|
|
252
|
+
"url": "https://automation.sls.epilot.io"
|
|
253
|
+
}
|
|
254
|
+
]
|
|
224
255
|
}
|
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`
|
|
@@ -771,6 +792,14 @@ declare namespace Components {
|
|
|
771
792
|
* eyJraWQiOiJrZXkifQ==
|
|
772
793
|
*/
|
|
773
794
|
ResumeToken;
|
|
795
|
+
trigger_context?: /**
|
|
796
|
+
* Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
|
|
797
|
+
* example:
|
|
798
|
+
* {
|
|
799
|
+
* "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
|
800
|
+
* }
|
|
801
|
+
*/
|
|
802
|
+
TriggerContext;
|
|
774
803
|
/**
|
|
775
804
|
* Version of the flow
|
|
776
805
|
* example:
|
|
@@ -778,6 +807,7 @@ declare namespace Components {
|
|
|
778
807
|
*/
|
|
779
808
|
version?: number;
|
|
780
809
|
trigger_event?: TriggerEventManual | TriggerEventEntityActivity | TriggerEventEntityOperation | TriggerEventFlowAutomationTask;
|
|
810
|
+
workflow_context?: WorkflowExecutionContext;
|
|
781
811
|
}
|
|
782
812
|
/**
|
|
783
813
|
* example:
|
|
@@ -893,6 +923,7 @@ declare namespace Components {
|
|
|
893
923
|
* Source blueprint/manifest ID used when automation is created via blueprints.
|
|
894
924
|
*/
|
|
895
925
|
_manifest?: string /* uuid */[] | null;
|
|
926
|
+
workflow_context?: /* For automation that are connected to workflows V2, this field tracks various information about the workflow. */ WorkflowContext;
|
|
896
927
|
}
|
|
897
928
|
/**
|
|
898
929
|
* ID of the Automation Flow
|
|
@@ -951,6 +982,14 @@ declare namespace Components {
|
|
|
951
982
|
* Time when the bulk trigger automation executions job was approved
|
|
952
983
|
*/
|
|
953
984
|
approved_at?: string; // date-time
|
|
985
|
+
trigger_context?: /**
|
|
986
|
+
* Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
|
|
987
|
+
* example:
|
|
988
|
+
* {
|
|
989
|
+
* "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
|
990
|
+
* }
|
|
991
|
+
*/
|
|
992
|
+
TriggerContext;
|
|
954
993
|
/**
|
|
955
994
|
* Task token to approve/cancel the bulk automation job
|
|
956
995
|
* example:
|
|
@@ -1028,6 +1067,14 @@ declare namespace Components {
|
|
|
1028
1067
|
*/
|
|
1029
1068
|
AutomationFlowId;
|
|
1030
1069
|
entities_refs: EntityRef[];
|
|
1070
|
+
trigger_context?: /**
|
|
1071
|
+
* Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
|
|
1072
|
+
* example:
|
|
1073
|
+
* {
|
|
1074
|
+
* "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
|
1075
|
+
* }
|
|
1076
|
+
*/
|
|
1077
|
+
TriggerContext;
|
|
1031
1078
|
} | {
|
|
1032
1079
|
flow_id: /**
|
|
1033
1080
|
* ID of the Automation Flow
|
|
@@ -1036,6 +1083,14 @@ declare namespace Components {
|
|
|
1036
1083
|
*/
|
|
1037
1084
|
AutomationFlowId;
|
|
1038
1085
|
entities_query: string;
|
|
1086
|
+
trigger_context?: /**
|
|
1087
|
+
* Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
|
|
1088
|
+
* example:
|
|
1089
|
+
* {
|
|
1090
|
+
* "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
|
1091
|
+
* }
|
|
1092
|
+
*/
|
|
1093
|
+
TriggerContext;
|
|
1039
1094
|
} | {
|
|
1040
1095
|
flow_id: /**
|
|
1041
1096
|
* ID of the Automation Flow
|
|
@@ -1062,7 +1117,32 @@ declare namespace Components {
|
|
|
1062
1117
|
* ]
|
|
1063
1118
|
*/
|
|
1064
1119
|
EntitySearchFilter;
|
|
1120
|
+
trigger_context?: /**
|
|
1121
|
+
* Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
|
|
1122
|
+
* example:
|
|
1123
|
+
* {
|
|
1124
|
+
* "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
|
1125
|
+
* }
|
|
1126
|
+
*/
|
|
1127
|
+
TriggerContext;
|
|
1065
1128
|
};
|
|
1129
|
+
/**
|
|
1130
|
+
* A reason for cancelling a flow execution
|
|
1131
|
+
*/
|
|
1132
|
+
export interface CancellationReason {
|
|
1133
|
+
/**
|
|
1134
|
+
* Unique identifier for the cancellation reason
|
|
1135
|
+
* example:
|
|
1136
|
+
* _6kITMwkv_0Uo4i7fO7Ja
|
|
1137
|
+
*/
|
|
1138
|
+
id: string;
|
|
1139
|
+
/**
|
|
1140
|
+
* Human-readable title for the cancellation reason
|
|
1141
|
+
* example:
|
|
1142
|
+
* Process completed successfully
|
|
1143
|
+
*/
|
|
1144
|
+
title: string;
|
|
1145
|
+
}
|
|
1066
1146
|
/**
|
|
1067
1147
|
* Creates an order entity with prices from journey
|
|
1068
1148
|
*/
|
|
@@ -1904,7 +1984,7 @@ declare namespace Components {
|
|
|
1904
1984
|
export interface EqualsIgnoreCaseCondition {
|
|
1905
1985
|
"equals-ignore-case"?: string;
|
|
1906
1986
|
}
|
|
1907
|
-
export type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG";
|
|
1987
|
+
export type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND";
|
|
1908
1988
|
export interface ErrorDetail {
|
|
1909
1989
|
explanation: string;
|
|
1910
1990
|
context?: string;
|
|
@@ -1958,6 +2038,152 @@ declare namespace Components {
|
|
|
1958
2038
|
export type FilterConditionOnEvent = OrCondition | {
|
|
1959
2039
|
[name: string]: (string | EqualsIgnoreCaseCondition | AnythingButCondition | NumericCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[];
|
|
1960
2040
|
};
|
|
2041
|
+
export interface FlowExecutionCancelAction {
|
|
2042
|
+
id?: /**
|
|
2043
|
+
* example:
|
|
2044
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2045
|
+
*/
|
|
2046
|
+
AutomationActionId;
|
|
2047
|
+
flow_action_id?: /**
|
|
2048
|
+
* example:
|
|
2049
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2050
|
+
*/
|
|
2051
|
+
AutomationActionId;
|
|
2052
|
+
name?: string;
|
|
2053
|
+
type?: "cancel-flow-execution";
|
|
2054
|
+
config?: /* Configuration for cancelling a flow execution with selected reasons */ FlowExecutionCancelConfig;
|
|
2055
|
+
/**
|
|
2056
|
+
* Whether to stop execution in a failed state if this action fails
|
|
2057
|
+
*/
|
|
2058
|
+
allow_failure?: boolean;
|
|
2059
|
+
/**
|
|
2060
|
+
* Flag indicating whether the action was created automatically or manually
|
|
2061
|
+
*/
|
|
2062
|
+
created_automatically?: boolean;
|
|
2063
|
+
/**
|
|
2064
|
+
* Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
|
|
2065
|
+
*/
|
|
2066
|
+
is_bulk_action?: boolean;
|
|
2067
|
+
reason?: {
|
|
2068
|
+
/**
|
|
2069
|
+
* Why the action has to be skipped/failed
|
|
2070
|
+
* example:
|
|
2071
|
+
* There are no registered portal users for the given emails, hence skipping the action
|
|
2072
|
+
*/
|
|
2073
|
+
message?: string;
|
|
2074
|
+
/**
|
|
2075
|
+
* Extra metadata about the skipping reason - such as a certain condition not met, etc.
|
|
2076
|
+
*/
|
|
2077
|
+
payload?: {
|
|
2078
|
+
[name: string]: any;
|
|
2079
|
+
};
|
|
2080
|
+
};
|
|
2081
|
+
/**
|
|
2082
|
+
* Condition Id to be checked before executing the action
|
|
2083
|
+
*/
|
|
2084
|
+
condition_id?: string;
|
|
2085
|
+
/**
|
|
2086
|
+
* Schedule Id which indicates the schedule of the action
|
|
2087
|
+
*/
|
|
2088
|
+
schedule_id?: string;
|
|
2089
|
+
execution_status?: ExecutionStatus;
|
|
2090
|
+
started_at?: string;
|
|
2091
|
+
updated_at?: string;
|
|
2092
|
+
/**
|
|
2093
|
+
* example:
|
|
2094
|
+
* {}
|
|
2095
|
+
*/
|
|
2096
|
+
outputs?: {
|
|
2097
|
+
[name: string]: any;
|
|
2098
|
+
};
|
|
2099
|
+
error_output?: ErrorOutput;
|
|
2100
|
+
retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
|
|
2101
|
+
}
|
|
2102
|
+
/**
|
|
2103
|
+
* example:
|
|
2104
|
+
* {
|
|
2105
|
+
* "id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
2106
|
+
* "name": "Cancel Flow Execution",
|
|
2107
|
+
* "type": "cancel-flow-execution",
|
|
2108
|
+
* "config": {
|
|
2109
|
+
* "selected_reasons": [
|
|
2110
|
+
* {
|
|
2111
|
+
* "id": "_6kITMwkv_0Uo4i7fO7Ja",
|
|
2112
|
+
* "title": "when you are done! that's when you close it."
|
|
2113
|
+
* },
|
|
2114
|
+
* {
|
|
2115
|
+
* "id": "qgK9sGbKoS7NxlAbNReVn",
|
|
2116
|
+
* "title": "Client didn't want our services"
|
|
2117
|
+
* }
|
|
2118
|
+
* ],
|
|
2119
|
+
* "extra_description": "Test cancellation"
|
|
2120
|
+
* }
|
|
2121
|
+
* }
|
|
2122
|
+
*/
|
|
2123
|
+
export interface FlowExecutionCancelActionConfig {
|
|
2124
|
+
id?: /**
|
|
2125
|
+
* example:
|
|
2126
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2127
|
+
*/
|
|
2128
|
+
AutomationActionId;
|
|
2129
|
+
flow_action_id?: /**
|
|
2130
|
+
* example:
|
|
2131
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2132
|
+
*/
|
|
2133
|
+
AutomationActionId;
|
|
2134
|
+
name?: string;
|
|
2135
|
+
type?: "cancel-flow-execution";
|
|
2136
|
+
config?: /* Configuration for cancelling a flow execution with selected reasons */ FlowExecutionCancelConfig;
|
|
2137
|
+
/**
|
|
2138
|
+
* Whether to stop execution in a failed state if this action fails
|
|
2139
|
+
*/
|
|
2140
|
+
allow_failure?: boolean;
|
|
2141
|
+
/**
|
|
2142
|
+
* Flag indicating whether the action was created automatically or manually
|
|
2143
|
+
*/
|
|
2144
|
+
created_automatically?: boolean;
|
|
2145
|
+
/**
|
|
2146
|
+
* Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
|
|
2147
|
+
*/
|
|
2148
|
+
is_bulk_action?: boolean;
|
|
2149
|
+
reason?: {
|
|
2150
|
+
/**
|
|
2151
|
+
* Why the action has to be skipped/failed
|
|
2152
|
+
* example:
|
|
2153
|
+
* There are no registered portal users for the given emails, hence skipping the action
|
|
2154
|
+
*/
|
|
2155
|
+
message?: string;
|
|
2156
|
+
/**
|
|
2157
|
+
* Extra metadata about the skipping reason - such as a certain condition not met, etc.
|
|
2158
|
+
*/
|
|
2159
|
+
payload?: {
|
|
2160
|
+
[name: string]: any;
|
|
2161
|
+
};
|
|
2162
|
+
};
|
|
2163
|
+
/**
|
|
2164
|
+
* Condition Id to be checked before executing the action
|
|
2165
|
+
*/
|
|
2166
|
+
condition_id?: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* Schedule Id which indicates the schedule of the action
|
|
2169
|
+
*/
|
|
2170
|
+
schedule_id?: string;
|
|
2171
|
+
}
|
|
2172
|
+
/**
|
|
2173
|
+
* Configuration for cancelling a flow execution with selected reasons
|
|
2174
|
+
*/
|
|
2175
|
+
export interface FlowExecutionCancelConfig {
|
|
2176
|
+
/**
|
|
2177
|
+
* List of reasons selected for this specific cancellation
|
|
2178
|
+
*/
|
|
2179
|
+
selected_reasons?: /* A reason for cancelling a flow execution */ CancellationReason[];
|
|
2180
|
+
/**
|
|
2181
|
+
* Additional description or notes for the cancellation
|
|
2182
|
+
* example:
|
|
2183
|
+
* Process completed successfully
|
|
2184
|
+
*/
|
|
2185
|
+
extra_description?: string;
|
|
2186
|
+
}
|
|
1961
2187
|
export interface FlowsTrigger {
|
|
1962
2188
|
/**
|
|
1963
2189
|
* example:
|
|
@@ -2811,14 +3037,15 @@ declare namespace Components {
|
|
|
2811
3037
|
* 7791b04a-16d2-44a2-9af9-2d59c25c512f
|
|
2812
3038
|
*/
|
|
2813
3039
|
AutomationFlowId;
|
|
3040
|
+
workflow_context?: WorkflowExecutionContext;
|
|
2814
3041
|
/**
|
|
2815
|
-
*
|
|
3042
|
+
* Use workflow_context.workflow_exec_id instead
|
|
2816
3043
|
*/
|
|
2817
3044
|
flow_execution_id?: string;
|
|
2818
3045
|
/**
|
|
2819
|
-
*
|
|
3046
|
+
* Use workflow_context.workflow_exec_task_id instead
|
|
2820
3047
|
*/
|
|
2821
|
-
flow_automation_task_id?: string;
|
|
3048
|
+
flow_automation_task_id?: string;
|
|
2822
3049
|
}
|
|
2823
3050
|
export interface SuffixCondition {
|
|
2824
3051
|
suffix?: string;
|
|
@@ -2835,6 +3062,16 @@ declare namespace Components {
|
|
|
2835
3062
|
comparison: Comparison;
|
|
2836
3063
|
value?: string | number | string[] | number[];
|
|
2837
3064
|
}
|
|
3065
|
+
/**
|
|
3066
|
+
* Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
|
|
3067
|
+
* example:
|
|
3068
|
+
* {
|
|
3069
|
+
* "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
|
3070
|
+
* }
|
|
3071
|
+
*/
|
|
3072
|
+
export interface TriggerContext {
|
|
3073
|
+
[name: string]: string;
|
|
3074
|
+
}
|
|
2838
3075
|
export interface TriggerEventEntityActivity {
|
|
2839
3076
|
type?: "entity_activity";
|
|
2840
3077
|
/**
|
|
@@ -3355,6 +3592,29 @@ declare namespace Components {
|
|
|
3355
3592
|
export interface WildcardCondition {
|
|
3356
3593
|
wildcard?: string;
|
|
3357
3594
|
}
|
|
3595
|
+
/**
|
|
3596
|
+
* For automation that are connected to workflows V2, this field tracks various information about the workflow.
|
|
3597
|
+
*/
|
|
3598
|
+
export interface WorkflowContext {
|
|
3599
|
+
/**
|
|
3600
|
+
* The ID of the workflow this automation is connected to
|
|
3601
|
+
*/
|
|
3602
|
+
workflow_id: string; // uuid
|
|
3603
|
+
/**
|
|
3604
|
+
* The ID of the task in the workflow that this automation is connected to
|
|
3605
|
+
*/
|
|
3606
|
+
task_id?: string; // uuid
|
|
3607
|
+
workflow_role: /* The role this automation plays in the workflow. */ WorkflowContextRole;
|
|
3608
|
+
}
|
|
3609
|
+
/**
|
|
3610
|
+
* The role this automation plays in the workflow.
|
|
3611
|
+
*/
|
|
3612
|
+
export type WorkflowContextRole = "trigger_workflow" | "run_task_automation";
|
|
3613
|
+
export interface WorkflowExecutionContext {
|
|
3614
|
+
workflow_exec_id: string;
|
|
3615
|
+
workflow_exec_task_id?: string;
|
|
3616
|
+
workflow_role: /* The role this automation plays in the workflow. */ WorkflowContextRole;
|
|
3617
|
+
}
|
|
3358
3618
|
}
|
|
3359
3619
|
}
|
|
3360
3620
|
declare namespace Paths {
|
|
@@ -3403,6 +3663,39 @@ declare namespace Paths {
|
|
|
3403
3663
|
Components.Responses.NotFoundError;
|
|
3404
3664
|
}
|
|
3405
3665
|
}
|
|
3666
|
+
namespace CancelSchedule {
|
|
3667
|
+
namespace Parameters {
|
|
3668
|
+
export type ExecutionId = /**
|
|
3669
|
+
* example:
|
|
3670
|
+
* 9baf184f-bc81-4128-bca3-d974c90a12c4
|
|
3671
|
+
*/
|
|
3672
|
+
Components.Schemas.AutomationExecutionId;
|
|
3673
|
+
export type ScheduleId = string;
|
|
3674
|
+
}
|
|
3675
|
+
export interface PathParameters {
|
|
3676
|
+
execution_id: Parameters.ExecutionId;
|
|
3677
|
+
schedule_id: Parameters.ScheduleId;
|
|
3678
|
+
}
|
|
3679
|
+
namespace Responses {
|
|
3680
|
+
export type $200 = Components.Schemas.ActionSchedule;
|
|
3681
|
+
export type $403 = /**
|
|
3682
|
+
* example:
|
|
3683
|
+
* {
|
|
3684
|
+
* "status": 403,
|
|
3685
|
+
* "error": "Forbidden"
|
|
3686
|
+
* }
|
|
3687
|
+
*/
|
|
3688
|
+
Components.Responses.ForbiddenError;
|
|
3689
|
+
export type $404 = /**
|
|
3690
|
+
* example:
|
|
3691
|
+
* {
|
|
3692
|
+
* "status": 404,
|
|
3693
|
+
* "error": "Not Found"
|
|
3694
|
+
* }
|
|
3695
|
+
*/
|
|
3696
|
+
Components.Responses.NotFoundError;
|
|
3697
|
+
}
|
|
3698
|
+
}
|
|
3406
3699
|
namespace CreateFlow {
|
|
3407
3700
|
export type RequestBody = Components.Schemas.AutomationFlow;
|
|
3408
3701
|
namespace Responses {
|
|
@@ -3521,12 +3814,14 @@ declare namespace Paths {
|
|
|
3521
3814
|
*/
|
|
3522
3815
|
Components.Schemas.EntityId;
|
|
3523
3816
|
export type From = number;
|
|
3817
|
+
export type IncludeFlows = boolean;
|
|
3524
3818
|
export type Size = number;
|
|
3525
3819
|
}
|
|
3526
3820
|
export interface QueryParameters {
|
|
3527
3821
|
entity_id?: Parameters.EntityId;
|
|
3528
3822
|
size?: Parameters.Size;
|
|
3529
3823
|
from?: Parameters.From;
|
|
3824
|
+
include_flows?: Parameters.IncludeFlows;
|
|
3530
3825
|
}
|
|
3531
3826
|
namespace Responses {
|
|
3532
3827
|
export type $200 = Components.Schemas.GetExecutionsResp;
|
|
@@ -3696,6 +3991,7 @@ declare namespace Paths {
|
|
|
3696
3991
|
namespace SearchFlows {
|
|
3697
3992
|
namespace Parameters {
|
|
3698
3993
|
export type From = number;
|
|
3994
|
+
export type IncludeFlows = boolean;
|
|
3699
3995
|
/**
|
|
3700
3996
|
* example:
|
|
3701
3997
|
* submission
|
|
@@ -3721,6 +4017,7 @@ declare namespace Paths {
|
|
|
3721
4017
|
* 600945fe-212e-4b97-acf7-391d64648384
|
|
3722
4018
|
*/
|
|
3723
4019
|
Parameters.TriggerSourceId;
|
|
4020
|
+
include_flows?: Parameters.IncludeFlows;
|
|
3724
4021
|
}
|
|
3725
4022
|
namespace Responses {
|
|
3726
4023
|
export type $200 = Components.Schemas.SearchAutomationsResp;
|
|
@@ -3889,6 +4186,16 @@ export interface OperationMethods {
|
|
|
3889
4186
|
data?: Paths.ResumeExecutionWithToken.RequestBody,
|
|
3890
4187
|
config?: AxiosRequestConfig
|
|
3891
4188
|
): OperationResponse<Paths.ResumeExecutionWithToken.Responses.$200>
|
|
4189
|
+
/**
|
|
4190
|
+
* cancelSchedule - cancelSchedule
|
|
4191
|
+
*
|
|
4192
|
+
* Cancel a scheduled automation
|
|
4193
|
+
*/
|
|
4194
|
+
'cancelSchedule'(
|
|
4195
|
+
parameters?: Parameters<Paths.CancelSchedule.PathParameters> | null,
|
|
4196
|
+
data?: any,
|
|
4197
|
+
config?: AxiosRequestConfig
|
|
4198
|
+
): OperationResponse<Paths.CancelSchedule.Responses.$200>
|
|
3892
4199
|
}
|
|
3893
4200
|
|
|
3894
4201
|
export interface PathsDictionary {
|
|
@@ -4053,6 +4360,18 @@ export interface PathsDictionary {
|
|
|
4053
4360
|
config?: AxiosRequestConfig
|
|
4054
4361
|
): OperationResponse<Paths.ResumeExecutionWithToken.Responses.$200>
|
|
4055
4362
|
}
|
|
4363
|
+
['/v1/automation/executions/{execution_id}/schedules/{schedule_id}']: {
|
|
4364
|
+
/**
|
|
4365
|
+
* cancelSchedule - cancelSchedule
|
|
4366
|
+
*
|
|
4367
|
+
* Cancel a scheduled automation
|
|
4368
|
+
*/
|
|
4369
|
+
'delete'(
|
|
4370
|
+
parameters?: Parameters<Paths.CancelSchedule.PathParameters> | null,
|
|
4371
|
+
data?: any,
|
|
4372
|
+
config?: AxiosRequestConfig
|
|
4373
|
+
): OperationResponse<Paths.CancelSchedule.Responses.$200>
|
|
4374
|
+
}
|
|
4056
4375
|
}
|
|
4057
4376
|
|
|
4058
4377
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
@@ -4082,6 +4401,7 @@ export type AutomationFlowId = Components.Schemas.AutomationFlowId;
|
|
|
4082
4401
|
export type AutomationTrigger = Components.Schemas.AutomationTrigger;
|
|
4083
4402
|
export type BulkTriggerJob = Components.Schemas.BulkTriggerJob;
|
|
4084
4403
|
export type BulkTriggerRequest = Components.Schemas.BulkTriggerRequest;
|
|
4404
|
+
export type CancellationReason = Components.Schemas.CancellationReason;
|
|
4085
4405
|
export type CartCheckoutAction = Components.Schemas.CartCheckoutAction;
|
|
4086
4406
|
export type CartCheckoutActionConfig = Components.Schemas.CartCheckoutActionConfig;
|
|
4087
4407
|
export type CartCheckoutConfig = Components.Schemas.CartCheckoutConfig;
|
|
@@ -4112,6 +4432,9 @@ export type ExecItem = Components.Schemas.ExecItem;
|
|
|
4112
4432
|
export type ExecutionStatus = Components.Schemas.ExecutionStatus;
|
|
4113
4433
|
export type ExistsCondition = Components.Schemas.ExistsCondition;
|
|
4114
4434
|
export type FilterConditionOnEvent = Components.Schemas.FilterConditionOnEvent;
|
|
4435
|
+
export type FlowExecutionCancelAction = Components.Schemas.FlowExecutionCancelAction;
|
|
4436
|
+
export type FlowExecutionCancelActionConfig = Components.Schemas.FlowExecutionCancelActionConfig;
|
|
4437
|
+
export type FlowExecutionCancelConfig = Components.Schemas.FlowExecutionCancelConfig;
|
|
4115
4438
|
export type FlowsTrigger = Components.Schemas.FlowsTrigger;
|
|
4116
4439
|
export type FrontendSubmitTrigger = Components.Schemas.FrontendSubmitTrigger;
|
|
4117
4440
|
export type GetExecutionsResp = Components.Schemas.GetExecutionsResp;
|
|
@@ -4152,6 +4475,7 @@ export type SetValueMapper = Components.Schemas.SetValueMapper;
|
|
|
4152
4475
|
export type StartExecutionRequest = Components.Schemas.StartExecutionRequest;
|
|
4153
4476
|
export type SuffixCondition = Components.Schemas.SuffixCondition;
|
|
4154
4477
|
export type TriggerCondition = Components.Schemas.TriggerCondition;
|
|
4478
|
+
export type TriggerContext = Components.Schemas.TriggerContext;
|
|
4155
4479
|
export type TriggerEventEntityActivity = Components.Schemas.TriggerEventEntityActivity;
|
|
4156
4480
|
export type TriggerEventEntityOperation = Components.Schemas.TriggerEventEntityOperation;
|
|
4157
4481
|
export type TriggerEventFlowAutomationTask = Components.Schemas.TriggerEventFlowAutomationTask;
|
|
@@ -4167,3 +4491,6 @@ export type TriggerWorkflowActionConfig = Components.Schemas.TriggerWorkflowActi
|
|
|
4167
4491
|
export type TriggerWorkflowCondition = Components.Schemas.TriggerWorkflowCondition;
|
|
4168
4492
|
export type TriggerWorkflowConfig = Components.Schemas.TriggerWorkflowConfig;
|
|
4169
4493
|
export type WildcardCondition = Components.Schemas.WildcardCondition;
|
|
4494
|
+
export type WorkflowContext = Components.Schemas.WorkflowContext;
|
|
4495
|
+
export type WorkflowContextRole = Components.Schemas.WorkflowContextRole;
|
|
4496
|
+
export type WorkflowExecutionContext = Components.Schemas.WorkflowExecutionContext;
|
package/dist/openapi.json
CHANGED
|
@@ -69,6 +69,15 @@
|
|
|
69
69
|
"type": "string",
|
|
70
70
|
"example": "600945fe-212e-4b97-acf7-391d64648384"
|
|
71
71
|
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "include_flows",
|
|
75
|
+
"in": "query",
|
|
76
|
+
"description": "Include flow automations in the response",
|
|
77
|
+
"schema": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"default": false
|
|
80
|
+
}
|
|
72
81
|
}
|
|
73
82
|
],
|
|
74
83
|
"responses": {
|
|
@@ -261,6 +270,15 @@
|
|
|
261
270
|
"type": "integer",
|
|
262
271
|
"default": 0
|
|
263
272
|
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "include_flows",
|
|
276
|
+
"in": "query",
|
|
277
|
+
"description": "Include flow automations in the response",
|
|
278
|
+
"schema": {
|
|
279
|
+
"type": "boolean",
|
|
280
|
+
"default": false
|
|
281
|
+
}
|
|
264
282
|
}
|
|
265
283
|
],
|
|
266
284
|
"tags": [
|
|
@@ -574,7 +592,10 @@
|
|
|
574
592
|
"entity_schema": "opportunity",
|
|
575
593
|
"entity_id": "b35a6c51-2a15-4ef1-9623-20db37b0744f"
|
|
576
594
|
}
|
|
577
|
-
]
|
|
595
|
+
],
|
|
596
|
+
"trigger_context": {
|
|
597
|
+
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
|
598
|
+
}
|
|
578
599
|
}
|
|
579
600
|
}
|
|
580
601
|
}
|
|
@@ -853,6 +874,53 @@
|
|
|
853
874
|
}
|
|
854
875
|
}
|
|
855
876
|
}
|
|
877
|
+
},
|
|
878
|
+
"/v1/automation/executions/{execution_id}/schedules/{schedule_id}": {
|
|
879
|
+
"delete": {
|
|
880
|
+
"operationId": "cancelSchedule",
|
|
881
|
+
"summary": "cancelSchedule",
|
|
882
|
+
"description": "Cancel a scheduled automation",
|
|
883
|
+
"parameters": [
|
|
884
|
+
{
|
|
885
|
+
"name": "execution_id",
|
|
886
|
+
"in": "path",
|
|
887
|
+
"schema": {
|
|
888
|
+
"$ref": "#/components/schemas/AutomationExecutionId"
|
|
889
|
+
},
|
|
890
|
+
"required": true
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"name": "schedule_id",
|
|
894
|
+
"in": "path",
|
|
895
|
+
"schema": {
|
|
896
|
+
"type": "string"
|
|
897
|
+
},
|
|
898
|
+
"required": true,
|
|
899
|
+
"description": "ID of the schedule to cancel"
|
|
900
|
+
}
|
|
901
|
+
],
|
|
902
|
+
"tags": [
|
|
903
|
+
"executions"
|
|
904
|
+
],
|
|
905
|
+
"responses": {
|
|
906
|
+
"200": {
|
|
907
|
+
"description": "The schedule was successfully cancelled",
|
|
908
|
+
"content": {
|
|
909
|
+
"application/json": {
|
|
910
|
+
"schema": {
|
|
911
|
+
"$ref": "#/components/schemas/ActionSchedule"
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
"403": {
|
|
917
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
918
|
+
},
|
|
919
|
+
"404": {
|
|
920
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
856
924
|
}
|
|
857
925
|
},
|
|
858
926
|
"components": {
|
|
@@ -1020,6 +1088,9 @@
|
|
|
1020
1088
|
"example": "123e4567-e89b-12d3-a456-426614174000"
|
|
1021
1089
|
},
|
|
1022
1090
|
"nullable": true
|
|
1091
|
+
},
|
|
1092
|
+
"workflow_context": {
|
|
1093
|
+
"$ref": "#/components/schemas/WorkflowContext"
|
|
1023
1094
|
}
|
|
1024
1095
|
},
|
|
1025
1096
|
"required": [
|
|
@@ -1028,6 +1099,37 @@
|
|
|
1028
1099
|
"actions"
|
|
1029
1100
|
]
|
|
1030
1101
|
},
|
|
1102
|
+
"WorkflowContext": {
|
|
1103
|
+
"type": "object",
|
|
1104
|
+
"description": "For automation that are connected to workflows V2, this field tracks various information about the workflow.",
|
|
1105
|
+
"required": [
|
|
1106
|
+
"workflow_id",
|
|
1107
|
+
"workflow_role"
|
|
1108
|
+
],
|
|
1109
|
+
"properties": {
|
|
1110
|
+
"workflow_id": {
|
|
1111
|
+
"type": "string",
|
|
1112
|
+
"format": "uuid",
|
|
1113
|
+
"description": "The ID of the workflow this automation is connected to"
|
|
1114
|
+
},
|
|
1115
|
+
"task_id": {
|
|
1116
|
+
"type": "string",
|
|
1117
|
+
"format": "uuid",
|
|
1118
|
+
"description": "The ID of the task in the workflow that this automation is connected to"
|
|
1119
|
+
},
|
|
1120
|
+
"workflow_role": {
|
|
1121
|
+
"$ref": "#/components/schemas/WorkflowContextRole"
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"WorkflowContextRole": {
|
|
1126
|
+
"type": "string",
|
|
1127
|
+
"description": "The role this automation plays in the workflow.",
|
|
1128
|
+
"enum": [
|
|
1129
|
+
"trigger_workflow",
|
|
1130
|
+
"run_task_automation"
|
|
1131
|
+
]
|
|
1132
|
+
},
|
|
1031
1133
|
"SearchAutomationsResp": {
|
|
1032
1134
|
"type": "object",
|
|
1033
1135
|
"properties": {
|
|
@@ -1105,6 +1207,9 @@
|
|
|
1105
1207
|
},
|
|
1106
1208
|
{
|
|
1107
1209
|
"$ref": "#/components/schemas/AutomationAction"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"$ref": "#/components/schemas/FlowExecutionCancelAction"
|
|
1108
1213
|
}
|
|
1109
1214
|
]
|
|
1110
1215
|
},
|
|
@@ -1139,6 +1244,9 @@
|
|
|
1139
1244
|
},
|
|
1140
1245
|
{
|
|
1141
1246
|
"$ref": "#/components/schemas/AutomationActionConfig"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
"$ref": "#/components/schemas/FlowExecutionCancelActionConfig"
|
|
1142
1250
|
}
|
|
1143
1251
|
]
|
|
1144
1252
|
},
|
|
@@ -1282,7 +1390,15 @@
|
|
|
1282
1390
|
"TRIGGER_WEBHOOK_ERROR",
|
|
1283
1391
|
"TEMPLATE_ERROR",
|
|
1284
1392
|
"INVALID_PAYLOAD",
|
|
1285
|
-
"INVALID_SCHEDULE_CONFIG"
|
|
1393
|
+
"INVALID_SCHEDULE_CONFIG",
|
|
1394
|
+
"CUSTOM_ACTION_ERROR",
|
|
1395
|
+
"ORDER_CREATION_ERROR",
|
|
1396
|
+
"DOCUMENT_GENERATION_ERROR",
|
|
1397
|
+
"BULK_EMAIL_ERROR",
|
|
1398
|
+
"SHARING_ERROR",
|
|
1399
|
+
"CANCEL_FLOW_EXECUTION_ERROR",
|
|
1400
|
+
"METER_READING_NOT_FOUND",
|
|
1401
|
+
"ENTITY_NOT_FOUND"
|
|
1286
1402
|
]
|
|
1287
1403
|
},
|
|
1288
1404
|
"ErrorDetail": {
|
|
@@ -2502,6 +2618,105 @@
|
|
|
2502
2618
|
}
|
|
2503
2619
|
}
|
|
2504
2620
|
},
|
|
2621
|
+
"FlowExecutionCancelActionConfig": {
|
|
2622
|
+
"allOf": [
|
|
2623
|
+
{
|
|
2624
|
+
"$ref": "#/components/schemas/AutomationActionConfig"
|
|
2625
|
+
},
|
|
2626
|
+
{
|
|
2627
|
+
"type": "object",
|
|
2628
|
+
"properties": {
|
|
2629
|
+
"type": {
|
|
2630
|
+
"enum": [
|
|
2631
|
+
"cancel-flow-execution"
|
|
2632
|
+
]
|
|
2633
|
+
},
|
|
2634
|
+
"config": {
|
|
2635
|
+
"$ref": "#/components/schemas/FlowExecutionCancelConfig"
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
],
|
|
2640
|
+
"example": {
|
|
2641
|
+
"id": "2520gja-2sgmsaga-0asg-822jgal",
|
|
2642
|
+
"name": "Cancel Flow Execution",
|
|
2643
|
+
"type": "cancel-flow-execution",
|
|
2644
|
+
"config": {
|
|
2645
|
+
"selected_reasons": [
|
|
2646
|
+
{
|
|
2647
|
+
"id": "_6kITMwkv_0Uo4i7fO7Ja",
|
|
2648
|
+
"title": "when you are done! that's when you close it."
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
"id": "qgK9sGbKoS7NxlAbNReVn",
|
|
2652
|
+
"title": "Client didn't want our services"
|
|
2653
|
+
}
|
|
2654
|
+
],
|
|
2655
|
+
"extra_description": "Test cancellation"
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
},
|
|
2659
|
+
"FlowExecutionCancelAction": {
|
|
2660
|
+
"allOf": [
|
|
2661
|
+
{
|
|
2662
|
+
"$ref": "#/components/schemas/AutomationAction"
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
"type": "object",
|
|
2666
|
+
"properties": {
|
|
2667
|
+
"type": {
|
|
2668
|
+
"enum": [
|
|
2669
|
+
"cancel-flow-execution"
|
|
2670
|
+
]
|
|
2671
|
+
},
|
|
2672
|
+
"config": {
|
|
2673
|
+
"$ref": "#/components/schemas/FlowExecutionCancelConfig"
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
]
|
|
2678
|
+
},
|
|
2679
|
+
"FlowExecutionCancelConfig": {
|
|
2680
|
+
"type": "object",
|
|
2681
|
+
"description": "Configuration for cancelling a flow execution with selected reasons",
|
|
2682
|
+
"properties": {
|
|
2683
|
+
"selected_reasons": {
|
|
2684
|
+
"type": "array",
|
|
2685
|
+
"description": "List of reasons selected for this specific cancellation",
|
|
2686
|
+
"items": {
|
|
2687
|
+
"$ref": "#/components/schemas/CancellationReason"
|
|
2688
|
+
}
|
|
2689
|
+
},
|
|
2690
|
+
"extra_description": {
|
|
2691
|
+
"type": "string",
|
|
2692
|
+
"description": "Additional description or notes for the cancellation",
|
|
2693
|
+
"example": "Process completed successfully"
|
|
2694
|
+
}
|
|
2695
|
+
},
|
|
2696
|
+
"required": [
|
|
2697
|
+
"configured_reasons"
|
|
2698
|
+
]
|
|
2699
|
+
},
|
|
2700
|
+
"CancellationReason": {
|
|
2701
|
+
"type": "object",
|
|
2702
|
+
"description": "A reason for cancelling a flow execution",
|
|
2703
|
+
"properties": {
|
|
2704
|
+
"id": {
|
|
2705
|
+
"type": "string",
|
|
2706
|
+
"description": "Unique identifier for the cancellation reason",
|
|
2707
|
+
"example": "_6kITMwkv_0Uo4i7fO7Ja"
|
|
2708
|
+
},
|
|
2709
|
+
"title": {
|
|
2710
|
+
"type": "string",
|
|
2711
|
+
"description": "Human-readable title for the cancellation reason",
|
|
2712
|
+
"example": "Process completed successfully"
|
|
2713
|
+
}
|
|
2714
|
+
},
|
|
2715
|
+
"required": [
|
|
2716
|
+
"id",
|
|
2717
|
+
"title"
|
|
2718
|
+
]
|
|
2719
|
+
},
|
|
2505
2720
|
"ConditionStatement": {
|
|
2506
2721
|
"type": "object",
|
|
2507
2722
|
"properties": {
|
|
@@ -2772,6 +2987,9 @@
|
|
|
2772
2987
|
"resume_token": {
|
|
2773
2988
|
"$ref": "#/components/schemas/ResumeToken"
|
|
2774
2989
|
},
|
|
2990
|
+
"trigger_context": {
|
|
2991
|
+
"$ref": "#/components/schemas/TriggerContext"
|
|
2992
|
+
},
|
|
2775
2993
|
"version": {
|
|
2776
2994
|
"type": "number",
|
|
2777
2995
|
"description": "Version of the flow",
|
|
@@ -2792,6 +3010,9 @@
|
|
|
2792
3010
|
"$ref": "#/components/schemas/TriggerEventFlowAutomationTask"
|
|
2793
3011
|
}
|
|
2794
3012
|
]
|
|
3013
|
+
},
|
|
3014
|
+
"workflow_context": {
|
|
3015
|
+
"$ref": "#/components/schemas/WorkflowExecutionContext"
|
|
2795
3016
|
}
|
|
2796
3017
|
},
|
|
2797
3018
|
"required": [
|
|
@@ -2803,6 +3024,24 @@
|
|
|
2803
3024
|
"actions"
|
|
2804
3025
|
]
|
|
2805
3026
|
},
|
|
3027
|
+
"WorkflowExecutionContext": {
|
|
3028
|
+
"type": "object",
|
|
3029
|
+
"required": [
|
|
3030
|
+
"workflow_exec_id",
|
|
3031
|
+
"workflow_role"
|
|
3032
|
+
],
|
|
3033
|
+
"properties": {
|
|
3034
|
+
"workflow_exec_id": {
|
|
3035
|
+
"type": "string"
|
|
3036
|
+
},
|
|
3037
|
+
"workflow_exec_task_id": {
|
|
3038
|
+
"type": "string"
|
|
3039
|
+
},
|
|
3040
|
+
"workflow_role": {
|
|
3041
|
+
"$ref": "#/components/schemas/WorkflowContextRole"
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
},
|
|
2806
3045
|
"TriggerEventManual": {
|
|
2807
3046
|
"type": "object",
|
|
2808
3047
|
"properties": {
|
|
@@ -3027,14 +3266,18 @@
|
|
|
3027
3266
|
"flow_id": {
|
|
3028
3267
|
"$ref": "#/components/schemas/AutomationFlowId"
|
|
3029
3268
|
},
|
|
3269
|
+
"workflow_context": {
|
|
3270
|
+
"$ref": "#/components/schemas/WorkflowExecutionContext"
|
|
3271
|
+
},
|
|
3030
3272
|
"flow_execution_id": {
|
|
3031
3273
|
"type": "string",
|
|
3032
|
-
"
|
|
3274
|
+
"deprecated": true,
|
|
3275
|
+
"description": "Use workflow_context.workflow_exec_id instead"
|
|
3033
3276
|
},
|
|
3034
3277
|
"flow_automation_task_id": {
|
|
3035
3278
|
"type": "string",
|
|
3036
|
-
"
|
|
3037
|
-
"description": "
|
|
3279
|
+
"deprecated": true,
|
|
3280
|
+
"description": "Use workflow_context.workflow_exec_task_id instead"
|
|
3038
3281
|
}
|
|
3039
3282
|
},
|
|
3040
3283
|
"required": [
|
|
@@ -3074,13 +3317,15 @@
|
|
|
3074
3317
|
"items": {
|
|
3075
3318
|
"$ref": "#/components/schemas/EntityRef"
|
|
3076
3319
|
}
|
|
3320
|
+
},
|
|
3321
|
+
"trigger_context": {
|
|
3322
|
+
"$ref": "#/components/schemas/TriggerContext"
|
|
3077
3323
|
}
|
|
3078
3324
|
},
|
|
3079
3325
|
"required": [
|
|
3080
3326
|
"flow_id",
|
|
3081
3327
|
"entities_refs"
|
|
3082
|
-
]
|
|
3083
|
-
"additionalProperties": false
|
|
3328
|
+
]
|
|
3084
3329
|
},
|
|
3085
3330
|
{
|
|
3086
3331
|
"type": "object",
|
|
@@ -3090,13 +3335,15 @@
|
|
|
3090
3335
|
},
|
|
3091
3336
|
"entities_query": {
|
|
3092
3337
|
"type": "string"
|
|
3338
|
+
},
|
|
3339
|
+
"trigger_context": {
|
|
3340
|
+
"$ref": "#/components/schemas/TriggerContext"
|
|
3093
3341
|
}
|
|
3094
3342
|
},
|
|
3095
3343
|
"required": [
|
|
3096
3344
|
"flow_id",
|
|
3097
3345
|
"entities_query"
|
|
3098
|
-
]
|
|
3099
|
-
"additionalProperties": false
|
|
3346
|
+
]
|
|
3100
3347
|
},
|
|
3101
3348
|
{
|
|
3102
3349
|
"type": "object",
|
|
@@ -3106,13 +3353,15 @@
|
|
|
3106
3353
|
},
|
|
3107
3354
|
"entities_filter": {
|
|
3108
3355
|
"$ref": "#/components/schemas/EntitySearchFilter"
|
|
3356
|
+
},
|
|
3357
|
+
"trigger_context": {
|
|
3358
|
+
"$ref": "#/components/schemas/TriggerContext"
|
|
3109
3359
|
}
|
|
3110
3360
|
},
|
|
3111
3361
|
"required": [
|
|
3112
3362
|
"flow_id",
|
|
3113
3363
|
"entities_filter"
|
|
3114
|
-
]
|
|
3115
|
-
"additionalProperties": false
|
|
3364
|
+
]
|
|
3116
3365
|
}
|
|
3117
3366
|
]
|
|
3118
3367
|
},
|
|
@@ -3185,6 +3434,9 @@
|
|
|
3185
3434
|
"description": "Time when the bulk trigger automation executions job was approved",
|
|
3186
3435
|
"format": "date-time"
|
|
3187
3436
|
},
|
|
3437
|
+
"trigger_context": {
|
|
3438
|
+
"$ref": "#/components/schemas/TriggerContext"
|
|
3439
|
+
},
|
|
3188
3440
|
"task_token": {
|
|
3189
3441
|
"type": "string",
|
|
3190
3442
|
"description": "Task token to approve/cancel the bulk automation job",
|
|
@@ -3320,6 +3572,16 @@
|
|
|
3320
3572
|
"type": "string",
|
|
3321
3573
|
"example": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74"
|
|
3322
3574
|
},
|
|
3575
|
+
"TriggerContext": {
|
|
3576
|
+
"type": "object",
|
|
3577
|
+
"additionalProperties": {
|
|
3578
|
+
"type": "string"
|
|
3579
|
+
},
|
|
3580
|
+
"description": "Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.",
|
|
3581
|
+
"example": {
|
|
3582
|
+
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
|
3583
|
+
}
|
|
3584
|
+
},
|
|
3323
3585
|
"AutomationTrigger": {
|
|
3324
3586
|
"type": "object",
|
|
3325
3587
|
"properties": {
|
|
@@ -4256,5 +4518,10 @@
|
|
|
4256
4518
|
}
|
|
4257
4519
|
}
|
|
4258
4520
|
}
|
|
4259
|
-
}
|
|
4521
|
+
},
|
|
4522
|
+
"servers": [
|
|
4523
|
+
{
|
|
4524
|
+
"url": "https://automation.sls.epilot.io"
|
|
4525
|
+
}
|
|
4526
|
+
]
|
|
4260
4527
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/automation-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"description": "Client library for epilot automation API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,13 +25,13 @@
|
|
|
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 https://docs.api.epilot.io/automation.yaml",
|
|
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",
|
|
32
32
|
"build:watch": "npm run build && tsc -w",
|
|
33
33
|
"prepublishOnly": "npm run typegen && npm run build",
|
|
34
|
-
"lint": "
|
|
34
|
+
"lint": "pnpm exec eslint src"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"*.js",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"axios": "^1.6.2"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@dazn/lambda-powertools-correlation-ids": "^1.28.1",
|
|
54
53
|
"buffer": "^6.0.3",
|
|
55
54
|
"https-browserify": "^1.0.0",
|
|
56
55
|
"stream-http": "^3.1.1",
|
|
@@ -66,8 +65,8 @@
|
|
|
66
65
|
"jest": "^26.6.3",
|
|
67
66
|
"json-loader": "^0.5.7",
|
|
68
67
|
"node-fetch": "^3.2.10",
|
|
69
|
-
"openapi-client-axios": "^7.
|
|
70
|
-
"openapicmd": "^2.
|
|
68
|
+
"openapi-client-axios": "^7.6.0",
|
|
69
|
+
"openapicmd": "^2.7.0",
|
|
71
70
|
"ts-jest": "^26.5.0",
|
|
72
71
|
"ts-loader": "^8.0.14",
|
|
73
72
|
"ts-node": "^10.9.1",
|