@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
package/.openapi-generator/FILES
CHANGED
|
@@ -51,6 +51,8 @@ docs/CreateWorkflowDefinitionRequest.md
|
|
|
51
51
|
docs/DefaultApi.md
|
|
52
52
|
docs/DirectorySyncResponse.md
|
|
53
53
|
docs/DissolveSectionResponse.md
|
|
54
|
+
docs/DocumentCheckoutApi.md
|
|
55
|
+
docs/DocumentCheckoutResponse.md
|
|
54
56
|
docs/DocumentOrigin.md
|
|
55
57
|
docs/DocumentResponse.md
|
|
56
58
|
docs/DocumentType.md
|
|
@@ -157,7 +159,6 @@ docs/RejectFileRequest.md
|
|
|
157
159
|
docs/ResolvedReferenceInput.md
|
|
158
160
|
docs/ResolvedReferenceOutput.md
|
|
159
161
|
docs/RootResponse.md
|
|
160
|
-
docs/RunLockResponse.md
|
|
161
162
|
docs/SSOInitiateResponse.md
|
|
162
163
|
docs/ScoredChunkResponse.md
|
|
163
164
|
docs/SearchSortOrder.md
|
|
@@ -247,6 +248,7 @@ src/apis/AuthApi.ts
|
|
|
247
248
|
src/apis/ChunkLineagesApi.ts
|
|
248
249
|
src/apis/ChunksApi.ts
|
|
249
250
|
src/apis/DefaultApi.ts
|
|
251
|
+
src/apis/DocumentCheckoutApi.ts
|
|
250
252
|
src/apis/DocumentVersionsApi.ts
|
|
251
253
|
src/apis/DocumentsApi.ts
|
|
252
254
|
src/apis/FeaturesApi.ts
|
|
@@ -313,6 +315,7 @@ src/models/CreateThreadRequest.ts
|
|
|
313
315
|
src/models/CreateWorkflowDefinitionRequest.ts
|
|
314
316
|
src/models/DirectorySyncResponse.ts
|
|
315
317
|
src/models/DissolveSectionResponse.ts
|
|
318
|
+
src/models/DocumentCheckoutResponse.ts
|
|
316
319
|
src/models/DocumentOrigin.ts
|
|
317
320
|
src/models/DocumentResponse.ts
|
|
318
321
|
src/models/DocumentType.ts
|
|
@@ -411,7 +414,6 @@ src/models/RejectFileRequest.ts
|
|
|
411
414
|
src/models/ResolvedReferenceInput.ts
|
|
412
415
|
src/models/ResolvedReferenceOutput.ts
|
|
413
416
|
src/models/RootResponse.ts
|
|
414
|
-
src/models/RunLockResponse.ts
|
|
415
417
|
src/models/SSOInitiateResponse.ts
|
|
416
418
|
src/models/ScoredChunkResponse.ts
|
|
417
419
|
src/models/SearchSortOrder.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@1.
|
|
1
|
+
# @knowledge-stack/ksapi@1.86.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -87,6 +87,9 @@ All URIs are relative to *http://localhost:8000*
|
|
|
87
87
|
*ChunksApi* | [**updateChunkMetadata**](docs/ChunksApi.md#updatechunkmetadataoperation) | **PATCH** /v1/chunks/{chunk_id} | Update Chunk Metadata Handler
|
|
88
88
|
*DefaultApi* | [**healthCheck**](docs/DefaultApi.md#healthcheck) | **GET** /healthz | Health Check Handler
|
|
89
89
|
*DefaultApi* | [**hello**](docs/DefaultApi.md#hello) | **GET** / | Root Handler
|
|
90
|
+
*DocumentCheckoutApi* | [**acquireDocumentCheckout**](docs/DocumentCheckoutApi.md#acquiredocumentcheckout) | **POST** /v1/documents/{path_part_id}/checkout | Acquire Document Checkout Handler
|
|
91
|
+
*DocumentCheckoutApi* | [**getDocumentCheckout**](docs/DocumentCheckoutApi.md#getdocumentcheckout) | **GET** /v1/documents/{path_part_id}/checkout | Get Document Checkout Handler
|
|
92
|
+
*DocumentCheckoutApi* | [**releaseDocumentCheckout**](docs/DocumentCheckoutApi.md#releasedocumentcheckout) | **DELETE** /v1/documents/{path_part_id}/checkout | Release Document Checkout Handler
|
|
90
93
|
*DocumentVersionsApi* | [**clearDocumentVersionContents**](docs/DocumentVersionsApi.md#cleardocumentversioncontents) | **DELETE** /v1/document_versions/{version_id}/contents | Clear Document Version Contents Handler
|
|
91
94
|
*DocumentVersionsApi* | [**createDocumentVersion**](docs/DocumentVersionsApi.md#createdocumentversion) | **POST** /v1/documents/{document_id}/versions | Create Document Version Handler
|
|
92
95
|
*DocumentVersionsApi* | [**deleteDocumentVersion**](docs/DocumentVersionsApi.md#deletedocumentversion) | **DELETE** /v1/document_versions/{version_id} | Delete Document Version Handler
|
|
@@ -198,12 +201,10 @@ All URIs are relative to *http://localhost:8000*
|
|
|
198
201
|
*WorkflowMemoryApi* | [**forgetWorkflowMemoryChunk**](docs/WorkflowMemoryApi.md#forgetworkflowmemorychunk) | **DELETE** /v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id} | Forget Workflow Memory Chunk Handler
|
|
199
202
|
*WorkflowMemoryApi* | [**getWorkflowMemoryChunk**](docs/WorkflowMemoryApi.md#getworkflowmemorychunk) | **GET** /v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id} | Get Workflow Memory Chunk Handler
|
|
200
203
|
*WorkflowMemoryApi* | [**listWorkflowMemoryChunks**](docs/WorkflowMemoryApi.md#listworkflowmemorychunks) | **GET** /v1/workflow-definitions/{definition_id}/memory | List Workflow Memory Chunks Handler
|
|
201
|
-
*WorkflowRunsApi* | [**acquireWorkflowRunLock**](docs/WorkflowRunsApi.md#acquireworkflowrunlock) | **POST** /v1/workflow-runs/{run_id}/lock | Acquire Workflow Run Lock Handler
|
|
202
204
|
*WorkflowRunsApi* | [**approveWorkflowRunFile**](docs/WorkflowRunsApi.md#approveworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/approve | Approve Workflow Run File Handler
|
|
203
205
|
*WorkflowRunsApi* | [**deleteWorkflowRun**](docs/WorkflowRunsApi.md#deleteworkflowrun) | **DELETE** /v1/workflow-runs/{run_id} | Delete Workflow Run Handler
|
|
204
206
|
*WorkflowRunsApi* | [**getWorkflowRun**](docs/WorkflowRunsApi.md#getworkflowrun) | **GET** /v1/workflow-runs/{run_id} | Get Workflow Run Handler
|
|
205
207
|
*WorkflowRunsApi* | [**rejectWorkflowRunFile**](docs/WorkflowRunsApi.md#rejectworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/reject | Reject Workflow Run File Handler
|
|
206
|
-
*WorkflowRunsApi* | [**releaseWorkflowRunLock**](docs/WorkflowRunsApi.md#releaseworkflowrunlock) | **DELETE** /v1/workflow-runs/{run_id}/lock | Release Workflow Run Lock Handler
|
|
207
208
|
*WorkflowRunsApi* | [**unapproveWorkflowRunFile**](docs/WorkflowRunsApi.md#unapproveworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/unapprove | Unapprove Workflow Run File Handler
|
|
208
209
|
*WorkflowRunsApi* | [**workflowRunCallback**](docs/WorkflowRunsApi.md#workflowruncallbackoperation) | **POST** /v1/workflow-runs/{run_id}/callback | Workflow Run Callback Handler
|
|
209
210
|
*WorkflowsApi* | [**cancelTemporalWorkflow**](docs/WorkflowsApi.md#canceltemporalworkflow) | **DELETE** /v1/workflows/{workflow_id} | Cancel Temporal Workflow Handler
|
|
@@ -258,6 +259,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
258
259
|
- [CreateWorkflowDefinitionRequest](docs/CreateWorkflowDefinitionRequest.md)
|
|
259
260
|
- [DirectorySyncResponse](docs/DirectorySyncResponse.md)
|
|
260
261
|
- [DissolveSectionResponse](docs/DissolveSectionResponse.md)
|
|
262
|
+
- [DocumentCheckoutResponse](docs/DocumentCheckoutResponse.md)
|
|
261
263
|
- [DocumentOrigin](docs/DocumentOrigin.md)
|
|
262
264
|
- [DocumentResponse](docs/DocumentResponse.md)
|
|
263
265
|
- [DocumentType](docs/DocumentType.md)
|
|
@@ -356,7 +358,6 @@ All URIs are relative to *http://localhost:8000*
|
|
|
356
358
|
- [ResolvedReferenceInput](docs/ResolvedReferenceInput.md)
|
|
357
359
|
- [ResolvedReferenceOutput](docs/ResolvedReferenceOutput.md)
|
|
358
360
|
- [RootResponse](docs/RootResponse.md)
|
|
359
|
-
- [RunLockResponse](docs/RunLockResponse.md)
|
|
360
361
|
- [SSOInitiateResponse](docs/SSOInitiateResponse.md)
|
|
361
362
|
- [ScoredChunkResponse](docs/ScoredChunkResponse.md)
|
|
362
363
|
- [SearchSortOrder](docs/SearchSortOrder.md)
|
|
@@ -439,7 +440,7 @@ and is automatically generated by the
|
|
|
439
440
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
440
441
|
|
|
441
442
|
- API version: `0.1.0`
|
|
442
|
-
- Package version: `1.
|
|
443
|
+
- Package version: `1.86.0`
|
|
443
444
|
- Generator version: `7.21.0`
|
|
444
445
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
445
446
|
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
49
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
50
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
51
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
52
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
53
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
54
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
+
exports.DocumentCheckoutApi = void 0;
|
|
59
|
+
const runtime = __importStar(require("../runtime"));
|
|
60
|
+
const index_1 = require("../models/index");
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
class DocumentCheckoutApi extends runtime.BaseAPI {
|
|
65
|
+
/**
|
|
66
|
+
* Creates request options for acquireDocumentCheckout without sending the request
|
|
67
|
+
*/
|
|
68
|
+
acquireDocumentCheckoutRequestOpts(requestParameters) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
if (requestParameters['pathPartId'] == null) {
|
|
71
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling acquireDocumentCheckout().');
|
|
72
|
+
}
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
if (requestParameters['authorization'] != null) {
|
|
76
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
77
|
+
}
|
|
78
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
79
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
80
|
+
return {
|
|
81
|
+
path: urlPath,
|
|
82
|
+
method: 'POST',
|
|
83
|
+
headers: headerParameters,
|
|
84
|
+
query: queryParameters,
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 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.
|
|
90
|
+
* Acquire Document Checkout Handler
|
|
91
|
+
*/
|
|
92
|
+
acquireDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
const requestOptions = yield this.acquireDocumentCheckoutRequestOpts(requestParameters);
|
|
95
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
96
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DocumentCheckoutResponseFromJSON)(jsonValue));
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* 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.
|
|
101
|
+
* Acquire Document Checkout Handler
|
|
102
|
+
*/
|
|
103
|
+
acquireDocumentCheckout(requestParameters, initOverrides) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
const response = yield this.acquireDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
106
|
+
return yield response.value();
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Creates request options for getDocumentCheckout without sending the request
|
|
111
|
+
*/
|
|
112
|
+
getDocumentCheckoutRequestOpts(requestParameters) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
if (requestParameters['pathPartId'] == null) {
|
|
115
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getDocumentCheckout().');
|
|
116
|
+
}
|
|
117
|
+
const queryParameters = {};
|
|
118
|
+
const headerParameters = {};
|
|
119
|
+
if (requestParameters['authorization'] != null) {
|
|
120
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
121
|
+
}
|
|
122
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
123
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
124
|
+
return {
|
|
125
|
+
path: urlPath,
|
|
126
|
+
method: 'GET',
|
|
127
|
+
headers: headerParameters,
|
|
128
|
+
query: queryParameters,
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* 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).
|
|
134
|
+
* Get Document Checkout Handler
|
|
135
|
+
*/
|
|
136
|
+
getDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const requestOptions = yield this.getDocumentCheckoutRequestOpts(requestParameters);
|
|
139
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
140
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DocumentCheckoutResponseFromJSON)(jsonValue));
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* 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).
|
|
145
|
+
* Get Document Checkout Handler
|
|
146
|
+
*/
|
|
147
|
+
getDocumentCheckout(requestParameters, initOverrides) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
const response = yield this.getDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
150
|
+
return yield response.value();
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Creates request options for releaseDocumentCheckout without sending the request
|
|
155
|
+
*/
|
|
156
|
+
releaseDocumentCheckoutRequestOpts(requestParameters) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
if (requestParameters['pathPartId'] == null) {
|
|
159
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling releaseDocumentCheckout().');
|
|
160
|
+
}
|
|
161
|
+
const queryParameters = {};
|
|
162
|
+
const headerParameters = {};
|
|
163
|
+
if (requestParameters['authorization'] != null) {
|
|
164
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
165
|
+
}
|
|
166
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
167
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
168
|
+
return {
|
|
169
|
+
path: urlPath,
|
|
170
|
+
method: 'DELETE',
|
|
171
|
+
headers: headerParameters,
|
|
172
|
+
query: queryParameters,
|
|
173
|
+
};
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* 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).
|
|
178
|
+
* Release Document Checkout Handler
|
|
179
|
+
*/
|
|
180
|
+
releaseDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
const requestOptions = yield this.releaseDocumentCheckoutRequestOpts(requestParameters);
|
|
183
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
184
|
+
return new runtime.VoidApiResponse(response);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* 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).
|
|
189
|
+
* Release Document Checkout Handler
|
|
190
|
+
*/
|
|
191
|
+
releaseDocumentCheckout(requestParameters, initOverrides) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
yield this.releaseDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
exports.DocumentCheckoutApi = DocumentCheckoutApi;
|