@knowledge-stack/ksapi 3.16.2 → 3.17.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 +26 -4
- package/README.md +23 -4
- package/dist/apis/MemoryApi.d.ts +5 -5
- package/dist/apis/MemoryApi.js +1 -1
- package/dist/apis/WorkflowMemoryApi.d.ts +17 -17
- package/dist/apis/WorkflowMemoryApi.js +4 -4
- package/dist/apis/WorkflowRepositoryApi.d.ts +419 -0
- package/dist/apis/WorkflowRepositoryApi.js +595 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/MemoryApi.d.ts +5 -5
- package/dist/esm/apis/MemoryApi.js +2 -2
- package/dist/esm/apis/WorkflowMemoryApi.d.ts +17 -17
- package/dist/esm/apis/WorkflowMemoryApi.js +5 -5
- package/dist/esm/apis/WorkflowRepositoryApi.d.ts +419 -0
- package/dist/esm/apis/WorkflowRepositoryApi.js +558 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ErrorResponse.d.ts +7 -0
- package/dist/esm/models/ErrorResponse.js +7 -0
- package/dist/esm/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
- package/dist/esm/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +9 -9
- package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
- package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +12 -12
- package/dist/esm/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseRepoVersionResponse.js +70 -0
- package/dist/esm/models/RecordRepoSaveSkipRequest.d.ts +60 -0
- package/dist/esm/models/RecordRepoSaveSkipRequest.js +55 -0
- package/dist/esm/models/RepoBranchResponse.d.ts +126 -0
- package/dist/esm/models/RepoBranchResponse.js +95 -0
- package/dist/esm/models/RepoCommitSummary.d.ts +71 -0
- package/dist/esm/models/RepoCommitSummary.js +60 -0
- package/dist/esm/models/RepoSaveSkipReason.d.ts +36 -0
- package/dist/esm/models/RepoSaveSkipReason.js +54 -0
- package/dist/esm/models/RepoSnapshot.d.ts +59 -0
- package/dist/esm/models/RepoSnapshot.js +50 -0
- package/dist/esm/models/RepoTreeEntry.d.ts +59 -0
- package/dist/esm/models/RepoTreeEntry.js +52 -0
- package/dist/esm/models/RepoTreeResponse.d.ts +54 -0
- package/dist/esm/models/RepoTreeResponse.js +49 -0
- package/dist/esm/models/RepoVersionResponse.d.ts +95 -0
- package/dist/esm/models/RepoVersionResponse.js +74 -0
- package/dist/esm/models/WorkflowRepoResponse.d.ts +102 -0
- package/dist/esm/models/WorkflowRepoResponse.js +81 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +7 -0
- package/dist/esm/models/WorkflowRunSnapshot.js +3 -0
- package/dist/esm/models/index.d.ts +12 -2
- package/dist/esm/models/index.js +12 -2
- package/dist/models/ErrorResponse.d.ts +7 -0
- package/dist/models/ErrorResponse.js +7 -0
- package/dist/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
- package/dist/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +15 -15
- package/dist/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
- package/dist/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +18 -18
- package/dist/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseRepoVersionResponse.js +78 -0
- package/dist/models/RecordRepoSaveSkipRequest.d.ts +60 -0
- package/dist/models/RecordRepoSaveSkipRequest.js +63 -0
- package/dist/models/RepoBranchResponse.d.ts +126 -0
- package/dist/models/RepoBranchResponse.js +103 -0
- package/dist/models/RepoCommitSummary.d.ts +71 -0
- package/dist/models/RepoCommitSummary.js +68 -0
- package/dist/models/RepoSaveSkipReason.d.ts +36 -0
- package/dist/models/RepoSaveSkipReason.js +62 -0
- package/dist/models/RepoSnapshot.d.ts +59 -0
- package/dist/models/RepoSnapshot.js +58 -0
- package/dist/models/RepoTreeEntry.d.ts +59 -0
- package/dist/models/RepoTreeEntry.js +60 -0
- package/dist/models/RepoTreeResponse.d.ts +54 -0
- package/dist/models/RepoTreeResponse.js +57 -0
- package/dist/models/RepoVersionResponse.d.ts +95 -0
- package/dist/models/RepoVersionResponse.js +82 -0
- package/dist/models/WorkflowRepoResponse.d.ts +102 -0
- package/dist/models/WorkflowRepoResponse.js +89 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +7 -0
- package/dist/models/WorkflowRunSnapshot.js +3 -0
- package/dist/models/index.d.ts +12 -2
- package/dist/models/index.js +12 -2
- package/docs/MemoryApi.md +2 -2
- package/docs/{MemoryChunkResponse.md → MemoryEntryResponse.md} +4 -4
- package/docs/{PaginatedResponseMemoryChunkResponse.md → PaginatedResponseMemoryEntryResponse.md} +5 -5
- package/docs/PaginatedResponseRepoVersionResponse.md +40 -0
- package/docs/RecordRepoSaveSkipRequest.md +38 -0
- package/docs/RepoBranchResponse.md +61 -0
- package/docs/RepoCommitSummary.md +42 -0
- package/docs/RepoSaveSkipReason.md +33 -0
- package/docs/RepoSnapshot.md +39 -0
- package/docs/RepoTreeEntry.md +38 -0
- package/docs/RepoTreeResponse.md +36 -0
- package/docs/RepoVersionResponse.md +51 -0
- package/docs/WorkflowMemoryApi.md +8 -8
- package/docs/WorkflowRepoResponse.md +53 -0
- package/docs/WorkflowRepositoryApi.md +745 -0
- package/docs/WorkflowRunSnapshot.md +2 -0
- package/package.json +1 -1
- package/src/apis/MemoryApi.ts +8 -8
- package/src/apis/WorkflowMemoryApi.ts +26 -26
- package/src/apis/WorkflowRepositoryApi.ts +1002 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ErrorResponse.ts +7 -0
- package/src/models/{MemoryChunkResponse.ts → MemoryEntryResponse.ts} +14 -14
- package/src/models/{PaginatedResponseMemoryChunkResponse.ts → PaginatedResponseMemoryEntryResponse.ts} +25 -25
- package/src/models/PaginatedResponseRepoVersionResponse.ts +130 -0
- package/src/models/RecordRepoSaveSkipRequest.ts +113 -0
- package/src/models/RepoBranchResponse.ts +207 -0
- package/src/models/RepoCommitSummary.ts +119 -0
- package/src/models/RepoSaveSkipReason.ts +64 -0
- package/src/models/RepoSnapshot.ts +100 -0
- package/src/models/RepoTreeEntry.ts +101 -0
- package/src/models/RepoTreeResponse.ts +100 -0
- package/src/models/RepoVersionResponse.ts +154 -0
- package/src/models/WorkflowRepoResponse.ts +172 -0
- package/src/models/WorkflowRunSnapshot.ts +15 -0
- package/src/models/index.ts +12 -2
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
# WorkflowRepositoryApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**downloadWorkflowRepoBranchBundle**](WorkflowRepositoryApi.md#downloadworkflowrepobranchbundle) | **GET** /v1/workflow-definitions/{definition_id}/memory/repo/branches/{run_id}/bundle | Download Workflow Repo Branch Bundle Handler |
|
|
8
|
+
| [**downloadWorkflowRepoBundle**](WorkflowRepositoryApi.md#downloadworkflowrepobundle) | **GET** /v1/workflow-definitions/{definition_id}/memory/repo/bundle | Download Workflow Repo Bundle Handler |
|
|
9
|
+
| [**getWorkflowRepo**](WorkflowRepositoryApi.md#getworkflowrepo) | **GET** /v1/workflow-definitions/{definition_id}/memory/repo | Get Workflow Repo Handler |
|
|
10
|
+
| [**getWorkflowRepoBranch**](WorkflowRepositoryApi.md#getworkflowrepobranch) | **GET** /v1/workflow-definitions/{definition_id}/memory/repo/branches/{run_id} | Get Workflow Repo Branch Handler |
|
|
11
|
+
| [**getWorkflowRepoTree**](WorkflowRepositoryApi.md#getworkflowrepotree) | **GET** /v1/workflow-definitions/{definition_id}/memory/repo/tree | Get Workflow Repo Tree Handler |
|
|
12
|
+
| [**listWorkflowRepoVersions**](WorkflowRepositoryApi.md#listworkflowrepoversions) | **GET** /v1/workflow-definitions/{definition_id}/memory/repo/versions | List Workflow Repo Versions Handler |
|
|
13
|
+
| [**recordWorkflowRepoSkippedSave**](WorkflowRepositoryApi.md#recordworkflowreposkippedsave) | **POST** /v1/workflow-definitions/{definition_id}/memory/repo/skipped-saves | Record Workflow Repo Skipped Save Handler |
|
|
14
|
+
| [**saveWorkflowRepoBranch**](WorkflowRepositoryApi.md#saveworkflowrepobranch) | **POST** /v1/workflow-definitions/{definition_id}/memory/repo/branches/{run_id}/versions | Save Workflow Repo Branch Handler |
|
|
15
|
+
| [**saveWorkflowRepoVersion**](WorkflowRepositoryApi.md#saveworkflowrepoversion) | **POST** /v1/workflow-definitions/{definition_id}/memory/repo/versions | Save Workflow Repo Version Handler |
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## downloadWorkflowRepoBranchBundle
|
|
20
|
+
|
|
21
|
+
> Blob downloadWorkflowRepoBranchBundle(definitionId, runId, versionId)
|
|
22
|
+
|
|
23
|
+
Download Workflow Repo Branch Bundle Handler
|
|
24
|
+
|
|
25
|
+
Download a run branch; a named version must belong to that run.
|
|
26
|
+
|
|
27
|
+
### Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
Configuration,
|
|
32
|
+
WorkflowRepositoryApi,
|
|
33
|
+
} from '@knowledge-stack/ksapi';
|
|
34
|
+
import type { DownloadWorkflowRepoBranchBundleRequest } from '@knowledge-stack/ksapi';
|
|
35
|
+
|
|
36
|
+
async function example() {
|
|
37
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
38
|
+
const config = new Configuration({
|
|
39
|
+
// To configure API key authorization: cookieAuth
|
|
40
|
+
apiKey: "YOUR API KEY",
|
|
41
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
42
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
43
|
+
});
|
|
44
|
+
const api = new WorkflowRepositoryApi(config);
|
|
45
|
+
|
|
46
|
+
const body = {
|
|
47
|
+
// string
|
|
48
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
49
|
+
// string
|
|
50
|
+
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
51
|
+
// string | Retained branch version (optional)
|
|
52
|
+
versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
53
|
+
} satisfies DownloadWorkflowRepoBranchBundleRequest;
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
const data = await api.downloadWorkflowRepoBranchBundle(body);
|
|
57
|
+
console.log(data);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error(error);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Run the test
|
|
64
|
+
example().catch(console.error);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Parameters
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
| Name | Type | Description | Notes |
|
|
71
|
+
|------------- | ------------- | ------------- | -------------|
|
|
72
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
73
|
+
| **runId** | `string` | | [Defaults to `undefined`] |
|
|
74
|
+
| **versionId** | `string` | Retained branch version | [Optional] [Defaults to `undefined`] |
|
|
75
|
+
|
|
76
|
+
### Return type
|
|
77
|
+
|
|
78
|
+
**Blob**
|
|
79
|
+
|
|
80
|
+
### Authorization
|
|
81
|
+
|
|
82
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
83
|
+
|
|
84
|
+
### HTTP request headers
|
|
85
|
+
|
|
86
|
+
- **Content-Type**: Not defined
|
|
87
|
+
- **Accept**: `application/x-git-bundle`, `application/json`
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### HTTP response details
|
|
91
|
+
| Status code | Description | Response headers |
|
|
92
|
+
|-------------|-------------|------------------|
|
|
93
|
+
| **200** | Successful Response | - |
|
|
94
|
+
| **422** | Validation Error | - |
|
|
95
|
+
| **0** | Error response. | - |
|
|
96
|
+
|
|
97
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## downloadWorkflowRepoBundle
|
|
101
|
+
|
|
102
|
+
> Blob downloadWorkflowRepoBundle(definitionId, versionId)
|
|
103
|
+
|
|
104
|
+
Download Workflow Repo Bundle Handler
|
|
105
|
+
|
|
106
|
+
Download a saved version as a git bundle (what a run clones).
|
|
107
|
+
|
|
108
|
+
### Example
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
import {
|
|
112
|
+
Configuration,
|
|
113
|
+
WorkflowRepositoryApi,
|
|
114
|
+
} from '@knowledge-stack/ksapi';
|
|
115
|
+
import type { DownloadWorkflowRepoBundleRequest } from '@knowledge-stack/ksapi';
|
|
116
|
+
|
|
117
|
+
async function example() {
|
|
118
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
119
|
+
const config = new Configuration({
|
|
120
|
+
// To configure API key authorization: cookieAuth
|
|
121
|
+
apiKey: "YOUR API KEY",
|
|
122
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
123
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
124
|
+
});
|
|
125
|
+
const api = new WorkflowRepositoryApi(config);
|
|
126
|
+
|
|
127
|
+
const body = {
|
|
128
|
+
// string
|
|
129
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
130
|
+
// string | Saved version; default: main (optional)
|
|
131
|
+
versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
132
|
+
} satisfies DownloadWorkflowRepoBundleRequest;
|
|
133
|
+
|
|
134
|
+
try {
|
|
135
|
+
const data = await api.downloadWorkflowRepoBundle(body);
|
|
136
|
+
console.log(data);
|
|
137
|
+
} catch (error) {
|
|
138
|
+
console.error(error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Run the test
|
|
143
|
+
example().catch(console.error);
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Parameters
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
| Name | Type | Description | Notes |
|
|
150
|
+
|------------- | ------------- | ------------- | -------------|
|
|
151
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
152
|
+
| **versionId** | `string` | Saved version; default: main | [Optional] [Defaults to `undefined`] |
|
|
153
|
+
|
|
154
|
+
### Return type
|
|
155
|
+
|
|
156
|
+
**Blob**
|
|
157
|
+
|
|
158
|
+
### Authorization
|
|
159
|
+
|
|
160
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
161
|
+
|
|
162
|
+
### HTTP request headers
|
|
163
|
+
|
|
164
|
+
- **Content-Type**: Not defined
|
|
165
|
+
- **Accept**: `application/x-git-bundle`, `application/json`
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### HTTP response details
|
|
169
|
+
| Status code | Description | Response headers |
|
|
170
|
+
|-------------|-------------|------------------|
|
|
171
|
+
| **200** | A full git bundle of main at that version. | - |
|
|
172
|
+
| **422** | Validation Error | - |
|
|
173
|
+
| **0** | Error response. | - |
|
|
174
|
+
|
|
175
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## getWorkflowRepo
|
|
179
|
+
|
|
180
|
+
> WorkflowRepoResponse getWorkflowRepo(definitionId)
|
|
181
|
+
|
|
182
|
+
Get Workflow Repo Handler
|
|
183
|
+
|
|
184
|
+
The repository\'s current main: name, head commit and size.
|
|
185
|
+
|
|
186
|
+
### Example
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
import {
|
|
190
|
+
Configuration,
|
|
191
|
+
WorkflowRepositoryApi,
|
|
192
|
+
} from '@knowledge-stack/ksapi';
|
|
193
|
+
import type { GetWorkflowRepoRequest } from '@knowledge-stack/ksapi';
|
|
194
|
+
|
|
195
|
+
async function example() {
|
|
196
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
197
|
+
const config = new Configuration({
|
|
198
|
+
// To configure API key authorization: cookieAuth
|
|
199
|
+
apiKey: "YOUR API KEY",
|
|
200
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
201
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
202
|
+
});
|
|
203
|
+
const api = new WorkflowRepositoryApi(config);
|
|
204
|
+
|
|
205
|
+
const body = {
|
|
206
|
+
// string
|
|
207
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
208
|
+
} satisfies GetWorkflowRepoRequest;
|
|
209
|
+
|
|
210
|
+
try {
|
|
211
|
+
const data = await api.getWorkflowRepo(body);
|
|
212
|
+
console.log(data);
|
|
213
|
+
} catch (error) {
|
|
214
|
+
console.error(error);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Run the test
|
|
219
|
+
example().catch(console.error);
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Parameters
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
| Name | Type | Description | Notes |
|
|
226
|
+
|------------- | ------------- | ------------- | -------------|
|
|
227
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
228
|
+
|
|
229
|
+
### Return type
|
|
230
|
+
|
|
231
|
+
[**WorkflowRepoResponse**](WorkflowRepoResponse.md)
|
|
232
|
+
|
|
233
|
+
### Authorization
|
|
234
|
+
|
|
235
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
236
|
+
|
|
237
|
+
### HTTP request headers
|
|
238
|
+
|
|
239
|
+
- **Content-Type**: Not defined
|
|
240
|
+
- **Accept**: `application/json`
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
### HTTP response details
|
|
244
|
+
| Status code | Description | Response headers |
|
|
245
|
+
|-------------|-------------|------------------|
|
|
246
|
+
| **200** | Successful Response | - |
|
|
247
|
+
| **422** | Validation Error | - |
|
|
248
|
+
| **0** | Error response. | - |
|
|
249
|
+
|
|
250
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
## getWorkflowRepoBranch
|
|
254
|
+
|
|
255
|
+
> RepoBranchResponse getWorkflowRepoBranch(definitionId, runId)
|
|
256
|
+
|
|
257
|
+
Get Workflow Repo Branch Handler
|
|
258
|
+
|
|
259
|
+
The run\'s retained branch and whether its latest version reached main.
|
|
260
|
+
|
|
261
|
+
### Example
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
import {
|
|
265
|
+
Configuration,
|
|
266
|
+
WorkflowRepositoryApi,
|
|
267
|
+
} from '@knowledge-stack/ksapi';
|
|
268
|
+
import type { GetWorkflowRepoBranchRequest } from '@knowledge-stack/ksapi';
|
|
269
|
+
|
|
270
|
+
async function example() {
|
|
271
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
272
|
+
const config = new Configuration({
|
|
273
|
+
// To configure API key authorization: cookieAuth
|
|
274
|
+
apiKey: "YOUR API KEY",
|
|
275
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
276
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
277
|
+
});
|
|
278
|
+
const api = new WorkflowRepositoryApi(config);
|
|
279
|
+
|
|
280
|
+
const body = {
|
|
281
|
+
// string
|
|
282
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
283
|
+
// string
|
|
284
|
+
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
285
|
+
} satisfies GetWorkflowRepoBranchRequest;
|
|
286
|
+
|
|
287
|
+
try {
|
|
288
|
+
const data = await api.getWorkflowRepoBranch(body);
|
|
289
|
+
console.log(data);
|
|
290
|
+
} catch (error) {
|
|
291
|
+
console.error(error);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Run the test
|
|
296
|
+
example().catch(console.error);
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Parameters
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
| Name | Type | Description | Notes |
|
|
303
|
+
|------------- | ------------- | ------------- | -------------|
|
|
304
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
305
|
+
| **runId** | `string` | | [Defaults to `undefined`] |
|
|
306
|
+
|
|
307
|
+
### Return type
|
|
308
|
+
|
|
309
|
+
[**RepoBranchResponse**](RepoBranchResponse.md)
|
|
310
|
+
|
|
311
|
+
### Authorization
|
|
312
|
+
|
|
313
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
314
|
+
|
|
315
|
+
### HTTP request headers
|
|
316
|
+
|
|
317
|
+
- **Content-Type**: Not defined
|
|
318
|
+
- **Accept**: `application/json`
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
### HTTP response details
|
|
322
|
+
| Status code | Description | Response headers |
|
|
323
|
+
|-------------|-------------|------------------|
|
|
324
|
+
| **200** | Successful Response | - |
|
|
325
|
+
| **422** | Validation Error | - |
|
|
326
|
+
| **0** | Error response. | - |
|
|
327
|
+
|
|
328
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
## getWorkflowRepoTree
|
|
332
|
+
|
|
333
|
+
> RepoTreeResponse getWorkflowRepoTree(definitionId, commit)
|
|
334
|
+
|
|
335
|
+
Get Workflow Repo Tree Handler
|
|
336
|
+
|
|
337
|
+
File metadata at a saved snapshot head (default: main), path-sorted. Intermediate commits without a saved manifest return repo_commit_not_found. This endpoint never reads object storage or interprets Git objects.
|
|
338
|
+
|
|
339
|
+
### Example
|
|
340
|
+
|
|
341
|
+
```ts
|
|
342
|
+
import {
|
|
343
|
+
Configuration,
|
|
344
|
+
WorkflowRepositoryApi,
|
|
345
|
+
} from '@knowledge-stack/ksapi';
|
|
346
|
+
import type { GetWorkflowRepoTreeRequest } from '@knowledge-stack/ksapi';
|
|
347
|
+
|
|
348
|
+
async function example() {
|
|
349
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
350
|
+
const config = new Configuration({
|
|
351
|
+
// To configure API key authorization: cookieAuth
|
|
352
|
+
apiKey: "YOUR API KEY",
|
|
353
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
354
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
355
|
+
});
|
|
356
|
+
const api = new WorkflowRepositoryApi(config);
|
|
357
|
+
|
|
358
|
+
const body = {
|
|
359
|
+
// string
|
|
360
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
361
|
+
// string (optional)
|
|
362
|
+
commit: commit_example,
|
|
363
|
+
} satisfies GetWorkflowRepoTreeRequest;
|
|
364
|
+
|
|
365
|
+
try {
|
|
366
|
+
const data = await api.getWorkflowRepoTree(body);
|
|
367
|
+
console.log(data);
|
|
368
|
+
} catch (error) {
|
|
369
|
+
console.error(error);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// Run the test
|
|
374
|
+
example().catch(console.error);
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Parameters
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
| Name | Type | Description | Notes |
|
|
381
|
+
|------------- | ------------- | ------------- | -------------|
|
|
382
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
383
|
+
| **commit** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
384
|
+
|
|
385
|
+
### Return type
|
|
386
|
+
|
|
387
|
+
[**RepoTreeResponse**](RepoTreeResponse.md)
|
|
388
|
+
|
|
389
|
+
### Authorization
|
|
390
|
+
|
|
391
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
392
|
+
|
|
393
|
+
### HTTP request headers
|
|
394
|
+
|
|
395
|
+
- **Content-Type**: Not defined
|
|
396
|
+
- **Accept**: `application/json`
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
### HTTP response details
|
|
400
|
+
| Status code | Description | Response headers |
|
|
401
|
+
|-------------|-------------|------------------|
|
|
402
|
+
| **200** | Successful Response | - |
|
|
403
|
+
| **422** | Validation Error | - |
|
|
404
|
+
| **0** | Error response. | - |
|
|
405
|
+
|
|
406
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
## listWorkflowRepoVersions
|
|
410
|
+
|
|
411
|
+
> PaginatedResponseRepoVersionResponse listWorkflowRepoVersions(definitionId, runId, limit, offset)
|
|
412
|
+
|
|
413
|
+
List Workflow Repo Versions Handler
|
|
414
|
+
|
|
415
|
+
Saved versions, newest first: the save log.
|
|
416
|
+
|
|
417
|
+
### Example
|
|
418
|
+
|
|
419
|
+
```ts
|
|
420
|
+
import {
|
|
421
|
+
Configuration,
|
|
422
|
+
WorkflowRepositoryApi,
|
|
423
|
+
} from '@knowledge-stack/ksapi';
|
|
424
|
+
import type { ListWorkflowRepoVersionsRequest } from '@knowledge-stack/ksapi';
|
|
425
|
+
|
|
426
|
+
async function example() {
|
|
427
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
428
|
+
const config = new Configuration({
|
|
429
|
+
// To configure API key authorization: cookieAuth
|
|
430
|
+
apiKey: "YOUR API KEY",
|
|
431
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
432
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
433
|
+
});
|
|
434
|
+
const api = new WorkflowRepositoryApi(config);
|
|
435
|
+
|
|
436
|
+
const body = {
|
|
437
|
+
// string
|
|
438
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
439
|
+
// string | Only versions saved by this run (optional)
|
|
440
|
+
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
441
|
+
// number | Number of items per page (optional)
|
|
442
|
+
limit: 56,
|
|
443
|
+
// number | Number of items to skip (optional)
|
|
444
|
+
offset: 56,
|
|
445
|
+
} satisfies ListWorkflowRepoVersionsRequest;
|
|
446
|
+
|
|
447
|
+
try {
|
|
448
|
+
const data = await api.listWorkflowRepoVersions(body);
|
|
449
|
+
console.log(data);
|
|
450
|
+
} catch (error) {
|
|
451
|
+
console.error(error);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// Run the test
|
|
456
|
+
example().catch(console.error);
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Parameters
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
| Name | Type | Description | Notes |
|
|
463
|
+
|------------- | ------------- | ------------- | -------------|
|
|
464
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
465
|
+
| **runId** | `string` | Only versions saved by this run | [Optional] [Defaults to `undefined`] |
|
|
466
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
467
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
468
|
+
|
|
469
|
+
### Return type
|
|
470
|
+
|
|
471
|
+
[**PaginatedResponseRepoVersionResponse**](PaginatedResponseRepoVersionResponse.md)
|
|
472
|
+
|
|
473
|
+
### Authorization
|
|
474
|
+
|
|
475
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
476
|
+
|
|
477
|
+
### HTTP request headers
|
|
478
|
+
|
|
479
|
+
- **Content-Type**: Not defined
|
|
480
|
+
- **Accept**: `application/json`
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
### HTTP response details
|
|
484
|
+
| Status code | Description | Response headers |
|
|
485
|
+
|-------------|-------------|------------------|
|
|
486
|
+
| **200** | Successful Response | - |
|
|
487
|
+
| **422** | Validation Error | - |
|
|
488
|
+
| **0** | Error response. | - |
|
|
489
|
+
|
|
490
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
## recordWorkflowRepoSkippedSave
|
|
494
|
+
|
|
495
|
+
> EventResponse recordWorkflowRepoSkippedSave(definitionId, recordRepoSaveSkipRequest)
|
|
496
|
+
|
|
497
|
+
Record Workflow Repo Skipped Save Handler
|
|
498
|
+
|
|
499
|
+
Record on a run that its turn\'s repository changes were not kept. Needs only read on the workflow: the same authority as posting the follow-up message whose turn produced the changes.
|
|
500
|
+
|
|
501
|
+
### Example
|
|
502
|
+
|
|
503
|
+
```ts
|
|
504
|
+
import {
|
|
505
|
+
Configuration,
|
|
506
|
+
WorkflowRepositoryApi,
|
|
507
|
+
} from '@knowledge-stack/ksapi';
|
|
508
|
+
import type { RecordWorkflowRepoSkippedSaveRequest } from '@knowledge-stack/ksapi';
|
|
509
|
+
|
|
510
|
+
async function example() {
|
|
511
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
512
|
+
const config = new Configuration({
|
|
513
|
+
// To configure API key authorization: cookieAuth
|
|
514
|
+
apiKey: "YOUR API KEY",
|
|
515
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
516
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
517
|
+
});
|
|
518
|
+
const api = new WorkflowRepositoryApi(config);
|
|
519
|
+
|
|
520
|
+
const body = {
|
|
521
|
+
// string
|
|
522
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
523
|
+
// RecordRepoSaveSkipRequest
|
|
524
|
+
recordRepoSaveSkipRequest: ...,
|
|
525
|
+
} satisfies RecordWorkflowRepoSkippedSaveRequest;
|
|
526
|
+
|
|
527
|
+
try {
|
|
528
|
+
const data = await api.recordWorkflowRepoSkippedSave(body);
|
|
529
|
+
console.log(data);
|
|
530
|
+
} catch (error) {
|
|
531
|
+
console.error(error);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// Run the test
|
|
536
|
+
example().catch(console.error);
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### Parameters
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
| Name | Type | Description | Notes |
|
|
543
|
+
|------------- | ------------- | ------------- | -------------|
|
|
544
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
545
|
+
| **recordRepoSaveSkipRequest** | [RecordRepoSaveSkipRequest](RecordRepoSaveSkipRequest.md) | | |
|
|
546
|
+
|
|
547
|
+
### Return type
|
|
548
|
+
|
|
549
|
+
[**EventResponse**](EventResponse.md)
|
|
550
|
+
|
|
551
|
+
### Authorization
|
|
552
|
+
|
|
553
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
554
|
+
|
|
555
|
+
### HTTP request headers
|
|
556
|
+
|
|
557
|
+
- **Content-Type**: `application/json`
|
|
558
|
+
- **Accept**: `application/json`
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
### HTTP response details
|
|
562
|
+
| Status code | Description | Response headers |
|
|
563
|
+
|-------------|-------------|------------------|
|
|
564
|
+
| **201** | Successful Response | - |
|
|
565
|
+
| **422** | Validation Error | - |
|
|
566
|
+
| **0** | Error response. | - |
|
|
567
|
+
|
|
568
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
## saveWorkflowRepoBranch
|
|
572
|
+
|
|
573
|
+
> RepoBranchResponse saveWorkflowRepoBranch(definitionId, runId, bundle, expectedVersionId, baseVersionId)
|
|
574
|
+
|
|
575
|
+
Save Workflow Repo Branch Handler
|
|
576
|
+
|
|
577
|
+
Retain a branch without publishing it to other runs.
|
|
578
|
+
|
|
579
|
+
### Example
|
|
580
|
+
|
|
581
|
+
```ts
|
|
582
|
+
import {
|
|
583
|
+
Configuration,
|
|
584
|
+
WorkflowRepositoryApi,
|
|
585
|
+
} from '@knowledge-stack/ksapi';
|
|
586
|
+
import type { SaveWorkflowRepoBranchRequest } from '@knowledge-stack/ksapi';
|
|
587
|
+
|
|
588
|
+
async function example() {
|
|
589
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
590
|
+
const config = new Configuration({
|
|
591
|
+
// To configure API key authorization: cookieAuth
|
|
592
|
+
apiKey: "YOUR API KEY",
|
|
593
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
594
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
595
|
+
});
|
|
596
|
+
const api = new WorkflowRepositoryApi(config);
|
|
597
|
+
|
|
598
|
+
const body = {
|
|
599
|
+
// string
|
|
600
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
601
|
+
// string
|
|
602
|
+
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
603
|
+
// Blob | Full git bundle of runs/<run-id>
|
|
604
|
+
bundle: BINARY_DATA_HERE,
|
|
605
|
+
// string | Previous retained version of this run branch (optional)
|
|
606
|
+
expectedVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
607
|
+
// string | Accepted main version this branch started from (optional)
|
|
608
|
+
baseVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
609
|
+
} satisfies SaveWorkflowRepoBranchRequest;
|
|
610
|
+
|
|
611
|
+
try {
|
|
612
|
+
const data = await api.saveWorkflowRepoBranch(body);
|
|
613
|
+
console.log(data);
|
|
614
|
+
} catch (error) {
|
|
615
|
+
console.error(error);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
// Run the test
|
|
620
|
+
example().catch(console.error);
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
### Parameters
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
| Name | Type | Description | Notes |
|
|
627
|
+
|------------- | ------------- | ------------- | -------------|
|
|
628
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
629
|
+
| **runId** | `string` | | [Defaults to `undefined`] |
|
|
630
|
+
| **bundle** | `Blob` | Full git bundle of runs/<run-id> | [Defaults to `undefined`] |
|
|
631
|
+
| **expectedVersionId** | `string` | Previous retained version of this run branch | [Optional] [Defaults to `undefined`] |
|
|
632
|
+
| **baseVersionId** | `string` | Accepted main version this branch started from | [Optional] [Defaults to `undefined`] |
|
|
633
|
+
|
|
634
|
+
### Return type
|
|
635
|
+
|
|
636
|
+
[**RepoBranchResponse**](RepoBranchResponse.md)
|
|
637
|
+
|
|
638
|
+
### Authorization
|
|
639
|
+
|
|
640
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
641
|
+
|
|
642
|
+
### HTTP request headers
|
|
643
|
+
|
|
644
|
+
- **Content-Type**: `multipart/form-data`
|
|
645
|
+
- **Accept**: `application/json`
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
### HTTP response details
|
|
649
|
+
| Status code | Description | Response headers |
|
|
650
|
+
|-------------|-------------|------------------|
|
|
651
|
+
| **201** | Successful Response | - |
|
|
652
|
+
| **200** | Already retained | - |
|
|
653
|
+
| **422** | Validation Error | - |
|
|
654
|
+
| **0** | Error response. | - |
|
|
655
|
+
|
|
656
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
## saveWorkflowRepoVersion
|
|
660
|
+
|
|
661
|
+
> RepoVersionResponse saveWorkflowRepoVersion(definitionId, bundle, runId, expectedVersionId, candidateVersionId)
|
|
662
|
+
|
|
663
|
+
Save Workflow Repo Version Handler
|
|
664
|
+
|
|
665
|
+
Make a bundle the workflow\'s new main (compare-and-set on the base version). 409 ``repo_head_moved``: main moved since the base; integrate and retry. 409 ``repo_not_fast_forward``: the bundle does not contain main. 422 ``repo_invalid_bundle`` / ``repo_too_large`` / ``repo_unsafe_path``.
|
|
666
|
+
|
|
667
|
+
### Example
|
|
668
|
+
|
|
669
|
+
```ts
|
|
670
|
+
import {
|
|
671
|
+
Configuration,
|
|
672
|
+
WorkflowRepositoryApi,
|
|
673
|
+
} from '@knowledge-stack/ksapi';
|
|
674
|
+
import type { SaveWorkflowRepoVersionRequest } from '@knowledge-stack/ksapi';
|
|
675
|
+
|
|
676
|
+
async function example() {
|
|
677
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
678
|
+
const config = new Configuration({
|
|
679
|
+
// To configure API key authorization: cookieAuth
|
|
680
|
+
apiKey: "YOUR API KEY",
|
|
681
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
682
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
683
|
+
});
|
|
684
|
+
const api = new WorkflowRepositoryApi(config);
|
|
685
|
+
|
|
686
|
+
const body = {
|
|
687
|
+
// string
|
|
688
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
689
|
+
// Blob | Full git bundle of main
|
|
690
|
+
bundle: BINARY_DATA_HERE,
|
|
691
|
+
// string | The run saving this version
|
|
692
|
+
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
693
|
+
// string | The version this save is based on; omit for the first save (optional)
|
|
694
|
+
expectedVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
695
|
+
// string | Retained run branch being integrated (optional)
|
|
696
|
+
candidateVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
697
|
+
} satisfies SaveWorkflowRepoVersionRequest;
|
|
698
|
+
|
|
699
|
+
try {
|
|
700
|
+
const data = await api.saveWorkflowRepoVersion(body);
|
|
701
|
+
console.log(data);
|
|
702
|
+
} catch (error) {
|
|
703
|
+
console.error(error);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// Run the test
|
|
708
|
+
example().catch(console.error);
|
|
709
|
+
```
|
|
710
|
+
|
|
711
|
+
### Parameters
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
| Name | Type | Description | Notes |
|
|
715
|
+
|------------- | ------------- | ------------- | -------------|
|
|
716
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
717
|
+
| **bundle** | `Blob` | Full git bundle of main | [Defaults to `undefined`] |
|
|
718
|
+
| **runId** | `string` | The run saving this version | [Defaults to `undefined`] |
|
|
719
|
+
| **expectedVersionId** | `string` | The version this save is based on; omit for the first save | [Optional] [Defaults to `undefined`] |
|
|
720
|
+
| **candidateVersionId** | `string` | Retained run branch being integrated | [Optional] [Defaults to `undefined`] |
|
|
721
|
+
|
|
722
|
+
### Return type
|
|
723
|
+
|
|
724
|
+
[**RepoVersionResponse**](RepoVersionResponse.md)
|
|
725
|
+
|
|
726
|
+
### Authorization
|
|
727
|
+
|
|
728
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
729
|
+
|
|
730
|
+
### HTTP request headers
|
|
731
|
+
|
|
732
|
+
- **Content-Type**: `multipart/form-data`
|
|
733
|
+
- **Accept**: `application/json`
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
### HTTP response details
|
|
737
|
+
| Status code | Description | Response headers |
|
|
738
|
+
|-------------|-------------|------------------|
|
|
739
|
+
| **201** | Successful Response | - |
|
|
740
|
+
| **200** | The bundle\'s head already is main; nothing new saved. | - |
|
|
741
|
+
| **422** | Validation Error | - |
|
|
742
|
+
| **0** | Error response. | - |
|
|
743
|
+
|
|
744
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
745
|
+
|