@knowledge-stack/ksapi 1.63.0 → 1.64.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.
- package/.openapi-generator/FILES +34 -0
- package/README.md +27 -2
- package/dist/apis/WorkflowDefinitionsApi.d.ts +328 -0
- package/dist/apis/WorkflowDefinitionsApi.js +345 -0
- package/dist/apis/WorkflowRunsApi.d.ts +146 -0
- package/dist/apis/WorkflowRunsApi.js +160 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +328 -0
- package/dist/esm/apis/WorkflowDefinitionsApi.js +341 -0
- package/dist/esm/apis/WorkflowRunsApi.d.ts +146 -0
- package/dist/esm/apis/WorkflowRunsApi.js +156 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/ABCDPathSnapshot.d.ts +60 -0
- package/dist/esm/models/ABCDPathSnapshot.js +53 -0
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +97 -0
- package/dist/esm/models/CreateWorkflowDefinitionRequest.js +95 -0
- package/dist/esm/models/InvokeWorkflowRequest.d.ts +47 -0
- package/dist/esm/models/InvokeWorkflowRequest.js +46 -0
- package/dist/esm/models/PaginatedResponseWorkflowDefinitionResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseWorkflowDefinitionResponse.js +70 -0
- package/dist/esm/models/PaginatedResponseWorkflowRunResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseWorkflowRunResponse.js +70 -0
- package/dist/esm/models/PartType.d.ts +2 -0
- package/dist/esm/models/PartType.js +3 -1
- package/dist/esm/models/ReferenceType.d.ts +2 -0
- package/dist/esm/models/ReferenceType.js +2 -0
- package/dist/esm/models/SelfHostedRunnerConfig.d.ts +53 -0
- package/dist/esm/models/SelfHostedRunnerConfig.js +53 -0
- package/dist/esm/models/SelfHostedRunnerConfigResponse.d.ts +47 -0
- package/dist/esm/models/SelfHostedRunnerConfigResponse.js +49 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +103 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +97 -0
- package/dist/esm/models/WorkflowCallbackResponse.d.ts +47 -0
- package/dist/esm/models/WorkflowCallbackResponse.js +44 -0
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +121 -0
- package/dist/esm/models/WorkflowDefinitionResponse.js +94 -0
- package/dist/esm/models/WorkflowRunCallbackRequest.d.ts +61 -0
- package/dist/esm/models/WorkflowRunCallbackRequest.js +57 -0
- package/dist/esm/models/WorkflowRunResponse.d.ts +110 -0
- package/dist/esm/models/WorkflowRunResponse.js +87 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +97 -0
- package/dist/esm/models/WorkflowRunSnapshot.js +78 -0
- package/dist/esm/models/WorkflowRunStatus.d.ts +27 -0
- package/dist/esm/models/WorkflowRunStatus.js +45 -0
- package/dist/esm/models/WorkflowRunnerType.d.ts +24 -0
- package/dist/esm/models/WorkflowRunnerType.js +42 -0
- package/dist/esm/models/index.d.ts +15 -0
- package/dist/esm/models/index.js +15 -0
- package/dist/models/ABCDPathSnapshot.d.ts +60 -0
- package/dist/models/ABCDPathSnapshot.js +61 -0
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +97 -0
- package/dist/models/CreateWorkflowDefinitionRequest.js +103 -0
- package/dist/models/InvokeWorkflowRequest.d.ts +47 -0
- package/dist/models/InvokeWorkflowRequest.js +54 -0
- package/dist/models/PaginatedResponseWorkflowDefinitionResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseWorkflowDefinitionResponse.js +78 -0
- package/dist/models/PaginatedResponseWorkflowRunResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseWorkflowRunResponse.js +78 -0
- package/dist/models/PartType.d.ts +2 -0
- package/dist/models/PartType.js +3 -1
- package/dist/models/ReferenceType.d.ts +2 -0
- package/dist/models/ReferenceType.js +2 -0
- package/dist/models/SelfHostedRunnerConfig.d.ts +53 -0
- package/dist/models/SelfHostedRunnerConfig.js +61 -0
- package/dist/models/SelfHostedRunnerConfigResponse.d.ts +47 -0
- package/dist/models/SelfHostedRunnerConfigResponse.js +57 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +103 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.js +105 -0
- package/dist/models/WorkflowCallbackResponse.d.ts +47 -0
- package/dist/models/WorkflowCallbackResponse.js +52 -0
- package/dist/models/WorkflowDefinitionResponse.d.ts +121 -0
- package/dist/models/WorkflowDefinitionResponse.js +102 -0
- package/dist/models/WorkflowRunCallbackRequest.d.ts +61 -0
- package/dist/models/WorkflowRunCallbackRequest.js +65 -0
- package/dist/models/WorkflowRunResponse.d.ts +110 -0
- package/dist/models/WorkflowRunResponse.js +95 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +97 -0
- package/dist/models/WorkflowRunSnapshot.js +86 -0
- package/dist/models/WorkflowRunStatus.d.ts +27 -0
- package/dist/models/WorkflowRunStatus.js +53 -0
- package/dist/models/WorkflowRunnerType.d.ts +24 -0
- package/dist/models/WorkflowRunnerType.js +50 -0
- package/dist/models/index.d.ts +15 -0
- package/dist/models/index.js +15 -0
- package/docs/ABCDPathSnapshot.md +39 -0
- package/docs/CreateWorkflowDefinitionRequest.md +51 -0
- package/docs/InvokeWorkflowRequest.md +35 -0
- package/docs/PaginatedResponseWorkflowDefinitionResponse.md +40 -0
- package/docs/PaginatedResponseWorkflowRunResponse.md +40 -0
- package/docs/SelfHostedRunnerConfig.md +37 -0
- package/docs/SelfHostedRunnerConfigResponse.md +35 -0
- package/docs/UpdateWorkflowDefinitionRequest.md +53 -0
- package/docs/WorkflowCallbackResponse.md +35 -0
- package/docs/WorkflowDefinitionResponse.md +59 -0
- package/docs/WorkflowDefinitionsApi.md +534 -0
- package/docs/WorkflowRunCallbackRequest.md +37 -0
- package/docs/WorkflowRunResponse.md +55 -0
- package/docs/WorkflowRunSnapshot.md +51 -0
- package/docs/WorkflowRunStatus.md +33 -0
- package/docs/WorkflowRunnerType.md +33 -0
- package/docs/WorkflowRunsApi.md +224 -0
- package/package.json +1 -1
- package/src/apis/WorkflowDefinitionsApi.ts +678 -0
- package/src/apis/WorkflowRunsApi.ts +296 -0
- package/src/apis/index.ts +2 -0
- package/src/models/ABCDPathSnapshot.ts +111 -0
- package/src/models/CreateWorkflowDefinitionRequest.ts +192 -0
- package/src/models/InvokeWorkflowRequest.ts +85 -0
- package/src/models/PaginatedResponseWorkflowDefinitionResponse.ts +130 -0
- package/src/models/PaginatedResponseWorkflowRunResponse.ts +130 -0
- package/src/models/PartType.ts +3 -1
- package/src/models/ReferenceType.ts +2 -0
- package/src/models/SelfHostedRunnerConfig.ts +96 -0
- package/src/models/SelfHostedRunnerConfigResponse.ts +87 -0
- package/src/models/UpdateWorkflowDefinitionRequest.ts +200 -0
- package/src/models/WorkflowCallbackResponse.ts +83 -0
- package/src/models/WorkflowDefinitionResponse.ts +208 -0
- package/src/models/WorkflowRunCallbackRequest.ts +105 -0
- package/src/models/WorkflowRunResponse.ts +197 -0
- package/src/models/WorkflowRunSnapshot.ts +172 -0
- package/src/models/WorkflowRunStatus.ts +55 -0
- package/src/models/WorkflowRunnerType.ts +52 -0
- package/src/models/index.ts +15 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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 * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
HTTPValidationError,
|
|
19
|
+
WorkflowCallbackResponse,
|
|
20
|
+
WorkflowRunCallbackRequest,
|
|
21
|
+
WorkflowRunResponse,
|
|
22
|
+
} from '../models/index';
|
|
23
|
+
import {
|
|
24
|
+
HTTPValidationErrorFromJSON,
|
|
25
|
+
HTTPValidationErrorToJSON,
|
|
26
|
+
WorkflowCallbackResponseFromJSON,
|
|
27
|
+
WorkflowCallbackResponseToJSON,
|
|
28
|
+
WorkflowRunCallbackRequestFromJSON,
|
|
29
|
+
WorkflowRunCallbackRequestToJSON,
|
|
30
|
+
WorkflowRunResponseFromJSON,
|
|
31
|
+
WorkflowRunResponseToJSON,
|
|
32
|
+
} from '../models/index';
|
|
33
|
+
|
|
34
|
+
export interface DeleteWorkflowRunRequest {
|
|
35
|
+
runId: string;
|
|
36
|
+
authorization?: string | null;
|
|
37
|
+
ksUat?: string | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface GetWorkflowRunRequest {
|
|
41
|
+
runId: string;
|
|
42
|
+
authorization?: string | null;
|
|
43
|
+
ksUat?: string | null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface WorkflowRunCallbackOperationRequest {
|
|
47
|
+
runId: string;
|
|
48
|
+
workflowRunCallbackRequest: WorkflowRunCallbackRequest;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* WorkflowRunsApi - interface
|
|
53
|
+
*
|
|
54
|
+
* @export
|
|
55
|
+
* @interface WorkflowRunsApiInterface
|
|
56
|
+
*/
|
|
57
|
+
export interface WorkflowRunsApiInterface {
|
|
58
|
+
/**
|
|
59
|
+
* Creates request options for deleteWorkflowRun without sending the request
|
|
60
|
+
* @param {string} runId
|
|
61
|
+
* @param {string} [authorization]
|
|
62
|
+
* @param {string} [ksUat]
|
|
63
|
+
* @throws {RequiredError}
|
|
64
|
+
* @memberof WorkflowRunsApiInterface
|
|
65
|
+
*/
|
|
66
|
+
deleteWorkflowRunRequestOpts(requestParameters: DeleteWorkflowRunRequest): Promise<runtime.RequestOpts>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @summary Delete Workflow Run Handler
|
|
71
|
+
* @param {string} runId
|
|
72
|
+
* @param {string} [authorization]
|
|
73
|
+
* @param {string} [ksUat]
|
|
74
|
+
* @param {*} [options] Override http request option.
|
|
75
|
+
* @throws {RequiredError}
|
|
76
|
+
* @memberof WorkflowRunsApiInterface
|
|
77
|
+
*/
|
|
78
|
+
deleteWorkflowRunRaw(requestParameters: DeleteWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Delete Workflow Run Handler
|
|
82
|
+
*/
|
|
83
|
+
deleteWorkflowRun(requestParameters: DeleteWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Creates request options for getWorkflowRun without sending the request
|
|
87
|
+
* @param {string} runId
|
|
88
|
+
* @param {string} [authorization]
|
|
89
|
+
* @param {string} [ksUat]
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
* @memberof WorkflowRunsApiInterface
|
|
92
|
+
*/
|
|
93
|
+
getWorkflowRunRequestOpts(requestParameters: GetWorkflowRunRequest): Promise<runtime.RequestOpts>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @summary Get Workflow Run Handler
|
|
98
|
+
* @param {string} runId
|
|
99
|
+
* @param {string} [authorization]
|
|
100
|
+
* @param {string} [ksUat]
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
* @memberof WorkflowRunsApiInterface
|
|
104
|
+
*/
|
|
105
|
+
getWorkflowRunRaw(requestParameters: GetWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get Workflow Run Handler
|
|
109
|
+
*/
|
|
110
|
+
getWorkflowRun(requestParameters: GetWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Creates request options for workflowRunCallback without sending the request
|
|
114
|
+
* @param {string} runId
|
|
115
|
+
* @param {WorkflowRunCallbackRequest} workflowRunCallbackRequest
|
|
116
|
+
* @throws {RequiredError}
|
|
117
|
+
* @memberof WorkflowRunsApiInterface
|
|
118
|
+
*/
|
|
119
|
+
workflowRunCallbackRequestOpts(requestParameters: WorkflowRunCallbackOperationRequest): Promise<runtime.RequestOpts>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @summary Workflow Run Callback Handler
|
|
124
|
+
* @param {string} runId
|
|
125
|
+
* @param {WorkflowRunCallbackRequest} workflowRunCallbackRequest
|
|
126
|
+
* @param {*} [options] Override http request option.
|
|
127
|
+
* @throws {RequiredError}
|
|
128
|
+
* @memberof WorkflowRunsApiInterface
|
|
129
|
+
*/
|
|
130
|
+
workflowRunCallbackRaw(requestParameters: WorkflowRunCallbackOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCallbackResponse>>;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Workflow Run Callback Handler
|
|
134
|
+
*/
|
|
135
|
+
workflowRunCallback(requestParameters: WorkflowRunCallbackOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCallbackResponse>;
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
*/
|
|
142
|
+
export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiInterface {
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Creates request options for deleteWorkflowRun without sending the request
|
|
146
|
+
*/
|
|
147
|
+
async deleteWorkflowRunRequestOpts(requestParameters: DeleteWorkflowRunRequest): Promise<runtime.RequestOpts> {
|
|
148
|
+
if (requestParameters['runId'] == null) {
|
|
149
|
+
throw new runtime.RequiredError(
|
|
150
|
+
'runId',
|
|
151
|
+
'Required parameter "runId" was null or undefined when calling deleteWorkflowRun().'
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const queryParameters: any = {};
|
|
156
|
+
|
|
157
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
158
|
+
|
|
159
|
+
if (requestParameters['authorization'] != null) {
|
|
160
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
let urlPath = `/v1/workflow-runs/{run_id}`;
|
|
165
|
+
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
path: urlPath,
|
|
169
|
+
method: 'DELETE',
|
|
170
|
+
headers: headerParameters,
|
|
171
|
+
query: queryParameters,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Delete Workflow Run Handler
|
|
177
|
+
*/
|
|
178
|
+
async deleteWorkflowRunRaw(requestParameters: DeleteWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
179
|
+
const requestOptions = await this.deleteWorkflowRunRequestOpts(requestParameters);
|
|
180
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
181
|
+
|
|
182
|
+
return new runtime.VoidApiResponse(response);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Delete Workflow Run Handler
|
|
187
|
+
*/
|
|
188
|
+
async deleteWorkflowRun(requestParameters: DeleteWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
189
|
+
await this.deleteWorkflowRunRaw(requestParameters, initOverrides);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Creates request options for getWorkflowRun without sending the request
|
|
194
|
+
*/
|
|
195
|
+
async getWorkflowRunRequestOpts(requestParameters: GetWorkflowRunRequest): Promise<runtime.RequestOpts> {
|
|
196
|
+
if (requestParameters['runId'] == null) {
|
|
197
|
+
throw new runtime.RequiredError(
|
|
198
|
+
'runId',
|
|
199
|
+
'Required parameter "runId" was null or undefined when calling getWorkflowRun().'
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const queryParameters: any = {};
|
|
204
|
+
|
|
205
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
206
|
+
|
|
207
|
+
if (requestParameters['authorization'] != null) {
|
|
208
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
let urlPath = `/v1/workflow-runs/{run_id}`;
|
|
213
|
+
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
214
|
+
|
|
215
|
+
return {
|
|
216
|
+
path: urlPath,
|
|
217
|
+
method: 'GET',
|
|
218
|
+
headers: headerParameters,
|
|
219
|
+
query: queryParameters,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Get Workflow Run Handler
|
|
225
|
+
*/
|
|
226
|
+
async getWorkflowRunRaw(requestParameters: GetWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>> {
|
|
227
|
+
const requestOptions = await this.getWorkflowRunRequestOpts(requestParameters);
|
|
228
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
229
|
+
|
|
230
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowRunResponseFromJSON(jsonValue));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Get Workflow Run Handler
|
|
235
|
+
*/
|
|
236
|
+
async getWorkflowRun(requestParameters: GetWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse> {
|
|
237
|
+
const response = await this.getWorkflowRunRaw(requestParameters, initOverrides);
|
|
238
|
+
return await response.value();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Creates request options for workflowRunCallback without sending the request
|
|
243
|
+
*/
|
|
244
|
+
async workflowRunCallbackRequestOpts(requestParameters: WorkflowRunCallbackOperationRequest): Promise<runtime.RequestOpts> {
|
|
245
|
+
if (requestParameters['runId'] == null) {
|
|
246
|
+
throw new runtime.RequiredError(
|
|
247
|
+
'runId',
|
|
248
|
+
'Required parameter "runId" was null or undefined when calling workflowRunCallback().'
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (requestParameters['workflowRunCallbackRequest'] == null) {
|
|
253
|
+
throw new runtime.RequiredError(
|
|
254
|
+
'workflowRunCallbackRequest',
|
|
255
|
+
'Required parameter "workflowRunCallbackRequest" was null or undefined when calling workflowRunCallback().'
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const queryParameters: any = {};
|
|
260
|
+
|
|
261
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
262
|
+
|
|
263
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
let urlPath = `/v1/workflow-runs/{run_id}/callback`;
|
|
267
|
+
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
268
|
+
|
|
269
|
+
return {
|
|
270
|
+
path: urlPath,
|
|
271
|
+
method: 'POST',
|
|
272
|
+
headers: headerParameters,
|
|
273
|
+
query: queryParameters,
|
|
274
|
+
body: WorkflowRunCallbackRequestToJSON(requestParameters['workflowRunCallbackRequest']),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Workflow Run Callback Handler
|
|
280
|
+
*/
|
|
281
|
+
async workflowRunCallbackRaw(requestParameters: WorkflowRunCallbackOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowCallbackResponse>> {
|
|
282
|
+
const requestOptions = await this.workflowRunCallbackRequestOpts(requestParameters);
|
|
283
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
284
|
+
|
|
285
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowCallbackResponseFromJSON(jsonValue));
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Workflow Run Callback Handler
|
|
290
|
+
*/
|
|
291
|
+
async workflowRunCallback(requestParameters: WorkflowRunCallbackOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowCallbackResponse> {
|
|
292
|
+
const response = await this.workflowRunCallbackRaw(requestParameters, initOverrides);
|
|
293
|
+
return await response.value();
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PartType } from './PartType';
|
|
17
|
+
import {
|
|
18
|
+
PartTypeFromJSON,
|
|
19
|
+
PartTypeFromJSONTyped,
|
|
20
|
+
PartTypeToJSON,
|
|
21
|
+
PartTypeToJSONTyped,
|
|
22
|
+
} from './PartType';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Snapshot of a single ABCD path reference at trigger time.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ABCDPathSnapshot
|
|
28
|
+
*/
|
|
29
|
+
export interface ABCDPathSnapshot {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ABCDPathSnapshot
|
|
34
|
+
*/
|
|
35
|
+
pathPartId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ABCDPathSnapshot
|
|
40
|
+
*/
|
|
41
|
+
materializedPath: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {PartType}
|
|
45
|
+
* @memberof ABCDPathSnapshot
|
|
46
|
+
*/
|
|
47
|
+
partType: PartType;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the ABCDPathSnapshot interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfABCDPathSnapshot(value: object): value is ABCDPathSnapshot {
|
|
56
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
57
|
+
if (!('materializedPath' in value) || value['materializedPath'] === undefined) return false;
|
|
58
|
+
if (!('partType' in value) || value['partType'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ABCDPathSnapshotFromJSON(json: any): ABCDPathSnapshot {
|
|
63
|
+
return ABCDPathSnapshotFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function ABCDPathSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): ABCDPathSnapshot {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'pathPartId': json['path_part_id'],
|
|
73
|
+
'materializedPath': json['materialized_path'],
|
|
74
|
+
'partType': PartTypeFromJSON(json['part_type']),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function ABCDPathSnapshotToJSON(json: any): ABCDPathSnapshot {
|
|
79
|
+
return ABCDPathSnapshotToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function ABCDPathSnapshotToJSONTyped(value?: ABCDPathSnapshot | null, ignoreDiscriminator: boolean = false): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'path_part_id': value['pathPartId'],
|
|
90
|
+
'materialized_path': value['materializedPath'],
|
|
91
|
+
'part_type': PartTypeToJSON(value['partType']),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const ABCDPathSnapshotPropertyValidationAttributesMap: {
|
|
96
|
+
[property: string]: {
|
|
97
|
+
maxLength?: number,
|
|
98
|
+
minLength?: number,
|
|
99
|
+
pattern?: string,
|
|
100
|
+
maximum?: number,
|
|
101
|
+
exclusiveMaximum?: boolean,
|
|
102
|
+
minimum?: number,
|
|
103
|
+
exclusiveMinimum?: boolean,
|
|
104
|
+
multipleOf?: number,
|
|
105
|
+
maxItems?: number,
|
|
106
|
+
minItems?: number,
|
|
107
|
+
uniqueItems?: boolean
|
|
108
|
+
}
|
|
109
|
+
} = {
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { SelfHostedRunnerConfig } from './SelfHostedRunnerConfig';
|
|
17
|
+
import {
|
|
18
|
+
SelfHostedRunnerConfigFromJSON,
|
|
19
|
+
SelfHostedRunnerConfigFromJSONTyped,
|
|
20
|
+
SelfHostedRunnerConfigToJSON,
|
|
21
|
+
SelfHostedRunnerConfigToJSONTyped,
|
|
22
|
+
} from './SelfHostedRunnerConfig';
|
|
23
|
+
import type { WorkflowRunnerType } from './WorkflowRunnerType';
|
|
24
|
+
import {
|
|
25
|
+
WorkflowRunnerTypeFromJSON,
|
|
26
|
+
WorkflowRunnerTypeFromJSONTyped,
|
|
27
|
+
WorkflowRunnerTypeToJSON,
|
|
28
|
+
WorkflowRunnerTypeToJSONTyped,
|
|
29
|
+
} from './WorkflowRunnerType';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Create a new workflow definition.
|
|
33
|
+
* @export
|
|
34
|
+
* @interface CreateWorkflowDefinitionRequest
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateWorkflowDefinitionRequest {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
47
|
+
*/
|
|
48
|
+
description?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {WorkflowRunnerType}
|
|
52
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
53
|
+
*/
|
|
54
|
+
runnerType: WorkflowRunnerType;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {SelfHostedRunnerConfig}
|
|
58
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
59
|
+
*/
|
|
60
|
+
runnerConfig?: SelfHostedRunnerConfig;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
65
|
+
*/
|
|
66
|
+
maxRunDurationSeconds?: number;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {Array<string>}
|
|
70
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
71
|
+
*/
|
|
72
|
+
sourcePathPartIds: Array<string>;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {Array<string>}
|
|
76
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
77
|
+
*/
|
|
78
|
+
instructionPathPartIds: Array<string>;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Array<string>}
|
|
82
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
83
|
+
*/
|
|
84
|
+
outputPathPartIds: Array<string>;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
89
|
+
*/
|
|
90
|
+
templatePathPartId?: string | null;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Check if a given object implements the CreateWorkflowDefinitionRequest interface.
|
|
97
|
+
*/
|
|
98
|
+
export function instanceOfCreateWorkflowDefinitionRequest(value: object): value is CreateWorkflowDefinitionRequest {
|
|
99
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
100
|
+
if (!('runnerType' in value) || value['runnerType'] === undefined) return false;
|
|
101
|
+
if (!('sourcePathPartIds' in value) || value['sourcePathPartIds'] === undefined) return false;
|
|
102
|
+
if (!('instructionPathPartIds' in value) || value['instructionPathPartIds'] === undefined) return false;
|
|
103
|
+
if (!('outputPathPartIds' in value) || value['outputPathPartIds'] === undefined) return false;
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function CreateWorkflowDefinitionRequestFromJSON(json: any): CreateWorkflowDefinitionRequest {
|
|
108
|
+
return CreateWorkflowDefinitionRequestFromJSONTyped(json, false);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function CreateWorkflowDefinitionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWorkflowDefinitionRequest {
|
|
112
|
+
if (json == null) {
|
|
113
|
+
return json;
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'name': json['name'],
|
|
118
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
119
|
+
'runnerType': WorkflowRunnerTypeFromJSON(json['runner_type']),
|
|
120
|
+
'runnerConfig': json['runner_config'] == null ? undefined : SelfHostedRunnerConfigFromJSON(json['runner_config']),
|
|
121
|
+
'maxRunDurationSeconds': json['max_run_duration_seconds'] == null ? undefined : json['max_run_duration_seconds'],
|
|
122
|
+
'sourcePathPartIds': json['source_path_part_ids'],
|
|
123
|
+
'instructionPathPartIds': json['instruction_path_part_ids'],
|
|
124
|
+
'outputPathPartIds': json['output_path_part_ids'],
|
|
125
|
+
'templatePathPartId': json['template_path_part_id'] == null ? undefined : json['template_path_part_id'],
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function CreateWorkflowDefinitionRequestToJSON(json: any): CreateWorkflowDefinitionRequest {
|
|
130
|
+
return CreateWorkflowDefinitionRequestToJSONTyped(json, false);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function CreateWorkflowDefinitionRequestToJSONTyped(value?: CreateWorkflowDefinitionRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
134
|
+
if (value == null) {
|
|
135
|
+
return value;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
|
|
140
|
+
'name': value['name'],
|
|
141
|
+
'description': value['description'],
|
|
142
|
+
'runner_type': WorkflowRunnerTypeToJSON(value['runnerType']),
|
|
143
|
+
'runner_config': SelfHostedRunnerConfigToJSON(value['runnerConfig']),
|
|
144
|
+
'max_run_duration_seconds': value['maxRunDurationSeconds'],
|
|
145
|
+
'source_path_part_ids': value['sourcePathPartIds'],
|
|
146
|
+
'instruction_path_part_ids': value['instructionPathPartIds'],
|
|
147
|
+
'output_path_part_ids': value['outputPathPartIds'],
|
|
148
|
+
'template_path_part_id': value['templatePathPartId'],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export const CreateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
|
|
153
|
+
[property: string]: {
|
|
154
|
+
maxLength?: number,
|
|
155
|
+
minLength?: number,
|
|
156
|
+
pattern?: string,
|
|
157
|
+
maximum?: number,
|
|
158
|
+
exclusiveMaximum?: boolean,
|
|
159
|
+
minimum?: number,
|
|
160
|
+
exclusiveMinimum?: boolean,
|
|
161
|
+
multipleOf?: number,
|
|
162
|
+
maxItems?: number,
|
|
163
|
+
minItems?: number,
|
|
164
|
+
uniqueItems?: boolean
|
|
165
|
+
}
|
|
166
|
+
} = {
|
|
167
|
+
name: {
|
|
168
|
+
maxLength: 255,
|
|
169
|
+
},
|
|
170
|
+
maxRunDurationSeconds: {
|
|
171
|
+
maximum: 86400,
|
|
172
|
+
exclusiveMaximum: false,
|
|
173
|
+
minimum: 60,
|
|
174
|
+
exclusiveMinimum: false,
|
|
175
|
+
},
|
|
176
|
+
sourcePathPartIds: {
|
|
177
|
+
maxItems: 20,
|
|
178
|
+
minItems: 1,
|
|
179
|
+
uniqueItems: false,
|
|
180
|
+
},
|
|
181
|
+
instructionPathPartIds: {
|
|
182
|
+
maxItems: 20,
|
|
183
|
+
minItems: 1,
|
|
184
|
+
uniqueItems: false,
|
|
185
|
+
},
|
|
186
|
+
outputPathPartIds: {
|
|
187
|
+
maxItems: 20,
|
|
188
|
+
minItems: 1,
|
|
189
|
+
uniqueItems: false,
|
|
190
|
+
},
|
|
191
|
+
}
|
|
192
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Request body for invoking a workflow definition.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface InvokeWorkflowRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface InvokeWorkflowRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Optional key to prevent duplicate runs from retries
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof InvokeWorkflowRequest
|
|
26
|
+
*/
|
|
27
|
+
idempotencyKey?: string | null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the InvokeWorkflowRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfInvokeWorkflowRequest(value: object): value is InvokeWorkflowRequest {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function InvokeWorkflowRequestFromJSON(json: any): InvokeWorkflowRequest {
|
|
38
|
+
return InvokeWorkflowRequestFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function InvokeWorkflowRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvokeWorkflowRequest {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'idempotencyKey': json['idempotency_key'] == null ? undefined : json['idempotency_key'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function InvokeWorkflowRequestToJSON(json: any): InvokeWorkflowRequest {
|
|
52
|
+
return InvokeWorkflowRequestToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function InvokeWorkflowRequestToJSONTyped(value?: InvokeWorkflowRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'idempotency_key': value['idempotencyKey'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const InvokeWorkflowRequestPropertyValidationAttributesMap: {
|
|
67
|
+
[property: string]: {
|
|
68
|
+
maxLength?: number,
|
|
69
|
+
minLength?: number,
|
|
70
|
+
pattern?: string,
|
|
71
|
+
maximum?: number,
|
|
72
|
+
exclusiveMaximum?: boolean,
|
|
73
|
+
minimum?: number,
|
|
74
|
+
exclusiveMinimum?: boolean,
|
|
75
|
+
multipleOf?: number,
|
|
76
|
+
maxItems?: number,
|
|
77
|
+
minItems?: number,
|
|
78
|
+
uniqueItems?: boolean
|
|
79
|
+
}
|
|
80
|
+
} = {
|
|
81
|
+
idempotencyKey: {
|
|
82
|
+
maxLength: 255,
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
|