@red-hat-developer-hub/backstage-plugin-orchestrator-common 1.24.1

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 (57) hide show
  1. package/CHANGELOG.md +228 -0
  2. package/README.md +5 -0
  3. package/config.d.ts +81 -0
  4. package/dist/QueryParams.cjs.js +12 -0
  5. package/dist/QueryParams.cjs.js.map +1 -0
  6. package/dist/QueryParams.esm.js +7 -0
  7. package/dist/QueryParams.esm.js.map +1 -0
  8. package/dist/constants.cjs.js +16 -0
  9. package/dist/constants.cjs.js.map +1 -0
  10. package/dist/constants.esm.js +9 -0
  11. package/dist/constants.esm.js.map +1 -0
  12. package/dist/generated/api/definition.cjs.js +7 -0
  13. package/dist/generated/api/definition.cjs.js.map +1 -0
  14. package/dist/generated/api/definition.esm.js +5 -0
  15. package/dist/generated/api/definition.esm.js.map +1 -0
  16. package/dist/generated/client/api.cjs.js +761 -0
  17. package/dist/generated/client/api.cjs.js.map +1 -0
  18. package/dist/generated/client/api.esm.js +744 -0
  19. package/dist/generated/client/api.esm.js.map +1 -0
  20. package/dist/generated/client/base.cjs.js +34 -0
  21. package/dist/generated/client/base.cjs.js.map +1 -0
  22. package/dist/generated/client/base.esm.js +25 -0
  23. package/dist/generated/client/base.esm.js.map +1 -0
  24. package/dist/generated/client/common.cjs.js +55 -0
  25. package/dist/generated/client/common.cjs.js.map +1 -0
  26. package/dist/generated/client/common.esm.js +48 -0
  27. package/dist/generated/client/common.esm.js.map +1 -0
  28. package/dist/generated/client/configuration.cjs.js +87 -0
  29. package/dist/generated/client/configuration.cjs.js.map +1 -0
  30. package/dist/generated/client/configuration.esm.js +85 -0
  31. package/dist/generated/client/configuration.esm.js.map +1 -0
  32. package/dist/index.cjs.js +63 -0
  33. package/dist/index.cjs.js.map +1 -0
  34. package/dist/index.d.ts +1570 -0
  35. package/dist/index.esm.js +11 -0
  36. package/dist/index.esm.js.map +1 -0
  37. package/dist/models.cjs.js +34 -0
  38. package/dist/models.cjs.js.map +1 -0
  39. package/dist/models.esm.js +29 -0
  40. package/dist/models.esm.js.map +1 -0
  41. package/dist/permissions.cjs.js +45 -0
  42. package/dist/permissions.cjs.js.map +1 -0
  43. package/dist/permissions.esm.js +38 -0
  44. package/dist/permissions.esm.js.map +1 -0
  45. package/dist/types.cjs.js +18 -0
  46. package/dist/types.cjs.js.map +1 -0
  47. package/dist/types.esm.js +14 -0
  48. package/dist/types.esm.js.map +1 -0
  49. package/dist/utils/StringUtils.cjs.js +8 -0
  50. package/dist/utils/StringUtils.cjs.js.map +1 -0
  51. package/dist/utils/StringUtils.esm.js +5 -0
  52. package/dist/utils/StringUtils.esm.js.map +1 -0
  53. package/dist/workflow.cjs.js +96 -0
  54. package/dist/workflow.cjs.js.map +1 -0
  55. package/dist/workflow.esm.js +87 -0
  56. package/dist/workflow.esm.js.map +1 -0
  57. package/package.json +85 -0
@@ -0,0 +1,761 @@
1
+ 'use strict';
2
+
3
+ var globalAxios = require('axios');
4
+ var common = require('./common.cjs.js');
5
+ var base = require('./base.cjs.js');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var globalAxios__default = /*#__PURE__*/_interopDefaultCompat(globalAxios);
10
+
11
+ const FieldFilterOperatorEnum = {
12
+ Eq: "EQ",
13
+ Gt: "GT",
14
+ Gte: "GTE",
15
+ Lt: "LT",
16
+ Lte: "LTE",
17
+ In: "IN",
18
+ IsNull: "IS_NULL",
19
+ Contains: "CONTAINS",
20
+ ContainsAll: "CONTAINS_ALL",
21
+ ContainsAny: "CONTAINS_ANY",
22
+ Like: "LIKE",
23
+ Between: "BETWEEN"
24
+ };
25
+ const LogicalFilterOperatorEnum = {
26
+ And: "AND",
27
+ Or: "OR",
28
+ Not: "NOT"
29
+ };
30
+ const PaginationInfoDTOOrderDirectionEnum = {
31
+ Asc: "ASC",
32
+ Desc: "DESC"
33
+ };
34
+ const ProcessInstanceStatusDTO = {
35
+ Active: "Active",
36
+ Error: "Error",
37
+ Completed: "Completed",
38
+ Aborted: "Aborted",
39
+ Suspended: "Suspended",
40
+ Pending: "Pending"
41
+ };
42
+ const WorkflowCategoryDTO = {
43
+ Assessment: "assessment",
44
+ Infrastructure: "infrastructure"
45
+ };
46
+ const WorkflowFormatDTO = {
47
+ Yaml: "yaml",
48
+ Json: "json"
49
+ };
50
+ const WorkflowResultDTOCompletedWithEnum = {
51
+ Error: "error",
52
+ Success: "success"
53
+ };
54
+ const WorkflowResultDTOOutputsInnerFormatEnum = {
55
+ Text: "text",
56
+ Number: "number",
57
+ Link: "link"
58
+ };
59
+ const DefaultApiAxiosParamCreator = function(configuration) {
60
+ return {
61
+ /**
62
+ * Aborts a workflow instance identified by the provided instanceId.
63
+ * @summary Abort a workflow instance
64
+ * @param {string} instanceId The identifier of the workflow instance to abort.
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ */
68
+ abortWorkflow: async (instanceId, options = {}) => {
69
+ common.assertParamExists("abortWorkflow", "instanceId", instanceId);
70
+ const localVarPath = `/v2/workflows/instances/{instanceId}/abort`.replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
71
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
72
+ let baseOptions;
73
+ if (configuration) {
74
+ baseOptions = configuration.baseOptions;
75
+ }
76
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
77
+ const localVarHeaderParameter = {};
78
+ const localVarQueryParameter = {};
79
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
80
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
81
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
82
+ return {
83
+ url: common.toPathString(localVarUrlObj),
84
+ options: localVarRequestOptions
85
+ };
86
+ },
87
+ /**
88
+ * Execute a workflow
89
+ * @summary Execute a workflow
90
+ * @param {string} workflowId ID of the workflow to execute
91
+ * @param {ExecuteWorkflowRequestDTO} executeWorkflowRequestDTO
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ executeWorkflow: async (workflowId, executeWorkflowRequestDTO, options = {}) => {
96
+ common.assertParamExists("executeWorkflow", "workflowId", workflowId);
97
+ common.assertParamExists("executeWorkflow", "executeWorkflowRequestDTO", executeWorkflowRequestDTO);
98
+ const localVarPath = `/v2/workflows/{workflowId}/execute`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
99
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
100
+ let baseOptions;
101
+ if (configuration) {
102
+ baseOptions = configuration.baseOptions;
103
+ }
104
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
105
+ const localVarHeaderParameter = {};
106
+ const localVarQueryParameter = {};
107
+ localVarHeaderParameter["Content-Type"] = "application/json";
108
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
109
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
110
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
111
+ localVarRequestOptions.data = common.serializeDataIfNeeded(executeWorkflowRequestDTO, localVarRequestOptions, configuration);
112
+ return {
113
+ url: common.toPathString(localVarUrlObj),
114
+ options: localVarRequestOptions
115
+ };
116
+ },
117
+ /**
118
+ * Get a workflow execution/run (instance)
119
+ * @summary Get Workflow Instance by ID
120
+ * @param {string} instanceId ID of the workflow instance
121
+ * @param {boolean} [includeAssessment] Whether to include assessment
122
+ * @param {*} [options] Override http request option.
123
+ * @throws {RequiredError}
124
+ */
125
+ getInstanceById: async (instanceId, includeAssessment, options = {}) => {
126
+ common.assertParamExists("getInstanceById", "instanceId", instanceId);
127
+ const localVarPath = `/v2/workflows/instances/{instanceId}`.replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
128
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
129
+ let baseOptions;
130
+ if (configuration) {
131
+ baseOptions = configuration.baseOptions;
132
+ }
133
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
134
+ const localVarHeaderParameter = {};
135
+ const localVarQueryParameter = {};
136
+ if (includeAssessment !== void 0) {
137
+ localVarQueryParameter["includeAssessment"] = includeAssessment;
138
+ }
139
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
140
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
142
+ return {
143
+ url: common.toPathString(localVarUrlObj),
144
+ options: localVarRequestOptions
145
+ };
146
+ },
147
+ /**
148
+ * Retrieve an array of workflow executions (instances)
149
+ * @summary Get instances
150
+ * @param {GetInstancesRequest} [getInstancesRequest] Parameters for retrieving instances
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ getInstances: async (getInstancesRequest, options = {}) => {
155
+ const localVarPath = `/v2/workflows/instances`;
156
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
157
+ let baseOptions;
158
+ if (configuration) {
159
+ baseOptions = configuration.baseOptions;
160
+ }
161
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
162
+ const localVarHeaderParameter = {};
163
+ const localVarQueryParameter = {};
164
+ localVarHeaderParameter["Content-Type"] = "application/json";
165
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
166
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
167
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
168
+ localVarRequestOptions.data = common.serializeDataIfNeeded(getInstancesRequest, localVarRequestOptions, configuration);
169
+ return {
170
+ url: common.toPathString(localVarUrlObj),
171
+ options: localVarRequestOptions
172
+ };
173
+ },
174
+ /**
175
+ * Get the workflow input schema. It defines the input fields of the workflow
176
+ * @param {string} workflowId ID of the workflow to fetch
177
+ * @param {string} [instanceId] ID of instance
178
+ * @param {*} [options] Override http request option.
179
+ * @throws {RequiredError}
180
+ */
181
+ getWorkflowInputSchemaById: async (workflowId, instanceId, options = {}) => {
182
+ common.assertParamExists("getWorkflowInputSchemaById", "workflowId", workflowId);
183
+ const localVarPath = `/v2/workflows/{workflowId}/inputSchema`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
184
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
185
+ let baseOptions;
186
+ if (configuration) {
187
+ baseOptions = configuration.baseOptions;
188
+ }
189
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
190
+ const localVarHeaderParameter = {};
191
+ const localVarQueryParameter = {};
192
+ if (instanceId !== void 0) {
193
+ localVarQueryParameter["instanceId"] = instanceId;
194
+ }
195
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
196
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
197
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
198
+ return {
199
+ url: common.toPathString(localVarUrlObj),
200
+ options: localVarRequestOptions
201
+ };
202
+ },
203
+ /**
204
+ * Retrieve an array of workflow executions (instances) for the given workflow
205
+ * @summary Get instances for a specific workflow
206
+ * @param {string} workflowId ID of the workflow
207
+ * @param {SearchRequest} [searchRequest] Parameters for retrieving workflow instances
208
+ * @param {*} [options] Override http request option.
209
+ * @throws {RequiredError}
210
+ */
211
+ getWorkflowInstances: async (workflowId, searchRequest, options = {}) => {
212
+ common.assertParamExists("getWorkflowInstances", "workflowId", workflowId);
213
+ const localVarPath = `/v2/workflows/{workflowId}/instances`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
214
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
215
+ let baseOptions;
216
+ if (configuration) {
217
+ baseOptions = configuration.baseOptions;
218
+ }
219
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
220
+ const localVarHeaderParameter = {};
221
+ const localVarQueryParameter = {};
222
+ localVarHeaderParameter["Content-Type"] = "application/json";
223
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
224
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
225
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
226
+ localVarRequestOptions.data = common.serializeDataIfNeeded(searchRequest, localVarRequestOptions, configuration);
227
+ return {
228
+ url: common.toPathString(localVarUrlObj),
229
+ options: localVarRequestOptions
230
+ };
231
+ },
232
+ /**
233
+ * Returns the key fields of the workflow including data on the last run instance
234
+ * @param {string} workflowId Unique identifier of the workflow
235
+ * @param {*} [options] Override http request option.
236
+ * @throws {RequiredError}
237
+ */
238
+ getWorkflowOverviewById: async (workflowId, options = {}) => {
239
+ common.assertParamExists("getWorkflowOverviewById", "workflowId", workflowId);
240
+ const localVarPath = `/v2/workflows/{workflowId}/overview`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
241
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
242
+ let baseOptions;
243
+ if (configuration) {
244
+ baseOptions = configuration.baseOptions;
245
+ }
246
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
247
+ const localVarHeaderParameter = {};
248
+ const localVarQueryParameter = {};
249
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
250
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
251
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
252
+ return {
253
+ url: common.toPathString(localVarUrlObj),
254
+ options: localVarRequestOptions
255
+ };
256
+ },
257
+ /**
258
+ * Get the workflow\'s definition
259
+ * @param {string} workflowId ID of the workflow to fetch
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ getWorkflowSourceById: async (workflowId, options = {}) => {
264
+ common.assertParamExists("getWorkflowSourceById", "workflowId", workflowId);
265
+ const localVarPath = `/v2/workflows/{workflowId}/source`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
266
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
267
+ let baseOptions;
268
+ if (configuration) {
269
+ baseOptions = configuration.baseOptions;
270
+ }
271
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
272
+ const localVarHeaderParameter = {};
273
+ const localVarQueryParameter = {};
274
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
275
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
276
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
277
+ return {
278
+ url: common.toPathString(localVarUrlObj),
279
+ options: localVarRequestOptions
280
+ };
281
+ },
282
+ /**
283
+ * Retrieve array with the status of all instances
284
+ * @summary Get workflow status list
285
+ * @param {*} [options] Override http request option.
286
+ * @throws {RequiredError}
287
+ */
288
+ getWorkflowStatuses: async (options = {}) => {
289
+ const localVarPath = `/v2/workflows/instances/statuses`;
290
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
291
+ let baseOptions;
292
+ if (configuration) {
293
+ baseOptions = configuration.baseOptions;
294
+ }
295
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
296
+ const localVarHeaderParameter = {};
297
+ const localVarQueryParameter = {};
298
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
299
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
300
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
301
+ return {
302
+ url: common.toPathString(localVarUrlObj),
303
+ options: localVarRequestOptions
304
+ };
305
+ },
306
+ /**
307
+ * Returns the key fields of the workflow including data on the last run instance
308
+ * @param {SearchRequest} [searchRequest] Pagination and filters
309
+ * @param {*} [options] Override http request option.
310
+ * @throws {RequiredError}
311
+ */
312
+ getWorkflowsOverview: async (searchRequest, options = {}) => {
313
+ const localVarPath = `/v2/workflows/overview`;
314
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
315
+ let baseOptions;
316
+ if (configuration) {
317
+ baseOptions = configuration.baseOptions;
318
+ }
319
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
320
+ const localVarHeaderParameter = {};
321
+ const localVarQueryParameter = {};
322
+ localVarHeaderParameter["Content-Type"] = "application/json";
323
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
324
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
325
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
326
+ localVarRequestOptions.data = common.serializeDataIfNeeded(searchRequest, localVarRequestOptions, configuration);
327
+ return {
328
+ url: common.toPathString(localVarUrlObj),
329
+ options: localVarRequestOptions
330
+ };
331
+ },
332
+ /**
333
+ * Retrigger an instance
334
+ * @summary Retrigger an instance
335
+ * @param {string} workflowId ID of the workflow
336
+ * @param {string} instanceId ID of the instance to retrigger
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ retriggerInstance: async (workflowId, instanceId, options = {}) => {
341
+ common.assertParamExists("retriggerInstance", "workflowId", workflowId);
342
+ common.assertParamExists("retriggerInstance", "instanceId", instanceId);
343
+ const localVarPath = `/v2/workflows/{workflowId}/{instanceId}/retrigger`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId))).replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId)));
344
+ const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
345
+ let baseOptions;
346
+ if (configuration) {
347
+ baseOptions = configuration.baseOptions;
348
+ }
349
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
350
+ const localVarHeaderParameter = {};
351
+ const localVarQueryParameter = {};
352
+ common.setSearchParams(localVarUrlObj, localVarQueryParameter);
353
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
354
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
355
+ return {
356
+ url: common.toPathString(localVarUrlObj),
357
+ options: localVarRequestOptions
358
+ };
359
+ }
360
+ };
361
+ };
362
+ const DefaultApiFp = function(configuration) {
363
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
364
+ return {
365
+ /**
366
+ * Aborts a workflow instance identified by the provided instanceId.
367
+ * @summary Abort a workflow instance
368
+ * @param {string} instanceId The identifier of the workflow instance to abort.
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ */
372
+ async abortWorkflow(instanceId, options) {
373
+ const localVarAxiosArgs = await localVarAxiosParamCreator.abortWorkflow(instanceId, options);
374
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
375
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.abortWorkflow"]?.[localVarOperationServerIndex]?.url;
376
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
377
+ },
378
+ /**
379
+ * Execute a workflow
380
+ * @summary Execute a workflow
381
+ * @param {string} workflowId ID of the workflow to execute
382
+ * @param {ExecuteWorkflowRequestDTO} executeWorkflowRequestDTO
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ async executeWorkflow(workflowId, executeWorkflowRequestDTO, options) {
387
+ const localVarAxiosArgs = await localVarAxiosParamCreator.executeWorkflow(workflowId, executeWorkflowRequestDTO, options);
388
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
389
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.executeWorkflow"]?.[localVarOperationServerIndex]?.url;
390
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
391
+ },
392
+ /**
393
+ * Get a workflow execution/run (instance)
394
+ * @summary Get Workflow Instance by ID
395
+ * @param {string} instanceId ID of the workflow instance
396
+ * @param {boolean} [includeAssessment] Whether to include assessment
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ async getInstanceById(instanceId, includeAssessment, options) {
401
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInstanceById(instanceId, includeAssessment, options);
402
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
403
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.getInstanceById"]?.[localVarOperationServerIndex]?.url;
404
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
405
+ },
406
+ /**
407
+ * Retrieve an array of workflow executions (instances)
408
+ * @summary Get instances
409
+ * @param {GetInstancesRequest} [getInstancesRequest] Parameters for retrieving instances
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ */
413
+ async getInstances(getInstancesRequest, options) {
414
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInstances(getInstancesRequest, options);
415
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
416
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.getInstances"]?.[localVarOperationServerIndex]?.url;
417
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
418
+ },
419
+ /**
420
+ * Get the workflow input schema. It defines the input fields of the workflow
421
+ * @param {string} workflowId ID of the workflow to fetch
422
+ * @param {string} [instanceId] ID of instance
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ */
426
+ async getWorkflowInputSchemaById(workflowId, instanceId, options) {
427
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflowInputSchemaById(workflowId, instanceId, options);
428
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
429
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.getWorkflowInputSchemaById"]?.[localVarOperationServerIndex]?.url;
430
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
431
+ },
432
+ /**
433
+ * Retrieve an array of workflow executions (instances) for the given workflow
434
+ * @summary Get instances for a specific workflow
435
+ * @param {string} workflowId ID of the workflow
436
+ * @param {SearchRequest} [searchRequest] Parameters for retrieving workflow instances
437
+ * @param {*} [options] Override http request option.
438
+ * @throws {RequiredError}
439
+ */
440
+ async getWorkflowInstances(workflowId, searchRequest, options) {
441
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflowInstances(workflowId, searchRequest, options);
442
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
443
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.getWorkflowInstances"]?.[localVarOperationServerIndex]?.url;
444
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
445
+ },
446
+ /**
447
+ * Returns the key fields of the workflow including data on the last run instance
448
+ * @param {string} workflowId Unique identifier of the workflow
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ async getWorkflowOverviewById(workflowId, options) {
453
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflowOverviewById(workflowId, options);
454
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
455
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.getWorkflowOverviewById"]?.[localVarOperationServerIndex]?.url;
456
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
457
+ },
458
+ /**
459
+ * Get the workflow\'s definition
460
+ * @param {string} workflowId ID of the workflow to fetch
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ */
464
+ async getWorkflowSourceById(workflowId, options) {
465
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflowSourceById(workflowId, options);
466
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
467
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.getWorkflowSourceById"]?.[localVarOperationServerIndex]?.url;
468
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
469
+ },
470
+ /**
471
+ * Retrieve array with the status of all instances
472
+ * @summary Get workflow status list
473
+ * @param {*} [options] Override http request option.
474
+ * @throws {RequiredError}
475
+ */
476
+ async getWorkflowStatuses(options) {
477
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflowStatuses(options);
478
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
479
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.getWorkflowStatuses"]?.[localVarOperationServerIndex]?.url;
480
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
481
+ },
482
+ /**
483
+ * Returns the key fields of the workflow including data on the last run instance
484
+ * @param {SearchRequest} [searchRequest] Pagination and filters
485
+ * @param {*} [options] Override http request option.
486
+ * @throws {RequiredError}
487
+ */
488
+ async getWorkflowsOverview(searchRequest, options) {
489
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflowsOverview(searchRequest, options);
490
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
491
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.getWorkflowsOverview"]?.[localVarOperationServerIndex]?.url;
492
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
493
+ },
494
+ /**
495
+ * Retrigger an instance
496
+ * @summary Retrigger an instance
497
+ * @param {string} workflowId ID of the workflow
498
+ * @param {string} instanceId ID of the instance to retrigger
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ async retriggerInstance(workflowId, instanceId, options) {
503
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retriggerInstance(workflowId, instanceId, options);
504
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
505
+ const localVarOperationServerBasePath = base.operationServerMap["DefaultApi.retriggerInstance"]?.[localVarOperationServerIndex]?.url;
506
+ return (axios, basePath) => common.createRequestFunction(localVarAxiosArgs, globalAxios__default.default, base.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
507
+ }
508
+ };
509
+ };
510
+ const DefaultApiFactory = function(configuration, basePath, axios) {
511
+ const localVarFp = DefaultApiFp(configuration);
512
+ return {
513
+ /**
514
+ * Aborts a workflow instance identified by the provided instanceId.
515
+ * @summary Abort a workflow instance
516
+ * @param {string} instanceId The identifier of the workflow instance to abort.
517
+ * @param {*} [options] Override http request option.
518
+ * @throws {RequiredError}
519
+ */
520
+ abortWorkflow(instanceId, options) {
521
+ return localVarFp.abortWorkflow(instanceId, options).then((request) => request(axios, basePath));
522
+ },
523
+ /**
524
+ * Execute a workflow
525
+ * @summary Execute a workflow
526
+ * @param {string} workflowId ID of the workflow to execute
527
+ * @param {ExecuteWorkflowRequestDTO} executeWorkflowRequestDTO
528
+ * @param {*} [options] Override http request option.
529
+ * @throws {RequiredError}
530
+ */
531
+ executeWorkflow(workflowId, executeWorkflowRequestDTO, options) {
532
+ return localVarFp.executeWorkflow(workflowId, executeWorkflowRequestDTO, options).then((request) => request(axios, basePath));
533
+ },
534
+ /**
535
+ * Get a workflow execution/run (instance)
536
+ * @summary Get Workflow Instance by ID
537
+ * @param {string} instanceId ID of the workflow instance
538
+ * @param {boolean} [includeAssessment] Whether to include assessment
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ */
542
+ getInstanceById(instanceId, includeAssessment, options) {
543
+ return localVarFp.getInstanceById(instanceId, includeAssessment, options).then((request) => request(axios, basePath));
544
+ },
545
+ /**
546
+ * Retrieve an array of workflow executions (instances)
547
+ * @summary Get instances
548
+ * @param {GetInstancesRequest} [getInstancesRequest] Parameters for retrieving instances
549
+ * @param {*} [options] Override http request option.
550
+ * @throws {RequiredError}
551
+ */
552
+ getInstances(getInstancesRequest, options) {
553
+ return localVarFp.getInstances(getInstancesRequest, options).then((request) => request(axios, basePath));
554
+ },
555
+ /**
556
+ * Get the workflow input schema. It defines the input fields of the workflow
557
+ * @param {string} workflowId ID of the workflow to fetch
558
+ * @param {string} [instanceId] ID of instance
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ */
562
+ getWorkflowInputSchemaById(workflowId, instanceId, options) {
563
+ return localVarFp.getWorkflowInputSchemaById(workflowId, instanceId, options).then((request) => request(axios, basePath));
564
+ },
565
+ /**
566
+ * Retrieve an array of workflow executions (instances) for the given workflow
567
+ * @summary Get instances for a specific workflow
568
+ * @param {string} workflowId ID of the workflow
569
+ * @param {SearchRequest} [searchRequest] Parameters for retrieving workflow instances
570
+ * @param {*} [options] Override http request option.
571
+ * @throws {RequiredError}
572
+ */
573
+ getWorkflowInstances(workflowId, searchRequest, options) {
574
+ return localVarFp.getWorkflowInstances(workflowId, searchRequest, options).then((request) => request(axios, basePath));
575
+ },
576
+ /**
577
+ * Returns the key fields of the workflow including data on the last run instance
578
+ * @param {string} workflowId Unique identifier of the workflow
579
+ * @param {*} [options] Override http request option.
580
+ * @throws {RequiredError}
581
+ */
582
+ getWorkflowOverviewById(workflowId, options) {
583
+ return localVarFp.getWorkflowOverviewById(workflowId, options).then((request) => request(axios, basePath));
584
+ },
585
+ /**
586
+ * Get the workflow\'s definition
587
+ * @param {string} workflowId ID of the workflow to fetch
588
+ * @param {*} [options] Override http request option.
589
+ * @throws {RequiredError}
590
+ */
591
+ getWorkflowSourceById(workflowId, options) {
592
+ return localVarFp.getWorkflowSourceById(workflowId, options).then((request) => request(axios, basePath));
593
+ },
594
+ /**
595
+ * Retrieve array with the status of all instances
596
+ * @summary Get workflow status list
597
+ * @param {*} [options] Override http request option.
598
+ * @throws {RequiredError}
599
+ */
600
+ getWorkflowStatuses(options) {
601
+ return localVarFp.getWorkflowStatuses(options).then((request) => request(axios, basePath));
602
+ },
603
+ /**
604
+ * Returns the key fields of the workflow including data on the last run instance
605
+ * @param {SearchRequest} [searchRequest] Pagination and filters
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ getWorkflowsOverview(searchRequest, options) {
610
+ return localVarFp.getWorkflowsOverview(searchRequest, options).then((request) => request(axios, basePath));
611
+ },
612
+ /**
613
+ * Retrigger an instance
614
+ * @summary Retrigger an instance
615
+ * @param {string} workflowId ID of the workflow
616
+ * @param {string} instanceId ID of the instance to retrigger
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ */
620
+ retriggerInstance(workflowId, instanceId, options) {
621
+ return localVarFp.retriggerInstance(workflowId, instanceId, options).then((request) => request(axios, basePath));
622
+ }
623
+ };
624
+ };
625
+ class DefaultApi extends base.BaseAPI {
626
+ /**
627
+ * Aborts a workflow instance identified by the provided instanceId.
628
+ * @summary Abort a workflow instance
629
+ * @param {string} instanceId The identifier of the workflow instance to abort.
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ * @memberof DefaultApi
633
+ */
634
+ abortWorkflow(instanceId, options) {
635
+ return DefaultApiFp(this.configuration).abortWorkflow(instanceId, options).then((request) => request(this.axios, this.basePath));
636
+ }
637
+ /**
638
+ * Execute a workflow
639
+ * @summary Execute a workflow
640
+ * @param {string} workflowId ID of the workflow to execute
641
+ * @param {ExecuteWorkflowRequestDTO} executeWorkflowRequestDTO
642
+ * @param {*} [options] Override http request option.
643
+ * @throws {RequiredError}
644
+ * @memberof DefaultApi
645
+ */
646
+ executeWorkflow(workflowId, executeWorkflowRequestDTO, options) {
647
+ return DefaultApiFp(this.configuration).executeWorkflow(workflowId, executeWorkflowRequestDTO, options).then((request) => request(this.axios, this.basePath));
648
+ }
649
+ /**
650
+ * Get a workflow execution/run (instance)
651
+ * @summary Get Workflow Instance by ID
652
+ * @param {string} instanceId ID of the workflow instance
653
+ * @param {boolean} [includeAssessment] Whether to include assessment
654
+ * @param {*} [options] Override http request option.
655
+ * @throws {RequiredError}
656
+ * @memberof DefaultApi
657
+ */
658
+ getInstanceById(instanceId, includeAssessment, options) {
659
+ return DefaultApiFp(this.configuration).getInstanceById(instanceId, includeAssessment, options).then((request) => request(this.axios, this.basePath));
660
+ }
661
+ /**
662
+ * Retrieve an array of workflow executions (instances)
663
+ * @summary Get instances
664
+ * @param {GetInstancesRequest} [getInstancesRequest] Parameters for retrieving instances
665
+ * @param {*} [options] Override http request option.
666
+ * @throws {RequiredError}
667
+ * @memberof DefaultApi
668
+ */
669
+ getInstances(getInstancesRequest, options) {
670
+ return DefaultApiFp(this.configuration).getInstances(getInstancesRequest, options).then((request) => request(this.axios, this.basePath));
671
+ }
672
+ /**
673
+ * Get the workflow input schema. It defines the input fields of the workflow
674
+ * @param {string} workflowId ID of the workflow to fetch
675
+ * @param {string} [instanceId] ID of instance
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ * @memberof DefaultApi
679
+ */
680
+ getWorkflowInputSchemaById(workflowId, instanceId, options) {
681
+ return DefaultApiFp(this.configuration).getWorkflowInputSchemaById(workflowId, instanceId, options).then((request) => request(this.axios, this.basePath));
682
+ }
683
+ /**
684
+ * Retrieve an array of workflow executions (instances) for the given workflow
685
+ * @summary Get instances for a specific workflow
686
+ * @param {string} workflowId ID of the workflow
687
+ * @param {SearchRequest} [searchRequest] Parameters for retrieving workflow instances
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ * @memberof DefaultApi
691
+ */
692
+ getWorkflowInstances(workflowId, searchRequest, options) {
693
+ return DefaultApiFp(this.configuration).getWorkflowInstances(workflowId, searchRequest, options).then((request) => request(this.axios, this.basePath));
694
+ }
695
+ /**
696
+ * Returns the key fields of the workflow including data on the last run instance
697
+ * @param {string} workflowId Unique identifier of the workflow
698
+ * @param {*} [options] Override http request option.
699
+ * @throws {RequiredError}
700
+ * @memberof DefaultApi
701
+ */
702
+ getWorkflowOverviewById(workflowId, options) {
703
+ return DefaultApiFp(this.configuration).getWorkflowOverviewById(workflowId, options).then((request) => request(this.axios, this.basePath));
704
+ }
705
+ /**
706
+ * Get the workflow\'s definition
707
+ * @param {string} workflowId ID of the workflow to fetch
708
+ * @param {*} [options] Override http request option.
709
+ * @throws {RequiredError}
710
+ * @memberof DefaultApi
711
+ */
712
+ getWorkflowSourceById(workflowId, options) {
713
+ return DefaultApiFp(this.configuration).getWorkflowSourceById(workflowId, options).then((request) => request(this.axios, this.basePath));
714
+ }
715
+ /**
716
+ * Retrieve array with the status of all instances
717
+ * @summary Get workflow status list
718
+ * @param {*} [options] Override http request option.
719
+ * @throws {RequiredError}
720
+ * @memberof DefaultApi
721
+ */
722
+ getWorkflowStatuses(options) {
723
+ return DefaultApiFp(this.configuration).getWorkflowStatuses(options).then((request) => request(this.axios, this.basePath));
724
+ }
725
+ /**
726
+ * Returns the key fields of the workflow including data on the last run instance
727
+ * @param {SearchRequest} [searchRequest] Pagination and filters
728
+ * @param {*} [options] Override http request option.
729
+ * @throws {RequiredError}
730
+ * @memberof DefaultApi
731
+ */
732
+ getWorkflowsOverview(searchRequest, options) {
733
+ return DefaultApiFp(this.configuration).getWorkflowsOverview(searchRequest, options).then((request) => request(this.axios, this.basePath));
734
+ }
735
+ /**
736
+ * Retrigger an instance
737
+ * @summary Retrigger an instance
738
+ * @param {string} workflowId ID of the workflow
739
+ * @param {string} instanceId ID of the instance to retrigger
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ * @memberof DefaultApi
743
+ */
744
+ retriggerInstance(workflowId, instanceId, options) {
745
+ return DefaultApiFp(this.configuration).retriggerInstance(workflowId, instanceId, options).then((request) => request(this.axios, this.basePath));
746
+ }
747
+ }
748
+
749
+ exports.DefaultApi = DefaultApi;
750
+ exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
751
+ exports.DefaultApiFactory = DefaultApiFactory;
752
+ exports.DefaultApiFp = DefaultApiFp;
753
+ exports.FieldFilterOperatorEnum = FieldFilterOperatorEnum;
754
+ exports.LogicalFilterOperatorEnum = LogicalFilterOperatorEnum;
755
+ exports.PaginationInfoDTOOrderDirectionEnum = PaginationInfoDTOOrderDirectionEnum;
756
+ exports.ProcessInstanceStatusDTO = ProcessInstanceStatusDTO;
757
+ exports.WorkflowCategoryDTO = WorkflowCategoryDTO;
758
+ exports.WorkflowFormatDTO = WorkflowFormatDTO;
759
+ exports.WorkflowResultDTOCompletedWithEnum = WorkflowResultDTOCompletedWithEnum;
760
+ exports.WorkflowResultDTOOutputsInnerFormatEnum = WorkflowResultDTOOutputsInnerFormatEnum;
761
+ //# sourceMappingURL=api.cjs.js.map