@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,534 @@
|
|
|
1
|
+
# WorkflowDefinitionsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createWorkflowDefinition**](WorkflowDefinitionsApi.md#createworkflowdefinitionoperation) | **POST** /v1/workflow-definitions | Create Workflow Definition Handler |
|
|
8
|
+
| [**deleteWorkflowDefinition**](WorkflowDefinitionsApi.md#deleteworkflowdefinition) | **DELETE** /v1/workflow-definitions/{definition_id} | Delete Workflow Definition Handler |
|
|
9
|
+
| [**getWorkflowDefinition**](WorkflowDefinitionsApi.md#getworkflowdefinition) | **GET** /v1/workflow-definitions/{definition_id} | Get Workflow Definition Handler |
|
|
10
|
+
| [**invokeWorkflow**](WorkflowDefinitionsApi.md#invokeworkflowoperation) | **POST** /v1/workflow-definitions/{definition_id}/invoke | Invoke Workflow Handler |
|
|
11
|
+
| [**listWorkflowDefinitions**](WorkflowDefinitionsApi.md#listworkflowdefinitions) | **GET** /v1/workflow-definitions | List Workflow Definitions Handler |
|
|
12
|
+
| [**listWorkflowRuns**](WorkflowDefinitionsApi.md#listworkflowruns) | **GET** /v1/workflow-definitions/{definition_id}/runs | List Workflow Runs Handler |
|
|
13
|
+
| [**updateWorkflowDefinition**](WorkflowDefinitionsApi.md#updateworkflowdefinitionoperation) | **PUT** /v1/workflow-definitions/{definition_id} | Update Workflow Definition Handler |
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## createWorkflowDefinition
|
|
18
|
+
|
|
19
|
+
> WorkflowDefinitionResponse createWorkflowDefinition(createWorkflowDefinitionRequest, authorization, ksUat)
|
|
20
|
+
|
|
21
|
+
Create Workflow Definition Handler
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import {
|
|
27
|
+
Configuration,
|
|
28
|
+
WorkflowDefinitionsApi,
|
|
29
|
+
} from '@knowledge-stack/ksapi';
|
|
30
|
+
import type { CreateWorkflowDefinitionOperationRequest } from '@knowledge-stack/ksapi';
|
|
31
|
+
|
|
32
|
+
async function example() {
|
|
33
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
34
|
+
const api = new WorkflowDefinitionsApi();
|
|
35
|
+
|
|
36
|
+
const body = {
|
|
37
|
+
// CreateWorkflowDefinitionRequest
|
|
38
|
+
createWorkflowDefinitionRequest: ...,
|
|
39
|
+
// string (optional)
|
|
40
|
+
authorization: authorization_example,
|
|
41
|
+
// string (optional)
|
|
42
|
+
ksUat: ksUat_example,
|
|
43
|
+
} satisfies CreateWorkflowDefinitionOperationRequest;
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const data = await api.createWorkflowDefinition(body);
|
|
47
|
+
console.log(data);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Run the test
|
|
54
|
+
example().catch(console.error);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description | Notes |
|
|
61
|
+
|------------- | ------------- | ------------- | -------------|
|
|
62
|
+
| **createWorkflowDefinitionRequest** | [CreateWorkflowDefinitionRequest](CreateWorkflowDefinitionRequest.md) | | |
|
|
63
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
64
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**WorkflowDefinitionResponse**](WorkflowDefinitionResponse.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
No authorization required
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: `application/json`
|
|
77
|
+
- **Accept**: `application/json`
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### HTTP response details
|
|
81
|
+
| Status code | Description | Response headers |
|
|
82
|
+
|-------------|-------------|------------------|
|
|
83
|
+
| **201** | Successful Response | - |
|
|
84
|
+
| **422** | Validation Error | - |
|
|
85
|
+
|
|
86
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## deleteWorkflowDefinition
|
|
90
|
+
|
|
91
|
+
> deleteWorkflowDefinition(definitionId, authorization, ksUat)
|
|
92
|
+
|
|
93
|
+
Delete Workflow Definition Handler
|
|
94
|
+
|
|
95
|
+
### Example
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import {
|
|
99
|
+
Configuration,
|
|
100
|
+
WorkflowDefinitionsApi,
|
|
101
|
+
} from '@knowledge-stack/ksapi';
|
|
102
|
+
import type { DeleteWorkflowDefinitionRequest } from '@knowledge-stack/ksapi';
|
|
103
|
+
|
|
104
|
+
async function example() {
|
|
105
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
106
|
+
const api = new WorkflowDefinitionsApi();
|
|
107
|
+
|
|
108
|
+
const body = {
|
|
109
|
+
// string
|
|
110
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
111
|
+
// string (optional)
|
|
112
|
+
authorization: authorization_example,
|
|
113
|
+
// string (optional)
|
|
114
|
+
ksUat: ksUat_example,
|
|
115
|
+
} satisfies DeleteWorkflowDefinitionRequest;
|
|
116
|
+
|
|
117
|
+
try {
|
|
118
|
+
const data = await api.deleteWorkflowDefinition(body);
|
|
119
|
+
console.log(data);
|
|
120
|
+
} catch (error) {
|
|
121
|
+
console.error(error);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Run the test
|
|
126
|
+
example().catch(console.error);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Parameters
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
| Name | Type | Description | Notes |
|
|
133
|
+
|------------- | ------------- | ------------- | -------------|
|
|
134
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
135
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
136
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
137
|
+
|
|
138
|
+
### Return type
|
|
139
|
+
|
|
140
|
+
`void` (Empty response body)
|
|
141
|
+
|
|
142
|
+
### Authorization
|
|
143
|
+
|
|
144
|
+
No authorization required
|
|
145
|
+
|
|
146
|
+
### HTTP request headers
|
|
147
|
+
|
|
148
|
+
- **Content-Type**: Not defined
|
|
149
|
+
- **Accept**: `application/json`
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### HTTP response details
|
|
153
|
+
| Status code | Description | Response headers |
|
|
154
|
+
|-------------|-------------|------------------|
|
|
155
|
+
| **204** | Successful Response | - |
|
|
156
|
+
| **422** | Validation Error | - |
|
|
157
|
+
|
|
158
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
## getWorkflowDefinition
|
|
162
|
+
|
|
163
|
+
> WorkflowDefinitionResponse getWorkflowDefinition(definitionId, authorization, ksUat)
|
|
164
|
+
|
|
165
|
+
Get Workflow Definition Handler
|
|
166
|
+
|
|
167
|
+
### Example
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
import {
|
|
171
|
+
Configuration,
|
|
172
|
+
WorkflowDefinitionsApi,
|
|
173
|
+
} from '@knowledge-stack/ksapi';
|
|
174
|
+
import type { GetWorkflowDefinitionRequest } from '@knowledge-stack/ksapi';
|
|
175
|
+
|
|
176
|
+
async function example() {
|
|
177
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
178
|
+
const api = new WorkflowDefinitionsApi();
|
|
179
|
+
|
|
180
|
+
const body = {
|
|
181
|
+
// string
|
|
182
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
183
|
+
// string (optional)
|
|
184
|
+
authorization: authorization_example,
|
|
185
|
+
// string (optional)
|
|
186
|
+
ksUat: ksUat_example,
|
|
187
|
+
} satisfies GetWorkflowDefinitionRequest;
|
|
188
|
+
|
|
189
|
+
try {
|
|
190
|
+
const data = await api.getWorkflowDefinition(body);
|
|
191
|
+
console.log(data);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error(error);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Run the test
|
|
198
|
+
example().catch(console.error);
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
| Name | Type | Description | Notes |
|
|
205
|
+
|------------- | ------------- | ------------- | -------------|
|
|
206
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
207
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
208
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
209
|
+
|
|
210
|
+
### Return type
|
|
211
|
+
|
|
212
|
+
[**WorkflowDefinitionResponse**](WorkflowDefinitionResponse.md)
|
|
213
|
+
|
|
214
|
+
### Authorization
|
|
215
|
+
|
|
216
|
+
No authorization required
|
|
217
|
+
|
|
218
|
+
### HTTP request headers
|
|
219
|
+
|
|
220
|
+
- **Content-Type**: Not defined
|
|
221
|
+
- **Accept**: `application/json`
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### HTTP response details
|
|
225
|
+
| Status code | Description | Response headers |
|
|
226
|
+
|-------------|-------------|------------------|
|
|
227
|
+
| **200** | Successful Response | - |
|
|
228
|
+
| **422** | Validation Error | - |
|
|
229
|
+
|
|
230
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## invokeWorkflow
|
|
234
|
+
|
|
235
|
+
> WorkflowRunResponse invokeWorkflow(definitionId, invokeWorkflowRequest, authorization, ksUat)
|
|
236
|
+
|
|
237
|
+
Invoke Workflow Handler
|
|
238
|
+
|
|
239
|
+
### Example
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
import {
|
|
243
|
+
Configuration,
|
|
244
|
+
WorkflowDefinitionsApi,
|
|
245
|
+
} from '@knowledge-stack/ksapi';
|
|
246
|
+
import type { InvokeWorkflowOperationRequest } from '@knowledge-stack/ksapi';
|
|
247
|
+
|
|
248
|
+
async function example() {
|
|
249
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
250
|
+
const api = new WorkflowDefinitionsApi();
|
|
251
|
+
|
|
252
|
+
const body = {
|
|
253
|
+
// string
|
|
254
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
255
|
+
// InvokeWorkflowRequest
|
|
256
|
+
invokeWorkflowRequest: ...,
|
|
257
|
+
// string (optional)
|
|
258
|
+
authorization: authorization_example,
|
|
259
|
+
// string (optional)
|
|
260
|
+
ksUat: ksUat_example,
|
|
261
|
+
} satisfies InvokeWorkflowOperationRequest;
|
|
262
|
+
|
|
263
|
+
try {
|
|
264
|
+
const data = await api.invokeWorkflow(body);
|
|
265
|
+
console.log(data);
|
|
266
|
+
} catch (error) {
|
|
267
|
+
console.error(error);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Run the test
|
|
272
|
+
example().catch(console.error);
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Parameters
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
| Name | Type | Description | Notes |
|
|
279
|
+
|------------- | ------------- | ------------- | -------------|
|
|
280
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
281
|
+
| **invokeWorkflowRequest** | [InvokeWorkflowRequest](InvokeWorkflowRequest.md) | | |
|
|
282
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
283
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
284
|
+
|
|
285
|
+
### Return type
|
|
286
|
+
|
|
287
|
+
[**WorkflowRunResponse**](WorkflowRunResponse.md)
|
|
288
|
+
|
|
289
|
+
### Authorization
|
|
290
|
+
|
|
291
|
+
No authorization required
|
|
292
|
+
|
|
293
|
+
### HTTP request headers
|
|
294
|
+
|
|
295
|
+
- **Content-Type**: `application/json`
|
|
296
|
+
- **Accept**: `application/json`
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
### HTTP response details
|
|
300
|
+
| Status code | Description | Response headers |
|
|
301
|
+
|-------------|-------------|------------------|
|
|
302
|
+
| **202** | Successful Response | - |
|
|
303
|
+
| **422** | Validation Error | - |
|
|
304
|
+
|
|
305
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
## listWorkflowDefinitions
|
|
309
|
+
|
|
310
|
+
> PaginatedResponseWorkflowDefinitionResponse listWorkflowDefinitions(limit, offset, authorization, ksUat)
|
|
311
|
+
|
|
312
|
+
List Workflow Definitions Handler
|
|
313
|
+
|
|
314
|
+
### Example
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
import {
|
|
318
|
+
Configuration,
|
|
319
|
+
WorkflowDefinitionsApi,
|
|
320
|
+
} from '@knowledge-stack/ksapi';
|
|
321
|
+
import type { ListWorkflowDefinitionsRequest } from '@knowledge-stack/ksapi';
|
|
322
|
+
|
|
323
|
+
async function example() {
|
|
324
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
325
|
+
const api = new WorkflowDefinitionsApi();
|
|
326
|
+
|
|
327
|
+
const body = {
|
|
328
|
+
// number | Number of items per page (optional)
|
|
329
|
+
limit: 56,
|
|
330
|
+
// number | Number of items to skip (optional)
|
|
331
|
+
offset: 56,
|
|
332
|
+
// string (optional)
|
|
333
|
+
authorization: authorization_example,
|
|
334
|
+
// string (optional)
|
|
335
|
+
ksUat: ksUat_example,
|
|
336
|
+
} satisfies ListWorkflowDefinitionsRequest;
|
|
337
|
+
|
|
338
|
+
try {
|
|
339
|
+
const data = await api.listWorkflowDefinitions(body);
|
|
340
|
+
console.log(data);
|
|
341
|
+
} catch (error) {
|
|
342
|
+
console.error(error);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Run the test
|
|
347
|
+
example().catch(console.error);
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Parameters
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
| Name | Type | Description | Notes |
|
|
354
|
+
|------------- | ------------- | ------------- | -------------|
|
|
355
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
356
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
357
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
358
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
359
|
+
|
|
360
|
+
### Return type
|
|
361
|
+
|
|
362
|
+
[**PaginatedResponseWorkflowDefinitionResponse**](PaginatedResponseWorkflowDefinitionResponse.md)
|
|
363
|
+
|
|
364
|
+
### Authorization
|
|
365
|
+
|
|
366
|
+
No authorization required
|
|
367
|
+
|
|
368
|
+
### HTTP request headers
|
|
369
|
+
|
|
370
|
+
- **Content-Type**: Not defined
|
|
371
|
+
- **Accept**: `application/json`
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
### HTTP response details
|
|
375
|
+
| Status code | Description | Response headers |
|
|
376
|
+
|-------------|-------------|------------------|
|
|
377
|
+
| **200** | Successful Response | - |
|
|
378
|
+
| **422** | Validation Error | - |
|
|
379
|
+
|
|
380
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
## listWorkflowRuns
|
|
384
|
+
|
|
385
|
+
> PaginatedResponseWorkflowRunResponse listWorkflowRuns(definitionId, limit, offset, authorization, ksUat)
|
|
386
|
+
|
|
387
|
+
List Workflow Runs Handler
|
|
388
|
+
|
|
389
|
+
### Example
|
|
390
|
+
|
|
391
|
+
```ts
|
|
392
|
+
import {
|
|
393
|
+
Configuration,
|
|
394
|
+
WorkflowDefinitionsApi,
|
|
395
|
+
} from '@knowledge-stack/ksapi';
|
|
396
|
+
import type { ListWorkflowRunsRequest } from '@knowledge-stack/ksapi';
|
|
397
|
+
|
|
398
|
+
async function example() {
|
|
399
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
400
|
+
const api = new WorkflowDefinitionsApi();
|
|
401
|
+
|
|
402
|
+
const body = {
|
|
403
|
+
// string
|
|
404
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
405
|
+
// number | Number of items per page (optional)
|
|
406
|
+
limit: 56,
|
|
407
|
+
// number | Number of items to skip (optional)
|
|
408
|
+
offset: 56,
|
|
409
|
+
// string (optional)
|
|
410
|
+
authorization: authorization_example,
|
|
411
|
+
// string (optional)
|
|
412
|
+
ksUat: ksUat_example,
|
|
413
|
+
} satisfies ListWorkflowRunsRequest;
|
|
414
|
+
|
|
415
|
+
try {
|
|
416
|
+
const data = await api.listWorkflowRuns(body);
|
|
417
|
+
console.log(data);
|
|
418
|
+
} catch (error) {
|
|
419
|
+
console.error(error);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// Run the test
|
|
424
|
+
example().catch(console.error);
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### Parameters
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
| Name | Type | Description | Notes |
|
|
431
|
+
|------------- | ------------- | ------------- | -------------|
|
|
432
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
433
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
434
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
435
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
436
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
437
|
+
|
|
438
|
+
### Return type
|
|
439
|
+
|
|
440
|
+
[**PaginatedResponseWorkflowRunResponse**](PaginatedResponseWorkflowRunResponse.md)
|
|
441
|
+
|
|
442
|
+
### Authorization
|
|
443
|
+
|
|
444
|
+
No authorization required
|
|
445
|
+
|
|
446
|
+
### HTTP request headers
|
|
447
|
+
|
|
448
|
+
- **Content-Type**: Not defined
|
|
449
|
+
- **Accept**: `application/json`
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
### HTTP response details
|
|
453
|
+
| Status code | Description | Response headers |
|
|
454
|
+
|-------------|-------------|------------------|
|
|
455
|
+
| **200** | Successful Response | - |
|
|
456
|
+
| **422** | Validation Error | - |
|
|
457
|
+
|
|
458
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
## updateWorkflowDefinition
|
|
462
|
+
|
|
463
|
+
> WorkflowDefinitionResponse updateWorkflowDefinition(definitionId, updateWorkflowDefinitionRequest, authorization, ksUat)
|
|
464
|
+
|
|
465
|
+
Update Workflow Definition Handler
|
|
466
|
+
|
|
467
|
+
### Example
|
|
468
|
+
|
|
469
|
+
```ts
|
|
470
|
+
import {
|
|
471
|
+
Configuration,
|
|
472
|
+
WorkflowDefinitionsApi,
|
|
473
|
+
} from '@knowledge-stack/ksapi';
|
|
474
|
+
import type { UpdateWorkflowDefinitionOperationRequest } from '@knowledge-stack/ksapi';
|
|
475
|
+
|
|
476
|
+
async function example() {
|
|
477
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
478
|
+
const api = new WorkflowDefinitionsApi();
|
|
479
|
+
|
|
480
|
+
const body = {
|
|
481
|
+
// string
|
|
482
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
483
|
+
// UpdateWorkflowDefinitionRequest
|
|
484
|
+
updateWorkflowDefinitionRequest: ...,
|
|
485
|
+
// string (optional)
|
|
486
|
+
authorization: authorization_example,
|
|
487
|
+
// string (optional)
|
|
488
|
+
ksUat: ksUat_example,
|
|
489
|
+
} satisfies UpdateWorkflowDefinitionOperationRequest;
|
|
490
|
+
|
|
491
|
+
try {
|
|
492
|
+
const data = await api.updateWorkflowDefinition(body);
|
|
493
|
+
console.log(data);
|
|
494
|
+
} catch (error) {
|
|
495
|
+
console.error(error);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// Run the test
|
|
500
|
+
example().catch(console.error);
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Parameters
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
| Name | Type | Description | Notes |
|
|
507
|
+
|------------- | ------------- | ------------- | -------------|
|
|
508
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
509
|
+
| **updateWorkflowDefinitionRequest** | [UpdateWorkflowDefinitionRequest](UpdateWorkflowDefinitionRequest.md) | | |
|
|
510
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
511
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
512
|
+
|
|
513
|
+
### Return type
|
|
514
|
+
|
|
515
|
+
[**WorkflowDefinitionResponse**](WorkflowDefinitionResponse.md)
|
|
516
|
+
|
|
517
|
+
### Authorization
|
|
518
|
+
|
|
519
|
+
No authorization required
|
|
520
|
+
|
|
521
|
+
### HTTP request headers
|
|
522
|
+
|
|
523
|
+
- **Content-Type**: `application/json`
|
|
524
|
+
- **Accept**: `application/json`
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
### HTTP response details
|
|
528
|
+
| Status code | Description | Response headers |
|
|
529
|
+
|-------------|-------------|------------------|
|
|
530
|
+
| **200** | Successful Response | - |
|
|
531
|
+
| **422** | Validation Error | - |
|
|
532
|
+
|
|
533
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
534
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# WorkflowRunCallbackRequest
|
|
3
|
+
|
|
4
|
+
Request body for the runner callback endpoint.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`status` | string
|
|
11
|
+
`error` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { WorkflowRunCallbackRequest } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"status": null,
|
|
21
|
+
"error": null,
|
|
22
|
+
} satisfies WorkflowRunCallbackRequest
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as WorkflowRunCallbackRequest
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
# WorkflowRunResponse
|
|
3
|
+
|
|
4
|
+
Workflow run response.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`workflowDefinitionId` | string
|
|
12
|
+
`userId` | string
|
|
13
|
+
`runnerType` | [WorkflowRunnerType](WorkflowRunnerType.md)
|
|
14
|
+
`status` | [WorkflowRunStatus](WorkflowRunStatus.md)
|
|
15
|
+
`startedAt` | Date
|
|
16
|
+
`completedAt` | Date
|
|
17
|
+
`runSnapshot` | [WorkflowRunSnapshot](WorkflowRunSnapshot.md)
|
|
18
|
+
`error` | string
|
|
19
|
+
`createdAt` | Date
|
|
20
|
+
`updatedAt` | Date
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import type { WorkflowRunResponse } from '@knowledge-stack/ksapi'
|
|
26
|
+
|
|
27
|
+
// TODO: Update the object below with actual values
|
|
28
|
+
const example = {
|
|
29
|
+
"id": null,
|
|
30
|
+
"workflowDefinitionId": null,
|
|
31
|
+
"userId": null,
|
|
32
|
+
"runnerType": null,
|
|
33
|
+
"status": null,
|
|
34
|
+
"startedAt": null,
|
|
35
|
+
"completedAt": null,
|
|
36
|
+
"runSnapshot": null,
|
|
37
|
+
"error": null,
|
|
38
|
+
"createdAt": null,
|
|
39
|
+
"updatedAt": null,
|
|
40
|
+
} satisfies WorkflowRunResponse
|
|
41
|
+
|
|
42
|
+
console.log(example)
|
|
43
|
+
|
|
44
|
+
// Convert the instance to a JSON string
|
|
45
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
46
|
+
console.log(exampleJSON)
|
|
47
|
+
|
|
48
|
+
// Parse the JSON string back to an object
|
|
49
|
+
const exampleParsed = JSON.parse(exampleJSON) as WorkflowRunResponse
|
|
50
|
+
console.log(exampleParsed)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
54
|
+
|
|
55
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
# WorkflowRunSnapshot
|
|
3
|
+
|
|
4
|
+
Frozen ABCD configuration captured at workflow trigger time.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`workflowDefinitionId` | string
|
|
11
|
+
`workflowName` | string
|
|
12
|
+
`runnerType` | [WorkflowRunnerType](WorkflowRunnerType.md)
|
|
13
|
+
`userId` | string
|
|
14
|
+
`maxRunDurationSeconds` | number
|
|
15
|
+
`sources` | [Array<ABCDPathSnapshot>](ABCDPathSnapshot.md)
|
|
16
|
+
`instructions` | [Array<ABCDPathSnapshot>](ABCDPathSnapshot.md)
|
|
17
|
+
`outputs` | [Array<ABCDPathSnapshot>](ABCDPathSnapshot.md)
|
|
18
|
+
`template` | [ABCDPathSnapshot](ABCDPathSnapshot.md)
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { WorkflowRunSnapshot } from '@knowledge-stack/ksapi'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"workflowDefinitionId": null,
|
|
28
|
+
"workflowName": null,
|
|
29
|
+
"runnerType": null,
|
|
30
|
+
"userId": null,
|
|
31
|
+
"maxRunDurationSeconds": null,
|
|
32
|
+
"sources": null,
|
|
33
|
+
"instructions": null,
|
|
34
|
+
"outputs": null,
|
|
35
|
+
"template": null,
|
|
36
|
+
} satisfies WorkflowRunSnapshot
|
|
37
|
+
|
|
38
|
+
console.log(example)
|
|
39
|
+
|
|
40
|
+
// Convert the instance to a JSON string
|
|
41
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
42
|
+
console.log(exampleJSON)
|
|
43
|
+
|
|
44
|
+
// Parse the JSON string back to an object
|
|
45
|
+
const exampleParsed = JSON.parse(exampleJSON) as WorkflowRunSnapshot
|
|
46
|
+
console.log(exampleParsed)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
50
|
+
|
|
51
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# WorkflowRunStatus
|
|
3
|
+
|
|
4
|
+
Lifecycle status of a workflow run.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { WorkflowRunStatus } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies WorkflowRunStatus
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as WorkflowRunStatus
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|