@emilgroup/action-sdk 1.1.1-beta.6 → 1.2.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/.openapi-generator/FILES +7 -0
- package/README.md +2 -2
- package/api/actions-api.ts +559 -130
- package/api/executions-api.ts +471 -0
- package/api.ts +2 -0
- package/dist/api/actions-api.d.ts +358 -112
- package/dist/api/actions-api.js +427 -97
- package/dist/api/executions-api.d.ts +272 -0
- package/dist/api/executions-api.js +452 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/action-class.d.ts +9 -20
- package/dist/models/action-execution-class.d.ts +36 -0
- package/dist/models/action-ref-class.d.ts +36 -0
- package/dist/models/action-ref-class.js +15 -0
- package/dist/models/action-version-class.d.ts +127 -0
- package/dist/models/action-version-class.js +21 -0
- package/dist/models/create-action-request-dto.d.ts +47 -5
- package/dist/models/create-action-request-dto.js +6 -0
- package/dist/models/get-action-version-response-class.d.ts +25 -0
- package/dist/models/get-action-version-response-class.js +15 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/models/list-action-versions-response-class.d.ts +43 -0
- package/dist/models/list-action-versions-response-class.js +15 -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 +41 -5
- package/dist/models/update-action-request-dto.js +6 -0
- package/models/action-class.ts +9 -20
- package/models/action-execution-class.ts +36 -0
- package/models/action-ref-class.ts +42 -0
- package/models/action-version-class.ts +136 -0
- package/models/create-action-request-dto.ts +50 -5
- package/models/get-action-version-response-class.ts +31 -0
- package/models/index.ts +6 -0
- package/models/list-action-versions-response-class.ts +49 -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 +44 -5
- package/package.json +1 -1
|
@@ -0,0 +1,452 @@
|
|
|
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
|
+
/**
|
|
89
|
+
* ExecutionsApi - axios parameter creator
|
|
90
|
+
* @export
|
|
91
|
+
*/
|
|
92
|
+
var ExecutionsApiAxiosParamCreator = function (configuration) {
|
|
93
|
+
var _this = this;
|
|
94
|
+
return {
|
|
95
|
+
/**
|
|
96
|
+
* Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
|
|
97
|
+
* @summary Retrieve the actionExecution
|
|
98
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
99
|
+
* @param {string} [executionCode] Action execution code
|
|
100
|
+
* @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
*/
|
|
104
|
+
getActionExecutionStatus: function (authorization, executionCode, correlationId, options) {
|
|
105
|
+
if (options === void 0) { options = {}; }
|
|
106
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
107
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
switch (_a.label) {
|
|
110
|
+
case 0:
|
|
111
|
+
localVarPath = "/actionservice/v1/actions/executions/status";
|
|
112
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
113
|
+
if (configuration) {
|
|
114
|
+
baseOptions = configuration.baseOptions;
|
|
115
|
+
baseAccessToken = configuration.accessToken;
|
|
116
|
+
}
|
|
117
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
118
|
+
localVarHeaderParameter = {};
|
|
119
|
+
localVarQueryParameter = {};
|
|
120
|
+
// authentication bearer required
|
|
121
|
+
// http bearer authentication required
|
|
122
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
123
|
+
case 1:
|
|
124
|
+
// authentication bearer required
|
|
125
|
+
// http bearer authentication required
|
|
126
|
+
_a.sent();
|
|
127
|
+
if (executionCode !== undefined) {
|
|
128
|
+
localVarQueryParameter['executionCode'] = executionCode;
|
|
129
|
+
}
|
|
130
|
+
if (correlationId !== undefined) {
|
|
131
|
+
localVarQueryParameter['correlationId'] = correlationId;
|
|
132
|
+
}
|
|
133
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
134
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
135
|
+
}
|
|
136
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
137
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
138
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
139
|
+
return [2 /*return*/, {
|
|
140
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
141
|
+
options: localVarRequestOptions,
|
|
142
|
+
}];
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
|
|
149
|
+
* @summary List actionExecutions
|
|
150
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
151
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
152
|
+
* @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.
|
|
153
|
+
* @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, triggeredAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
154
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
155
|
+
* @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, triggeredAt, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt</i>
|
|
156
|
+
* @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/>
|
|
157
|
+
* @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, triggeredAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
158
|
+
* @param {*} [options] Override http request option.
|
|
159
|
+
* @throws {RequiredError}
|
|
160
|
+
*/
|
|
161
|
+
listActionExecutions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
162
|
+
if (options === void 0) { options = {}; }
|
|
163
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
164
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
165
|
+
return __generator(this, function (_a) {
|
|
166
|
+
switch (_a.label) {
|
|
167
|
+
case 0:
|
|
168
|
+
localVarPath = "/actionservice/v1/actions/executions";
|
|
169
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
170
|
+
if (configuration) {
|
|
171
|
+
baseOptions = configuration.baseOptions;
|
|
172
|
+
baseAccessToken = configuration.accessToken;
|
|
173
|
+
}
|
|
174
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
175
|
+
localVarHeaderParameter = {};
|
|
176
|
+
localVarQueryParameter = {};
|
|
177
|
+
// authentication bearer required
|
|
178
|
+
// http bearer authentication required
|
|
179
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
180
|
+
case 1:
|
|
181
|
+
// authentication bearer required
|
|
182
|
+
// http bearer authentication required
|
|
183
|
+
_a.sent();
|
|
184
|
+
if (pageSize !== undefined) {
|
|
185
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
186
|
+
}
|
|
187
|
+
if (pageToken !== undefined) {
|
|
188
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
189
|
+
}
|
|
190
|
+
if (filter !== undefined) {
|
|
191
|
+
localVarQueryParameter['filter'] = filter;
|
|
192
|
+
}
|
|
193
|
+
if (search !== undefined) {
|
|
194
|
+
localVarQueryParameter['search'] = search;
|
|
195
|
+
}
|
|
196
|
+
if (order !== undefined) {
|
|
197
|
+
localVarQueryParameter['order'] = order;
|
|
198
|
+
}
|
|
199
|
+
if (expand !== undefined) {
|
|
200
|
+
localVarQueryParameter['expand'] = expand;
|
|
201
|
+
}
|
|
202
|
+
if (filters !== undefined) {
|
|
203
|
+
localVarQueryParameter['filters'] = filters;
|
|
204
|
+
}
|
|
205
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
206
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
207
|
+
}
|
|
208
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
209
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
210
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
211
|
+
return [2 /*return*/, {
|
|
212
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
213
|
+
options: localVarRequestOptions,
|
|
214
|
+
}];
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
/**
|
|
220
|
+
* 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\"
|
|
221
|
+
* @summary Create the actionExecution
|
|
222
|
+
* @param {TriggerActionRequestDto} triggerActionRequestDto
|
|
223
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
224
|
+
* @param {*} [options] Override http request option.
|
|
225
|
+
* @throws {RequiredError}
|
|
226
|
+
*/
|
|
227
|
+
triggerAction: function (triggerActionRequestDto, authorization, options) {
|
|
228
|
+
if (options === void 0) { options = {}; }
|
|
229
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
230
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
231
|
+
return __generator(this, function (_a) {
|
|
232
|
+
switch (_a.label) {
|
|
233
|
+
case 0:
|
|
234
|
+
// verify required parameter 'triggerActionRequestDto' is not null or undefined
|
|
235
|
+
(0, common_1.assertParamExists)('triggerAction', 'triggerActionRequestDto', triggerActionRequestDto);
|
|
236
|
+
localVarPath = "/actionservice/v1/actions/trigger";
|
|
237
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
238
|
+
if (configuration) {
|
|
239
|
+
baseOptions = configuration.baseOptions;
|
|
240
|
+
baseAccessToken = configuration.accessToken;
|
|
241
|
+
}
|
|
242
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
243
|
+
localVarHeaderParameter = {};
|
|
244
|
+
localVarQueryParameter = {};
|
|
245
|
+
// authentication bearer required
|
|
246
|
+
// http bearer authentication required
|
|
247
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
248
|
+
case 1:
|
|
249
|
+
// authentication bearer required
|
|
250
|
+
// http bearer authentication required
|
|
251
|
+
_a.sent();
|
|
252
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
253
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
254
|
+
}
|
|
255
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
256
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
257
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
258
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
259
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(triggerActionRequestDto, localVarRequestOptions, configuration);
|
|
260
|
+
return [2 /*return*/, {
|
|
261
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
262
|
+
options: localVarRequestOptions,
|
|
263
|
+
}];
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
exports.ExecutionsApiAxiosParamCreator = ExecutionsApiAxiosParamCreator;
|
|
271
|
+
/**
|
|
272
|
+
* ExecutionsApi - functional programming interface
|
|
273
|
+
* @export
|
|
274
|
+
*/
|
|
275
|
+
var ExecutionsApiFp = function (configuration) {
|
|
276
|
+
var localVarAxiosParamCreator = (0, exports.ExecutionsApiAxiosParamCreator)(configuration);
|
|
277
|
+
return {
|
|
278
|
+
/**
|
|
279
|
+
* Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
|
|
280
|
+
* @summary Retrieve the actionExecution
|
|
281
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
282
|
+
* @param {string} [executionCode] Action execution code
|
|
283
|
+
* @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
|
|
284
|
+
* @param {*} [options] Override http request option.
|
|
285
|
+
* @throws {RequiredError}
|
|
286
|
+
*/
|
|
287
|
+
getActionExecutionStatus: function (authorization, executionCode, correlationId, options) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
289
|
+
var localVarAxiosArgs;
|
|
290
|
+
return __generator(this, function (_a) {
|
|
291
|
+
switch (_a.label) {
|
|
292
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActionExecutionStatus(authorization, executionCode, correlationId, options)];
|
|
293
|
+
case 1:
|
|
294
|
+
localVarAxiosArgs = _a.sent();
|
|
295
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
},
|
|
300
|
+
/**
|
|
301
|
+
* Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
|
|
302
|
+
* @summary List actionExecutions
|
|
303
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
304
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
305
|
+
* @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.
|
|
306
|
+
* @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, triggeredAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
307
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
308
|
+
* @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, triggeredAt, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt</i>
|
|
309
|
+
* @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/>
|
|
310
|
+
* @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, triggeredAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
311
|
+
* @param {*} [options] Override http request option.
|
|
312
|
+
* @throws {RequiredError}
|
|
313
|
+
*/
|
|
314
|
+
listActionExecutions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
315
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
316
|
+
var localVarAxiosArgs;
|
|
317
|
+
return __generator(this, function (_a) {
|
|
318
|
+
switch (_a.label) {
|
|
319
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
|
|
320
|
+
case 1:
|
|
321
|
+
localVarAxiosArgs = _a.sent();
|
|
322
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* 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\"
|
|
329
|
+
* @summary Create the actionExecution
|
|
330
|
+
* @param {TriggerActionRequestDto} triggerActionRequestDto
|
|
331
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
332
|
+
* @param {*} [options] Override http request option.
|
|
333
|
+
* @throws {RequiredError}
|
|
334
|
+
*/
|
|
335
|
+
triggerAction: function (triggerActionRequestDto, authorization, options) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
337
|
+
var localVarAxiosArgs;
|
|
338
|
+
return __generator(this, function (_a) {
|
|
339
|
+
switch (_a.label) {
|
|
340
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.triggerAction(triggerActionRequestDto, authorization, options)];
|
|
341
|
+
case 1:
|
|
342
|
+
localVarAxiosArgs = _a.sent();
|
|
343
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
},
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
exports.ExecutionsApiFp = ExecutionsApiFp;
|
|
351
|
+
/**
|
|
352
|
+
* ExecutionsApi - factory interface
|
|
353
|
+
* @export
|
|
354
|
+
*/
|
|
355
|
+
var ExecutionsApiFactory = function (configuration, basePath, axios) {
|
|
356
|
+
var localVarFp = (0, exports.ExecutionsApiFp)(configuration);
|
|
357
|
+
return {
|
|
358
|
+
/**
|
|
359
|
+
* Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
|
|
360
|
+
* @summary Retrieve the actionExecution
|
|
361
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
362
|
+
* @param {string} [executionCode] Action execution code
|
|
363
|
+
* @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
|
|
364
|
+
* @param {*} [options] Override http request option.
|
|
365
|
+
* @throws {RequiredError}
|
|
366
|
+
*/
|
|
367
|
+
getActionExecutionStatus: function (authorization, executionCode, correlationId, options) {
|
|
368
|
+
return localVarFp.getActionExecutionStatus(authorization, executionCode, correlationId, options).then(function (request) { return request(axios, basePath); });
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
|
|
372
|
+
* @summary List actionExecutions
|
|
373
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
374
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
375
|
+
* @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.
|
|
376
|
+
* @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, triggeredAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
377
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
378
|
+
* @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, triggeredAt, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt</i>
|
|
379
|
+
* @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/>
|
|
380
|
+
* @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, triggeredAt, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
381
|
+
* @param {*} [options] Override http request option.
|
|
382
|
+
* @throws {RequiredError}
|
|
383
|
+
*/
|
|
384
|
+
listActionExecutions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
385
|
+
return localVarFp.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
386
|
+
},
|
|
387
|
+
/**
|
|
388
|
+
* 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\"
|
|
389
|
+
* @summary Create the actionExecution
|
|
390
|
+
* @param {TriggerActionRequestDto} triggerActionRequestDto
|
|
391
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
392
|
+
* @param {*} [options] Override http request option.
|
|
393
|
+
* @throws {RequiredError}
|
|
394
|
+
*/
|
|
395
|
+
triggerAction: function (triggerActionRequestDto, authorization, options) {
|
|
396
|
+
return localVarFp.triggerAction(triggerActionRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
397
|
+
},
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
exports.ExecutionsApiFactory = ExecutionsApiFactory;
|
|
401
|
+
/**
|
|
402
|
+
* ExecutionsApi - object-oriented interface
|
|
403
|
+
* @export
|
|
404
|
+
* @class ExecutionsApi
|
|
405
|
+
* @extends {BaseAPI}
|
|
406
|
+
*/
|
|
407
|
+
var ExecutionsApi = /** @class */ (function (_super) {
|
|
408
|
+
__extends(ExecutionsApi, _super);
|
|
409
|
+
function ExecutionsApi() {
|
|
410
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
|
|
414
|
+
* @summary Retrieve the actionExecution
|
|
415
|
+
* @param {ExecutionsApiGetActionExecutionStatusRequest} requestParameters Request parameters.
|
|
416
|
+
* @param {*} [options] Override http request option.
|
|
417
|
+
* @throws {RequiredError}
|
|
418
|
+
* @memberof ExecutionsApi
|
|
419
|
+
*/
|
|
420
|
+
ExecutionsApi.prototype.getActionExecutionStatus = function (requestParameters, options) {
|
|
421
|
+
var _this = this;
|
|
422
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
423
|
+
return (0, exports.ExecutionsApiFp)(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
|
|
427
|
+
* @summary List actionExecutions
|
|
428
|
+
* @param {ExecutionsApiListActionExecutionsRequest} requestParameters Request parameters.
|
|
429
|
+
* @param {*} [options] Override http request option.
|
|
430
|
+
* @throws {RequiredError}
|
|
431
|
+
* @memberof ExecutionsApi
|
|
432
|
+
*/
|
|
433
|
+
ExecutionsApi.prototype.listActionExecutions = function (requestParameters, options) {
|
|
434
|
+
var _this = this;
|
|
435
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
436
|
+
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); });
|
|
437
|
+
};
|
|
438
|
+
/**
|
|
439
|
+
* 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\"
|
|
440
|
+
* @summary Create the actionExecution
|
|
441
|
+
* @param {ExecutionsApiTriggerActionRequest} requestParameters Request parameters.
|
|
442
|
+
* @param {*} [options] Override http request option.
|
|
443
|
+
* @throws {RequiredError}
|
|
444
|
+
* @memberof ExecutionsApi
|
|
445
|
+
*/
|
|
446
|
+
ExecutionsApi.prototype.triggerAction = function (requestParameters, options) {
|
|
447
|
+
var _this = this;
|
|
448
|
+
return (0, exports.ExecutionsApiFp)(this.configuration).triggerAction(requestParameters.triggerActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
449
|
+
};
|
|
450
|
+
return ExecutionsApi;
|
|
451
|
+
}(base_1.BaseAPI));
|
|
452
|
+
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);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { ActionVersionClass } from './action-version-class';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -28,35 +29,17 @@ export interface ActionClass {
|
|
|
28
29
|
*/
|
|
29
30
|
'code': string;
|
|
30
31
|
/**
|
|
31
|
-
* Human readable action name
|
|
32
|
+
* Human readable action name (from active version)
|
|
32
33
|
* @type {string}
|
|
33
34
|
* @memberof ActionClass
|
|
34
35
|
*/
|
|
35
36
|
'name': string;
|
|
36
37
|
/**
|
|
37
|
-
* Stable identifier; unique per tenant
|
|
38
|
+
* Stable identifier; unique per tenant (from active version)
|
|
38
39
|
* @type {string}
|
|
39
40
|
* @memberof ActionClass
|
|
40
41
|
*/
|
|
41
42
|
'slug': string;
|
|
42
|
-
/**
|
|
43
|
-
* BPMN/workflow code to execute when this action is triggered
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof ActionClass
|
|
46
|
-
*/
|
|
47
|
-
'workflowCode'?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Whether the action is enabled and can be triggered
|
|
50
|
-
* @type {boolean}
|
|
51
|
-
* @memberof ActionClass
|
|
52
|
-
*/
|
|
53
|
-
'isEnabled': boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Detailed description of what this action does
|
|
56
|
-
* @type {string}
|
|
57
|
-
* @memberof ActionClass
|
|
58
|
-
*/
|
|
59
|
-
'description'?: string;
|
|
60
43
|
/**
|
|
61
44
|
* Time at which the object was created.
|
|
62
45
|
* @type {string}
|
|
@@ -81,4 +64,10 @@ export interface ActionClass {
|
|
|
81
64
|
* @memberof ActionClass
|
|
82
65
|
*/
|
|
83
66
|
'updatedBy': string;
|
|
67
|
+
/**
|
|
68
|
+
* No expand: empty. expand=versions: active version only. All versions: use listActionVersions.
|
|
69
|
+
* @type {Array<ActionVersionClass>}
|
|
70
|
+
* @memberof ActionClass
|
|
71
|
+
*/
|
|
72
|
+
'versions': Array<ActionVersionClass>;
|
|
84
73
|
}
|
|
@@ -34,6 +34,12 @@ export interface ActionExecutionClass {
|
|
|
34
34
|
* @memberof ActionExecutionClass
|
|
35
35
|
*/
|
|
36
36
|
'actionCode': string;
|
|
37
|
+
/**
|
|
38
|
+
* Action config version (version_number) 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,34 @@ 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;
|
|
137
|
+
/**
|
|
138
|
+
* When the action was triggered (set at creation, same for all status rows of this execution)
|
|
139
|
+
* @type {string}
|
|
140
|
+
* @memberof ActionExecutionClass
|
|
141
|
+
*/
|
|
142
|
+
'triggeredAt'?: string;
|
|
107
143
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 ActionRefClass
|
|
16
|
+
*/
|
|
17
|
+
export interface ActionRefClass {
|
|
18
|
+
/**
|
|
19
|
+
* Action code
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ActionRefClass
|
|
22
|
+
*/
|
|
23
|
+
'code': string;
|
|
24
|
+
/**
|
|
25
|
+
* Action name
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ActionRefClass
|
|
28
|
+
*/
|
|
29
|
+
'name': string;
|
|
30
|
+
/**
|
|
31
|
+
* Action slug
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ActionRefClass
|
|
34
|
+
*/
|
|
35
|
+
'slug': string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|