@emilgroup/action-sdk 1.1.1-beta.6 → 1.1.1-beta.7

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,364 @@
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
+ /**
28
+ * ExecutionsApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const ExecutionsApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
35
+ * @summary Retrieve the actionExecution
36
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
37
+ * @param {string} [executionCode] Action execution code
38
+ * @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ getActionExecutionStatus: async (authorization?: string, executionCode?: string, correlationId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
43
+ const localVarPath = `/actionservice/v1/actions/executions/status`;
44
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
45
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
46
+ let baseOptions;
47
+ let baseAccessToken;
48
+ if (configuration) {
49
+ baseOptions = configuration.baseOptions;
50
+ baseAccessToken = configuration.accessToken;
51
+ }
52
+
53
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
54
+ const localVarHeaderParameter = {} as any;
55
+ const localVarQueryParameter = {} as any;
56
+
57
+ // authentication bearer required
58
+ // http bearer authentication required
59
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
60
+
61
+ if (executionCode !== undefined) {
62
+ localVarQueryParameter['executionCode'] = executionCode;
63
+ }
64
+
65
+ if (correlationId !== undefined) {
66
+ localVarQueryParameter['correlationId'] = correlationId;
67
+ }
68
+
69
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
70
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
71
+ }
72
+
73
+
74
+
75
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
76
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
77
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
78
+
79
+ return {
80
+ url: toPathString(localVarUrlObj),
81
+ options: localVarRequestOptions,
82
+ };
83
+ },
84
+ /**
85
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
86
+ * @summary List actionExecutions
87
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
88
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
89
+ * @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.
90
+ * @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;
91
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
92
+ * @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;
93
+ * @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;
94
+ * @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;
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ listActionExecutions: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
99
+ const localVarPath = `/actionservice/v1/actions/executions`;
100
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
101
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
102
+ let baseOptions;
103
+ let baseAccessToken;
104
+ if (configuration) {
105
+ baseOptions = configuration.baseOptions;
106
+ baseAccessToken = configuration.accessToken;
107
+ }
108
+
109
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
110
+ const localVarHeaderParameter = {} as any;
111
+ const localVarQueryParameter = {} as any;
112
+
113
+ // authentication bearer required
114
+ // http bearer authentication required
115
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
116
+
117
+ if (pageSize !== undefined) {
118
+ localVarQueryParameter['pageSize'] = pageSize;
119
+ }
120
+
121
+ if (pageToken !== undefined) {
122
+ localVarQueryParameter['pageToken'] = pageToken;
123
+ }
124
+
125
+ if (filter !== undefined) {
126
+ localVarQueryParameter['filter'] = filter;
127
+ }
128
+
129
+ if (search !== undefined) {
130
+ localVarQueryParameter['search'] = search;
131
+ }
132
+
133
+ if (order !== undefined) {
134
+ localVarQueryParameter['order'] = order;
135
+ }
136
+
137
+ if (expand !== undefined) {
138
+ localVarQueryParameter['expand'] = expand;
139
+ }
140
+
141
+ if (filters !== undefined) {
142
+ localVarQueryParameter['filters'] = filters;
143
+ }
144
+
145
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
146
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
147
+ }
148
+
149
+
150
+
151
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
152
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
153
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
154
+
155
+ return {
156
+ url: toPathString(localVarUrlObj),
157
+ options: localVarRequestOptions,
158
+ };
159
+ },
160
+ }
161
+ };
162
+
163
+ /**
164
+ * ExecutionsApi - functional programming interface
165
+ * @export
166
+ */
167
+ export const ExecutionsApiFp = function(configuration?: Configuration) {
168
+ const localVarAxiosParamCreator = ExecutionsApiAxiosParamCreator(configuration)
169
+ return {
170
+ /**
171
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
172
+ * @summary Retrieve the actionExecution
173
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
174
+ * @param {string} [executionCode] Action execution code
175
+ * @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
176
+ * @param {*} [options] Override http request option.
177
+ * @throws {RequiredError}
178
+ */
179
+ async getActionExecutionStatus(authorization?: string, executionCode?: string, correlationId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetActionExecutionStatusResponseClass>> {
180
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getActionExecutionStatus(authorization, executionCode, correlationId, options);
181
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
182
+ },
183
+ /**
184
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
185
+ * @summary List actionExecutions
186
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
187
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
188
+ * @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.
189
+ * @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;
190
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
191
+ * @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;
192
+ * @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;
193
+ * @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;
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ */
197
+ 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>> {
198
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
199
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
200
+ },
201
+ }
202
+ };
203
+
204
+ /**
205
+ * ExecutionsApi - factory interface
206
+ * @export
207
+ */
208
+ export const ExecutionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
209
+ const localVarFp = ExecutionsApiFp(configuration)
210
+ return {
211
+ /**
212
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
213
+ * @summary Retrieve the actionExecution
214
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
215
+ * @param {string} [executionCode] Action execution code
216
+ * @param {string} [correlationId] Correlation ID (e.g. webhook execution code that triggered this action execution)
217
+ * @param {*} [options] Override http request option.
218
+ * @throws {RequiredError}
219
+ */
220
+ getActionExecutionStatus(authorization?: string, executionCode?: string, correlationId?: string, options?: any): AxiosPromise<GetActionExecutionStatusResponseClass> {
221
+ return localVarFp.getActionExecutionStatus(authorization, executionCode, correlationId, options).then((request) => request(axios, basePath));
222
+ },
223
+ /**
224
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
225
+ * @summary List actionExecutions
226
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
227
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
228
+ * @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.
229
+ * @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;
230
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
231
+ * @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;
232
+ * @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;
233
+ * @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;
234
+ * @param {*} [options] Override http request option.
235
+ * @throws {RequiredError}
236
+ */
237
+ listActionExecutions(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListActionExecutionsResponseClass> {
238
+ return localVarFp.listActionExecutions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
239
+ },
240
+ };
241
+ };
242
+
243
+ /**
244
+ * Request parameters for getActionExecutionStatus operation in ExecutionsApi.
245
+ * @export
246
+ * @interface ExecutionsApiGetActionExecutionStatusRequest
247
+ */
248
+ export interface ExecutionsApiGetActionExecutionStatusRequest {
249
+ /**
250
+ * Bearer Token: provided by the login endpoint under the name accessToken.
251
+ * @type {string}
252
+ * @memberof ExecutionsApiGetActionExecutionStatus
253
+ */
254
+ readonly authorization?: string
255
+
256
+ /**
257
+ * Action execution code
258
+ * @type {string}
259
+ * @memberof ExecutionsApiGetActionExecutionStatus
260
+ */
261
+ readonly executionCode?: string
262
+
263
+ /**
264
+ * Correlation ID (e.g. webhook execution code that triggered this action execution)
265
+ * @type {string}
266
+ * @memberof ExecutionsApiGetActionExecutionStatus
267
+ */
268
+ readonly correlationId?: string
269
+ }
270
+
271
+ /**
272
+ * Request parameters for listActionExecutions operation in ExecutionsApi.
273
+ * @export
274
+ * @interface ExecutionsApiListActionExecutionsRequest
275
+ */
276
+ export interface ExecutionsApiListActionExecutionsRequest {
277
+ /**
278
+ * Bearer Token: provided by the login endpoint under the name accessToken.
279
+ * @type {string}
280
+ * @memberof ExecutionsApiListActionExecutions
281
+ */
282
+ readonly authorization?: string
283
+
284
+ /**
285
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
286
+ * @type {number}
287
+ * @memberof ExecutionsApiListActionExecutions
288
+ */
289
+ readonly pageSize?: number
290
+
291
+ /**
292
+ * 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.
293
+ * @type {string}
294
+ * @memberof ExecutionsApiListActionExecutions
295
+ */
296
+ readonly pageToken?: string
297
+
298
+ /**
299
+ * 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;
300
+ * @type {string}
301
+ * @memberof ExecutionsApiListActionExecutions
302
+ */
303
+ readonly filter?: string
304
+
305
+ /**
306
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
307
+ * @type {string}
308
+ * @memberof ExecutionsApiListActionExecutions
309
+ */
310
+ readonly search?: string
311
+
312
+ /**
313
+ * 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;
314
+ * @type {string}
315
+ * @memberof ExecutionsApiListActionExecutions
316
+ */
317
+ readonly order?: string
318
+
319
+ /**
320
+ * 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;
321
+ * @type {string}
322
+ * @memberof ExecutionsApiListActionExecutions
323
+ */
324
+ readonly expand?: string
325
+
326
+ /**
327
+ * 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;
328
+ * @type {string}
329
+ * @memberof ExecutionsApiListActionExecutions
330
+ */
331
+ readonly filters?: string
332
+ }
333
+
334
+ /**
335
+ * ExecutionsApi - object-oriented interface
336
+ * @export
337
+ * @class ExecutionsApi
338
+ * @extends {BaseAPI}
339
+ */
340
+ export class ExecutionsApi extends BaseAPI {
341
+ /**
342
+ * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
343
+ * @summary Retrieve the actionExecution
344
+ * @param {ExecutionsApiGetActionExecutionStatusRequest} requestParameters Request parameters.
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ * @memberof ExecutionsApi
348
+ */
349
+ public getActionExecutionStatus(requestParameters: ExecutionsApiGetActionExecutionStatusRequest = {}, options?: AxiosRequestConfig) {
350
+ return ExecutionsApiFp(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, options).then((request) => request(this.axios, this.basePath));
351
+ }
352
+
353
+ /**
354
+ * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
355
+ * @summary List actionExecutions
356
+ * @param {ExecutionsApiListActionExecutionsRequest} requestParameters Request parameters.
357
+ * @param {*} [options] Override http request option.
358
+ * @throws {RequiredError}
359
+ * @memberof ExecutionsApi
360
+ */
361
+ public listActionExecutions(requestParameters: ExecutionsApiListActionExecutionsRequest = {}, options?: AxiosRequestConfig) {
362
+ 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));
363
+ }
364
+ }
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