@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
@@ -18,7 +18,6 @@ import type {
18
18
  HTTPValidationError,
19
19
  PathPartApprovalResponse,
20
20
  RejectFileRequest,
21
- RunLockResponse,
22
21
  WorkflowCallbackResponse,
23
22
  WorkflowRunCallbackRequest,
24
23
  WorkflowRunResponse,
@@ -30,8 +29,6 @@ import {
30
29
  PathPartApprovalResponseToJSON,
31
30
  RejectFileRequestFromJSON,
32
31
  RejectFileRequestToJSON,
33
- RunLockResponseFromJSON,
34
- RunLockResponseToJSON,
35
32
  WorkflowCallbackResponseFromJSON,
36
33
  WorkflowCallbackResponseToJSON,
37
34
  WorkflowRunCallbackRequestFromJSON,
@@ -40,12 +37,6 @@ import {
40
37
  WorkflowRunResponseToJSON,
41
38
  } from '../models/index';
42
39
 
43
- export interface AcquireWorkflowRunLockRequest {
44
- runId: string;
45
- authorization?: string | null;
46
- ksUat?: string | null;
47
- }
48
-
49
40
  export interface ApproveWorkflowRunFileRequest {
50
41
  runId: string;
51
42
  pathPartId: string;
@@ -73,12 +64,6 @@ export interface RejectWorkflowRunFileRequest {
73
64
  ksUat?: string | null;
74
65
  }
75
66
 
76
- export interface ReleaseWorkflowRunLockRequest {
77
- runId: string;
78
- authorization?: string | null;
79
- ksUat?: string | null;
80
- }
81
-
82
67
  export interface UnapproveWorkflowRunFileRequest {
83
68
  runId: string;
84
69
  pathPartId: string;
@@ -98,34 +83,6 @@ export interface WorkflowRunCallbackOperationRequest {
98
83
  * @interface WorkflowRunsApiInterface
99
84
  */
100
85
  export interface WorkflowRunsApiInterface {
101
- /**
102
- * Creates request options for acquireWorkflowRunLock without sending the request
103
- * @param {string} runId
104
- * @param {string} [authorization]
105
- * @param {string} [ksUat]
106
- * @throws {RequiredError}
107
- * @memberof WorkflowRunsApiInterface
108
- */
109
- acquireWorkflowRunLockRequestOpts(requestParameters: AcquireWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
110
-
111
- /**
112
- * Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
113
- * @summary Acquire Workflow Run Lock Handler
114
- * @param {string} runId
115
- * @param {string} [authorization]
116
- * @param {string} [ksUat]
117
- * @param {*} [options] Override http request option.
118
- * @throws {RequiredError}
119
- * @memberof WorkflowRunsApiInterface
120
- */
121
- acquireWorkflowRunLockRaw(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RunLockResponse>>;
122
-
123
- /**
124
- * Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
125
- * Acquire Workflow Run Lock Handler
126
- */
127
- acquireWorkflowRunLock(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RunLockResponse>;
128
-
129
86
  /**
130
87
  * Creates request options for approveWorkflowRunFile without sending the request
131
88
  * @param {string} runId
@@ -138,7 +95,7 @@ export interface WorkflowRunsApiInterface {
138
95
  approveWorkflowRunFileRequestOpts(requestParameters: ApproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
139
96
 
140
97
  /**
141
- * Approve a single generated file. Caller must hold the run lock.
98
+ * Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
142
99
  * @summary Approve Workflow Run File Handler
143
100
  * @param {string} runId
144
101
  * @param {string} pathPartId
@@ -151,7 +108,7 @@ export interface WorkflowRunsApiInterface {
151
108
  approveWorkflowRunFileRaw(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
152
109
 
153
110
  /**
154
- * Approve a single generated file. Caller must hold the run lock.
111
+ * Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
155
112
  * Approve Workflow Run File Handler
156
113
  */
157
114
  approveWorkflowRunFile(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
@@ -223,7 +180,7 @@ export interface WorkflowRunsApiInterface {
223
180
  rejectWorkflowRunFileRequestOpts(requestParameters: RejectWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
224
181
 
225
182
  /**
226
- * Reject a single generated file with a reason. Caller must hold the run lock.
183
+ * Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
227
184
  * @summary Reject Workflow Run File Handler
228
185
  * @param {string} runId
229
186
  * @param {string} pathPartId
@@ -237,39 +194,11 @@ export interface WorkflowRunsApiInterface {
237
194
  rejectWorkflowRunFileRaw(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
238
195
 
239
196
  /**
240
- * Reject a single generated file with a reason. Caller must hold the run lock.
197
+ * Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
241
198
  * Reject Workflow Run File Handler
242
199
  */
243
200
  rejectWorkflowRunFile(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
244
201
 
245
- /**
246
- * Creates request options for releaseWorkflowRunLock without sending the request
247
- * @param {string} runId
248
- * @param {string} [authorization]
249
- * @param {string} [ksUat]
250
- * @throws {RequiredError}
251
- * @memberof WorkflowRunsApiInterface
252
- */
253
- releaseWorkflowRunLockRequestOpts(requestParameters: ReleaseWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
254
-
255
- /**
256
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
257
- * @summary Release Workflow Run Lock Handler
258
- * @param {string} runId
259
- * @param {string} [authorization]
260
- * @param {string} [ksUat]
261
- * @param {*} [options] Override http request option.
262
- * @throws {RequiredError}
263
- * @memberof WorkflowRunsApiInterface
264
- */
265
- releaseWorkflowRunLockRaw(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
266
-
267
- /**
268
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
269
- * Release Workflow Run Lock Handler
270
- */
271
- releaseWorkflowRunLock(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
272
-
273
202
  /**
274
203
  * Creates request options for unapproveWorkflowRunFile without sending the request
275
204
  * @param {string} runId
@@ -282,7 +211,7 @@ export interface WorkflowRunsApiInterface {
282
211
  unapproveWorkflowRunFileRequestOpts(requestParameters: UnapproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
283
212
 
284
213
  /**
285
- * Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
214
+ * Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
286
215
  * @summary Unapprove Workflow Run File Handler
287
216
  * @param {string} runId
288
217
  * @param {string} pathPartId
@@ -295,7 +224,7 @@ export interface WorkflowRunsApiInterface {
295
224
  unapproveWorkflowRunFileRaw(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
296
225
 
297
226
  /**
298
- * Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
227
+ * Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
299
228
  * Unapprove Workflow Run File Handler
300
229
  */
301
230
  unapproveWorkflowRunFile(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
@@ -332,57 +261,6 @@ export interface WorkflowRunsApiInterface {
332
261
  */
333
262
  export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiInterface {
334
263
 
335
- /**
336
- * Creates request options for acquireWorkflowRunLock without sending the request
337
- */
338
- async acquireWorkflowRunLockRequestOpts(requestParameters: AcquireWorkflowRunLockRequest): Promise<runtime.RequestOpts> {
339
- if (requestParameters['runId'] == null) {
340
- throw new runtime.RequiredError(
341
- 'runId',
342
- 'Required parameter "runId" was null or undefined when calling acquireWorkflowRunLock().'
343
- );
344
- }
345
-
346
- const queryParameters: any = {};
347
-
348
- const headerParameters: runtime.HTTPHeaders = {};
349
-
350
- if (requestParameters['authorization'] != null) {
351
- headerParameters['authorization'] = String(requestParameters['authorization']);
352
- }
353
-
354
-
355
- let urlPath = `/v1/workflow-runs/{run_id}/lock`;
356
- urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
357
-
358
- return {
359
- path: urlPath,
360
- method: 'POST',
361
- headers: headerParameters,
362
- query: queryParameters,
363
- };
364
- }
365
-
366
- /**
367
- * Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
368
- * Acquire Workflow Run Lock Handler
369
- */
370
- async acquireWorkflowRunLockRaw(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RunLockResponse>> {
371
- const requestOptions = await this.acquireWorkflowRunLockRequestOpts(requestParameters);
372
- const response = await this.request(requestOptions, initOverrides);
373
-
374
- return new runtime.JSONApiResponse(response, (jsonValue) => RunLockResponseFromJSON(jsonValue));
375
- }
376
-
377
- /**
378
- * Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
379
- * Acquire Workflow Run Lock Handler
380
- */
381
- async acquireWorkflowRunLock(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RunLockResponse> {
382
- const response = await this.acquireWorkflowRunLockRaw(requestParameters, initOverrides);
383
- return await response.value();
384
- }
385
-
386
264
  /**
387
265
  * Creates request options for approveWorkflowRunFile without sending the request
388
266
  */
@@ -423,7 +301,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
423
301
  }
424
302
 
425
303
  /**
426
- * Approve a single generated file. Caller must hold the run lock.
304
+ * Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
427
305
  * Approve Workflow Run File Handler
428
306
  */
429
307
  async approveWorkflowRunFileRaw(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>> {
@@ -434,7 +312,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
434
312
  }
435
313
 
436
314
  /**
437
- * Approve a single generated file. Caller must hold the run lock.
315
+ * Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
438
316
  * Approve Workflow Run File Handler
439
317
  */
440
318
  async approveWorkflowRunFile(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse> {
@@ -589,7 +467,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
589
467
  }
590
468
 
591
469
  /**
592
- * Reject a single generated file with a reason. Caller must hold the run lock.
470
+ * Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
593
471
  * Reject Workflow Run File Handler
594
472
  */
595
473
  async rejectWorkflowRunFileRaw(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>> {
@@ -600,7 +478,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
600
478
  }
601
479
 
602
480
  /**
603
- * Reject a single generated file with a reason. Caller must hold the run lock.
481
+ * Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
604
482
  * Reject Workflow Run File Handler
605
483
  */
606
484
  async rejectWorkflowRunFile(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse> {
@@ -608,56 +486,6 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
608
486
  return await response.value();
609
487
  }
610
488
 
611
- /**
612
- * Creates request options for releaseWorkflowRunLock without sending the request
613
- */
614
- async releaseWorkflowRunLockRequestOpts(requestParameters: ReleaseWorkflowRunLockRequest): Promise<runtime.RequestOpts> {
615
- if (requestParameters['runId'] == null) {
616
- throw new runtime.RequiredError(
617
- 'runId',
618
- 'Required parameter "runId" was null or undefined when calling releaseWorkflowRunLock().'
619
- );
620
- }
621
-
622
- const queryParameters: any = {};
623
-
624
- const headerParameters: runtime.HTTPHeaders = {};
625
-
626
- if (requestParameters['authorization'] != null) {
627
- headerParameters['authorization'] = String(requestParameters['authorization']);
628
- }
629
-
630
-
631
- let urlPath = `/v1/workflow-runs/{run_id}/lock`;
632
- urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
633
-
634
- return {
635
- path: urlPath,
636
- method: 'DELETE',
637
- headers: headerParameters,
638
- query: queryParameters,
639
- };
640
- }
641
-
642
- /**
643
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
644
- * Release Workflow Run Lock Handler
645
- */
646
- async releaseWorkflowRunLockRaw(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
647
- const requestOptions = await this.releaseWorkflowRunLockRequestOpts(requestParameters);
648
- const response = await this.request(requestOptions, initOverrides);
649
-
650
- return new runtime.VoidApiResponse(response);
651
- }
652
-
653
- /**
654
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
655
- * Release Workflow Run Lock Handler
656
- */
657
- async releaseWorkflowRunLock(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
658
- await this.releaseWorkflowRunLockRaw(requestParameters, initOverrides);
659
- }
660
-
661
489
  /**
662
490
  * Creates request options for unapproveWorkflowRunFile without sending the request
663
491
  */
@@ -698,7 +526,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
698
526
  }
699
527
 
700
528
  /**
701
- * Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
529
+ * Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
702
530
  * Unapprove Workflow Run File Handler
703
531
  */
704
532
  async unapproveWorkflowRunFileRaw(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>> {
@@ -709,7 +537,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
709
537
  }
710
538
 
711
539
  /**
712
- * Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
540
+ * Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
713
541
  * Unapprove Workflow Run File Handler
714
542
  */
715
543
  async unapproveWorkflowRunFile(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse> {
package/src/apis/index.ts CHANGED
@@ -6,6 +6,7 @@ export * from './AuthApi';
6
6
  export * from './ChunkLineagesApi';
7
7
  export * from './ChunksApi';
8
8
  export * from './DefaultApi';
9
+ export * from './DocumentCheckoutApi';
9
10
  export * from './DocumentVersionsApi';
10
11
  export * from './DocumentsApi';
11
12
  export * from './FeaturesApi';
@@ -0,0 +1,110 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Active checkout state on a document.
18
+ * @export
19
+ * @interface DocumentCheckoutResponse
20
+ */
21
+ export interface DocumentCheckoutResponse {
22
+ /**
23
+ * Tenant ID
24
+ * @type {string}
25
+ * @memberof DocumentCheckoutResponse
26
+ */
27
+ tenantId: string;
28
+ /**
29
+ * Document's PathPart ID
30
+ * @type {string}
31
+ * @memberof DocumentCheckoutResponse
32
+ */
33
+ pathPartId: string;
34
+ /**
35
+ * User who holds the checkout
36
+ * @type {string}
37
+ * @memberof DocumentCheckoutResponse
38
+ */
39
+ userId: string;
40
+ /**
41
+ * When the checkout was acquired
42
+ * @type {Date}
43
+ * @memberof DocumentCheckoutResponse
44
+ */
45
+ acquiredAt: Date;
46
+ }
47
+ export const DocumentCheckoutResponsePropertyValidationAttributesMap: {
48
+ [property: string]: {
49
+ maxLength?: number,
50
+ minLength?: number,
51
+ pattern?: string,
52
+ maximum?: number,
53
+ exclusiveMaximum?: boolean,
54
+ minimum?: number,
55
+ exclusiveMinimum?: boolean,
56
+ multipleOf?: number,
57
+ maxItems?: number,
58
+ minItems?: number,
59
+ uniqueItems?: boolean
60
+ }
61
+ } = {
62
+ }
63
+
64
+
65
+ /**
66
+ * Check if a given object implements the DocumentCheckoutResponse interface.
67
+ */
68
+ export function instanceOfDocumentCheckoutResponse(value: object): value is DocumentCheckoutResponse {
69
+ if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
70
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
71
+ if (!('userId' in value) || value['userId'] === undefined) return false;
72
+ if (!('acquiredAt' in value) || value['acquiredAt'] === undefined) return false;
73
+ return true;
74
+ }
75
+
76
+ export function DocumentCheckoutResponseFromJSON(json: any): DocumentCheckoutResponse {
77
+ return DocumentCheckoutResponseFromJSONTyped(json, false);
78
+ }
79
+
80
+ export function DocumentCheckoutResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentCheckoutResponse {
81
+ if (json == null) {
82
+ return json;
83
+ }
84
+ return {
85
+
86
+ 'tenantId': json['tenant_id'],
87
+ 'pathPartId': json['path_part_id'],
88
+ 'userId': json['user_id'],
89
+ 'acquiredAt': (new Date(json['acquired_at'])),
90
+ };
91
+ }
92
+
93
+ export function DocumentCheckoutResponseToJSON(json: any): DocumentCheckoutResponse {
94
+ return DocumentCheckoutResponseToJSONTyped(json, false);
95
+ }
96
+
97
+ export function DocumentCheckoutResponseToJSONTyped(value?: DocumentCheckoutResponse | null, ignoreDiscriminator: boolean = false): any {
98
+ if (value == null) {
99
+ return value;
100
+ }
101
+
102
+ return {
103
+
104
+ 'tenant_id': value['tenantId'],
105
+ 'path_part_id': value['pathPartId'],
106
+ 'user_id': value['userId'],
107
+ 'acquired_at': value['acquiredAt'].toISOString(),
108
+ };
109
+ }
110
+
@@ -34,6 +34,13 @@ import {
34
34
  DocumentTypeToJSON,
35
35
  DocumentTypeToJSONTyped,
36
36
  } from './DocumentType';
37
+ import type { DocumentCheckoutResponse } from './DocumentCheckoutResponse';
38
+ import {
39
+ DocumentCheckoutResponseFromJSON,
40
+ DocumentCheckoutResponseFromJSONTyped,
41
+ DocumentCheckoutResponseToJSON,
42
+ DocumentCheckoutResponseToJSONTyped,
43
+ } from './DocumentCheckoutResponse';
37
44
  import type { DocumentVersionResponse } from './DocumentVersionResponse';
38
45
  import {
39
46
  DocumentVersionResponseFromJSON,
@@ -156,6 +163,12 @@ export interface DocumentResponse {
156
163
  * @memberof DocumentResponse
157
164
  */
158
165
  canWrite?: boolean | null;
166
+ /**
167
+ * 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.
168
+ * @type {DocumentCheckoutResponse}
169
+ * @memberof DocumentResponse
170
+ */
171
+ checkout?: DocumentCheckoutResponse | null;
159
172
  }
160
173
 
161
174
 
@@ -236,6 +249,7 @@ export function DocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
236
249
  'updatedAt': (new Date(json['updated_at'])),
237
250
  'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
238
251
  'canWrite': json['can_write'] == null ? undefined : json['can_write'],
252
+ 'checkout': json['checkout'] == null ? undefined : DocumentCheckoutResponseFromJSON(json['checkout']),
239
253
  };
240
254
  }
241
255
 
@@ -268,6 +282,7 @@ export function DocumentResponseToJSONTyped(value?: DocumentResponse | null, ign
268
282
  'updated_at': value['updatedAt'].toISOString(),
269
283
  'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagResponseToJSON)),
270
284
  'can_write': value['canWrite'],
285
+ 'checkout': DocumentCheckoutResponseToJSON(value['checkout']),
271
286
  };
272
287
  }
273
288
 
@@ -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';
@@ -1,59 +0,0 @@
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
- * Reviewer-lock state on a workflow run.
14
- * @export
15
- * @interface RunLockResponse
16
- */
17
- export interface RunLockResponse {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof RunLockResponse
22
- */
23
- runId: string;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof RunLockResponse
28
- */
29
- lockUserId: string | null;
30
- /**
31
- *
32
- * @type {Date}
33
- * @memberof RunLockResponse
34
- */
35
- lockAcquiredAt: Date | null;
36
- }
37
- export declare const RunLockResponsePropertyValidationAttributesMap: {
38
- [property: string]: {
39
- maxLength?: number;
40
- minLength?: number;
41
- pattern?: string;
42
- maximum?: number;
43
- exclusiveMaximum?: boolean;
44
- minimum?: number;
45
- exclusiveMinimum?: boolean;
46
- multipleOf?: number;
47
- maxItems?: number;
48
- minItems?: number;
49
- uniqueItems?: boolean;
50
- };
51
- };
52
- /**
53
- * Check if a given object implements the RunLockResponse interface.
54
- */
55
- export declare function instanceOfRunLockResponse(value: object): value is RunLockResponse;
56
- export declare function RunLockResponseFromJSON(json: any): RunLockResponse;
57
- export declare function RunLockResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RunLockResponse;
58
- export declare function RunLockResponseToJSON(json: any): RunLockResponse;
59
- export declare function RunLockResponseToJSONTyped(value?: RunLockResponse | null, ignoreDiscriminator?: boolean): any;
@@ -1,52 +0,0 @@
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 RunLockResponsePropertyValidationAttributesMap = {};
15
- /**
16
- * Check if a given object implements the RunLockResponse interface.
17
- */
18
- export function instanceOfRunLockResponse(value) {
19
- if (!('runId' in value) || value['runId'] === undefined)
20
- return false;
21
- if (!('lockUserId' in value) || value['lockUserId'] === undefined)
22
- return false;
23
- if (!('lockAcquiredAt' in value) || value['lockAcquiredAt'] === undefined)
24
- return false;
25
- return true;
26
- }
27
- export function RunLockResponseFromJSON(json) {
28
- return RunLockResponseFromJSONTyped(json, false);
29
- }
30
- export function RunLockResponseFromJSONTyped(json, ignoreDiscriminator) {
31
- if (json == null) {
32
- return json;
33
- }
34
- return {
35
- 'runId': json['run_id'],
36
- 'lockUserId': json['lock_user_id'],
37
- 'lockAcquiredAt': (json['lock_acquired_at'] == null ? null : new Date(json['lock_acquired_at'])),
38
- };
39
- }
40
- export function RunLockResponseToJSON(json) {
41
- return RunLockResponseToJSONTyped(json, false);
42
- }
43
- export function RunLockResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
- if (value == null) {
45
- return value;
46
- }
47
- return {
48
- 'run_id': value['runId'],
49
- 'lock_user_id': value['lockUserId'],
50
- 'lock_acquired_at': value['lockAcquiredAt'] == null ? value['lockAcquiredAt'] : value['lockAcquiredAt'].toISOString(),
51
- };
52
- }
@@ -1,59 +0,0 @@
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
- * Reviewer-lock state on a workflow run.
14
- * @export
15
- * @interface RunLockResponse
16
- */
17
- export interface RunLockResponse {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof RunLockResponse
22
- */
23
- runId: string;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof RunLockResponse
28
- */
29
- lockUserId: string | null;
30
- /**
31
- *
32
- * @type {Date}
33
- * @memberof RunLockResponse
34
- */
35
- lockAcquiredAt: Date | null;
36
- }
37
- export declare const RunLockResponsePropertyValidationAttributesMap: {
38
- [property: string]: {
39
- maxLength?: number;
40
- minLength?: number;
41
- pattern?: string;
42
- maximum?: number;
43
- exclusiveMaximum?: boolean;
44
- minimum?: number;
45
- exclusiveMinimum?: boolean;
46
- multipleOf?: number;
47
- maxItems?: number;
48
- minItems?: number;
49
- uniqueItems?: boolean;
50
- };
51
- };
52
- /**
53
- * Check if a given object implements the RunLockResponse interface.
54
- */
55
- export declare function instanceOfRunLockResponse(value: object): value is RunLockResponse;
56
- export declare function RunLockResponseFromJSON(json: any): RunLockResponse;
57
- export declare function RunLockResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RunLockResponse;
58
- export declare function RunLockResponseToJSON(json: any): RunLockResponse;
59
- export declare function RunLockResponseToJSONTyped(value?: RunLockResponse | null, ignoreDiscriminator?: boolean): any;