@knowledge-stack/ksapi 1.85.0 → 1.86.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 +0 -2
- package/README.md +2 -5
- package/dist/apis/WorkflowRunsApi.d.ts +13 -101
- package/dist/apis/WorkflowRunsApi.js +6 -93
- package/dist/esm/apis/WorkflowRunsApi.d.ts +13 -101
- package/dist/esm/apis/WorkflowRunsApi.js +7 -94
- package/dist/esm/models/index.d.ts +0 -1
- package/dist/esm/models/index.js +0 -1
- package/dist/models/index.d.ts +0 -1
- package/dist/models/index.js +0 -1
- package/docs/WorkflowRunsApi.md +3 -153
- package/package.json +1 -1
- package/src/apis/WorkflowRunsApi.ts +12 -184
- package/src/models/index.ts +0 -1
- package/dist/esm/models/RunLockResponse.d.ts +0 -59
- package/dist/esm/models/RunLockResponse.js +0 -52
- package/dist/models/RunLockResponse.d.ts +0 -59
- package/dist/models/RunLockResponse.js +0 -60
- package/docs/RunLockResponse.md +0 -39
- package/src/models/RunLockResponse.ts +0 -101
|
@@ -10,12 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PathPartApprovalResponse, RejectFileRequest,
|
|
14
|
-
export interface AcquireWorkflowRunLockRequest {
|
|
15
|
-
runId: string;
|
|
16
|
-
authorization?: string | null;
|
|
17
|
-
ksUat?: string | null;
|
|
18
|
-
}
|
|
13
|
+
import type { PathPartApprovalResponse, RejectFileRequest, WorkflowCallbackResponse, WorkflowRunCallbackRequest, WorkflowRunResponse } from '../models/index';
|
|
19
14
|
export interface ApproveWorkflowRunFileRequest {
|
|
20
15
|
runId: string;
|
|
21
16
|
pathPartId: string;
|
|
@@ -39,11 +34,6 @@ export interface RejectWorkflowRunFileRequest {
|
|
|
39
34
|
authorization?: string | null;
|
|
40
35
|
ksUat?: string | null;
|
|
41
36
|
}
|
|
42
|
-
export interface ReleaseWorkflowRunLockRequest {
|
|
43
|
-
runId: string;
|
|
44
|
-
authorization?: string | null;
|
|
45
|
-
ksUat?: string | null;
|
|
46
|
-
}
|
|
47
37
|
export interface UnapproveWorkflowRunFileRequest {
|
|
48
38
|
runId: string;
|
|
49
39
|
pathPartId: string;
|
|
@@ -61,31 +51,6 @@ export interface WorkflowRunCallbackOperationRequest {
|
|
|
61
51
|
* @interface WorkflowRunsApiInterface
|
|
62
52
|
*/
|
|
63
53
|
export interface WorkflowRunsApiInterface {
|
|
64
|
-
/**
|
|
65
|
-
* Creates request options for acquireWorkflowRunLock without sending the request
|
|
66
|
-
* @param {string} runId
|
|
67
|
-
* @param {string} [authorization]
|
|
68
|
-
* @param {string} [ksUat]
|
|
69
|
-
* @throws {RequiredError}
|
|
70
|
-
* @memberof WorkflowRunsApiInterface
|
|
71
|
-
*/
|
|
72
|
-
acquireWorkflowRunLockRequestOpts(requestParameters: AcquireWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
|
|
73
|
-
/**
|
|
74
|
-
* Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
|
|
75
|
-
* @summary Acquire Workflow Run Lock Handler
|
|
76
|
-
* @param {string} runId
|
|
77
|
-
* @param {string} [authorization]
|
|
78
|
-
* @param {string} [ksUat]
|
|
79
|
-
* @param {*} [options] Override http request option.
|
|
80
|
-
* @throws {RequiredError}
|
|
81
|
-
* @memberof WorkflowRunsApiInterface
|
|
82
|
-
*/
|
|
83
|
-
acquireWorkflowRunLockRaw(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RunLockResponse>>;
|
|
84
|
-
/**
|
|
85
|
-
* Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
|
|
86
|
-
* Acquire Workflow Run Lock Handler
|
|
87
|
-
*/
|
|
88
|
-
acquireWorkflowRunLock(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RunLockResponse>;
|
|
89
54
|
/**
|
|
90
55
|
* Creates request options for approveWorkflowRunFile without sending the request
|
|
91
56
|
* @param {string} runId
|
|
@@ -97,7 +62,7 @@ export interface WorkflowRunsApiInterface {
|
|
|
97
62
|
*/
|
|
98
63
|
approveWorkflowRunFileRequestOpts(requestParameters: ApproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
99
64
|
/**
|
|
100
|
-
* Approve a
|
|
65
|
+
* Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
|
|
101
66
|
* @summary Approve Workflow Run File Handler
|
|
102
67
|
* @param {string} runId
|
|
103
68
|
* @param {string} pathPartId
|
|
@@ -109,7 +74,7 @@ export interface WorkflowRunsApiInterface {
|
|
|
109
74
|
*/
|
|
110
75
|
approveWorkflowRunFileRaw(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
111
76
|
/**
|
|
112
|
-
* Approve a
|
|
77
|
+
* Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
|
|
113
78
|
* Approve Workflow Run File Handler
|
|
114
79
|
*/
|
|
115
80
|
approveWorkflowRunFile(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
@@ -173,7 +138,7 @@ export interface WorkflowRunsApiInterface {
|
|
|
173
138
|
*/
|
|
174
139
|
rejectWorkflowRunFileRequestOpts(requestParameters: RejectWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
175
140
|
/**
|
|
176
|
-
* Reject a
|
|
141
|
+
* Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
|
|
177
142
|
* @summary Reject Workflow Run File Handler
|
|
178
143
|
* @param {string} runId
|
|
179
144
|
* @param {string} pathPartId
|
|
@@ -186,35 +151,10 @@ export interface WorkflowRunsApiInterface {
|
|
|
186
151
|
*/
|
|
187
152
|
rejectWorkflowRunFileRaw(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
188
153
|
/**
|
|
189
|
-
* Reject a
|
|
154
|
+
* Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
|
|
190
155
|
* Reject Workflow Run File Handler
|
|
191
156
|
*/
|
|
192
157
|
rejectWorkflowRunFile(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
193
|
-
/**
|
|
194
|
-
* Creates request options for releaseWorkflowRunLock without sending the request
|
|
195
|
-
* @param {string} runId
|
|
196
|
-
* @param {string} [authorization]
|
|
197
|
-
* @param {string} [ksUat]
|
|
198
|
-
* @throws {RequiredError}
|
|
199
|
-
* @memberof WorkflowRunsApiInterface
|
|
200
|
-
*/
|
|
201
|
-
releaseWorkflowRunLockRequestOpts(requestParameters: ReleaseWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
|
|
202
|
-
/**
|
|
203
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
204
|
-
* @summary Release Workflow Run Lock Handler
|
|
205
|
-
* @param {string} runId
|
|
206
|
-
* @param {string} [authorization]
|
|
207
|
-
* @param {string} [ksUat]
|
|
208
|
-
* @param {*} [options] Override http request option.
|
|
209
|
-
* @throws {RequiredError}
|
|
210
|
-
* @memberof WorkflowRunsApiInterface
|
|
211
|
-
*/
|
|
212
|
-
releaseWorkflowRunLockRaw(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
213
|
-
/**
|
|
214
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
215
|
-
* Release Workflow Run Lock Handler
|
|
216
|
-
*/
|
|
217
|
-
releaseWorkflowRunLock(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
218
158
|
/**
|
|
219
159
|
* Creates request options for unapproveWorkflowRunFile without sending the request
|
|
220
160
|
* @param {string} runId
|
|
@@ -226,7 +166,7 @@ export interface WorkflowRunsApiInterface {
|
|
|
226
166
|
*/
|
|
227
167
|
unapproveWorkflowRunFileRequestOpts(requestParameters: UnapproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
228
168
|
/**
|
|
229
|
-
* Revert an approved file to ``pending``.
|
|
169
|
+
* Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
|
|
230
170
|
* @summary Unapprove Workflow Run File Handler
|
|
231
171
|
* @param {string} runId
|
|
232
172
|
* @param {string} pathPartId
|
|
@@ -238,7 +178,7 @@ export interface WorkflowRunsApiInterface {
|
|
|
238
178
|
*/
|
|
239
179
|
unapproveWorkflowRunFileRaw(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
240
180
|
/**
|
|
241
|
-
* Revert an approved file to ``pending``.
|
|
181
|
+
* Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
|
|
242
182
|
* Unapprove Workflow Run File Handler
|
|
243
183
|
*/
|
|
244
184
|
unapproveWorkflowRunFile(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
@@ -269,31 +209,17 @@ export interface WorkflowRunsApiInterface {
|
|
|
269
209
|
*
|
|
270
210
|
*/
|
|
271
211
|
export declare class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiInterface {
|
|
272
|
-
/**
|
|
273
|
-
* Creates request options for acquireWorkflowRunLock without sending the request
|
|
274
|
-
*/
|
|
275
|
-
acquireWorkflowRunLockRequestOpts(requestParameters: AcquireWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
|
|
276
|
-
/**
|
|
277
|
-
* Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
|
|
278
|
-
* Acquire Workflow Run Lock Handler
|
|
279
|
-
*/
|
|
280
|
-
acquireWorkflowRunLockRaw(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RunLockResponse>>;
|
|
281
|
-
/**
|
|
282
|
-
* Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
|
|
283
|
-
* Acquire Workflow Run Lock Handler
|
|
284
|
-
*/
|
|
285
|
-
acquireWorkflowRunLock(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RunLockResponse>;
|
|
286
212
|
/**
|
|
287
213
|
* Creates request options for approveWorkflowRunFile without sending the request
|
|
288
214
|
*/
|
|
289
215
|
approveWorkflowRunFileRequestOpts(requestParameters: ApproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
290
216
|
/**
|
|
291
|
-
* Approve a
|
|
217
|
+
* Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
|
|
292
218
|
* Approve Workflow Run File Handler
|
|
293
219
|
*/
|
|
294
220
|
approveWorkflowRunFileRaw(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
295
221
|
/**
|
|
296
|
-
* Approve a
|
|
222
|
+
* Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
|
|
297
223
|
* Approve Workflow Run File Handler
|
|
298
224
|
*/
|
|
299
225
|
approveWorkflowRunFile(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
@@ -326,40 +252,26 @@ export declare class WorkflowRunsApi extends runtime.BaseAPI implements Workflow
|
|
|
326
252
|
*/
|
|
327
253
|
rejectWorkflowRunFileRequestOpts(requestParameters: RejectWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
328
254
|
/**
|
|
329
|
-
* Reject a
|
|
255
|
+
* Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
|
|
330
256
|
* Reject Workflow Run File Handler
|
|
331
257
|
*/
|
|
332
258
|
rejectWorkflowRunFileRaw(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
333
259
|
/**
|
|
334
|
-
* Reject a
|
|
260
|
+
* Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
|
|
335
261
|
* Reject Workflow Run File Handler
|
|
336
262
|
*/
|
|
337
263
|
rejectWorkflowRunFile(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
338
|
-
/**
|
|
339
|
-
* Creates request options for releaseWorkflowRunLock without sending the request
|
|
340
|
-
*/
|
|
341
|
-
releaseWorkflowRunLockRequestOpts(requestParameters: ReleaseWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
|
|
342
|
-
/**
|
|
343
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
344
|
-
* Release Workflow Run Lock Handler
|
|
345
|
-
*/
|
|
346
|
-
releaseWorkflowRunLockRaw(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
347
|
-
/**
|
|
348
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
349
|
-
* Release Workflow Run Lock Handler
|
|
350
|
-
*/
|
|
351
|
-
releaseWorkflowRunLock(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
352
264
|
/**
|
|
353
265
|
* Creates request options for unapproveWorkflowRunFile without sending the request
|
|
354
266
|
*/
|
|
355
267
|
unapproveWorkflowRunFileRequestOpts(requestParameters: UnapproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
356
268
|
/**
|
|
357
|
-
* Revert an approved file to ``pending``.
|
|
269
|
+
* Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
|
|
358
270
|
* Unapprove Workflow Run File Handler
|
|
359
271
|
*/
|
|
360
272
|
unapproveWorkflowRunFileRaw(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
361
273
|
/**
|
|
362
|
-
* Revert an approved file to ``pending``.
|
|
274
|
+
* Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
|
|
363
275
|
* Unapprove Workflow Run File Handler
|
|
364
276
|
*/
|
|
365
277
|
unapproveWorkflowRunFile(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
@@ -21,55 +21,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { PathPartApprovalResponseFromJSON, RejectFileRequestToJSON,
|
|
24
|
+
import { PathPartApprovalResponseFromJSON, RejectFileRequestToJSON, WorkflowCallbackResponseFromJSON, WorkflowRunCallbackRequestToJSON, WorkflowRunResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
29
|
-
/**
|
|
30
|
-
* Creates request options for acquireWorkflowRunLock without sending the request
|
|
31
|
-
*/
|
|
32
|
-
acquireWorkflowRunLockRequestOpts(requestParameters) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
if (requestParameters['runId'] == null) {
|
|
35
|
-
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling acquireWorkflowRunLock().');
|
|
36
|
-
}
|
|
37
|
-
const queryParameters = {};
|
|
38
|
-
const headerParameters = {};
|
|
39
|
-
if (requestParameters['authorization'] != null) {
|
|
40
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
41
|
-
}
|
|
42
|
-
let urlPath = `/v1/workflow-runs/{run_id}/lock`;
|
|
43
|
-
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
44
|
-
return {
|
|
45
|
-
path: urlPath,
|
|
46
|
-
method: 'POST',
|
|
47
|
-
headers: headerParameters,
|
|
48
|
-
query: queryParameters,
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
|
|
54
|
-
* Acquire Workflow Run Lock Handler
|
|
55
|
-
*/
|
|
56
|
-
acquireWorkflowRunLockRaw(requestParameters, initOverrides) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
const requestOptions = yield this.acquireWorkflowRunLockRequestOpts(requestParameters);
|
|
59
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => RunLockResponseFromJSON(jsonValue));
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
|
|
65
|
-
* Acquire Workflow Run Lock Handler
|
|
66
|
-
*/
|
|
67
|
-
acquireWorkflowRunLock(requestParameters, initOverrides) {
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
const response = yield this.acquireWorkflowRunLockRaw(requestParameters, initOverrides);
|
|
70
|
-
return yield response.value();
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
29
|
/**
|
|
74
30
|
* Creates request options for approveWorkflowRunFile without sending the request
|
|
75
31
|
*/
|
|
@@ -98,7 +54,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
98
54
|
});
|
|
99
55
|
}
|
|
100
56
|
/**
|
|
101
|
-
* Approve a
|
|
57
|
+
* Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
|
|
102
58
|
* Approve Workflow Run File Handler
|
|
103
59
|
*/
|
|
104
60
|
approveWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -109,7 +65,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
109
65
|
});
|
|
110
66
|
}
|
|
111
67
|
/**
|
|
112
|
-
* Approve a
|
|
68
|
+
* Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
|
|
113
69
|
* Approve Workflow Run File Handler
|
|
114
70
|
*/
|
|
115
71
|
approveWorkflowRunFile(requestParameters, initOverrides) {
|
|
@@ -234,7 +190,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
234
190
|
});
|
|
235
191
|
}
|
|
236
192
|
/**
|
|
237
|
-
* Reject a
|
|
193
|
+
* Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
|
|
238
194
|
* Reject Workflow Run File Handler
|
|
239
195
|
*/
|
|
240
196
|
rejectWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -245,7 +201,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
245
201
|
});
|
|
246
202
|
}
|
|
247
203
|
/**
|
|
248
|
-
* Reject a
|
|
204
|
+
* Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
|
|
249
205
|
* Reject Workflow Run File Handler
|
|
250
206
|
*/
|
|
251
207
|
rejectWorkflowRunFile(requestParameters, initOverrides) {
|
|
@@ -254,49 +210,6 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
254
210
|
return yield response.value();
|
|
255
211
|
});
|
|
256
212
|
}
|
|
257
|
-
/**
|
|
258
|
-
* Creates request options for releaseWorkflowRunLock without sending the request
|
|
259
|
-
*/
|
|
260
|
-
releaseWorkflowRunLockRequestOpts(requestParameters) {
|
|
261
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
if (requestParameters['runId'] == null) {
|
|
263
|
-
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling releaseWorkflowRunLock().');
|
|
264
|
-
}
|
|
265
|
-
const queryParameters = {};
|
|
266
|
-
const headerParameters = {};
|
|
267
|
-
if (requestParameters['authorization'] != null) {
|
|
268
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
269
|
-
}
|
|
270
|
-
let urlPath = `/v1/workflow-runs/{run_id}/lock`;
|
|
271
|
-
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
272
|
-
return {
|
|
273
|
-
path: urlPath,
|
|
274
|
-
method: 'DELETE',
|
|
275
|
-
headers: headerParameters,
|
|
276
|
-
query: queryParameters,
|
|
277
|
-
};
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
282
|
-
* Release Workflow Run Lock Handler
|
|
283
|
-
*/
|
|
284
|
-
releaseWorkflowRunLockRaw(requestParameters, initOverrides) {
|
|
285
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
const requestOptions = yield this.releaseWorkflowRunLockRequestOpts(requestParameters);
|
|
287
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
288
|
-
return new runtime.VoidApiResponse(response);
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
293
|
-
* Release Workflow Run Lock Handler
|
|
294
|
-
*/
|
|
295
|
-
releaseWorkflowRunLock(requestParameters, initOverrides) {
|
|
296
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
-
yield this.releaseWorkflowRunLockRaw(requestParameters, initOverrides);
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
213
|
/**
|
|
301
214
|
* Creates request options for unapproveWorkflowRunFile without sending the request
|
|
302
215
|
*/
|
|
@@ -325,7 +238,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
325
238
|
});
|
|
326
239
|
}
|
|
327
240
|
/**
|
|
328
|
-
* Revert an approved file to ``pending``.
|
|
241
|
+
* Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
|
|
329
242
|
* Unapprove Workflow Run File Handler
|
|
330
243
|
*/
|
|
331
244
|
unapproveWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -336,7 +249,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
336
249
|
});
|
|
337
250
|
}
|
|
338
251
|
/**
|
|
339
|
-
* Revert an approved file to ``pending``.
|
|
252
|
+
* Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
|
|
340
253
|
* Unapprove Workflow Run File Handler
|
|
341
254
|
*/
|
|
342
255
|
unapproveWorkflowRunFile(requestParameters, initOverrides) {
|
|
@@ -140,7 +140,6 @@ export * from './RejectFileRequest';
|
|
|
140
140
|
export * from './ResolvedReferenceInput';
|
|
141
141
|
export * from './ResolvedReferenceOutput';
|
|
142
142
|
export * from './RootResponse';
|
|
143
|
-
export * from './RunLockResponse';
|
|
144
143
|
export * from './SSOInitiateResponse';
|
|
145
144
|
export * from './ScoredChunkResponse';
|
|
146
145
|
export * from './SearchSortOrder';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -142,7 +142,6 @@ export * from './RejectFileRequest';
|
|
|
142
142
|
export * from './ResolvedReferenceInput';
|
|
143
143
|
export * from './ResolvedReferenceOutput';
|
|
144
144
|
export * from './RootResponse';
|
|
145
|
-
export * from './RunLockResponse';
|
|
146
145
|
export * from './SSOInitiateResponse';
|
|
147
146
|
export * from './ScoredChunkResponse';
|
|
148
147
|
export * from './SearchSortOrder';
|
package/dist/models/index.d.ts
CHANGED
|
@@ -140,7 +140,6 @@ export * from './RejectFileRequest';
|
|
|
140
140
|
export * from './ResolvedReferenceInput';
|
|
141
141
|
export * from './ResolvedReferenceOutput';
|
|
142
142
|
export * from './RootResponse';
|
|
143
|
-
export * from './RunLockResponse';
|
|
144
143
|
export * from './SSOInitiateResponse';
|
|
145
144
|
export * from './ScoredChunkResponse';
|
|
146
145
|
export * from './SearchSortOrder';
|
package/dist/models/index.js
CHANGED
|
@@ -158,7 +158,6 @@ __exportStar(require("./RejectFileRequest"), exports);
|
|
|
158
158
|
__exportStar(require("./ResolvedReferenceInput"), exports);
|
|
159
159
|
__exportStar(require("./ResolvedReferenceOutput"), exports);
|
|
160
160
|
__exportStar(require("./RootResponse"), exports);
|
|
161
|
-
__exportStar(require("./RunLockResponse"), exports);
|
|
162
161
|
__exportStar(require("./SSOInitiateResponse"), exports);
|
|
163
162
|
__exportStar(require("./ScoredChunkResponse"), exports);
|
|
164
163
|
__exportStar(require("./SearchSortOrder"), exports);
|
package/docs/WorkflowRunsApi.md
CHANGED
|
@@ -4,98 +4,22 @@ All URIs are relative to *http://localhost:8000*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
| [**acquireWorkflowRunLock**](WorkflowRunsApi.md#acquireworkflowrunlock) | **POST** /v1/workflow-runs/{run_id}/lock | Acquire Workflow Run Lock Handler |
|
|
8
7
|
| [**approveWorkflowRunFile**](WorkflowRunsApi.md#approveworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/approve | Approve Workflow Run File Handler |
|
|
9
8
|
| [**deleteWorkflowRun**](WorkflowRunsApi.md#deleteworkflowrun) | **DELETE** /v1/workflow-runs/{run_id} | Delete Workflow Run Handler |
|
|
10
9
|
| [**getWorkflowRun**](WorkflowRunsApi.md#getworkflowrun) | **GET** /v1/workflow-runs/{run_id} | Get Workflow Run Handler |
|
|
11
10
|
| [**rejectWorkflowRunFile**](WorkflowRunsApi.md#rejectworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/reject | Reject Workflow Run File Handler |
|
|
12
|
-
| [**releaseWorkflowRunLock**](WorkflowRunsApi.md#releaseworkflowrunlock) | **DELETE** /v1/workflow-runs/{run_id}/lock | Release Workflow Run Lock Handler |
|
|
13
11
|
| [**unapproveWorkflowRunFile**](WorkflowRunsApi.md#unapproveworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/unapprove | Unapprove Workflow Run File Handler |
|
|
14
12
|
| [**workflowRunCallback**](WorkflowRunsApi.md#workflowruncallbackoperation) | **POST** /v1/workflow-runs/{run_id}/callback | Workflow Run Callback Handler |
|
|
15
13
|
|
|
16
14
|
|
|
17
15
|
|
|
18
|
-
## acquireWorkflowRunLock
|
|
19
|
-
|
|
20
|
-
> RunLockResponse acquireWorkflowRunLock(runId, authorization, ksUat)
|
|
21
|
-
|
|
22
|
-
Acquire Workflow Run Lock Handler
|
|
23
|
-
|
|
24
|
-
Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
|
|
25
|
-
|
|
26
|
-
### Example
|
|
27
|
-
|
|
28
|
-
```ts
|
|
29
|
-
import {
|
|
30
|
-
Configuration,
|
|
31
|
-
WorkflowRunsApi,
|
|
32
|
-
} from '@knowledge-stack/ksapi';
|
|
33
|
-
import type { AcquireWorkflowRunLockRequest } from '@knowledge-stack/ksapi';
|
|
34
|
-
|
|
35
|
-
async function example() {
|
|
36
|
-
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
37
|
-
const api = new WorkflowRunsApi();
|
|
38
|
-
|
|
39
|
-
const body = {
|
|
40
|
-
// string
|
|
41
|
-
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
42
|
-
// string (optional)
|
|
43
|
-
authorization: authorization_example,
|
|
44
|
-
// string (optional)
|
|
45
|
-
ksUat: ksUat_example,
|
|
46
|
-
} satisfies AcquireWorkflowRunLockRequest;
|
|
47
|
-
|
|
48
|
-
try {
|
|
49
|
-
const data = await api.acquireWorkflowRunLock(body);
|
|
50
|
-
console.log(data);
|
|
51
|
-
} catch (error) {
|
|
52
|
-
console.error(error);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Run the test
|
|
57
|
-
example().catch(console.error);
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Parameters
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| Name | Type | Description | Notes |
|
|
64
|
-
|------------- | ------------- | ------------- | -------------|
|
|
65
|
-
| **runId** | `string` | | [Defaults to `undefined`] |
|
|
66
|
-
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
67
|
-
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
68
|
-
|
|
69
|
-
### Return type
|
|
70
|
-
|
|
71
|
-
[**RunLockResponse**](RunLockResponse.md)
|
|
72
|
-
|
|
73
|
-
### Authorization
|
|
74
|
-
|
|
75
|
-
No authorization required
|
|
76
|
-
|
|
77
|
-
### HTTP request headers
|
|
78
|
-
|
|
79
|
-
- **Content-Type**: Not defined
|
|
80
|
-
- **Accept**: `application/json`
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
### HTTP response details
|
|
84
|
-
| Status code | Description | Response headers |
|
|
85
|
-
|-------------|-------------|------------------|
|
|
86
|
-
| **200** | Successful Response | - |
|
|
87
|
-
| **422** | Validation Error | - |
|
|
88
|
-
|
|
89
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
90
|
-
|
|
91
|
-
|
|
92
16
|
## approveWorkflowRunFile
|
|
93
17
|
|
|
94
18
|
> PathPartApprovalResponse approveWorkflowRunFile(runId, pathPartId, authorization, ksUat)
|
|
95
19
|
|
|
96
20
|
Approve Workflow Run File Handler
|
|
97
21
|
|
|
98
|
-
Approve a
|
|
22
|
+
Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
|
|
99
23
|
|
|
100
24
|
### Example
|
|
101
25
|
|
|
@@ -316,7 +240,7 @@ No authorization required
|
|
|
316
240
|
|
|
317
241
|
Reject Workflow Run File Handler
|
|
318
242
|
|
|
319
|
-
Reject a
|
|
243
|
+
Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
|
|
320
244
|
|
|
321
245
|
### Example
|
|
322
246
|
|
|
@@ -390,87 +314,13 @@ No authorization required
|
|
|
390
314
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
391
315
|
|
|
392
316
|
|
|
393
|
-
## releaseWorkflowRunLock
|
|
394
|
-
|
|
395
|
-
> releaseWorkflowRunLock(runId, authorization, ksUat)
|
|
396
|
-
|
|
397
|
-
Release Workflow Run Lock Handler
|
|
398
|
-
|
|
399
|
-
Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
400
|
-
|
|
401
|
-
### Example
|
|
402
|
-
|
|
403
|
-
```ts
|
|
404
|
-
import {
|
|
405
|
-
Configuration,
|
|
406
|
-
WorkflowRunsApi,
|
|
407
|
-
} from '@knowledge-stack/ksapi';
|
|
408
|
-
import type { ReleaseWorkflowRunLockRequest } from '@knowledge-stack/ksapi';
|
|
409
|
-
|
|
410
|
-
async function example() {
|
|
411
|
-
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
412
|
-
const api = new WorkflowRunsApi();
|
|
413
|
-
|
|
414
|
-
const body = {
|
|
415
|
-
// string
|
|
416
|
-
runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
417
|
-
// string (optional)
|
|
418
|
-
authorization: authorization_example,
|
|
419
|
-
// string (optional)
|
|
420
|
-
ksUat: ksUat_example,
|
|
421
|
-
} satisfies ReleaseWorkflowRunLockRequest;
|
|
422
|
-
|
|
423
|
-
try {
|
|
424
|
-
const data = await api.releaseWorkflowRunLock(body);
|
|
425
|
-
console.log(data);
|
|
426
|
-
} catch (error) {
|
|
427
|
-
console.error(error);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
// Run the test
|
|
432
|
-
example().catch(console.error);
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
### Parameters
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
| Name | Type | Description | Notes |
|
|
439
|
-
|------------- | ------------- | ------------- | -------------|
|
|
440
|
-
| **runId** | `string` | | [Defaults to `undefined`] |
|
|
441
|
-
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
442
|
-
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
443
|
-
|
|
444
|
-
### Return type
|
|
445
|
-
|
|
446
|
-
`void` (Empty response body)
|
|
447
|
-
|
|
448
|
-
### Authorization
|
|
449
|
-
|
|
450
|
-
No authorization required
|
|
451
|
-
|
|
452
|
-
### HTTP request headers
|
|
453
|
-
|
|
454
|
-
- **Content-Type**: Not defined
|
|
455
|
-
- **Accept**: `application/json`
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
### HTTP response details
|
|
459
|
-
| Status code | Description | Response headers |
|
|
460
|
-
|-------------|-------------|------------------|
|
|
461
|
-
| **204** | Successful Response | - |
|
|
462
|
-
| **422** | Validation Error | - |
|
|
463
|
-
|
|
464
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
465
|
-
|
|
466
|
-
|
|
467
317
|
## unapproveWorkflowRunFile
|
|
468
318
|
|
|
469
319
|
> PathPartApprovalResponse unapproveWorkflowRunFile(runId, pathPartId, authorization, ksUat)
|
|
470
320
|
|
|
471
321
|
Unapprove Workflow Run File Handler
|
|
472
322
|
|
|
473
|
-
Revert an approved file to ``pending``.
|
|
323
|
+
Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
|
|
474
324
|
|
|
475
325
|
### Example
|
|
476
326
|
|