@emilgroup/action-sdk-node 1.0.1-beta.31 → 1.0.1-beta.32

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.
@@ -0,0 +1,368 @@
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
+ // URLSearchParams not necessarily used
28
+ // @ts-ignore
29
+ import { URL, URLSearchParams } from 'url';
30
+ const FormData = require('form-data');
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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, 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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, 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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, 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
+ };
166
+
167
+ /**
168
+ * ExecutionsApi - functional programming interface
169
+ * @export
170
+ */
171
+ export const ExecutionsApiFp = function(configuration?: Configuration) {
172
+ const localVarAxiosParamCreator = ExecutionsApiAxiosParamCreator(configuration)
173
+ return {
174
+ /**
175
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
176
+ * @summary Retrieve the actionExecution
177
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
178
+ * @param {string} [executionCode] Action execution code
179
+ * @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ async getActionExecutionStatus(authorization?: string, executionCode?: string, correlationId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetActionExecutionStatusResponseClass>> {
184
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActionExecutionStatus(authorization, executionCode, correlationId, options);
185
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
186
+ },
187
+ /**
188
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
189
+ * @summary List actionExecutions
190
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
191
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
192
+ * @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.
193
+ * @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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
194
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
195
+ * @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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt&lt;/i&gt;
196
+ * @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;
197
+ * @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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ 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>> {
202
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
203
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
204
+ },
205
+ }
206
+ };
207
+
208
+ /**
209
+ * ExecutionsApi - factory interface
210
+ * @export
211
+ */
212
+ export const ExecutionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
213
+ const localVarFp = ExecutionsApiFp(configuration)
214
+ return {
215
+ /**
216
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
217
+ * @summary Retrieve the actionExecution
218
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
219
+ * @param {string} [executionCode] Action execution code
220
+ * @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
221
+ * @param {*} [options] Override http request option.
222
+ * @throws {RequiredError}
223
+ */
224
+ getActionExecutionStatus(authorization?: string, executionCode?: string, correlationId?: string, options?: any): AxiosPromise<GetActionExecutionStatusResponseClass> {
225
+ return localVarFp.getActionExecutionStatus(authorization, executionCode, correlationId, options).then((request) => request(axios, basePath));
226
+ },
227
+ /**
228
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
229
+ * @summary List actionExecutions
230
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
231
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
232
+ * @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.
233
+ * @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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
234
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
235
+ * @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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt&lt;/i&gt;
236
+ * @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;
237
+ * @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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
238
+ * @param {*} [options] Override http request option.
239
+ * @throws {RequiredError}
240
+ */
241
+ listActionExecutions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListActionExecutionsResponseClass> {
242
+ return localVarFp.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
243
+ },
244
+ };
245
+ };
246
+
247
+ /**
248
+ * Request parameters for getActionExecutionStatus operation in ExecutionsApi.
249
+ * @export
250
+ * @interface ExecutionsApiGetActionExecutionStatusRequest
251
+ */
252
+ export interface ExecutionsApiGetActionExecutionStatusRequest {
253
+ /**
254
+ * Bearer Token: provided by the login endpoint under the name accessToken.
255
+ * @type {string}
256
+ * @memberof ExecutionsApiGetActionExecutionStatus
257
+ */
258
+ readonly authorization?: string
259
+
260
+ /**
261
+ * Action execution code
262
+ * @type {string}
263
+ * @memberof ExecutionsApiGetActionExecutionStatus
264
+ */
265
+ readonly executionCode?: string
266
+
267
+ /**
268
+ * Correlation ID (e.g. webhook execution code that triggered this action execution)
269
+ * @type {string}
270
+ * @memberof ExecutionsApiGetActionExecutionStatus
271
+ */
272
+ readonly correlationId?: string
273
+ }
274
+
275
+ /**
276
+ * Request parameters for listActionExecutions operation in ExecutionsApi.
277
+ * @export
278
+ * @interface ExecutionsApiListActionExecutionsRequest
279
+ */
280
+ export interface ExecutionsApiListActionExecutionsRequest {
281
+ /**
282
+ * Bearer Token: provided by the login endpoint under the name accessToken.
283
+ * @type {string}
284
+ * @memberof ExecutionsApiListActionExecutions
285
+ */
286
+ readonly authorization?: string
287
+
288
+ /**
289
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
290
+ * @type {number}
291
+ * @memberof ExecutionsApiListActionExecutions
292
+ */
293
+ readonly pageSize?: number
294
+
295
+ /**
296
+ * 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.
297
+ * @type {string}
298
+ * @memberof ExecutionsApiListActionExecutions
299
+ */
300
+ readonly pageToken?: string
301
+
302
+ /**
303
+ * 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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
304
+ * @type {string}
305
+ * @memberof ExecutionsApiListActionExecutions
306
+ */
307
+ readonly filter?: string
308
+
309
+ /**
310
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
311
+ * @type {string}
312
+ * @memberof ExecutionsApiListActionExecutions
313
+ */
314
+ readonly search?: string
315
+
316
+ /**
317
+ * 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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt&lt;/i&gt;
318
+ * @type {string}
319
+ * @memberof ExecutionsApiListActionExecutions
320
+ */
321
+ readonly order?: string
322
+
323
+ /**
324
+ * 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;
325
+ * @type {string}
326
+ * @memberof ExecutionsApiListActionExecutions
327
+ */
328
+ readonly expand?: string
329
+
330
+ /**
331
+ * 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, status, triggeredBy, triggerSource, correlationId, workflowInstanceCode, completedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
332
+ * @type {string}
333
+ * @memberof ExecutionsApiListActionExecutions
334
+ */
335
+ readonly filters?: string
336
+ }
337
+
338
+ /**
339
+ * ExecutionsApi - object-oriented interface
340
+ * @export
341
+ * @class ExecutionsApi
342
+ * @extends {BaseAPI}
343
+ */
344
+ export class ExecutionsApi extends BaseAPI {
345
+ /**
346
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
347
+ * @summary Retrieve the actionExecution
348
+ * @param {ExecutionsApiGetActionExecutionStatusRequest} requestParameters Request parameters.
349
+ * @param {*} [options] Override http request option.
350
+ * @throws {RequiredError}
351
+ * @memberof ExecutionsApi
352
+ */
353
+ public getActionExecutionStatus(requestParameters: ExecutionsApiGetActionExecutionStatusRequest = {}, options?: AxiosRequestConfig) {
354
+ return ExecutionsApiFp(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, options).then((request) => request(this.axios, this.basePath));
355
+ }
356
+
357
+ /**
358
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
359
+ * @summary List actionExecutions
360
+ * @param {ExecutionsApiListActionExecutionsRequest} requestParameters Request parameters.
361
+ * @param {*} [options] Override http request option.
362
+ * @throws {RequiredError}
363
+ * @memberof ExecutionsApi
364
+ */
365
+ public listActionExecutions(requestParameters: ExecutionsApiListActionExecutionsRequest = {}, options?: AxiosRequestConfig) {
366
+ 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));
367
+ }
368
+ }
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