@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
@@ -0,0 +1,56 @@
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
+ export const DocumentCheckoutResponsePropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the DocumentCheckoutResponse interface.
17
+ */
18
+ export function instanceOfDocumentCheckoutResponse(value) {
19
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
20
+ return false;
21
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
22
+ return false;
23
+ if (!('userId' in value) || value['userId'] === undefined)
24
+ return false;
25
+ if (!('acquiredAt' in value) || value['acquiredAt'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ export function DocumentCheckoutResponseFromJSON(json) {
30
+ return DocumentCheckoutResponseFromJSONTyped(json, false);
31
+ }
32
+ export function DocumentCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'tenantId': json['tenant_id'],
38
+ 'pathPartId': json['path_part_id'],
39
+ 'userId': json['user_id'],
40
+ 'acquiredAt': (new Date(json['acquired_at'])),
41
+ };
42
+ }
43
+ export function DocumentCheckoutResponseToJSON(json) {
44
+ return DocumentCheckoutResponseToJSONTyped(json, false);
45
+ }
46
+ export function DocumentCheckoutResponseToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'tenant_id': value['tenantId'],
52
+ 'path_part_id': value['pathPartId'],
53
+ 'user_id': value['userId'],
54
+ 'acquired_at': value['acquiredAt'].toISOString(),
55
+ };
56
+ }
@@ -12,6 +12,7 @@
12
12
  import type { DocumentOrigin } from './DocumentOrigin';
13
13
  import type { TagResponse } from './TagResponse';
14
14
  import type { DocumentType } from './DocumentType';
15
+ import type { DocumentCheckoutResponse } from './DocumentCheckoutResponse';
15
16
  import type { DocumentVersionResponse } from './DocumentVersionResponse';
16
17
  /**
17
18
  * Document response model.
@@ -127,6 +128,12 @@ export interface DocumentResponse {
127
128
  * @memberof DocumentResponse
128
129
  */
129
130
  canWrite?: boolean | null;
131
+ /**
132
+ * Active write-lock state. Null when no checkout is held. Populated on detail endpoints (GET /v1/documents/{id}). Any tenant member with read access may observe this state.
133
+ * @type {DocumentCheckoutResponse}
134
+ * @memberof DocumentResponse
135
+ */
136
+ checkout?: DocumentCheckoutResponse | null;
130
137
  }
131
138
  /**
132
139
  * @export
@@ -14,6 +14,7 @@
14
14
  import { DocumentOriginFromJSON, DocumentOriginToJSON, } from './DocumentOrigin';
15
15
  import { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
16
16
  import { DocumentTypeFromJSON, DocumentTypeToJSON, } from './DocumentType';
17
+ import { DocumentCheckoutResponseFromJSON, DocumentCheckoutResponseToJSON, } from './DocumentCheckoutResponse';
17
18
  import { DocumentVersionResponseFromJSON, DocumentVersionResponseToJSON, } from './DocumentVersionResponse';
18
19
  /**
19
20
  * @export
@@ -86,6 +87,7 @@ export function DocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
86
87
  'updatedAt': (new Date(json['updated_at'])),
87
88
  'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
88
89
  'canWrite': json['can_write'] == null ? undefined : json['can_write'],
90
+ 'checkout': json['checkout'] == null ? undefined : DocumentCheckoutResponseFromJSON(json['checkout']),
89
91
  };
90
92
  }
91
93
  export function DocumentResponseToJSON(json) {
@@ -114,5 +116,6 @@ export function DocumentResponseToJSONTyped(value, ignoreDiscriminator = false)
114
116
  'updated_at': value['updatedAt'].toISOString(),
115
117
  'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
116
118
  'can_write': value['canWrite'],
119
+ 'checkout': DocumentCheckoutResponseToJSON(value['checkout']),
117
120
  };
118
121
  }
@@ -41,6 +41,7 @@ export * from './CreateThreadRequest';
41
41
  export * from './CreateWorkflowDefinitionRequest';
42
42
  export * from './DirectorySyncResponse';
43
43
  export * from './DissolveSectionResponse';
44
+ export * from './DocumentCheckoutResponse';
44
45
  export * from './DocumentOrigin';
45
46
  export * from './DocumentResponse';
46
47
  export * from './DocumentType';
@@ -139,7 +140,6 @@ export * from './RejectFileRequest';
139
140
  export * from './ResolvedReferenceInput';
140
141
  export * from './ResolvedReferenceOutput';
141
142
  export * from './RootResponse';
142
- export * from './RunLockResponse';
143
143
  export * from './SSOInitiateResponse';
144
144
  export * from './ScoredChunkResponse';
145
145
  export * from './SearchSortOrder';
@@ -43,6 +43,7 @@ export * from './CreateThreadRequest';
43
43
  export * from './CreateWorkflowDefinitionRequest';
44
44
  export * from './DirectorySyncResponse';
45
45
  export * from './DissolveSectionResponse';
46
+ export * from './DocumentCheckoutResponse';
46
47
  export * from './DocumentOrigin';
47
48
  export * from './DocumentResponse';
48
49
  export * from './DocumentType';
@@ -141,7 +142,6 @@ export * from './RejectFileRequest';
141
142
  export * from './ResolvedReferenceInput';
142
143
  export * from './ResolvedReferenceOutput';
143
144
  export * from './RootResponse';
144
- export * from './RunLockResponse';
145
145
  export * from './SSOInitiateResponse';
146
146
  export * from './ScoredChunkResponse';
147
147
  export * from './SearchSortOrder';
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Active checkout state on a document.
14
+ * @export
15
+ * @interface DocumentCheckoutResponse
16
+ */
17
+ export interface DocumentCheckoutResponse {
18
+ /**
19
+ * Tenant ID
20
+ * @type {string}
21
+ * @memberof DocumentCheckoutResponse
22
+ */
23
+ tenantId: string;
24
+ /**
25
+ * Document's PathPart ID
26
+ * @type {string}
27
+ * @memberof DocumentCheckoutResponse
28
+ */
29
+ pathPartId: string;
30
+ /**
31
+ * User who holds the checkout
32
+ * @type {string}
33
+ * @memberof DocumentCheckoutResponse
34
+ */
35
+ userId: string;
36
+ /**
37
+ * When the checkout was acquired
38
+ * @type {Date}
39
+ * @memberof DocumentCheckoutResponse
40
+ */
41
+ acquiredAt: Date;
42
+ }
43
+ export declare const DocumentCheckoutResponsePropertyValidationAttributesMap: {
44
+ [property: string]: {
45
+ maxLength?: number;
46
+ minLength?: number;
47
+ pattern?: string;
48
+ maximum?: number;
49
+ exclusiveMaximum?: boolean;
50
+ minimum?: number;
51
+ exclusiveMinimum?: boolean;
52
+ multipleOf?: number;
53
+ maxItems?: number;
54
+ minItems?: number;
55
+ uniqueItems?: boolean;
56
+ };
57
+ };
58
+ /**
59
+ * Check if a given object implements the DocumentCheckoutResponse interface.
60
+ */
61
+ export declare function instanceOfDocumentCheckoutResponse(value: object): value is DocumentCheckoutResponse;
62
+ export declare function DocumentCheckoutResponseFromJSON(json: any): DocumentCheckoutResponse;
63
+ export declare function DocumentCheckoutResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentCheckoutResponse;
64
+ export declare function DocumentCheckoutResponseToJSON(json: any): DocumentCheckoutResponse;
65
+ export declare function DocumentCheckoutResponseToJSONTyped(value?: DocumentCheckoutResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.DocumentCheckoutResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfDocumentCheckoutResponse = instanceOfDocumentCheckoutResponse;
18
+ exports.DocumentCheckoutResponseFromJSON = DocumentCheckoutResponseFromJSON;
19
+ exports.DocumentCheckoutResponseFromJSONTyped = DocumentCheckoutResponseFromJSONTyped;
20
+ exports.DocumentCheckoutResponseToJSON = DocumentCheckoutResponseToJSON;
21
+ exports.DocumentCheckoutResponseToJSONTyped = DocumentCheckoutResponseToJSONTyped;
22
+ exports.DocumentCheckoutResponsePropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the DocumentCheckoutResponse interface.
25
+ */
26
+ function instanceOfDocumentCheckoutResponse(value) {
27
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
28
+ return false;
29
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
30
+ return false;
31
+ if (!('userId' in value) || value['userId'] === undefined)
32
+ return false;
33
+ if (!('acquiredAt' in value) || value['acquiredAt'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function DocumentCheckoutResponseFromJSON(json) {
38
+ return DocumentCheckoutResponseFromJSONTyped(json, false);
39
+ }
40
+ function DocumentCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'tenantId': json['tenant_id'],
46
+ 'pathPartId': json['path_part_id'],
47
+ 'userId': json['user_id'],
48
+ 'acquiredAt': (new Date(json['acquired_at'])),
49
+ };
50
+ }
51
+ function DocumentCheckoutResponseToJSON(json) {
52
+ return DocumentCheckoutResponseToJSONTyped(json, false);
53
+ }
54
+ function DocumentCheckoutResponseToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'tenant_id': value['tenantId'],
60
+ 'path_part_id': value['pathPartId'],
61
+ 'user_id': value['userId'],
62
+ 'acquired_at': value['acquiredAt'].toISOString(),
63
+ };
64
+ }
@@ -12,6 +12,7 @@
12
12
  import type { DocumentOrigin } from './DocumentOrigin';
13
13
  import type { TagResponse } from './TagResponse';
14
14
  import type { DocumentType } from './DocumentType';
15
+ import type { DocumentCheckoutResponse } from './DocumentCheckoutResponse';
15
16
  import type { DocumentVersionResponse } from './DocumentVersionResponse';
16
17
  /**
17
18
  * Document response model.
@@ -127,6 +128,12 @@ export interface DocumentResponse {
127
128
  * @memberof DocumentResponse
128
129
  */
129
130
  canWrite?: boolean | null;
131
+ /**
132
+ * Active write-lock state. Null when no checkout is held. Populated on detail endpoints (GET /v1/documents/{id}). Any tenant member with read access may observe this state.
133
+ * @type {DocumentCheckoutResponse}
134
+ * @memberof DocumentResponse
135
+ */
136
+ checkout?: DocumentCheckoutResponse | null;
130
137
  }
131
138
  /**
132
139
  * @export
@@ -22,6 +22,7 @@ exports.DocumentResponseToJSONTyped = DocumentResponseToJSONTyped;
22
22
  const DocumentOrigin_1 = require("./DocumentOrigin");
23
23
  const TagResponse_1 = require("./TagResponse");
24
24
  const DocumentType_1 = require("./DocumentType");
25
+ const DocumentCheckoutResponse_1 = require("./DocumentCheckoutResponse");
25
26
  const DocumentVersionResponse_1 = require("./DocumentVersionResponse");
26
27
  /**
27
28
  * @export
@@ -94,6 +95,7 @@ function DocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
94
95
  'updatedAt': (new Date(json['updated_at'])),
95
96
  'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponse_1.TagResponseFromJSON)),
96
97
  'canWrite': json['can_write'] == null ? undefined : json['can_write'],
98
+ 'checkout': json['checkout'] == null ? undefined : (0, DocumentCheckoutResponse_1.DocumentCheckoutResponseFromJSON)(json['checkout']),
97
99
  };
98
100
  }
99
101
  function DocumentResponseToJSON(json) {
@@ -122,5 +124,6 @@ function DocumentResponseToJSONTyped(value, ignoreDiscriminator = false) {
122
124
  'updated_at': value['updatedAt'].toISOString(),
123
125
  'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponse_1.TagResponseToJSON)),
124
126
  'can_write': value['canWrite'],
127
+ 'checkout': (0, DocumentCheckoutResponse_1.DocumentCheckoutResponseToJSON)(value['checkout']),
125
128
  };
126
129
  }
@@ -41,6 +41,7 @@ export * from './CreateThreadRequest';
41
41
  export * from './CreateWorkflowDefinitionRequest';
42
42
  export * from './DirectorySyncResponse';
43
43
  export * from './DissolveSectionResponse';
44
+ export * from './DocumentCheckoutResponse';
44
45
  export * from './DocumentOrigin';
45
46
  export * from './DocumentResponse';
46
47
  export * from './DocumentType';
@@ -139,7 +140,6 @@ export * from './RejectFileRequest';
139
140
  export * from './ResolvedReferenceInput';
140
141
  export * from './ResolvedReferenceOutput';
141
142
  export * from './RootResponse';
142
- export * from './RunLockResponse';
143
143
  export * from './SSOInitiateResponse';
144
144
  export * from './ScoredChunkResponse';
145
145
  export * from './SearchSortOrder';
@@ -59,6 +59,7 @@ __exportStar(require("./CreateThreadRequest"), exports);
59
59
  __exportStar(require("./CreateWorkflowDefinitionRequest"), exports);
60
60
  __exportStar(require("./DirectorySyncResponse"), exports);
61
61
  __exportStar(require("./DissolveSectionResponse"), exports);
62
+ __exportStar(require("./DocumentCheckoutResponse"), exports);
62
63
  __exportStar(require("./DocumentOrigin"), exports);
63
64
  __exportStar(require("./DocumentResponse"), exports);
64
65
  __exportStar(require("./DocumentType"), exports);
@@ -157,7 +158,6 @@ __exportStar(require("./RejectFileRequest"), exports);
157
158
  __exportStar(require("./ResolvedReferenceInput"), exports);
158
159
  __exportStar(require("./ResolvedReferenceOutput"), exports);
159
160
  __exportStar(require("./RootResponse"), exports);
160
- __exportStar(require("./RunLockResponse"), exports);
161
161
  __exportStar(require("./SSOInitiateResponse"), exports);
162
162
  __exportStar(require("./ScoredChunkResponse"), exports);
163
163
  __exportStar(require("./SearchSortOrder"), exports);
@@ -0,0 +1,233 @@
1
+ # DocumentCheckoutApi
2
+
3
+ All URIs are relative to *http://localhost:8000*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**acquireDocumentCheckout**](DocumentCheckoutApi.md#acquiredocumentcheckout) | **POST** /v1/documents/{path_part_id}/checkout | Acquire Document Checkout Handler |
8
+ | [**getDocumentCheckout**](DocumentCheckoutApi.md#getdocumentcheckout) | **GET** /v1/documents/{path_part_id}/checkout | Get Document Checkout Handler |
9
+ | [**releaseDocumentCheckout**](DocumentCheckoutApi.md#releasedocumentcheckout) | **DELETE** /v1/documents/{path_part_id}/checkout | Release Document Checkout Handler |
10
+
11
+
12
+
13
+ ## acquireDocumentCheckout
14
+
15
+ > DocumentCheckoutResponse acquireDocumentCheckout(pathPartId, authorization, ksUat)
16
+
17
+ Acquire Document Checkout Handler
18
+
19
+ 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.
20
+
21
+ ### Example
22
+
23
+ ```ts
24
+ import {
25
+ Configuration,
26
+ DocumentCheckoutApi,
27
+ } from '@knowledge-stack/ksapi';
28
+ import type { AcquireDocumentCheckoutRequest } from '@knowledge-stack/ksapi';
29
+
30
+ async function example() {
31
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
32
+ const api = new DocumentCheckoutApi();
33
+
34
+ const body = {
35
+ // string | Document\'s PathPart ID
36
+ pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
37
+ // string (optional)
38
+ authorization: authorization_example,
39
+ // string (optional)
40
+ ksUat: ksUat_example,
41
+ } satisfies AcquireDocumentCheckoutRequest;
42
+
43
+ try {
44
+ const data = await api.acquireDocumentCheckout(body);
45
+ console.log(data);
46
+ } catch (error) {
47
+ console.error(error);
48
+ }
49
+ }
50
+
51
+ // Run the test
52
+ example().catch(console.error);
53
+ ```
54
+
55
+ ### Parameters
56
+
57
+
58
+ | Name | Type | Description | Notes |
59
+ |------------- | ------------- | ------------- | -------------|
60
+ | **pathPartId** | `string` | Document\'s PathPart ID | [Defaults to `undefined`] |
61
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
62
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
63
+
64
+ ### Return type
65
+
66
+ [**DocumentCheckoutResponse**](DocumentCheckoutResponse.md)
67
+
68
+ ### Authorization
69
+
70
+ No authorization required
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: Not defined
75
+ - **Accept**: `application/json`
76
+
77
+
78
+ ### HTTP response details
79
+ | Status code | Description | Response headers |
80
+ |-------------|-------------|------------------|
81
+ | **200** | Successful Response | - |
82
+ | **422** | Validation Error | - |
83
+
84
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
85
+
86
+
87
+ ## getDocumentCheckout
88
+
89
+ > DocumentCheckoutResponse getDocumentCheckout(pathPartId, authorization, ksUat)
90
+
91
+ Get Document Checkout Handler
92
+
93
+ 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).
94
+
95
+ ### Example
96
+
97
+ ```ts
98
+ import {
99
+ Configuration,
100
+ DocumentCheckoutApi,
101
+ } from '@knowledge-stack/ksapi';
102
+ import type { GetDocumentCheckoutRequest } from '@knowledge-stack/ksapi';
103
+
104
+ async function example() {
105
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
106
+ const api = new DocumentCheckoutApi();
107
+
108
+ const body = {
109
+ // string | Document\'s PathPart ID
110
+ pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
111
+ // string (optional)
112
+ authorization: authorization_example,
113
+ // string (optional)
114
+ ksUat: ksUat_example,
115
+ } satisfies GetDocumentCheckoutRequest;
116
+
117
+ try {
118
+ const data = await api.getDocumentCheckout(body);
119
+ console.log(data);
120
+ } catch (error) {
121
+ console.error(error);
122
+ }
123
+ }
124
+
125
+ // Run the test
126
+ example().catch(console.error);
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+
132
+ | Name | Type | Description | Notes |
133
+ |------------- | ------------- | ------------- | -------------|
134
+ | **pathPartId** | `string` | Document\'s PathPart ID | [Defaults to `undefined`] |
135
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
136
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
137
+
138
+ ### Return type
139
+
140
+ [**DocumentCheckoutResponse**](DocumentCheckoutResponse.md)
141
+
142
+ ### Authorization
143
+
144
+ No authorization required
145
+
146
+ ### HTTP request headers
147
+
148
+ - **Content-Type**: Not defined
149
+ - **Accept**: `application/json`
150
+
151
+
152
+ ### HTTP response details
153
+ | Status code | Description | Response headers |
154
+ |-------------|-------------|------------------|
155
+ | **200** | Successful Response | - |
156
+ | **422** | Validation Error | - |
157
+
158
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
159
+
160
+
161
+ ## releaseDocumentCheckout
162
+
163
+ > releaseDocumentCheckout(pathPartId, authorization, ksUat)
164
+
165
+ Release Document Checkout Handler
166
+
167
+ 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).
168
+
169
+ ### Example
170
+
171
+ ```ts
172
+ import {
173
+ Configuration,
174
+ DocumentCheckoutApi,
175
+ } from '@knowledge-stack/ksapi';
176
+ import type { ReleaseDocumentCheckoutRequest } from '@knowledge-stack/ksapi';
177
+
178
+ async function example() {
179
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
180
+ const api = new DocumentCheckoutApi();
181
+
182
+ const body = {
183
+ // string | Document\'s PathPart ID
184
+ pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
185
+ // string (optional)
186
+ authorization: authorization_example,
187
+ // string (optional)
188
+ ksUat: ksUat_example,
189
+ } satisfies ReleaseDocumentCheckoutRequest;
190
+
191
+ try {
192
+ const data = await api.releaseDocumentCheckout(body);
193
+ console.log(data);
194
+ } catch (error) {
195
+ console.error(error);
196
+ }
197
+ }
198
+
199
+ // Run the test
200
+ example().catch(console.error);
201
+ ```
202
+
203
+ ### Parameters
204
+
205
+
206
+ | Name | Type | Description | Notes |
207
+ |------------- | ------------- | ------------- | -------------|
208
+ | **pathPartId** | `string` | Document\'s PathPart ID | [Defaults to `undefined`] |
209
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
210
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
211
+
212
+ ### Return type
213
+
214
+ `void` (Empty response body)
215
+
216
+ ### Authorization
217
+
218
+ No authorization required
219
+
220
+ ### HTTP request headers
221
+
222
+ - **Content-Type**: Not defined
223
+ - **Accept**: `application/json`
224
+
225
+
226
+ ### HTTP response details
227
+ | Status code | Description | Response headers |
228
+ |-------------|-------------|------------------|
229
+ | **204** | Successful Response | - |
230
+ | **422** | Validation Error | - |
231
+
232
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
233
+
@@ -1,27 +1,29 @@
1
1
 
2
- # RunLockResponse
2
+ # DocumentCheckoutResponse
3
3
 
4
- Reviewer-lock state on a workflow run.
4
+ Active checkout state on a document.
5
5
 
6
6
  ## Properties
7
7
 
8
8
  Name | Type
9
9
  ------------ | -------------
10
- `runId` | string
11
- `lockUserId` | string
12
- `lockAcquiredAt` | Date
10
+ `tenantId` | string
11
+ `pathPartId` | string
12
+ `userId` | string
13
+ `acquiredAt` | Date
13
14
 
14
15
  ## Example
15
16
 
16
17
  ```typescript
17
- import type { RunLockResponse } from '@knowledge-stack/ksapi'
18
+ import type { DocumentCheckoutResponse } from '@knowledge-stack/ksapi'
18
19
 
19
20
  // TODO: Update the object below with actual values
20
21
  const example = {
21
- "runId": null,
22
- "lockUserId": null,
23
- "lockAcquiredAt": null,
24
- } satisfies RunLockResponse
22
+ "tenantId": null,
23
+ "pathPartId": null,
24
+ "userId": null,
25
+ "acquiredAt": null,
26
+ } satisfies DocumentCheckoutResponse
25
27
 
26
28
  console.log(example)
27
29
 
@@ -30,7 +32,7 @@ const exampleJSON: string = JSON.stringify(example)
30
32
  console.log(exampleJSON)
31
33
 
32
34
  // Parse the JSON string back to an object
33
- const exampleParsed = JSON.parse(exampleJSON) as RunLockResponse
35
+ const exampleParsed = JSON.parse(exampleJSON) as DocumentCheckoutResponse
34
36
  console.log(exampleParsed)
35
37
  ```
36
38
 
@@ -25,6 +25,7 @@ Name | Type
25
25
  `updatedAt` | Date
26
26
  `tags` | [Array<TagResponse>](TagResponse.md)
27
27
  `canWrite` | boolean
28
+ `checkout` | [DocumentCheckoutResponse](DocumentCheckoutResponse.md)
28
29
 
29
30
  ## Example
30
31
 
@@ -51,6 +52,7 @@ const example = {
51
52
  "updatedAt": null,
52
53
  "tags": null,
53
54
  "canWrite": null,
55
+ "checkout": null,
54
56
  } satisfies DocumentResponse
55
57
 
56
58
  console.log(example)
@@ -24,6 +24,7 @@ Name | Type
24
24
  `activeVersionId` | string
25
25
  `activeVersion` | [DocumentVersionResponse](DocumentVersionResponse.md)
26
26
  `ownerTenantUserId` | string
27
+ `checkout` | [DocumentCheckoutResponse](DocumentCheckoutResponse.md)
27
28
 
28
29
  ## Example
29
30
 
@@ -50,6 +51,7 @@ const example = {
50
51
  "activeVersionId": null,
51
52
  "activeVersion": null,
52
53
  "ownerTenantUserId": null,
54
+ "checkout": null,
53
55
  } satisfies FolderResponseOrDocumentResponse
54
56
 
55
57
  console.log(example)