@emilgroup/action-sdk-node 1.0.1-beta.31 → 1.0.1-beta.35
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/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/api/actions-api.ts +184 -219
- package/api/executions-api.ts +475 -0
- package/api.ts +2 -0
- package/dist/api/actions-api.d.ts +140 -166
- package/dist/api/actions-api.js +126 -141
- package/dist/api/executions-api.d.ts +272 -0
- package/dist/api/executions-api.js +456 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/action-class.d.ts +38 -2
- package/dist/models/action-execution-class.d.ts +30 -0
- package/dist/models/create-action-request-dto.d.ts +31 -1
- package/dist/models/create-action-request-dto.js +6 -0
- package/dist/models/export-actions-as-yaml-response-class.d.ts +24 -0
- package/dist/models/export-actions-as-yaml-response-class.js +15 -0
- package/dist/models/import-actions-from-yaml-request-dto.d.ts +36 -0
- package/dist/models/import-actions-from-yaml-request-dto.js +15 -0
- package/dist/models/import-actions-from-yaml-response-class.d.ts +37 -0
- package/dist/models/import-actions-from-yaml-response-class.js +15 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/models/trigger-action-request-dto.d.ts +62 -0
- package/dist/models/trigger-action-request-dto.js +15 -0
- package/dist/models/trigger-action-response-class.d.ts +25 -0
- package/dist/models/trigger-action-response-class.js +15 -0
- package/dist/models/update-action-request-dto.d.ts +30 -0
- package/dist/models/update-action-request-dto.js +6 -0
- package/models/action-class.ts +38 -2
- package/models/action-execution-class.ts +30 -0
- package/models/create-action-request-dto.ts +34 -1
- package/models/export-actions-as-yaml-response-class.ts +30 -0
- package/models/import-actions-from-yaml-request-dto.ts +42 -0
- package/models/import-actions-from-yaml-response-class.ts +43 -0
- package/models/index.ts +5 -0
- package/models/trigger-action-request-dto.ts +66 -0
- package/models/trigger-action-response-class.ts +31 -0
- package/models/update-action-request-dto.ts +33 -0
- package/package.json +1 -1
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL ActionService
|
|
6
|
+
* The EMIL ActionService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.ExecutionsApi = exports.ExecutionsApiFactory = exports.ExecutionsApiFp = exports.ExecutionsApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
// URLSearchParams not necessarily used
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
var url_1 = require("url");
|
|
91
|
+
var FormData = require('form-data');
|
|
92
|
+
/**
|
|
93
|
+
* ExecutionsApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var ExecutionsApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
|
|
101
|
+
* @summary Retrieve the actionExecution
|
|
102
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
103
|
+
* @param {string} [executionCode] Action execution code
|
|
104
|
+
* @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
getActionExecutionStatus: function (authorization, executionCode, correlationId, options) {
|
|
109
|
+
if (options === void 0) { options = {}; }
|
|
110
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
switch (_a.label) {
|
|
114
|
+
case 0:
|
|
115
|
+
localVarPath = "/actionservice/v1/actions/executions/status";
|
|
116
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
117
|
+
if (configuration) {
|
|
118
|
+
baseOptions = configuration.baseOptions;
|
|
119
|
+
baseAccessToken = configuration.accessToken;
|
|
120
|
+
}
|
|
121
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
122
|
+
localVarHeaderParameter = {};
|
|
123
|
+
localVarQueryParameter = {};
|
|
124
|
+
// authentication bearer required
|
|
125
|
+
// http bearer authentication required
|
|
126
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
127
|
+
case 1:
|
|
128
|
+
// authentication bearer required
|
|
129
|
+
// http bearer authentication required
|
|
130
|
+
_a.sent();
|
|
131
|
+
if (executionCode !== undefined) {
|
|
132
|
+
localVarQueryParameter['executionCode'] = executionCode;
|
|
133
|
+
}
|
|
134
|
+
if (correlationId !== undefined) {
|
|
135
|
+
localVarQueryParameter['correlationId'] = correlationId;
|
|
136
|
+
}
|
|
137
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
138
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
139
|
+
}
|
|
140
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
141
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
143
|
+
return [2 /*return*/, {
|
|
144
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
145
|
+
options: localVarRequestOptions,
|
|
146
|
+
}];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
|
|
153
|
+
* @summary List actionExecutions
|
|
154
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
155
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
156
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
157
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
158
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
159
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt</i>
|
|
160
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
161
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
162
|
+
* @param {*} [options] Override http request option.
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
*/
|
|
165
|
+
listActionExecutions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
166
|
+
if (options === void 0) { options = {}; }
|
|
167
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
168
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
169
|
+
return __generator(this, function (_a) {
|
|
170
|
+
switch (_a.label) {
|
|
171
|
+
case 0:
|
|
172
|
+
localVarPath = "/actionservice/v1/actions/executions";
|
|
173
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
174
|
+
if (configuration) {
|
|
175
|
+
baseOptions = configuration.baseOptions;
|
|
176
|
+
baseAccessToken = configuration.accessToken;
|
|
177
|
+
}
|
|
178
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
179
|
+
localVarHeaderParameter = {};
|
|
180
|
+
localVarQueryParameter = {};
|
|
181
|
+
// authentication bearer required
|
|
182
|
+
// http bearer authentication required
|
|
183
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
184
|
+
case 1:
|
|
185
|
+
// authentication bearer required
|
|
186
|
+
// http bearer authentication required
|
|
187
|
+
_a.sent();
|
|
188
|
+
if (pageSize !== undefined) {
|
|
189
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
190
|
+
}
|
|
191
|
+
if (pageToken !== undefined) {
|
|
192
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
193
|
+
}
|
|
194
|
+
if (filter !== undefined) {
|
|
195
|
+
localVarQueryParameter['filter'] = filter;
|
|
196
|
+
}
|
|
197
|
+
if (search !== undefined) {
|
|
198
|
+
localVarQueryParameter['search'] = search;
|
|
199
|
+
}
|
|
200
|
+
if (order !== undefined) {
|
|
201
|
+
localVarQueryParameter['order'] = order;
|
|
202
|
+
}
|
|
203
|
+
if (expand !== undefined) {
|
|
204
|
+
localVarQueryParameter['expand'] = expand;
|
|
205
|
+
}
|
|
206
|
+
if (filters !== undefined) {
|
|
207
|
+
localVarQueryParameter['filters'] = filters;
|
|
208
|
+
}
|
|
209
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
210
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
211
|
+
}
|
|
212
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
213
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
214
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
215
|
+
return [2 /*return*/, {
|
|
216
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
217
|
+
options: localVarRequestOptions,
|
|
218
|
+
}];
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Triggers an action execution. When the action has an input_validation_schema, the input payload is validated against it; invalid payloads return HTTP 400 with a body containing message and errors (JSON Schema validation errors). **Required Permissions** \"action-management.actions.run\"
|
|
225
|
+
* @summary Create the actionExecution
|
|
226
|
+
* @param {TriggerActionRequestDto} triggerActionRequestDto
|
|
227
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
228
|
+
* @param {*} [options] Override http request option.
|
|
229
|
+
* @throws {RequiredError}
|
|
230
|
+
*/
|
|
231
|
+
triggerAction: function (triggerActionRequestDto, authorization, options) {
|
|
232
|
+
if (options === void 0) { options = {}; }
|
|
233
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
234
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
235
|
+
return __generator(this, function (_a) {
|
|
236
|
+
switch (_a.label) {
|
|
237
|
+
case 0:
|
|
238
|
+
// verify required parameter 'triggerActionRequestDto' is not null or undefined
|
|
239
|
+
(0, common_1.assertParamExists)('triggerAction', 'triggerActionRequestDto', triggerActionRequestDto);
|
|
240
|
+
localVarPath = "/actionservice/v1/actions/trigger";
|
|
241
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
242
|
+
if (configuration) {
|
|
243
|
+
baseOptions = configuration.baseOptions;
|
|
244
|
+
baseAccessToken = configuration.accessToken;
|
|
245
|
+
}
|
|
246
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
247
|
+
localVarHeaderParameter = {};
|
|
248
|
+
localVarQueryParameter = {};
|
|
249
|
+
// authentication bearer required
|
|
250
|
+
// http bearer authentication required
|
|
251
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
252
|
+
case 1:
|
|
253
|
+
// authentication bearer required
|
|
254
|
+
// http bearer authentication required
|
|
255
|
+
_a.sent();
|
|
256
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
257
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
258
|
+
}
|
|
259
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
260
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
261
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
262
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
263
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(triggerActionRequestDto, localVarRequestOptions, configuration);
|
|
264
|
+
return [2 /*return*/, {
|
|
265
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
266
|
+
options: localVarRequestOptions,
|
|
267
|
+
}];
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
},
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
exports.ExecutionsApiAxiosParamCreator = ExecutionsApiAxiosParamCreator;
|
|
275
|
+
/**
|
|
276
|
+
* ExecutionsApi - functional programming interface
|
|
277
|
+
* @export
|
|
278
|
+
*/
|
|
279
|
+
var ExecutionsApiFp = function (configuration) {
|
|
280
|
+
var localVarAxiosParamCreator = (0, exports.ExecutionsApiAxiosParamCreator)(configuration);
|
|
281
|
+
return {
|
|
282
|
+
/**
|
|
283
|
+
* Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
|
|
284
|
+
* @summary Retrieve the actionExecution
|
|
285
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
286
|
+
* @param {string} [executionCode] Action execution code
|
|
287
|
+
* @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
|
|
288
|
+
* @param {*} [options] Override http request option.
|
|
289
|
+
* @throws {RequiredError}
|
|
290
|
+
*/
|
|
291
|
+
getActionExecutionStatus: function (authorization, executionCode, correlationId, options) {
|
|
292
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
293
|
+
var localVarAxiosArgs;
|
|
294
|
+
return __generator(this, function (_a) {
|
|
295
|
+
switch (_a.label) {
|
|
296
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActionExecutionStatus(authorization, executionCode, correlationId, options)];
|
|
297
|
+
case 1:
|
|
298
|
+
localVarAxiosArgs = _a.sent();
|
|
299
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
},
|
|
304
|
+
/**
|
|
305
|
+
* Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
|
|
306
|
+
* @summary List actionExecutions
|
|
307
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
308
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
309
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
310
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
311
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
312
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt</i>
|
|
313
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
314
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
315
|
+
* @param {*} [options] Override http request option.
|
|
316
|
+
* @throws {RequiredError}
|
|
317
|
+
*/
|
|
318
|
+
listActionExecutions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
320
|
+
var localVarAxiosArgs;
|
|
321
|
+
return __generator(this, function (_a) {
|
|
322
|
+
switch (_a.label) {
|
|
323
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
|
|
324
|
+
case 1:
|
|
325
|
+
localVarAxiosArgs = _a.sent();
|
|
326
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
},
|
|
331
|
+
/**
|
|
332
|
+
* Triggers an action execution. When the action has an input_validation_schema, the input payload is validated against it; invalid payloads return HTTP 400 with a body containing message and errors (JSON Schema validation errors). **Required Permissions** \"action-management.actions.run\"
|
|
333
|
+
* @summary Create the actionExecution
|
|
334
|
+
* @param {TriggerActionRequestDto} triggerActionRequestDto
|
|
335
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
336
|
+
* @param {*} [options] Override http request option.
|
|
337
|
+
* @throws {RequiredError}
|
|
338
|
+
*/
|
|
339
|
+
triggerAction: function (triggerActionRequestDto, authorization, options) {
|
|
340
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
341
|
+
var localVarAxiosArgs;
|
|
342
|
+
return __generator(this, function (_a) {
|
|
343
|
+
switch (_a.label) {
|
|
344
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.triggerAction(triggerActionRequestDto, authorization, options)];
|
|
345
|
+
case 1:
|
|
346
|
+
localVarAxiosArgs = _a.sent();
|
|
347
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
exports.ExecutionsApiFp = ExecutionsApiFp;
|
|
355
|
+
/**
|
|
356
|
+
* ExecutionsApi - factory interface
|
|
357
|
+
* @export
|
|
358
|
+
*/
|
|
359
|
+
var ExecutionsApiFactory = function (configuration, basePath, axios) {
|
|
360
|
+
var localVarFp = (0, exports.ExecutionsApiFp)(configuration);
|
|
361
|
+
return {
|
|
362
|
+
/**
|
|
363
|
+
* Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
|
|
364
|
+
* @summary Retrieve the actionExecution
|
|
365
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
366
|
+
* @param {string} [executionCode] Action execution code
|
|
367
|
+
* @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
|
|
368
|
+
* @param {*} [options] Override http request option.
|
|
369
|
+
* @throws {RequiredError}
|
|
370
|
+
*/
|
|
371
|
+
getActionExecutionStatus: function (authorization, executionCode, correlationId, options) {
|
|
372
|
+
return localVarFp.getActionExecutionStatus(authorization, executionCode, correlationId, options).then(function (request) { return request(axios, basePath); });
|
|
373
|
+
},
|
|
374
|
+
/**
|
|
375
|
+
* Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
|
|
376
|
+
* @summary List actionExecutions
|
|
377
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
378
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
379
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
380
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
381
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
382
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt</i>
|
|
383
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
384
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
385
|
+
* @param {*} [options] Override http request option.
|
|
386
|
+
* @throws {RequiredError}
|
|
387
|
+
*/
|
|
388
|
+
listActionExecutions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
389
|
+
return localVarFp.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
390
|
+
},
|
|
391
|
+
/**
|
|
392
|
+
* Triggers an action execution. When the action has an input_validation_schema, the input payload is validated against it; invalid payloads return HTTP 400 with a body containing message and errors (JSON Schema validation errors). **Required Permissions** \"action-management.actions.run\"
|
|
393
|
+
* @summary Create the actionExecution
|
|
394
|
+
* @param {TriggerActionRequestDto} triggerActionRequestDto
|
|
395
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
396
|
+
* @param {*} [options] Override http request option.
|
|
397
|
+
* @throws {RequiredError}
|
|
398
|
+
*/
|
|
399
|
+
triggerAction: function (triggerActionRequestDto, authorization, options) {
|
|
400
|
+
return localVarFp.triggerAction(triggerActionRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
401
|
+
},
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
exports.ExecutionsApiFactory = ExecutionsApiFactory;
|
|
405
|
+
/**
|
|
406
|
+
* ExecutionsApi - object-oriented interface
|
|
407
|
+
* @export
|
|
408
|
+
* @class ExecutionsApi
|
|
409
|
+
* @extends {BaseAPI}
|
|
410
|
+
*/
|
|
411
|
+
var ExecutionsApi = /** @class */ (function (_super) {
|
|
412
|
+
__extends(ExecutionsApi, _super);
|
|
413
|
+
function ExecutionsApi() {
|
|
414
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
|
|
418
|
+
* @summary Retrieve the actionExecution
|
|
419
|
+
* @param {ExecutionsApiGetActionExecutionStatusRequest} requestParameters Request parameters.
|
|
420
|
+
* @param {*} [options] Override http request option.
|
|
421
|
+
* @throws {RequiredError}
|
|
422
|
+
* @memberof ExecutionsApi
|
|
423
|
+
*/
|
|
424
|
+
ExecutionsApi.prototype.getActionExecutionStatus = function (requestParameters, options) {
|
|
425
|
+
var _this = this;
|
|
426
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
427
|
+
return (0, exports.ExecutionsApiFp)(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
|
|
431
|
+
* @summary List actionExecutions
|
|
432
|
+
* @param {ExecutionsApiListActionExecutionsRequest} requestParameters Request parameters.
|
|
433
|
+
* @param {*} [options] Override http request option.
|
|
434
|
+
* @throws {RequiredError}
|
|
435
|
+
* @memberof ExecutionsApi
|
|
436
|
+
*/
|
|
437
|
+
ExecutionsApi.prototype.listActionExecutions = function (requestParameters, options) {
|
|
438
|
+
var _this = this;
|
|
439
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
440
|
+
return (0, exports.ExecutionsApiFp)(this.configuration).listActionExecutions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
441
|
+
};
|
|
442
|
+
/**
|
|
443
|
+
* Triggers an action execution. When the action has an input_validation_schema, the input payload is validated against it; invalid payloads return HTTP 400 with a body containing message and errors (JSON Schema validation errors). **Required Permissions** \"action-management.actions.run\"
|
|
444
|
+
* @summary Create the actionExecution
|
|
445
|
+
* @param {ExecutionsApiTriggerActionRequest} requestParameters Request parameters.
|
|
446
|
+
* @param {*} [options] Override http request option.
|
|
447
|
+
* @throws {RequiredError}
|
|
448
|
+
* @memberof ExecutionsApi
|
|
449
|
+
*/
|
|
450
|
+
ExecutionsApi.prototype.triggerAction = function (requestParameters, options) {
|
|
451
|
+
var _this = this;
|
|
452
|
+
return (0, exports.ExecutionsApiFp)(this.configuration).triggerAction(requestParameters.triggerActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
453
|
+
};
|
|
454
|
+
return ExecutionsApi;
|
|
455
|
+
}(base_1.BaseAPI));
|
|
456
|
+
exports.ExecutionsApi = ExecutionsApi;
|
package/dist/api.d.ts
CHANGED
package/dist/api.js
CHANGED
|
@@ -29,3 +29,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
__exportStar(require("./api/actions-api"), exports);
|
|
31
31
|
__exportStar(require("./api/default-api"), exports);
|
|
32
|
+
__exportStar(require("./api/executions-api"), exports);
|
|
@@ -44,13 +44,19 @@ export interface ActionClass {
|
|
|
44
44
|
* @type {string}
|
|
45
45
|
* @memberof ActionClass
|
|
46
46
|
*/
|
|
47
|
-
'workflowCode'
|
|
47
|
+
'workflowCode': string;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* true = published (and triggerable), false = draft; only one published per code/slug/name
|
|
50
50
|
* @type {boolean}
|
|
51
51
|
* @memberof ActionClass
|
|
52
52
|
*/
|
|
53
53
|
'isEnabled': boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the action is available in the UI
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof ActionClass
|
|
58
|
+
*/
|
|
59
|
+
'isAvailableInUi'?: boolean;
|
|
54
60
|
/**
|
|
55
61
|
* Detailed description of what this action does
|
|
56
62
|
* @type {string}
|
|
@@ -81,4 +87,34 @@ export interface ActionClass {
|
|
|
81
87
|
* @memberof ActionClass
|
|
82
88
|
*/
|
|
83
89
|
'updatedBy': string;
|
|
90
|
+
/**
|
|
91
|
+
* Entity type: Policy, Lead, Claim
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof ActionClass
|
|
94
|
+
*/
|
|
95
|
+
'entityType'?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Product version ID
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @memberof ActionClass
|
|
100
|
+
*/
|
|
101
|
+
'productVersionId'?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Derived from product_version.product_id
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof ActionClass
|
|
106
|
+
*/
|
|
107
|
+
'productSlug'?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Optional JSON Schema to validate input_payload when triggering the action (only populated when expand=inputValidationSchema)
|
|
110
|
+
* @type {object}
|
|
111
|
+
* @memberof ActionClass
|
|
112
|
+
*/
|
|
113
|
+
'inputValidationSchema'?: object;
|
|
114
|
+
/**
|
|
115
|
+
* Business version per action config
|
|
116
|
+
* @type {number}
|
|
117
|
+
* @memberof ActionClass
|
|
118
|
+
*/
|
|
119
|
+
'configVersion': number;
|
|
84
120
|
}
|
|
@@ -34,6 +34,12 @@ export interface ActionExecutionClass {
|
|
|
34
34
|
* @memberof ActionExecutionClass
|
|
35
35
|
*/
|
|
36
36
|
'actionCode': string;
|
|
37
|
+
/**
|
|
38
|
+
* Action config version (config_version) at trigger time for audit/tracing
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof ActionExecutionClass
|
|
41
|
+
*/
|
|
42
|
+
'actionVersion': number;
|
|
37
43
|
/**
|
|
38
44
|
* Execution status
|
|
39
45
|
* @type {string}
|
|
@@ -104,4 +110,28 @@ export interface ActionExecutionClass {
|
|
|
104
110
|
* @memberof ActionExecutionClass
|
|
105
111
|
*/
|
|
106
112
|
'workflowOutputReference'?: WorkflowOutputReferenceClass;
|
|
113
|
+
/**
|
|
114
|
+
* When true, execution was triggered with force (e.g. draft/disabled action)
|
|
115
|
+
* @type {boolean}
|
|
116
|
+
* @memberof ActionExecutionClass
|
|
117
|
+
*/
|
|
118
|
+
'force'?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* For entity actions: code of the entity the action was run on (e.g. policy code, lead code)
|
|
121
|
+
* @type {string}
|
|
122
|
+
* @memberof ActionExecutionClass
|
|
123
|
+
*/
|
|
124
|
+
'entityCode'?: string;
|
|
125
|
+
/**
|
|
126
|
+
* For entity actions: entity type (POLICY, LEAD, CLAIM) for lookup
|
|
127
|
+
* @type {string}
|
|
128
|
+
* @memberof ActionExecutionClass
|
|
129
|
+
*/
|
|
130
|
+
'entityType'?: string;
|
|
131
|
+
/**
|
|
132
|
+
* JWT sub of who triggered the action (set when trigger is from API; null for webhook/system)
|
|
133
|
+
* @type {string}
|
|
134
|
+
* @memberof ActionExecutionClass
|
|
135
|
+
*/
|
|
136
|
+
'triggeredBySub'?: string;
|
|
107
137
|
}
|
|
@@ -34,15 +34,45 @@ export interface CreateActionRequestDto {
|
|
|
34
34
|
*/
|
|
35
35
|
'workflowCode': string;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* true = published (triggerable), false = draft. Default true.
|
|
38
38
|
* @type {boolean}
|
|
39
39
|
* @memberof CreateActionRequestDto
|
|
40
40
|
*/
|
|
41
41
|
'isEnabled'?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the action is available in the UI
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof CreateActionRequestDto
|
|
46
|
+
*/
|
|
47
|
+
'isAvailableInUi'?: boolean;
|
|
42
48
|
/**
|
|
43
49
|
* Detailed description of what this action does
|
|
44
50
|
* @type {string}
|
|
45
51
|
* @memberof CreateActionRequestDto
|
|
46
52
|
*/
|
|
47
53
|
'description'?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Entity type. When provided, productVersionId is required (and vice versa).
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof CreateActionRequestDto
|
|
58
|
+
*/
|
|
59
|
+
'entityType'?: CreateActionRequestDtoEntityTypeEnum;
|
|
60
|
+
/**
|
|
61
|
+
* Product version ID. When provided, entityType is required (and vice versa).
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof CreateActionRequestDto
|
|
64
|
+
*/
|
|
65
|
+
'productVersionId'?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Optional JSON Schema to validate input_payload when triggering the action
|
|
68
|
+
* @type {object}
|
|
69
|
+
* @memberof CreateActionRequestDto
|
|
70
|
+
*/
|
|
71
|
+
'inputValidationSchema'?: object;
|
|
48
72
|
}
|
|
73
|
+
export declare const CreateActionRequestDtoEntityTypeEnum: {
|
|
74
|
+
readonly Policy: "POLICY";
|
|
75
|
+
readonly Lead: "LEAD";
|
|
76
|
+
readonly Claim: "CLAIM";
|
|
77
|
+
};
|
|
78
|
+
export type CreateActionRequestDtoEntityTypeEnum = typeof CreateActionRequestDtoEntityTypeEnum[keyof typeof CreateActionRequestDtoEntityTypeEnum];
|
|
@@ -13,3 +13,9 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreateActionRequestDtoEntityTypeEnum = void 0;
|
|
17
|
+
exports.CreateActionRequestDtoEntityTypeEnum = {
|
|
18
|
+
Policy: 'POLICY',
|
|
19
|
+
Lead: 'LEAD',
|
|
20
|
+
Claim: 'CLAIM'
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL ActionService
|
|
3
|
+
* The EMIL ActionService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ExportActionsAsYamlResponseClass
|
|
16
|
+
*/
|
|
17
|
+
export interface ExportActionsAsYamlResponseClass {
|
|
18
|
+
/**
|
|
19
|
+
* Serialized YAML for the product version (all entity types)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ExportActionsAsYamlResponseClass
|
|
22
|
+
*/
|
|
23
|
+
'yamlContent': string;
|
|
24
|
+
}
|