@knowledge-stack/ksapi 1.84.0 → 1.85.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 -0
- package/README.md +6 -2
- package/dist/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/apis/DocumentCheckoutApi.js +197 -0
- 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/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 -0
- package/dist/esm/models/index.js +1 -0
- 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 -0
- package/dist/models/index.js +1 -0
- package/docs/DocumentCheckoutApi.md +233 -0
- package/docs/DocumentCheckoutResponse.md +41 -0
- package/docs/DocumentResponse.md +2 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/package.json +1 -1
- package/src/apis/DocumentCheckoutApi.ts +296 -0
- 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 -0
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
|
|
@@ -247,6 +249,7 @@ src/apis/AuthApi.ts
|
|
|
247
249
|
src/apis/ChunkLineagesApi.ts
|
|
248
250
|
src/apis/ChunksApi.ts
|
|
249
251
|
src/apis/DefaultApi.ts
|
|
252
|
+
src/apis/DocumentCheckoutApi.ts
|
|
250
253
|
src/apis/DocumentVersionsApi.ts
|
|
251
254
|
src/apis/DocumentsApi.ts
|
|
252
255
|
src/apis/FeaturesApi.ts
|
|
@@ -313,6 +316,7 @@ src/models/CreateThreadRequest.ts
|
|
|
313
316
|
src/models/CreateWorkflowDefinitionRequest.ts
|
|
314
317
|
src/models/DirectorySyncResponse.ts
|
|
315
318
|
src/models/DissolveSectionResponse.ts
|
|
319
|
+
src/models/DocumentCheckoutResponse.ts
|
|
316
320
|
src/models/DocumentOrigin.ts
|
|
317
321
|
src/models/DocumentResponse.ts
|
|
318
322
|
src/models/DocumentType.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@1.
|
|
1
|
+
# @knowledge-stack/ksapi@1.85.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
|
|
@@ -258,6 +261,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
258
261
|
- [CreateWorkflowDefinitionRequest](docs/CreateWorkflowDefinitionRequest.md)
|
|
259
262
|
- [DirectorySyncResponse](docs/DirectorySyncResponse.md)
|
|
260
263
|
- [DissolveSectionResponse](docs/DissolveSectionResponse.md)
|
|
264
|
+
- [DocumentCheckoutResponse](docs/DocumentCheckoutResponse.md)
|
|
261
265
|
- [DocumentOrigin](docs/DocumentOrigin.md)
|
|
262
266
|
- [DocumentResponse](docs/DocumentResponse.md)
|
|
263
267
|
- [DocumentType](docs/DocumentType.md)
|
|
@@ -439,7 +443,7 @@ and is automatically generated by the
|
|
|
439
443
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
440
444
|
|
|
441
445
|
- API version: `0.1.0`
|
|
442
|
-
- Package version: `1.
|
|
446
|
+
- Package version: `1.85.0`
|
|
443
447
|
- Generator version: `7.21.0`
|
|
444
448
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
445
449
|
|
|
@@ -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;
|
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
|
+
}
|