@knowledge-stack/ksapi 1.84.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 +4 -2
- package/README.md +6 -5
- package/dist/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/apis/DocumentCheckoutApi.js +197 -0
- package/dist/apis/WorkflowRunsApi.d.ts +13 -101
- package/dist/apis/WorkflowRunsApi.js +6 -93
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/esm/apis/DocumentCheckoutApi.js +160 -0
- package/dist/esm/apis/WorkflowRunsApi.d.ts +13 -101
- package/dist/esm/apis/WorkflowRunsApi.js +7 -94
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/DocumentCheckoutResponse.d.ts +65 -0
- package/dist/esm/models/DocumentCheckoutResponse.js +56 -0
- package/dist/esm/models/DocumentResponse.d.ts +7 -0
- package/dist/esm/models/DocumentResponse.js +3 -0
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/models/DocumentCheckoutResponse.d.ts +65 -0
- package/dist/models/DocumentCheckoutResponse.js +64 -0
- package/dist/models/DocumentResponse.d.ts +7 -0
- package/dist/models/DocumentResponse.js +3 -0
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/docs/DocumentCheckoutApi.md +233 -0
- package/docs/{RunLockResponse.md → DocumentCheckoutResponse.md} +13 -11
- package/docs/DocumentResponse.md +2 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/docs/WorkflowRunsApi.md +3 -153
- package/package.json +1 -1
- package/src/apis/DocumentCheckoutApi.ts +296 -0
- package/src/apis/WorkflowRunsApi.ts +12 -184
- package/src/apis/index.ts +1 -0
- package/src/models/DocumentCheckoutResponse.ts +110 -0
- package/src/models/DocumentResponse.ts +15 -0
- package/src/models/index.ts +1 -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/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>;
|
|
@@ -62,50 +62,6 @@ const index_1 = require("../models/index");
|
|
|
62
62
|
*
|
|
63
63
|
*/
|
|
64
64
|
class WorkflowRunsApi extends runtime.BaseAPI {
|
|
65
|
-
/**
|
|
66
|
-
* Creates request options for acquireWorkflowRunLock without sending the request
|
|
67
|
-
*/
|
|
68
|
-
acquireWorkflowRunLockRequestOpts(requestParameters) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
if (requestParameters['runId'] == null) {
|
|
71
|
-
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling acquireWorkflowRunLock().');
|
|
72
|
-
}
|
|
73
|
-
const queryParameters = {};
|
|
74
|
-
const headerParameters = {};
|
|
75
|
-
if (requestParameters['authorization'] != null) {
|
|
76
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
77
|
-
}
|
|
78
|
-
let urlPath = `/v1/workflow-runs/{run_id}/lock`;
|
|
79
|
-
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
80
|
-
return {
|
|
81
|
-
path: urlPath,
|
|
82
|
-
method: 'POST',
|
|
83
|
-
headers: headerParameters,
|
|
84
|
-
query: queryParameters,
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* 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.
|
|
90
|
-
* Acquire Workflow Run Lock Handler
|
|
91
|
-
*/
|
|
92
|
-
acquireWorkflowRunLockRaw(requestParameters, initOverrides) {
|
|
93
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
const requestOptions = yield this.acquireWorkflowRunLockRequestOpts(requestParameters);
|
|
95
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
96
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RunLockResponseFromJSON)(jsonValue));
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* 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.
|
|
101
|
-
* Acquire Workflow Run Lock Handler
|
|
102
|
-
*/
|
|
103
|
-
acquireWorkflowRunLock(requestParameters, initOverrides) {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
const response = yield this.acquireWorkflowRunLockRaw(requestParameters, initOverrides);
|
|
106
|
-
return yield response.value();
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
65
|
/**
|
|
110
66
|
* Creates request options for approveWorkflowRunFile without sending the request
|
|
111
67
|
*/
|
|
@@ -134,7 +90,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
134
90
|
});
|
|
135
91
|
}
|
|
136
92
|
/**
|
|
137
|
-
* Approve a
|
|
93
|
+
* 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.
|
|
138
94
|
* Approve Workflow Run File Handler
|
|
139
95
|
*/
|
|
140
96
|
approveWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -145,7 +101,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
145
101
|
});
|
|
146
102
|
}
|
|
147
103
|
/**
|
|
148
|
-
* Approve a
|
|
104
|
+
* 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.
|
|
149
105
|
* Approve Workflow Run File Handler
|
|
150
106
|
*/
|
|
151
107
|
approveWorkflowRunFile(requestParameters, initOverrides) {
|
|
@@ -270,7 +226,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
270
226
|
});
|
|
271
227
|
}
|
|
272
228
|
/**
|
|
273
|
-
* Reject a
|
|
229
|
+
* 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).
|
|
274
230
|
* Reject Workflow Run File Handler
|
|
275
231
|
*/
|
|
276
232
|
rejectWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -281,7 +237,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
281
237
|
});
|
|
282
238
|
}
|
|
283
239
|
/**
|
|
284
|
-
* Reject a
|
|
240
|
+
* 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).
|
|
285
241
|
* Reject Workflow Run File Handler
|
|
286
242
|
*/
|
|
287
243
|
rejectWorkflowRunFile(requestParameters, initOverrides) {
|
|
@@ -290,49 +246,6 @@ class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
290
246
|
return yield response.value();
|
|
291
247
|
});
|
|
292
248
|
}
|
|
293
|
-
/**
|
|
294
|
-
* Creates request options for releaseWorkflowRunLock without sending the request
|
|
295
|
-
*/
|
|
296
|
-
releaseWorkflowRunLockRequestOpts(requestParameters) {
|
|
297
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
-
if (requestParameters['runId'] == null) {
|
|
299
|
-
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling releaseWorkflowRunLock().');
|
|
300
|
-
}
|
|
301
|
-
const queryParameters = {};
|
|
302
|
-
const headerParameters = {};
|
|
303
|
-
if (requestParameters['authorization'] != null) {
|
|
304
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
305
|
-
}
|
|
306
|
-
let urlPath = `/v1/workflow-runs/{run_id}/lock`;
|
|
307
|
-
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
308
|
-
return {
|
|
309
|
-
path: urlPath,
|
|
310
|
-
method: 'DELETE',
|
|
311
|
-
headers: headerParameters,
|
|
312
|
-
query: queryParameters,
|
|
313
|
-
};
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
318
|
-
* Release Workflow Run Lock Handler
|
|
319
|
-
*/
|
|
320
|
-
releaseWorkflowRunLockRaw(requestParameters, initOverrides) {
|
|
321
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
-
const requestOptions = yield this.releaseWorkflowRunLockRequestOpts(requestParameters);
|
|
323
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
324
|
-
return new runtime.VoidApiResponse(response);
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
329
|
-
* Release Workflow Run Lock Handler
|
|
330
|
-
*/
|
|
331
|
-
releaseWorkflowRunLock(requestParameters, initOverrides) {
|
|
332
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
-
yield this.releaseWorkflowRunLockRaw(requestParameters, initOverrides);
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
249
|
/**
|
|
337
250
|
* Creates request options for unapproveWorkflowRunFile without sending the request
|
|
338
251
|
*/
|
|
@@ -361,7 +274,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
361
274
|
});
|
|
362
275
|
}
|
|
363
276
|
/**
|
|
364
|
-
* Revert an approved file to ``pending``.
|
|
277
|
+
* 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.
|
|
365
278
|
* Unapprove Workflow Run File Handler
|
|
366
279
|
*/
|
|
367
280
|
unapproveWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -372,7 +285,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
372
285
|
});
|
|
373
286
|
}
|
|
374
287
|
/**
|
|
375
|
-
* Revert an approved file to ``pending``.
|
|
288
|
+
* 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.
|
|
376
289
|
* Unapprove Workflow Run File Handler
|
|
377
290
|
*/
|
|
378
291
|
unapproveWorkflowRunFile(requestParameters, initOverrides) {
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './AuthApi';
|
|
|
4
4
|
export * from './ChunkLineagesApi';
|
|
5
5
|
export * from './ChunksApi';
|
|
6
6
|
export * from './DefaultApi';
|
|
7
|
+
export * from './DocumentCheckoutApi';
|
|
7
8
|
export * from './DocumentVersionsApi';
|
|
8
9
|
export * from './DocumentsApi';
|
|
9
10
|
export * from './FeaturesApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./AuthApi"), exports);
|
|
|
22
22
|
__exportStar(require("./ChunkLineagesApi"), exports);
|
|
23
23
|
__exportStar(require("./ChunksApi"), exports);
|
|
24
24
|
__exportStar(require("./DefaultApi"), exports);
|
|
25
|
+
__exportStar(require("./DocumentCheckoutApi"), exports);
|
|
25
26
|
__exportStar(require("./DocumentVersionsApi"), exports);
|
|
26
27
|
__exportStar(require("./DocumentsApi"), exports);
|
|
27
28
|
__exportStar(require("./FeaturesApi"), exports);
|
|
@@ -0,0 +1,158 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { DocumentCheckoutResponse } from '../models/index';
|
|
14
|
+
export interface AcquireDocumentCheckoutRequest {
|
|
15
|
+
pathPartId: string;
|
|
16
|
+
authorization?: string | null;
|
|
17
|
+
ksUat?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface GetDocumentCheckoutRequest {
|
|
20
|
+
pathPartId: string;
|
|
21
|
+
authorization?: string | null;
|
|
22
|
+
ksUat?: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface ReleaseDocumentCheckoutRequest {
|
|
25
|
+
pathPartId: string;
|
|
26
|
+
authorization?: string | null;
|
|
27
|
+
ksUat?: string | null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* DocumentCheckoutApi - interface
|
|
31
|
+
*
|
|
32
|
+
* @export
|
|
33
|
+
* @interface DocumentCheckoutApiInterface
|
|
34
|
+
*/
|
|
35
|
+
export interface DocumentCheckoutApiInterface {
|
|
36
|
+
/**
|
|
37
|
+
* Creates request options for acquireDocumentCheckout without sending the request
|
|
38
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
39
|
+
* @param {string} [authorization]
|
|
40
|
+
* @param {string} [ksUat]
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
* @memberof DocumentCheckoutApiInterface
|
|
43
|
+
*/
|
|
44
|
+
acquireDocumentCheckoutRequestOpts(requestParameters: AcquireDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
45
|
+
/**
|
|
46
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
47
|
+
* @summary Acquire Document Checkout Handler
|
|
48
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
49
|
+
* @param {string} [authorization]
|
|
50
|
+
* @param {string} [ksUat]
|
|
51
|
+
* @param {*} [options] Override http request option.
|
|
52
|
+
* @throws {RequiredError}
|
|
53
|
+
* @memberof DocumentCheckoutApiInterface
|
|
54
|
+
*/
|
|
55
|
+
acquireDocumentCheckoutRaw(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
|
|
56
|
+
/**
|
|
57
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
58
|
+
* Acquire Document Checkout Handler
|
|
59
|
+
*/
|
|
60
|
+
acquireDocumentCheckout(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Creates request options for getDocumentCheckout without sending the request
|
|
63
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
64
|
+
* @param {string} [authorization]
|
|
65
|
+
* @param {string} [ksUat]
|
|
66
|
+
* @throws {RequiredError}
|
|
67
|
+
* @memberof DocumentCheckoutApiInterface
|
|
68
|
+
*/
|
|
69
|
+
getDocumentCheckoutRequestOpts(requestParameters: GetDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
70
|
+
/**
|
|
71
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
72
|
+
* @summary Get Document Checkout Handler
|
|
73
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
74
|
+
* @param {string} [authorization]
|
|
75
|
+
* @param {string} [ksUat]
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
* @memberof DocumentCheckoutApiInterface
|
|
79
|
+
*/
|
|
80
|
+
getDocumentCheckoutRaw(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
|
|
81
|
+
/**
|
|
82
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
83
|
+
* Get Document Checkout Handler
|
|
84
|
+
*/
|
|
85
|
+
getDocumentCheckout(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* Creates request options for releaseDocumentCheckout without sending the request
|
|
88
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
89
|
+
* @param {string} [authorization]
|
|
90
|
+
* @param {string} [ksUat]
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
* @memberof DocumentCheckoutApiInterface
|
|
93
|
+
*/
|
|
94
|
+
releaseDocumentCheckoutRequestOpts(requestParameters: ReleaseDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
95
|
+
/**
|
|
96
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
97
|
+
* @summary Release Document Checkout Handler
|
|
98
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
99
|
+
* @param {string} [authorization]
|
|
100
|
+
* @param {string} [ksUat]
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
* @memberof DocumentCheckoutApiInterface
|
|
104
|
+
*/
|
|
105
|
+
releaseDocumentCheckoutRaw(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
106
|
+
/**
|
|
107
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
108
|
+
* Release Document Checkout Handler
|
|
109
|
+
*/
|
|
110
|
+
releaseDocumentCheckout(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
export declare class DocumentCheckoutApi extends runtime.BaseAPI implements DocumentCheckoutApiInterface {
|
|
116
|
+
/**
|
|
117
|
+
* Creates request options for acquireDocumentCheckout without sending the request
|
|
118
|
+
*/
|
|
119
|
+
acquireDocumentCheckoutRequestOpts(requestParameters: AcquireDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
120
|
+
/**
|
|
121
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
122
|
+
* Acquire Document Checkout Handler
|
|
123
|
+
*/
|
|
124
|
+
acquireDocumentCheckoutRaw(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
|
|
125
|
+
/**
|
|
126
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
127
|
+
* Acquire Document Checkout Handler
|
|
128
|
+
*/
|
|
129
|
+
acquireDocumentCheckout(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* Creates request options for getDocumentCheckout without sending the request
|
|
132
|
+
*/
|
|
133
|
+
getDocumentCheckoutRequestOpts(requestParameters: GetDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
134
|
+
/**
|
|
135
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
136
|
+
* Get Document Checkout Handler
|
|
137
|
+
*/
|
|
138
|
+
getDocumentCheckoutRaw(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
|
|
139
|
+
/**
|
|
140
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
141
|
+
* Get Document Checkout Handler
|
|
142
|
+
*/
|
|
143
|
+
getDocumentCheckout(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
|
|
144
|
+
/**
|
|
145
|
+
* Creates request options for releaseDocumentCheckout without sending the request
|
|
146
|
+
*/
|
|
147
|
+
releaseDocumentCheckoutRequestOpts(requestParameters: ReleaseDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
148
|
+
/**
|
|
149
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
150
|
+
* Release Document Checkout Handler
|
|
151
|
+
*/
|
|
152
|
+
releaseDocumentCheckoutRaw(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
153
|
+
/**
|
|
154
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
155
|
+
* Release Document Checkout Handler
|
|
156
|
+
*/
|
|
157
|
+
releaseDocumentCheckout(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
158
|
+
}
|