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