@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.
Files changed (43) hide show
  1. package/.openapi-generator/FILES +4 -2
  2. package/README.md +6 -5
  3. package/dist/apis/DocumentCheckoutApi.d.ts +158 -0
  4. package/dist/apis/DocumentCheckoutApi.js +197 -0
  5. package/dist/apis/WorkflowRunsApi.d.ts +13 -101
  6. package/dist/apis/WorkflowRunsApi.js +6 -93
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/DocumentCheckoutApi.d.ts +158 -0
  10. package/dist/esm/apis/DocumentCheckoutApi.js +160 -0
  11. package/dist/esm/apis/WorkflowRunsApi.d.ts +13 -101
  12. package/dist/esm/apis/WorkflowRunsApi.js +7 -94
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/DocumentCheckoutResponse.d.ts +65 -0
  16. package/dist/esm/models/DocumentCheckoutResponse.js +56 -0
  17. package/dist/esm/models/DocumentResponse.d.ts +7 -0
  18. package/dist/esm/models/DocumentResponse.js +3 -0
  19. package/dist/esm/models/index.d.ts +1 -1
  20. package/dist/esm/models/index.js +1 -1
  21. package/dist/models/DocumentCheckoutResponse.d.ts +65 -0
  22. package/dist/models/DocumentCheckoutResponse.js +64 -0
  23. package/dist/models/DocumentResponse.d.ts +7 -0
  24. package/dist/models/DocumentResponse.js +3 -0
  25. package/dist/models/index.d.ts +1 -1
  26. package/dist/models/index.js +1 -1
  27. package/docs/DocumentCheckoutApi.md +233 -0
  28. package/docs/{RunLockResponse.md → DocumentCheckoutResponse.md} +13 -11
  29. package/docs/DocumentResponse.md +2 -0
  30. package/docs/FolderResponseOrDocumentResponse.md +2 -0
  31. package/docs/WorkflowRunsApi.md +3 -153
  32. package/package.json +1 -1
  33. package/src/apis/DocumentCheckoutApi.ts +296 -0
  34. package/src/apis/WorkflowRunsApi.ts +12 -184
  35. package/src/apis/index.ts +1 -0
  36. package/src/models/DocumentCheckoutResponse.ts +110 -0
  37. package/src/models/DocumentResponse.ts +15 -0
  38. package/src/models/index.ts +1 -1
  39. package/dist/esm/models/RunLockResponse.d.ts +0 -59
  40. package/dist/esm/models/RunLockResponse.js +0 -52
  41. package/dist/models/RunLockResponse.d.ts +0 -59
  42. package/dist/models/RunLockResponse.js +0 -60
  43. package/src/models/RunLockResponse.ts +0 -101
@@ -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 single generated file. Caller must hold the run lock.
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 single generated file with a reason. Caller must hold the run lock.
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``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.84.0",
3
+ "version": "1.86.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,296 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ DocumentCheckoutResponse,
19
+ HTTPValidationError,
20
+ } from '../models/index';
21
+ import {
22
+ DocumentCheckoutResponseFromJSON,
23
+ DocumentCheckoutResponseToJSON,
24
+ HTTPValidationErrorFromJSON,
25
+ HTTPValidationErrorToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface AcquireDocumentCheckoutRequest {
29
+ pathPartId: string;
30
+ authorization?: string | null;
31
+ ksUat?: string | null;
32
+ }
33
+
34
+ export interface GetDocumentCheckoutRequest {
35
+ pathPartId: string;
36
+ authorization?: string | null;
37
+ ksUat?: string | null;
38
+ }
39
+
40
+ export interface ReleaseDocumentCheckoutRequest {
41
+ pathPartId: string;
42
+ authorization?: string | null;
43
+ ksUat?: string | null;
44
+ }
45
+
46
+ /**
47
+ * DocumentCheckoutApi - interface
48
+ *
49
+ * @export
50
+ * @interface DocumentCheckoutApiInterface
51
+ */
52
+ export interface DocumentCheckoutApiInterface {
53
+ /**
54
+ * Creates request options for acquireDocumentCheckout without sending the request
55
+ * @param {string} pathPartId Document\'s PathPart ID
56
+ * @param {string} [authorization]
57
+ * @param {string} [ksUat]
58
+ * @throws {RequiredError}
59
+ * @memberof DocumentCheckoutApiInterface
60
+ */
61
+ acquireDocumentCheckoutRequestOpts(requestParameters: AcquireDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
62
+
63
+ /**
64
+ * 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.
65
+ * @summary Acquire Document Checkout Handler
66
+ * @param {string} pathPartId Document\&#39;s PathPart ID
67
+ * @param {string} [authorization]
68
+ * @param {string} [ksUat]
69
+ * @param {*} [options] Override http request option.
70
+ * @throws {RequiredError}
71
+ * @memberof DocumentCheckoutApiInterface
72
+ */
73
+ acquireDocumentCheckoutRaw(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
74
+
75
+ /**
76
+ * 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.
77
+ * Acquire Document Checkout Handler
78
+ */
79
+ acquireDocumentCheckout(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
80
+
81
+ /**
82
+ * Creates request options for getDocumentCheckout without sending the request
83
+ * @param {string} pathPartId Document\&#39;s PathPart ID
84
+ * @param {string} [authorization]
85
+ * @param {string} [ksUat]
86
+ * @throws {RequiredError}
87
+ * @memberof DocumentCheckoutApiInterface
88
+ */
89
+ getDocumentCheckoutRequestOpts(requestParameters: GetDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
90
+
91
+ /**
92
+ * 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).
93
+ * @summary Get Document Checkout Handler
94
+ * @param {string} pathPartId Document\&#39;s PathPart ID
95
+ * @param {string} [authorization]
96
+ * @param {string} [ksUat]
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ * @memberof DocumentCheckoutApiInterface
100
+ */
101
+ getDocumentCheckoutRaw(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
102
+
103
+ /**
104
+ * 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).
105
+ * Get Document Checkout Handler
106
+ */
107
+ getDocumentCheckout(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
108
+
109
+ /**
110
+ * Creates request options for releaseDocumentCheckout without sending the request
111
+ * @param {string} pathPartId Document\&#39;s PathPart ID
112
+ * @param {string} [authorization]
113
+ * @param {string} [ksUat]
114
+ * @throws {RequiredError}
115
+ * @memberof DocumentCheckoutApiInterface
116
+ */
117
+ releaseDocumentCheckoutRequestOpts(requestParameters: ReleaseDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
118
+
119
+ /**
120
+ * 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).
121
+ * @summary Release Document Checkout Handler
122
+ * @param {string} pathPartId Document\&#39;s PathPart ID
123
+ * @param {string} [authorization]
124
+ * @param {string} [ksUat]
125
+ * @param {*} [options] Override http request option.
126
+ * @throws {RequiredError}
127
+ * @memberof DocumentCheckoutApiInterface
128
+ */
129
+ releaseDocumentCheckoutRaw(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
130
+
131
+ /**
132
+ * 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).
133
+ * Release Document Checkout Handler
134
+ */
135
+ releaseDocumentCheckout(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
136
+
137
+ }
138
+
139
+ /**
140
+ *
141
+ */
142
+ export class DocumentCheckoutApi extends runtime.BaseAPI implements DocumentCheckoutApiInterface {
143
+
144
+ /**
145
+ * Creates request options for acquireDocumentCheckout without sending the request
146
+ */
147
+ async acquireDocumentCheckoutRequestOpts(requestParameters: AcquireDocumentCheckoutRequest): Promise<runtime.RequestOpts> {
148
+ if (requestParameters['pathPartId'] == null) {
149
+ throw new runtime.RequiredError(
150
+ 'pathPartId',
151
+ 'Required parameter "pathPartId" was null or undefined when calling acquireDocumentCheckout().'
152
+ );
153
+ }
154
+
155
+ const queryParameters: any = {};
156
+
157
+ const headerParameters: runtime.HTTPHeaders = {};
158
+
159
+ if (requestParameters['authorization'] != null) {
160
+ headerParameters['authorization'] = String(requestParameters['authorization']);
161
+ }
162
+
163
+
164
+ let urlPath = `/v1/documents/{path_part_id}/checkout`;
165
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
166
+
167
+ return {
168
+ path: urlPath,
169
+ method: 'POST',
170
+ headers: headerParameters,
171
+ query: queryParameters,
172
+ };
173
+ }
174
+
175
+ /**
176
+ * 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.
177
+ * Acquire Document Checkout Handler
178
+ */
179
+ async acquireDocumentCheckoutRaw(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>> {
180
+ const requestOptions = await this.acquireDocumentCheckoutRequestOpts(requestParameters);
181
+ const response = await this.request(requestOptions, initOverrides);
182
+
183
+ return new runtime.JSONApiResponse(response, (jsonValue) => DocumentCheckoutResponseFromJSON(jsonValue));
184
+ }
185
+
186
+ /**
187
+ * 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.
188
+ * Acquire Document Checkout Handler
189
+ */
190
+ async acquireDocumentCheckout(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse> {
191
+ const response = await this.acquireDocumentCheckoutRaw(requestParameters, initOverrides);
192
+ return await response.value();
193
+ }
194
+
195
+ /**
196
+ * Creates request options for getDocumentCheckout without sending the request
197
+ */
198
+ async getDocumentCheckoutRequestOpts(requestParameters: GetDocumentCheckoutRequest): Promise<runtime.RequestOpts> {
199
+ if (requestParameters['pathPartId'] == null) {
200
+ throw new runtime.RequiredError(
201
+ 'pathPartId',
202
+ 'Required parameter "pathPartId" was null or undefined when calling getDocumentCheckout().'
203
+ );
204
+ }
205
+
206
+ const queryParameters: any = {};
207
+
208
+ const headerParameters: runtime.HTTPHeaders = {};
209
+
210
+ if (requestParameters['authorization'] != null) {
211
+ headerParameters['authorization'] = String(requestParameters['authorization']);
212
+ }
213
+
214
+
215
+ let urlPath = `/v1/documents/{path_part_id}/checkout`;
216
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
217
+
218
+ return {
219
+ path: urlPath,
220
+ method: 'GET',
221
+ headers: headerParameters,
222
+ query: queryParameters,
223
+ };
224
+ }
225
+
226
+ /**
227
+ * 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).
228
+ * Get Document Checkout Handler
229
+ */
230
+ async getDocumentCheckoutRaw(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>> {
231
+ const requestOptions = await this.getDocumentCheckoutRequestOpts(requestParameters);
232
+ const response = await this.request(requestOptions, initOverrides);
233
+
234
+ return new runtime.JSONApiResponse(response, (jsonValue) => DocumentCheckoutResponseFromJSON(jsonValue));
235
+ }
236
+
237
+ /**
238
+ * 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).
239
+ * Get Document Checkout Handler
240
+ */
241
+ async getDocumentCheckout(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse> {
242
+ const response = await this.getDocumentCheckoutRaw(requestParameters, initOverrides);
243
+ return await response.value();
244
+ }
245
+
246
+ /**
247
+ * Creates request options for releaseDocumentCheckout without sending the request
248
+ */
249
+ async releaseDocumentCheckoutRequestOpts(requestParameters: ReleaseDocumentCheckoutRequest): Promise<runtime.RequestOpts> {
250
+ if (requestParameters['pathPartId'] == null) {
251
+ throw new runtime.RequiredError(
252
+ 'pathPartId',
253
+ 'Required parameter "pathPartId" was null or undefined when calling releaseDocumentCheckout().'
254
+ );
255
+ }
256
+
257
+ const queryParameters: any = {};
258
+
259
+ const headerParameters: runtime.HTTPHeaders = {};
260
+
261
+ if (requestParameters['authorization'] != null) {
262
+ headerParameters['authorization'] = String(requestParameters['authorization']);
263
+ }
264
+
265
+
266
+ let urlPath = `/v1/documents/{path_part_id}/checkout`;
267
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
268
+
269
+ return {
270
+ path: urlPath,
271
+ method: 'DELETE',
272
+ headers: headerParameters,
273
+ query: queryParameters,
274
+ };
275
+ }
276
+
277
+ /**
278
+ * 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).
279
+ * Release Document Checkout Handler
280
+ */
281
+ async releaseDocumentCheckoutRaw(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
282
+ const requestOptions = await this.releaseDocumentCheckoutRequestOpts(requestParameters);
283
+ const response = await this.request(requestOptions, initOverrides);
284
+
285
+ return new runtime.VoidApiResponse(response);
286
+ }
287
+
288
+ /**
289
+ * 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).
290
+ * Release Document Checkout Handler
291
+ */
292
+ async releaseDocumentCheckout(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
293
+ await this.releaseDocumentCheckoutRaw(requestParameters, initOverrides);
294
+ }
295
+
296
+ }