@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.
Files changed (40) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/actions-api.ts +184 -219
  4. package/api/executions-api.ts +475 -0
  5. package/api.ts +2 -0
  6. package/dist/api/actions-api.d.ts +140 -166
  7. package/dist/api/actions-api.js +126 -141
  8. package/dist/api/executions-api.d.ts +272 -0
  9. package/dist/api/executions-api.js +456 -0
  10. package/dist/api.d.ts +1 -0
  11. package/dist/api.js +1 -0
  12. package/dist/models/action-class.d.ts +38 -2
  13. package/dist/models/action-execution-class.d.ts +30 -0
  14. package/dist/models/create-action-request-dto.d.ts +31 -1
  15. package/dist/models/create-action-request-dto.js +6 -0
  16. package/dist/models/export-actions-as-yaml-response-class.d.ts +24 -0
  17. package/dist/models/export-actions-as-yaml-response-class.js +15 -0
  18. package/dist/models/import-actions-from-yaml-request-dto.d.ts +36 -0
  19. package/dist/models/import-actions-from-yaml-request-dto.js +15 -0
  20. package/dist/models/import-actions-from-yaml-response-class.d.ts +37 -0
  21. package/dist/models/import-actions-from-yaml-response-class.js +15 -0
  22. package/dist/models/index.d.ts +5 -0
  23. package/dist/models/index.js +5 -0
  24. package/dist/models/trigger-action-request-dto.d.ts +62 -0
  25. package/dist/models/trigger-action-request-dto.js +15 -0
  26. package/dist/models/trigger-action-response-class.d.ts +25 -0
  27. package/dist/models/trigger-action-response-class.js +15 -0
  28. package/dist/models/update-action-request-dto.d.ts +30 -0
  29. package/dist/models/update-action-request-dto.js +6 -0
  30. package/models/action-class.ts +38 -2
  31. package/models/action-execution-class.ts +30 -0
  32. package/models/create-action-request-dto.ts +34 -1
  33. package/models/export-actions-as-yaml-response-class.ts +30 -0
  34. package/models/import-actions-from-yaml-request-dto.ts +42 -0
  35. package/models/import-actions-from-yaml-response-class.ts +43 -0
  36. package/models/index.ts +5 -0
  37. package/models/trigger-action-request-dto.ts +66 -0
  38. package/models/trigger-action-response-class.ts +31 -0
  39. package/models/update-action-request-dto.ts +33 -0
  40. package/package.json +1 -1
@@ -0,0 +1,475 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL ActionService
5
+ * The EMIL ActionService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { GetActionExecutionStatusResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { ListActionExecutionsResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { TriggerActionRequestDto } from '../models';
29
+ // @ts-ignore
30
+ import { TriggerActionResponseClass } from '../models';
31
+ // URLSearchParams not necessarily used
32
+ // @ts-ignore
33
+ import { URL, URLSearchParams } from 'url';
34
+ const FormData = require('form-data');
35
+ /**
36
+ * ExecutionsApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const ExecutionsApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
43
+ * @summary Retrieve the actionExecution
44
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
45
+ * @param {string} [executionCode] Action execution code
46
+ * @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ getActionExecutionStatus: async (authorization?: string, executionCode?: string, correlationId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
51
+ const localVarPath = `/actionservice/v1/actions/executions/status`;
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ let baseAccessToken;
56
+ if (configuration) {
57
+ baseOptions = configuration.baseOptions;
58
+ baseAccessToken = configuration.accessToken;
59
+ }
60
+
61
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
62
+ const localVarHeaderParameter = {} as any;
63
+ const localVarQueryParameter = {} as any;
64
+
65
+ // authentication bearer required
66
+ // http bearer authentication required
67
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
68
+
69
+ if (executionCode !== undefined) {
70
+ localVarQueryParameter['executionCode'] = executionCode;
71
+ }
72
+
73
+ if (correlationId !== undefined) {
74
+ localVarQueryParameter['correlationId'] = correlationId;
75
+ }
76
+
77
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
78
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
79
+ }
80
+
81
+
82
+
83
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
84
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
85
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
94
+ * @summary List actionExecutions
95
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
96
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
97
+ * @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.
98
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
99
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
100
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt&lt;/i&gt;
101
+ * @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;
102
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ listActionExecutions: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
107
+ const localVarPath = `/actionservice/v1/actions/executions`;
108
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
109
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
110
+ let baseOptions;
111
+ let baseAccessToken;
112
+ if (configuration) {
113
+ baseOptions = configuration.baseOptions;
114
+ baseAccessToken = configuration.accessToken;
115
+ }
116
+
117
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
118
+ const localVarHeaderParameter = {} as any;
119
+ const localVarQueryParameter = {} as any;
120
+
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
124
+
125
+ if (pageSize !== undefined) {
126
+ localVarQueryParameter['pageSize'] = pageSize;
127
+ }
128
+
129
+ if (pageToken !== undefined) {
130
+ localVarQueryParameter['pageToken'] = pageToken;
131
+ }
132
+
133
+ if (filter !== undefined) {
134
+ localVarQueryParameter['filter'] = filter;
135
+ }
136
+
137
+ if (search !== undefined) {
138
+ localVarQueryParameter['search'] = search;
139
+ }
140
+
141
+ if (order !== undefined) {
142
+ localVarQueryParameter['order'] = order;
143
+ }
144
+
145
+ if (expand !== undefined) {
146
+ localVarQueryParameter['expand'] = expand;
147
+ }
148
+
149
+ if (filters !== undefined) {
150
+ localVarQueryParameter['filters'] = filters;
151
+ }
152
+
153
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
154
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
155
+ }
156
+
157
+
158
+
159
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
160
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
161
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
162
+
163
+ return {
164
+ url: toPathString(localVarUrlObj),
165
+ options: localVarRequestOptions,
166
+ };
167
+ },
168
+ /**
169
+ * 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\"
170
+ * @summary Create the actionExecution
171
+ * @param {TriggerActionRequestDto} triggerActionRequestDto
172
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
173
+ * @param {*} [options] Override http request option.
174
+ * @throws {RequiredError}
175
+ */
176
+ triggerAction: async (triggerActionRequestDto: TriggerActionRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
177
+ // verify required parameter 'triggerActionRequestDto' is not null or undefined
178
+ assertParamExists('triggerAction', 'triggerActionRequestDto', triggerActionRequestDto)
179
+ const localVarPath = `/actionservice/v1/actions/trigger`;
180
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
181
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
182
+ let baseOptions;
183
+ let baseAccessToken;
184
+ if (configuration) {
185
+ baseOptions = configuration.baseOptions;
186
+ baseAccessToken = configuration.accessToken;
187
+ }
188
+
189
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
190
+ const localVarHeaderParameter = {} as any;
191
+ const localVarQueryParameter = {} as any;
192
+
193
+ // authentication bearer required
194
+ // http bearer authentication required
195
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
196
+
197
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
198
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
199
+ }
200
+
201
+
202
+
203
+ localVarHeaderParameter['Content-Type'] = 'application/json';
204
+
205
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
206
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
207
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
208
+ localVarRequestOptions.data = serializeDataIfNeeded(triggerActionRequestDto, localVarRequestOptions, configuration)
209
+
210
+ return {
211
+ url: toPathString(localVarUrlObj),
212
+ options: localVarRequestOptions,
213
+ };
214
+ },
215
+ }
216
+ };
217
+
218
+ /**
219
+ * ExecutionsApi - functional programming interface
220
+ * @export
221
+ */
222
+ export const ExecutionsApiFp = function(configuration?: Configuration) {
223
+ const localVarAxiosParamCreator = ExecutionsApiAxiosParamCreator(configuration)
224
+ return {
225
+ /**
226
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
227
+ * @summary Retrieve the actionExecution
228
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
229
+ * @param {string} [executionCode] Action execution code
230
+ * @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
231
+ * @param {*} [options] Override http request option.
232
+ * @throws {RequiredError}
233
+ */
234
+ async getActionExecutionStatus(authorization?: string, executionCode?: string, correlationId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetActionExecutionStatusResponseClass>> {
235
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActionExecutionStatus(authorization, executionCode, correlationId, options);
236
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
237
+ },
238
+ /**
239
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
240
+ * @summary List actionExecutions
241
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
242
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
243
+ * @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.
244
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
245
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
246
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt&lt;/i&gt;
247
+ * @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;
248
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
249
+ * @param {*} [options] Override http request option.
250
+ * @throws {RequiredError}
251
+ */
252
+ async listActionExecutions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListActionExecutionsResponseClass>> {
253
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
254
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
255
+ },
256
+ /**
257
+ * 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\"
258
+ * @summary Create the actionExecution
259
+ * @param {TriggerActionRequestDto} triggerActionRequestDto
260
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
261
+ * @param {*} [options] Override http request option.
262
+ * @throws {RequiredError}
263
+ */
264
+ async triggerAction(triggerActionRequestDto: TriggerActionRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TriggerActionResponseClass>> {
265
+ const localVarAxiosArgs = await localVarAxiosParamCreator.triggerAction(triggerActionRequestDto, authorization, options);
266
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
267
+ },
268
+ }
269
+ };
270
+
271
+ /**
272
+ * ExecutionsApi - factory interface
273
+ * @export
274
+ */
275
+ export const ExecutionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
276
+ const localVarFp = ExecutionsApiFp(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(authorization?: string, executionCode?: string, correlationId?: string, options?: any): AxiosPromise<GetActionExecutionStatusResponseClass> {
288
+ return localVarFp.getActionExecutionStatus(authorization, executionCode, correlationId, options).then((request) => request(axios, basePath));
289
+ },
290
+ /**
291
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
292
+ * @summary List actionExecutions
293
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
294
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
295
+ * @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.
296
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
297
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
298
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt&lt;/i&gt;
299
+ * @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;
300
+ * @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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
301
+ * @param {*} [options] Override http request option.
302
+ * @throws {RequiredError}
303
+ */
304
+ listActionExecutions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListActionExecutionsResponseClass> {
305
+ return localVarFp.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
306
+ },
307
+ /**
308
+ * 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\"
309
+ * @summary Create the actionExecution
310
+ * @param {TriggerActionRequestDto} triggerActionRequestDto
311
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
312
+ * @param {*} [options] Override http request option.
313
+ * @throws {RequiredError}
314
+ */
315
+ triggerAction(triggerActionRequestDto: TriggerActionRequestDto, authorization?: string, options?: any): AxiosPromise<TriggerActionResponseClass> {
316
+ return localVarFp.triggerAction(triggerActionRequestDto, authorization, options).then((request) => request(axios, basePath));
317
+ },
318
+ };
319
+ };
320
+
321
+ /**
322
+ * Request parameters for getActionExecutionStatus operation in ExecutionsApi.
323
+ * @export
324
+ * @interface ExecutionsApiGetActionExecutionStatusRequest
325
+ */
326
+ export interface ExecutionsApiGetActionExecutionStatusRequest {
327
+ /**
328
+ * Bearer Token: provided by the login endpoint under the name accessToken.
329
+ * @type {string}
330
+ * @memberof ExecutionsApiGetActionExecutionStatus
331
+ */
332
+ readonly authorization?: string
333
+
334
+ /**
335
+ * Action execution code
336
+ * @type {string}
337
+ * @memberof ExecutionsApiGetActionExecutionStatus
338
+ */
339
+ readonly executionCode?: string
340
+
341
+ /**
342
+ * Correlation ID (e.g. webhook execution code that triggered this action execution)
343
+ * @type {string}
344
+ * @memberof ExecutionsApiGetActionExecutionStatus
345
+ */
346
+ readonly correlationId?: string
347
+ }
348
+
349
+ /**
350
+ * Request parameters for listActionExecutions operation in ExecutionsApi.
351
+ * @export
352
+ * @interface ExecutionsApiListActionExecutionsRequest
353
+ */
354
+ export interface ExecutionsApiListActionExecutionsRequest {
355
+ /**
356
+ * Bearer Token: provided by the login endpoint under the name accessToken.
357
+ * @type {string}
358
+ * @memberof ExecutionsApiListActionExecutions
359
+ */
360
+ readonly authorization?: string
361
+
362
+ /**
363
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
364
+ * @type {number}
365
+ * @memberof ExecutionsApiListActionExecutions
366
+ */
367
+ readonly pageSize?: number
368
+
369
+ /**
370
+ * 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.
371
+ * @type {string}
372
+ * @memberof ExecutionsApiListActionExecutions
373
+ */
374
+ readonly pageToken?: string
375
+
376
+ /**
377
+ * 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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
378
+ * @type {string}
379
+ * @memberof ExecutionsApiListActionExecutions
380
+ */
381
+ readonly filter?: string
382
+
383
+ /**
384
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
385
+ * @type {string}
386
+ * @memberof ExecutionsApiListActionExecutions
387
+ */
388
+ readonly search?: string
389
+
390
+ /**
391
+ * 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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt&lt;/i&gt;
392
+ * @type {string}
393
+ * @memberof ExecutionsApiListActionExecutions
394
+ */
395
+ readonly order?: string
396
+
397
+ /**
398
+ * 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;
399
+ * @type {string}
400
+ * @memberof ExecutionsApiListActionExecutions
401
+ */
402
+ readonly expand?: string
403
+
404
+ /**
405
+ * 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, executionCode, actionCode, actionSlug, actionVersion, entityCode, entityType, triggeredBySub, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, force, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
406
+ * @type {string}
407
+ * @memberof ExecutionsApiListActionExecutions
408
+ */
409
+ readonly filters?: string
410
+ }
411
+
412
+ /**
413
+ * Request parameters for triggerAction operation in ExecutionsApi.
414
+ * @export
415
+ * @interface ExecutionsApiTriggerActionRequest
416
+ */
417
+ export interface ExecutionsApiTriggerActionRequest {
418
+ /**
419
+ *
420
+ * @type {TriggerActionRequestDto}
421
+ * @memberof ExecutionsApiTriggerAction
422
+ */
423
+ readonly triggerActionRequestDto: TriggerActionRequestDto
424
+
425
+ /**
426
+ * Bearer Token: provided by the login endpoint under the name accessToken.
427
+ * @type {string}
428
+ * @memberof ExecutionsApiTriggerAction
429
+ */
430
+ readonly authorization?: string
431
+ }
432
+
433
+ /**
434
+ * ExecutionsApi - object-oriented interface
435
+ * @export
436
+ * @class ExecutionsApi
437
+ * @extends {BaseAPI}
438
+ */
439
+ export class ExecutionsApi extends BaseAPI {
440
+ /**
441
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
442
+ * @summary Retrieve the actionExecution
443
+ * @param {ExecutionsApiGetActionExecutionStatusRequest} requestParameters Request parameters.
444
+ * @param {*} [options] Override http request option.
445
+ * @throws {RequiredError}
446
+ * @memberof ExecutionsApi
447
+ */
448
+ public getActionExecutionStatus(requestParameters: ExecutionsApiGetActionExecutionStatusRequest = {}, options?: AxiosRequestConfig) {
449
+ return ExecutionsApiFp(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, options).then((request) => request(this.axios, this.basePath));
450
+ }
451
+
452
+ /**
453
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
454
+ * @summary List actionExecutions
455
+ * @param {ExecutionsApiListActionExecutionsRequest} requestParameters Request parameters.
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ * @memberof ExecutionsApi
459
+ */
460
+ public listActionExecutions(requestParameters: ExecutionsApiListActionExecutionsRequest = {}, options?: AxiosRequestConfig) {
461
+ return ExecutionsApiFp(this.configuration).listActionExecutions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
462
+ }
463
+
464
+ /**
465
+ * 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\"
466
+ * @summary Create the actionExecution
467
+ * @param {ExecutionsApiTriggerActionRequest} requestParameters Request parameters.
468
+ * @param {*} [options] Override http request option.
469
+ * @throws {RequiredError}
470
+ * @memberof ExecutionsApi
471
+ */
472
+ public triggerAction(requestParameters: ExecutionsApiTriggerActionRequest, options?: AxiosRequestConfig) {
473
+ return ExecutionsApiFp(this.configuration).triggerAction(requestParameters.triggerActionRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
474
+ }
475
+ }
package/api.ts CHANGED
@@ -26,8 +26,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
26
26
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
27
27
  import { ActionsApi } from './api';
28
28
  import { DefaultApi } from './api';
29
+ import { ExecutionsApi } from './api';
29
30
 
30
31
 
31
32
  export * from './api/actions-api';
32
33
  export * from './api/default-api';
34
+ export * from './api/executions-api';
33
35