@emilgroup/action-sdk 1.0.1-beta.20 → 1.0.1-beta.21

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.
Files changed (33) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +2 -2
  3. package/api/actions-api.ts +716 -0
  4. package/api.ts +2 -0
  5. package/dist/api/actions-api.d.ts +411 -0
  6. package/dist/api/actions-api.js +654 -0
  7. package/dist/api.d.ts +1 -0
  8. package/dist/api.js +1 -0
  9. package/dist/models/action-class.d.ts +84 -0
  10. package/dist/models/action-class.js +15 -0
  11. package/dist/models/create-action-request-dto.d.ts +48 -0
  12. package/dist/models/create-action-request-dto.js +15 -0
  13. package/dist/models/create-action-response-class.d.ts +25 -0
  14. package/dist/models/create-action-response-class.js +15 -0
  15. package/dist/models/get-action-response-class.d.ts +25 -0
  16. package/dist/models/get-action-response-class.js +15 -0
  17. package/dist/models/index.d.ts +7 -0
  18. package/dist/models/index.js +7 -0
  19. package/dist/models/list-actions-response-class.d.ts +43 -0
  20. package/dist/models/list-actions-response-class.js +15 -0
  21. package/dist/models/update-action-request-dto.d.ts +54 -0
  22. package/dist/models/update-action-request-dto.js +15 -0
  23. package/dist/models/update-action-response-class.d.ts +25 -0
  24. package/dist/models/update-action-response-class.js +15 -0
  25. package/models/action-class.ts +90 -0
  26. package/models/create-action-request-dto.ts +54 -0
  27. package/models/create-action-response-class.ts +31 -0
  28. package/models/get-action-response-class.ts +31 -0
  29. package/models/index.ts +7 -0
  30. package/models/list-actions-response-class.ts +49 -0
  31. package/models/update-action-request-dto.ts +60 -0
  32. package/models/update-action-response-class.ts +31 -0
  33. package/package.json +1 -1
@@ -0,0 +1,654 @@
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.ActionsApi = exports.ActionsApiFactory = exports.ActionsApiFp = exports.ActionsApiAxiosParamCreator = 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
+ * ActionsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var ActionsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * Creates a new action configuration
97
+ * @summary Create the action
98
+ * @param {CreateActionRequestDto} createActionRequestDto
99
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ createAction: function (createActionRequestDto, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'createActionRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createAction', 'createActionRequestDto', createActionRequestDto);
112
+ localVarPath = "/actionservice/v1/actions";
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ case 1:
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ _a.sent();
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+ localVarHeaderParameter['Content-Type'] = 'application/json';
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createActionRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * Deletes an action configuration by its code
146
+ * @summary Delete the action
147
+ * @param {string} code
148
+ * @param {any} action Unique identifier for the object.
149
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ deleteAction: function (code, action, authorization, options) {
154
+ if (options === void 0) { options = {}; }
155
+ return __awaiter(_this, void 0, void 0, function () {
156
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
157
+ return __generator(this, function (_a) {
158
+ switch (_a.label) {
159
+ case 0:
160
+ // verify required parameter 'code' is not null or undefined
161
+ (0, common_1.assertParamExists)('deleteAction', 'code', code);
162
+ // verify required parameter 'action' is not null or undefined
163
+ (0, common_1.assertParamExists)('deleteAction', 'action', action);
164
+ localVarPath = "/actionservice/v1/actions/{code}"
165
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)))
166
+ .replace("{".concat("action", "}"), encodeURIComponent(String(action)));
167
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
+ case 1:
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ _a.sent();
182
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ }
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ return [2 /*return*/, {
189
+ url: (0, common_1.toPathString)(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ }];
192
+ }
193
+ });
194
+ });
195
+ },
196
+ /**
197
+ * Retrieves an action configuration by its code
198
+ * @summary Retrieve the action
199
+ * @param {string} code
200
+ * @param {any} action Unique identifier for the object.
201
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ getAction: function (code, action, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
208
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ return __generator(this, function (_a) {
210
+ switch (_a.label) {
211
+ case 0:
212
+ // verify required parameter 'code' is not null or undefined
213
+ (0, common_1.assertParamExists)('getAction', 'code', code);
214
+ // verify required parameter 'action' is not null or undefined
215
+ (0, common_1.assertParamExists)('getAction', 'action', action);
216
+ localVarPath = "/actionservice/v1/actions/{code}"
217
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)))
218
+ .replace("{".concat("action", "}"), encodeURIComponent(String(action)));
219
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
220
+ if (configuration) {
221
+ baseOptions = configuration.baseOptions;
222
+ baseAccessToken = configuration.accessToken;
223
+ }
224
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
225
+ localVarHeaderParameter = {};
226
+ localVarQueryParameter = {};
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
230
+ case 1:
231
+ // authentication bearer required
232
+ // http bearer authentication required
233
+ _a.sent();
234
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
235
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
236
+ }
237
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
238
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
239
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
240
+ return [2 /*return*/, {
241
+ url: (0, common_1.toPathString)(localVarUrlObj),
242
+ options: localVarRequestOptions,
243
+ }];
244
+ }
245
+ });
246
+ });
247
+ },
248
+ /**
249
+ * Lists all action configurations with optional filters
250
+ * @summary List actions
251
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
252
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
253
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
254
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
255
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
256
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt&lt;/i&gt;
257
+ * @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.&lt;br/&gt; &lt;br/&gt;
258
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ */
262
+ listActions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
263
+ if (options === void 0) { options = {}; }
264
+ return __awaiter(_this, void 0, void 0, function () {
265
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
266
+ return __generator(this, function (_a) {
267
+ switch (_a.label) {
268
+ case 0:
269
+ localVarPath = "/actionservice/v1/actions";
270
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
271
+ if (configuration) {
272
+ baseOptions = configuration.baseOptions;
273
+ baseAccessToken = configuration.accessToken;
274
+ }
275
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
276
+ localVarHeaderParameter = {};
277
+ localVarQueryParameter = {};
278
+ // authentication bearer required
279
+ // http bearer authentication required
280
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
281
+ case 1:
282
+ // authentication bearer required
283
+ // http bearer authentication required
284
+ _a.sent();
285
+ if (pageSize !== undefined) {
286
+ localVarQueryParameter['pageSize'] = pageSize;
287
+ }
288
+ if (pageToken !== undefined) {
289
+ localVarQueryParameter['pageToken'] = pageToken;
290
+ }
291
+ if (filter !== undefined) {
292
+ localVarQueryParameter['filter'] = filter;
293
+ }
294
+ if (search !== undefined) {
295
+ localVarQueryParameter['search'] = search;
296
+ }
297
+ if (order !== undefined) {
298
+ localVarQueryParameter['order'] = order;
299
+ }
300
+ if (expand !== undefined) {
301
+ localVarQueryParameter['expand'] = expand;
302
+ }
303
+ if (filters !== undefined) {
304
+ localVarQueryParameter['filters'] = filters;
305
+ }
306
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
307
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
308
+ }
309
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
310
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
311
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
312
+ return [2 /*return*/, {
313
+ url: (0, common_1.toPathString)(localVarUrlObj),
314
+ options: localVarRequestOptions,
315
+ }];
316
+ }
317
+ });
318
+ });
319
+ },
320
+ /**
321
+ * Updates an existing action configuration (patch semantics)
322
+ * @summary Update the action
323
+ * @param {string} code
324
+ * @param {any} action Unique identifier for the object.
325
+ * @param {UpdateActionRequestDto} updateActionRequestDto
326
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ updateAction: function (code, action, updateActionRequestDto, authorization, options) {
331
+ if (options === void 0) { options = {}; }
332
+ return __awaiter(_this, void 0, void 0, function () {
333
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
334
+ return __generator(this, function (_a) {
335
+ switch (_a.label) {
336
+ case 0:
337
+ // verify required parameter 'code' is not null or undefined
338
+ (0, common_1.assertParamExists)('updateAction', 'code', code);
339
+ // verify required parameter 'action' is not null or undefined
340
+ (0, common_1.assertParamExists)('updateAction', 'action', action);
341
+ // verify required parameter 'updateActionRequestDto' is not null or undefined
342
+ (0, common_1.assertParamExists)('updateAction', 'updateActionRequestDto', updateActionRequestDto);
343
+ localVarPath = "/actionservice/v1/actions/{code}"
344
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)))
345
+ .replace("{".concat("action", "}"), encodeURIComponent(String(action)));
346
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
347
+ if (configuration) {
348
+ baseOptions = configuration.baseOptions;
349
+ baseAccessToken = configuration.accessToken;
350
+ }
351
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
352
+ localVarHeaderParameter = {};
353
+ localVarQueryParameter = {};
354
+ // authentication bearer required
355
+ // http bearer authentication required
356
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
357
+ case 1:
358
+ // authentication bearer required
359
+ // http bearer authentication required
360
+ _a.sent();
361
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
362
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
363
+ }
364
+ localVarHeaderParameter['Content-Type'] = 'application/json';
365
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
366
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
367
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
368
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateActionRequestDto, localVarRequestOptions, configuration);
369
+ return [2 /*return*/, {
370
+ url: (0, common_1.toPathString)(localVarUrlObj),
371
+ options: localVarRequestOptions,
372
+ }];
373
+ }
374
+ });
375
+ });
376
+ },
377
+ };
378
+ };
379
+ exports.ActionsApiAxiosParamCreator = ActionsApiAxiosParamCreator;
380
+ /**
381
+ * ActionsApi - functional programming interface
382
+ * @export
383
+ */
384
+ var ActionsApiFp = function (configuration) {
385
+ var localVarAxiosParamCreator = (0, exports.ActionsApiAxiosParamCreator)(configuration);
386
+ return {
387
+ /**
388
+ * Creates a new action configuration
389
+ * @summary Create the action
390
+ * @param {CreateActionRequestDto} createActionRequestDto
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
+ createAction: function (createActionRequestDto, authorization, options) {
396
+ return __awaiter(this, void 0, void 0, function () {
397
+ var localVarAxiosArgs;
398
+ return __generator(this, function (_a) {
399
+ switch (_a.label) {
400
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAction(createActionRequestDto, authorization, options)];
401
+ case 1:
402
+ localVarAxiosArgs = _a.sent();
403
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
404
+ }
405
+ });
406
+ });
407
+ },
408
+ /**
409
+ * Deletes an action configuration by its code
410
+ * @summary Delete the action
411
+ * @param {string} code
412
+ * @param {any} action Unique identifier for the object.
413
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ deleteAction: function (code, action, authorization, options) {
418
+ return __awaiter(this, void 0, void 0, function () {
419
+ var localVarAxiosArgs;
420
+ return __generator(this, function (_a) {
421
+ switch (_a.label) {
422
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteAction(code, action, authorization, options)];
423
+ case 1:
424
+ localVarAxiosArgs = _a.sent();
425
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
426
+ }
427
+ });
428
+ });
429
+ },
430
+ /**
431
+ * Retrieves an action configuration by its code
432
+ * @summary Retrieve the action
433
+ * @param {string} code
434
+ * @param {any} action Unique identifier for the object.
435
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
436
+ * @param {*} [options] Override http request option.
437
+ * @throws {RequiredError}
438
+ */
439
+ getAction: function (code, action, authorization, options) {
440
+ return __awaiter(this, void 0, void 0, function () {
441
+ var localVarAxiosArgs;
442
+ return __generator(this, function (_a) {
443
+ switch (_a.label) {
444
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAction(code, action, authorization, options)];
445
+ case 1:
446
+ localVarAxiosArgs = _a.sent();
447
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
448
+ }
449
+ });
450
+ });
451
+ },
452
+ /**
453
+ * Lists all action configurations with optional filters
454
+ * @summary List actions
455
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
456
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
457
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
458
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
459
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
460
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt&lt;/i&gt;
461
+ * @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.&lt;br/&gt; &lt;br/&gt;
462
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ */
466
+ listActions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
467
+ return __awaiter(this, void 0, void 0, function () {
468
+ var localVarAxiosArgs;
469
+ return __generator(this, function (_a) {
470
+ switch (_a.label) {
471
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listActions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
472
+ case 1:
473
+ localVarAxiosArgs = _a.sent();
474
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
475
+ }
476
+ });
477
+ });
478
+ },
479
+ /**
480
+ * Updates an existing action configuration (patch semantics)
481
+ * @summary Update the action
482
+ * @param {string} code
483
+ * @param {any} action Unique identifier for the object.
484
+ * @param {UpdateActionRequestDto} updateActionRequestDto
485
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ */
489
+ updateAction: function (code, action, updateActionRequestDto, authorization, options) {
490
+ return __awaiter(this, void 0, void 0, function () {
491
+ var localVarAxiosArgs;
492
+ return __generator(this, function (_a) {
493
+ switch (_a.label) {
494
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateAction(code, action, updateActionRequestDto, authorization, options)];
495
+ case 1:
496
+ localVarAxiosArgs = _a.sent();
497
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
498
+ }
499
+ });
500
+ });
501
+ },
502
+ };
503
+ };
504
+ exports.ActionsApiFp = ActionsApiFp;
505
+ /**
506
+ * ActionsApi - factory interface
507
+ * @export
508
+ */
509
+ var ActionsApiFactory = function (configuration, basePath, axios) {
510
+ var localVarFp = (0, exports.ActionsApiFp)(configuration);
511
+ return {
512
+ /**
513
+ * Creates a new action configuration
514
+ * @summary Create the action
515
+ * @param {CreateActionRequestDto} createActionRequestDto
516
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
517
+ * @param {*} [options] Override http request option.
518
+ * @throws {RequiredError}
519
+ */
520
+ createAction: function (createActionRequestDto, authorization, options) {
521
+ return localVarFp.createAction(createActionRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
522
+ },
523
+ /**
524
+ * Deletes an action configuration by its code
525
+ * @summary Delete the action
526
+ * @param {string} code
527
+ * @param {any} action Unique identifier for the object.
528
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
529
+ * @param {*} [options] Override http request option.
530
+ * @throws {RequiredError}
531
+ */
532
+ deleteAction: function (code, action, authorization, options) {
533
+ return localVarFp.deleteAction(code, action, authorization, options).then(function (request) { return request(axios, basePath); });
534
+ },
535
+ /**
536
+ * Retrieves an action configuration by its code
537
+ * @summary Retrieve the action
538
+ * @param {string} code
539
+ * @param {any} action Unique identifier for the object.
540
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
541
+ * @param {*} [options] Override http request option.
542
+ * @throws {RequiredError}
543
+ */
544
+ getAction: function (code, action, authorization, options) {
545
+ return localVarFp.getAction(code, action, authorization, options).then(function (request) { return request(axios, basePath); });
546
+ },
547
+ /**
548
+ * Lists all action configurations with optional filters
549
+ * @summary List actions
550
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
551
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
552
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
553
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
554
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
555
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt&lt;/i&gt;
556
+ * @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.&lt;br/&gt; &lt;br/&gt;
557
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
558
+ * @param {*} [options] Override http request option.
559
+ * @throws {RequiredError}
560
+ */
561
+ listActions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
562
+ return localVarFp.listActions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
563
+ },
564
+ /**
565
+ * Updates an existing action configuration (patch semantics)
566
+ * @summary Update the action
567
+ * @param {string} code
568
+ * @param {any} action Unique identifier for the object.
569
+ * @param {UpdateActionRequestDto} updateActionRequestDto
570
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
571
+ * @param {*} [options] Override http request option.
572
+ * @throws {RequiredError}
573
+ */
574
+ updateAction: function (code, action, updateActionRequestDto, authorization, options) {
575
+ return localVarFp.updateAction(code, action, updateActionRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
576
+ },
577
+ };
578
+ };
579
+ exports.ActionsApiFactory = ActionsApiFactory;
580
+ /**
581
+ * ActionsApi - object-oriented interface
582
+ * @export
583
+ * @class ActionsApi
584
+ * @extends {BaseAPI}
585
+ */
586
+ var ActionsApi = /** @class */ (function (_super) {
587
+ __extends(ActionsApi, _super);
588
+ function ActionsApi() {
589
+ return _super !== null && _super.apply(this, arguments) || this;
590
+ }
591
+ /**
592
+ * Creates a new action configuration
593
+ * @summary Create the action
594
+ * @param {ActionsApiCreateActionRequest} requestParameters Request parameters.
595
+ * @param {*} [options] Override http request option.
596
+ * @throws {RequiredError}
597
+ * @memberof ActionsApi
598
+ */
599
+ ActionsApi.prototype.createAction = function (requestParameters, options) {
600
+ var _this = this;
601
+ return (0, exports.ActionsApiFp)(this.configuration).createAction(requestParameters.createActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
602
+ };
603
+ /**
604
+ * Deletes an action configuration by its code
605
+ * @summary Delete the action
606
+ * @param {ActionsApiDeleteActionRequest} requestParameters Request parameters.
607
+ * @param {*} [options] Override http request option.
608
+ * @throws {RequiredError}
609
+ * @memberof ActionsApi
610
+ */
611
+ ActionsApi.prototype.deleteAction = function (requestParameters, options) {
612
+ var _this = this;
613
+ return (0, exports.ActionsApiFp)(this.configuration).deleteAction(requestParameters.code, requestParameters.action, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
614
+ };
615
+ /**
616
+ * Retrieves an action configuration by its code
617
+ * @summary Retrieve the action
618
+ * @param {ActionsApiGetActionRequest} requestParameters Request parameters.
619
+ * @param {*} [options] Override http request option.
620
+ * @throws {RequiredError}
621
+ * @memberof ActionsApi
622
+ */
623
+ ActionsApi.prototype.getAction = function (requestParameters, options) {
624
+ var _this = this;
625
+ return (0, exports.ActionsApiFp)(this.configuration).getAction(requestParameters.code, requestParameters.action, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
626
+ };
627
+ /**
628
+ * Lists all action configurations with optional filters
629
+ * @summary List actions
630
+ * @param {ActionsApiListActionsRequest} requestParameters Request parameters.
631
+ * @param {*} [options] Override http request option.
632
+ * @throws {RequiredError}
633
+ * @memberof ActionsApi
634
+ */
635
+ ActionsApi.prototype.listActions = function (requestParameters, options) {
636
+ var _this = this;
637
+ if (requestParameters === void 0) { requestParameters = {}; }
638
+ return (0, exports.ActionsApiFp)(this.configuration).listActions(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); });
639
+ };
640
+ /**
641
+ * Updates an existing action configuration (patch semantics)
642
+ * @summary Update the action
643
+ * @param {ActionsApiUpdateActionRequest} requestParameters Request parameters.
644
+ * @param {*} [options] Override http request option.
645
+ * @throws {RequiredError}
646
+ * @memberof ActionsApi
647
+ */
648
+ ActionsApi.prototype.updateAction = function (requestParameters, options) {
649
+ var _this = this;
650
+ return (0, exports.ActionsApiFp)(this.configuration).updateAction(requestParameters.code, requestParameters.action, requestParameters.updateActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
651
+ };
652
+ return ActionsApi;
653
+ }(base_1.BaseAPI));
654
+ exports.ActionsApi = ActionsApi;