@knowledge-stack/ksapi 1.82.0 → 1.83.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 +8 -0
- package/README.md +11 -2
- package/dist/apis/WorkflowRunsApi.d.ts +233 -1
- package/dist/apis/WorkflowRunsApi.js +236 -0
- package/dist/esm/apis/WorkflowRunsApi.d.ts +233 -1
- package/dist/esm/apis/WorkflowRunsApi.js +237 -1
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
- package/dist/esm/models/CreateWorkflowDefinitionRequest.js +2 -0
- package/dist/esm/models/PathPartApprovalDecision.d.ts +30 -0
- package/dist/esm/models/PathPartApprovalDecision.js +48 -0
- package/dist/esm/models/PathPartApprovalResponse.d.ts +111 -0
- package/dist/esm/models/PathPartApprovalResponse.js +85 -0
- package/dist/esm/models/RejectFileRequest.d.ts +47 -0
- package/dist/esm/models/RejectFileRequest.js +49 -0
- package/dist/esm/models/RunLockResponse.d.ts +59 -0
- package/dist/esm/models/RunLockResponse.js +52 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +2 -0
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +6 -0
- package/dist/esm/models/WorkflowDefinitionResponse.js +4 -0
- package/dist/esm/models/WorkflowRunStatus.d.ts +20 -2
- package/dist/esm/models/WorkflowRunStatus.js +20 -2
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
- package/dist/models/CreateWorkflowDefinitionRequest.js +2 -0
- package/dist/models/PathPartApprovalDecision.d.ts +30 -0
- package/dist/models/PathPartApprovalDecision.js +56 -0
- package/dist/models/PathPartApprovalResponse.d.ts +111 -0
- package/dist/models/PathPartApprovalResponse.js +93 -0
- package/dist/models/RejectFileRequest.d.ts +47 -0
- package/dist/models/RejectFileRequest.js +57 -0
- package/dist/models/RunLockResponse.d.ts +59 -0
- package/dist/models/RunLockResponse.js +60 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.js +2 -0
- package/dist/models/WorkflowDefinitionResponse.d.ts +6 -0
- package/dist/models/WorkflowDefinitionResponse.js +4 -0
- package/dist/models/WorkflowRunStatus.d.ts +20 -2
- package/dist/models/WorkflowRunStatus.js +20 -2
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/CreateWorkflowDefinitionRequest.md +2 -0
- package/docs/PathPartApprovalDecision.md +33 -0
- package/docs/PathPartApprovalResponse.md +55 -0
- package/docs/RejectFileRequest.md +35 -0
- package/docs/RunLockResponse.md +39 -0
- package/docs/UpdateWorkflowDefinitionRequest.md +2 -0
- package/docs/WorkflowDefinitionResponse.md +2 -0
- package/docs/WorkflowRunStatus.md +1 -1
- package/docs/WorkflowRunsApi.md +387 -0
- package/package.json +1 -1
- package/src/apis/WorkflowRunsApi.ts +479 -0
- package/src/models/CreateWorkflowDefinitionRequest.ts +8 -0
- package/src/models/PathPartApprovalDecision.ts +58 -0
- package/src/models/PathPartApprovalResponse.ts +186 -0
- package/src/models/RejectFileRequest.ts +87 -0
- package/src/models/RunLockResponse.ts +101 -0
- package/src/models/UpdateWorkflowDefinitionRequest.ts +8 -0
- package/src/models/WorkflowDefinitionResponse.ts +9 -0
- package/src/models/WorkflowRunStatus.ts +20 -2
- package/src/models/index.ts +4 -0
|
@@ -10,7 +10,18 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { WorkflowCallbackResponse, WorkflowRunCallbackRequest, WorkflowRunResponse } from '../models/index';
|
|
13
|
+
import type { PathPartApprovalResponse, RejectFileRequest, RunLockResponse, WorkflowCallbackResponse, WorkflowRunCallbackRequest, WorkflowRunResponse } from '../models/index';
|
|
14
|
+
export interface AcquireWorkflowRunLockRequest {
|
|
15
|
+
runId: string;
|
|
16
|
+
authorization?: string | null;
|
|
17
|
+
ksUat?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface ApproveWorkflowRunFileRequest {
|
|
20
|
+
runId: string;
|
|
21
|
+
pathPartId: string;
|
|
22
|
+
authorization?: string | null;
|
|
23
|
+
ksUat?: string | null;
|
|
24
|
+
}
|
|
14
25
|
export interface DeleteWorkflowRunRequest {
|
|
15
26
|
runId: string;
|
|
16
27
|
authorization?: string | null;
|
|
@@ -21,6 +32,24 @@ export interface GetWorkflowRunRequest {
|
|
|
21
32
|
authorization?: string | null;
|
|
22
33
|
ksUat?: string | null;
|
|
23
34
|
}
|
|
35
|
+
export interface RejectWorkflowRunFileRequest {
|
|
36
|
+
runId: string;
|
|
37
|
+
pathPartId: string;
|
|
38
|
+
rejectFileRequest: RejectFileRequest;
|
|
39
|
+
authorization?: string | null;
|
|
40
|
+
ksUat?: string | null;
|
|
41
|
+
}
|
|
42
|
+
export interface ReleaseWorkflowRunLockRequest {
|
|
43
|
+
runId: string;
|
|
44
|
+
authorization?: string | null;
|
|
45
|
+
ksUat?: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface UnapproveWorkflowRunFileRequest {
|
|
48
|
+
runId: string;
|
|
49
|
+
pathPartId: string;
|
|
50
|
+
authorization?: string | null;
|
|
51
|
+
ksUat?: string | null;
|
|
52
|
+
}
|
|
24
53
|
export interface WorkflowRunCallbackOperationRequest {
|
|
25
54
|
runId: string;
|
|
26
55
|
workflowRunCallbackRequest: WorkflowRunCallbackRequest;
|
|
@@ -32,6 +61,58 @@ export interface WorkflowRunCallbackOperationRequest {
|
|
|
32
61
|
* @interface WorkflowRunsApiInterface
|
|
33
62
|
*/
|
|
34
63
|
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
|
+
/**
|
|
90
|
+
* Creates request options for approveWorkflowRunFile without sending the request
|
|
91
|
+
* @param {string} runId
|
|
92
|
+
* @param {string} pathPartId
|
|
93
|
+
* @param {string} [authorization]
|
|
94
|
+
* @param {string} [ksUat]
|
|
95
|
+
* @throws {RequiredError}
|
|
96
|
+
* @memberof WorkflowRunsApiInterface
|
|
97
|
+
*/
|
|
98
|
+
approveWorkflowRunFileRequestOpts(requestParameters: ApproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
99
|
+
/**
|
|
100
|
+
* Approve a single generated file. Caller must hold the run lock.
|
|
101
|
+
* @summary Approve Workflow Run File Handler
|
|
102
|
+
* @param {string} runId
|
|
103
|
+
* @param {string} pathPartId
|
|
104
|
+
* @param {string} [authorization]
|
|
105
|
+
* @param {string} [ksUat]
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
* @memberof WorkflowRunsApiInterface
|
|
109
|
+
*/
|
|
110
|
+
approveWorkflowRunFileRaw(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
111
|
+
/**
|
|
112
|
+
* Approve a single generated file. Caller must hold the run lock.
|
|
113
|
+
* Approve Workflow Run File Handler
|
|
114
|
+
*/
|
|
115
|
+
approveWorkflowRunFile(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
35
116
|
/**
|
|
36
117
|
* Creates request options for deleteWorkflowRun without sending the request
|
|
37
118
|
* @param {string} runId
|
|
@@ -80,6 +161,87 @@ export interface WorkflowRunsApiInterface {
|
|
|
80
161
|
* Get Workflow Run Handler
|
|
81
162
|
*/
|
|
82
163
|
getWorkflowRun(requestParameters: GetWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
|
|
164
|
+
/**
|
|
165
|
+
* Creates request options for rejectWorkflowRunFile without sending the request
|
|
166
|
+
* @param {string} runId
|
|
167
|
+
* @param {string} pathPartId
|
|
168
|
+
* @param {RejectFileRequest} rejectFileRequest
|
|
169
|
+
* @param {string} [authorization]
|
|
170
|
+
* @param {string} [ksUat]
|
|
171
|
+
* @throws {RequiredError}
|
|
172
|
+
* @memberof WorkflowRunsApiInterface
|
|
173
|
+
*/
|
|
174
|
+
rejectWorkflowRunFileRequestOpts(requestParameters: RejectWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
175
|
+
/**
|
|
176
|
+
* Reject a single generated file with a reason. Caller must hold the run lock.
|
|
177
|
+
* @summary Reject Workflow Run File Handler
|
|
178
|
+
* @param {string} runId
|
|
179
|
+
* @param {string} pathPartId
|
|
180
|
+
* @param {RejectFileRequest} rejectFileRequest
|
|
181
|
+
* @param {string} [authorization]
|
|
182
|
+
* @param {string} [ksUat]
|
|
183
|
+
* @param {*} [options] Override http request option.
|
|
184
|
+
* @throws {RequiredError}
|
|
185
|
+
* @memberof WorkflowRunsApiInterface
|
|
186
|
+
*/
|
|
187
|
+
rejectWorkflowRunFileRaw(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
188
|
+
/**
|
|
189
|
+
* Reject a single generated file with a reason. Caller must hold the run lock.
|
|
190
|
+
* Reject Workflow Run File Handler
|
|
191
|
+
*/
|
|
192
|
+
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
|
+
/**
|
|
219
|
+
* Creates request options for unapproveWorkflowRunFile without sending the request
|
|
220
|
+
* @param {string} runId
|
|
221
|
+
* @param {string} pathPartId
|
|
222
|
+
* @param {string} [authorization]
|
|
223
|
+
* @param {string} [ksUat]
|
|
224
|
+
* @throws {RequiredError}
|
|
225
|
+
* @memberof WorkflowRunsApiInterface
|
|
226
|
+
*/
|
|
227
|
+
unapproveWorkflowRunFileRequestOpts(requestParameters: UnapproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
228
|
+
/**
|
|
229
|
+
* Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
|
|
230
|
+
* @summary Unapprove Workflow Run File Handler
|
|
231
|
+
* @param {string} runId
|
|
232
|
+
* @param {string} pathPartId
|
|
233
|
+
* @param {string} [authorization]
|
|
234
|
+
* @param {string} [ksUat]
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
* @memberof WorkflowRunsApiInterface
|
|
238
|
+
*/
|
|
239
|
+
unapproveWorkflowRunFileRaw(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
240
|
+
/**
|
|
241
|
+
* Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
|
|
242
|
+
* Unapprove Workflow Run File Handler
|
|
243
|
+
*/
|
|
244
|
+
unapproveWorkflowRunFile(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
83
245
|
/**
|
|
84
246
|
* Creates request options for workflowRunCallback without sending the request
|
|
85
247
|
* @param {string} runId
|
|
@@ -107,6 +269,34 @@ export interface WorkflowRunsApiInterface {
|
|
|
107
269
|
*
|
|
108
270
|
*/
|
|
109
271
|
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
|
+
/**
|
|
287
|
+
* Creates request options for approveWorkflowRunFile without sending the request
|
|
288
|
+
*/
|
|
289
|
+
approveWorkflowRunFileRequestOpts(requestParameters: ApproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
290
|
+
/**
|
|
291
|
+
* Approve a single generated file. Caller must hold the run lock.
|
|
292
|
+
* Approve Workflow Run File Handler
|
|
293
|
+
*/
|
|
294
|
+
approveWorkflowRunFileRaw(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
295
|
+
/**
|
|
296
|
+
* Approve a single generated file. Caller must hold the run lock.
|
|
297
|
+
* Approve Workflow Run File Handler
|
|
298
|
+
*/
|
|
299
|
+
approveWorkflowRunFile(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
110
300
|
/**
|
|
111
301
|
* Creates request options for deleteWorkflowRun without sending the request
|
|
112
302
|
*/
|
|
@@ -131,6 +321,48 @@ export declare class WorkflowRunsApi extends runtime.BaseAPI implements Workflow
|
|
|
131
321
|
* Get Workflow Run Handler
|
|
132
322
|
*/
|
|
133
323
|
getWorkflowRun(requestParameters: GetWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
|
|
324
|
+
/**
|
|
325
|
+
* Creates request options for rejectWorkflowRunFile without sending the request
|
|
326
|
+
*/
|
|
327
|
+
rejectWorkflowRunFileRequestOpts(requestParameters: RejectWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
328
|
+
/**
|
|
329
|
+
* Reject a single generated file with a reason. Caller must hold the run lock.
|
|
330
|
+
* Reject Workflow Run File Handler
|
|
331
|
+
*/
|
|
332
|
+
rejectWorkflowRunFileRaw(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
333
|
+
/**
|
|
334
|
+
* Reject a single generated file with a reason. Caller must hold the run lock.
|
|
335
|
+
* Reject Workflow Run File Handler
|
|
336
|
+
*/
|
|
337
|
+
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
|
+
/**
|
|
353
|
+
* Creates request options for unapproveWorkflowRunFile without sending the request
|
|
354
|
+
*/
|
|
355
|
+
unapproveWorkflowRunFileRequestOpts(requestParameters: UnapproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
|
|
356
|
+
/**
|
|
357
|
+
* Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
|
|
358
|
+
* Unapprove Workflow Run File Handler
|
|
359
|
+
*/
|
|
360
|
+
unapproveWorkflowRunFileRaw(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
|
|
361
|
+
/**
|
|
362
|
+
* Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
|
|
363
|
+
* Unapprove Workflow Run File Handler
|
|
364
|
+
*/
|
|
365
|
+
unapproveWorkflowRunFile(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
|
|
134
366
|
/**
|
|
135
367
|
* Creates request options for workflowRunCallback without sending the request
|
|
136
368
|
*/
|
|
@@ -21,11 +21,103 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { WorkflowCallbackResponseFromJSON, WorkflowRunCallbackRequestToJSON, WorkflowRunResponseFromJSON, } from '../models/index';
|
|
24
|
+
import { PathPartApprovalResponseFromJSON, RejectFileRequestToJSON, RunLockResponseFromJSON, 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
|
+
/**
|
|
74
|
+
* Creates request options for approveWorkflowRunFile without sending the request
|
|
75
|
+
*/
|
|
76
|
+
approveWorkflowRunFileRequestOpts(requestParameters) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (requestParameters['runId'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling approveWorkflowRunFile().');
|
|
80
|
+
}
|
|
81
|
+
if (requestParameters['pathPartId'] == null) {
|
|
82
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling approveWorkflowRunFile().');
|
|
83
|
+
}
|
|
84
|
+
const queryParameters = {};
|
|
85
|
+
const headerParameters = {};
|
|
86
|
+
if (requestParameters['authorization'] != null) {
|
|
87
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
88
|
+
}
|
|
89
|
+
let urlPath = `/v1/workflow-runs/{run_id}/files/{path_part_id}/approve`;
|
|
90
|
+
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
91
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
92
|
+
return {
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Approve a single generated file. Caller must hold the run lock.
|
|
102
|
+
* Approve Workflow Run File Handler
|
|
103
|
+
*/
|
|
104
|
+
approveWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const requestOptions = yield this.approveWorkflowRunFileRequestOpts(requestParameters);
|
|
107
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
108
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PathPartApprovalResponseFromJSON(jsonValue));
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Approve a single generated file. Caller must hold the run lock.
|
|
113
|
+
* Approve Workflow Run File Handler
|
|
114
|
+
*/
|
|
115
|
+
approveWorkflowRunFile(requestParameters, initOverrides) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const response = yield this.approveWorkflowRunFileRaw(requestParameters, initOverrides);
|
|
118
|
+
return yield response.value();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
29
121
|
/**
|
|
30
122
|
* Creates request options for deleteWorkflowRun without sending the request
|
|
31
123
|
*/
|
|
@@ -109,6 +201,150 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
109
201
|
return yield response.value();
|
|
110
202
|
});
|
|
111
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Creates request options for rejectWorkflowRunFile without sending the request
|
|
206
|
+
*/
|
|
207
|
+
rejectWorkflowRunFileRequestOpts(requestParameters) {
|
|
208
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
+
if (requestParameters['runId'] == null) {
|
|
210
|
+
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling rejectWorkflowRunFile().');
|
|
211
|
+
}
|
|
212
|
+
if (requestParameters['pathPartId'] == null) {
|
|
213
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling rejectWorkflowRunFile().');
|
|
214
|
+
}
|
|
215
|
+
if (requestParameters['rejectFileRequest'] == null) {
|
|
216
|
+
throw new runtime.RequiredError('rejectFileRequest', 'Required parameter "rejectFileRequest" was null or undefined when calling rejectWorkflowRunFile().');
|
|
217
|
+
}
|
|
218
|
+
const queryParameters = {};
|
|
219
|
+
const headerParameters = {};
|
|
220
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
221
|
+
if (requestParameters['authorization'] != null) {
|
|
222
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
223
|
+
}
|
|
224
|
+
let urlPath = `/v1/workflow-runs/{run_id}/files/{path_part_id}/reject`;
|
|
225
|
+
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
226
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
227
|
+
return {
|
|
228
|
+
path: urlPath,
|
|
229
|
+
method: 'POST',
|
|
230
|
+
headers: headerParameters,
|
|
231
|
+
query: queryParameters,
|
|
232
|
+
body: RejectFileRequestToJSON(requestParameters['rejectFileRequest']),
|
|
233
|
+
};
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Reject a single generated file with a reason. Caller must hold the run lock.
|
|
238
|
+
* Reject Workflow Run File Handler
|
|
239
|
+
*/
|
|
240
|
+
rejectWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
const requestOptions = yield this.rejectWorkflowRunFileRequestOpts(requestParameters);
|
|
243
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
244
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PathPartApprovalResponseFromJSON(jsonValue));
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Reject a single generated file with a reason. Caller must hold the run lock.
|
|
249
|
+
* Reject Workflow Run File Handler
|
|
250
|
+
*/
|
|
251
|
+
rejectWorkflowRunFile(requestParameters, initOverrides) {
|
|
252
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
253
|
+
const response = yield this.rejectWorkflowRunFileRaw(requestParameters, initOverrides);
|
|
254
|
+
return yield response.value();
|
|
255
|
+
});
|
|
256
|
+
}
|
|
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
|
+
/**
|
|
301
|
+
* Creates request options for unapproveWorkflowRunFile without sending the request
|
|
302
|
+
*/
|
|
303
|
+
unapproveWorkflowRunFileRequestOpts(requestParameters) {
|
|
304
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
if (requestParameters['runId'] == null) {
|
|
306
|
+
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling unapproveWorkflowRunFile().');
|
|
307
|
+
}
|
|
308
|
+
if (requestParameters['pathPartId'] == null) {
|
|
309
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling unapproveWorkflowRunFile().');
|
|
310
|
+
}
|
|
311
|
+
const queryParameters = {};
|
|
312
|
+
const headerParameters = {};
|
|
313
|
+
if (requestParameters['authorization'] != null) {
|
|
314
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
315
|
+
}
|
|
316
|
+
let urlPath = `/v1/workflow-runs/{run_id}/files/{path_part_id}/unapprove`;
|
|
317
|
+
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
318
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
319
|
+
return {
|
|
320
|
+
path: urlPath,
|
|
321
|
+
method: 'POST',
|
|
322
|
+
headers: headerParameters,
|
|
323
|
+
query: queryParameters,
|
|
324
|
+
};
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
|
|
329
|
+
* Unapprove Workflow Run File Handler
|
|
330
|
+
*/
|
|
331
|
+
unapproveWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
332
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
+
const requestOptions = yield this.unapproveWorkflowRunFileRequestOpts(requestParameters);
|
|
334
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
335
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PathPartApprovalResponseFromJSON(jsonValue));
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
|
|
340
|
+
* Unapprove Workflow Run File Handler
|
|
341
|
+
*/
|
|
342
|
+
unapproveWorkflowRunFile(requestParameters, initOverrides) {
|
|
343
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
+
const response = yield this.unapproveWorkflowRunFileRaw(requestParameters, initOverrides);
|
|
345
|
+
return yield response.value();
|
|
346
|
+
});
|
|
347
|
+
}
|
|
112
348
|
/**
|
|
113
349
|
* Creates request options for workflowRunCallback without sending the request
|
|
114
350
|
*/
|
|
@@ -78,6 +78,12 @@ export interface CreateWorkflowDefinitionRequest {
|
|
|
78
78
|
* @memberof CreateWorkflowDefinitionRequest
|
|
79
79
|
*/
|
|
80
80
|
templatePathPartId?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {boolean}
|
|
84
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
85
|
+
*/
|
|
86
|
+
approvalRequired?: boolean;
|
|
81
87
|
}
|
|
82
88
|
export declare const CreateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
|
|
83
89
|
[property: string]: {
|
|
@@ -69,6 +69,7 @@ export function CreateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscrim
|
|
|
69
69
|
'instructionPathPartIds': json['instruction_path_part_ids'] == null ? undefined : json['instruction_path_part_ids'],
|
|
70
70
|
'outputPathPartIds': json['output_path_part_ids'],
|
|
71
71
|
'templatePathPartId': json['template_path_part_id'] == null ? undefined : json['template_path_part_id'],
|
|
72
|
+
'approvalRequired': json['approval_required'] == null ? undefined : json['approval_required'],
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
export function CreateWorkflowDefinitionRequestToJSON(json) {
|
|
@@ -88,5 +89,6 @@ export function CreateWorkflowDefinitionRequestToJSONTyped(value, ignoreDiscrimi
|
|
|
88
89
|
'instruction_path_part_ids': value['instructionPathPartIds'],
|
|
89
90
|
'output_path_part_ids': value['outputPathPartIds'],
|
|
90
91
|
'template_path_part_id': value['templatePathPartId'],
|
|
92
|
+
'approval_required': value['approvalRequired'],
|
|
91
93
|
};
|
|
92
94
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Per-file review status within a run (SeaHonor pilot).
|
|
14
|
+
*
|
|
15
|
+
* Now retained as the audit-history record (one row per (run, file));
|
|
16
|
+
* the current state of truth is ``path_part.approval_state``. The
|
|
17
|
+
* service dual-writes both.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const PathPartApprovalDecision: {
|
|
21
|
+
readonly Pending: "pending";
|
|
22
|
+
readonly Approved: "approved";
|
|
23
|
+
readonly Rejected: "rejected";
|
|
24
|
+
};
|
|
25
|
+
export type PathPartApprovalDecision = typeof PathPartApprovalDecision[keyof typeof PathPartApprovalDecision];
|
|
26
|
+
export declare function instanceOfPathPartApprovalDecision(value: any): boolean;
|
|
27
|
+
export declare function PathPartApprovalDecisionFromJSON(json: any): PathPartApprovalDecision;
|
|
28
|
+
export declare function PathPartApprovalDecisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartApprovalDecision;
|
|
29
|
+
export declare function PathPartApprovalDecisionToJSON(value?: PathPartApprovalDecision | null): any;
|
|
30
|
+
export declare function PathPartApprovalDecisionToJSONTyped(value: any, ignoreDiscriminator: boolean): PathPartApprovalDecision;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Per-file review status within a run (SeaHonor pilot).
|
|
16
|
+
*
|
|
17
|
+
* Now retained as the audit-history record (one row per (run, file));
|
|
18
|
+
* the current state of truth is ``path_part.approval_state``. The
|
|
19
|
+
* service dual-writes both.
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
export const PathPartApprovalDecision = {
|
|
23
|
+
Pending: 'pending',
|
|
24
|
+
Approved: 'approved',
|
|
25
|
+
Rejected: 'rejected'
|
|
26
|
+
};
|
|
27
|
+
export function instanceOfPathPartApprovalDecision(value) {
|
|
28
|
+
for (const key in PathPartApprovalDecision) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(PathPartApprovalDecision, key)) {
|
|
30
|
+
if (PathPartApprovalDecision[key] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
export function PathPartApprovalDecisionFromJSON(json) {
|
|
38
|
+
return PathPartApprovalDecisionFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function PathPartApprovalDecisionFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
export function PathPartApprovalDecisionToJSON(value) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
export function PathPartApprovalDecisionToJSONTyped(value, ignoreDiscriminator) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|