@knowledge-stack/ksapi 1.85.0 → 1.86.1

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 (44) hide show
  1. package/.openapi-generator/FILES +0 -2
  2. package/README.md +2 -5
  3. package/dist/apis/DocumentVersionsApi.d.ts +3 -0
  4. package/dist/apis/DocumentVersionsApi.js +3 -0
  5. package/dist/apis/WorkflowRunsApi.d.ts +13 -101
  6. package/dist/apis/WorkflowRunsApi.js +6 -93
  7. package/dist/esm/apis/DocumentVersionsApi.d.ts +3 -0
  8. package/dist/esm/apis/DocumentVersionsApi.js +3 -0
  9. package/dist/esm/apis/WorkflowRunsApi.d.ts +13 -101
  10. package/dist/esm/apis/WorkflowRunsApi.js +7 -94
  11. package/dist/esm/models/DocumentVersionResponse.d.ts +6 -0
  12. package/dist/esm/models/DocumentVersionResponse.js +2 -0
  13. package/dist/esm/models/ThreadMessageDetailsInput.d.ts +6 -0
  14. package/dist/esm/models/ThreadMessageDetailsInput.js +7 -1
  15. package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +6 -0
  16. package/dist/esm/models/ThreadMessageDetailsOutput.js +7 -1
  17. package/dist/esm/models/index.d.ts +0 -1
  18. package/dist/esm/models/index.js +0 -1
  19. package/dist/models/DocumentVersionResponse.d.ts +6 -0
  20. package/dist/models/DocumentVersionResponse.js +2 -0
  21. package/dist/models/ThreadMessageDetailsInput.d.ts +6 -0
  22. package/dist/models/ThreadMessageDetailsInput.js +7 -1
  23. package/dist/models/ThreadMessageDetailsOutput.d.ts +6 -0
  24. package/dist/models/ThreadMessageDetailsOutput.js +7 -1
  25. package/dist/models/index.d.ts +0 -1
  26. package/dist/models/index.js +0 -1
  27. package/docs/DocumentVersionResponse.md +2 -0
  28. package/docs/DocumentVersionsApi.md +4 -1
  29. package/docs/ThreadMessageDetailsInput.md +2 -0
  30. package/docs/ThreadMessageDetailsOutput.md +2 -0
  31. package/docs/WorkflowRunsApi.md +3 -153
  32. package/package.json +1 -1
  33. package/src/apis/DocumentVersionsApi.ts +7 -0
  34. package/src/apis/WorkflowRunsApi.ts +12 -184
  35. package/src/models/DocumentVersionResponse.ts +8 -0
  36. package/src/models/ThreadMessageDetailsInput.ts +11 -0
  37. package/src/models/ThreadMessageDetailsOutput.ts +11 -0
  38. package/src/models/index.ts +0 -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/docs/RunLockResponse.md +0 -39
  44. package/src/models/RunLockResponse.ts +0 -101
@@ -158,7 +158,6 @@ __exportStar(require("./RejectFileRequest"), exports);
158
158
  __exportStar(require("./ResolvedReferenceInput"), exports);
159
159
  __exportStar(require("./ResolvedReferenceOutput"), exports);
160
160
  __exportStar(require("./RootResponse"), exports);
161
- __exportStar(require("./RunLockResponse"), exports);
162
161
  __exportStar(require("./SSOInitiateResponse"), exports);
163
162
  __exportStar(require("./ScoredChunkResponse"), exports);
164
163
  __exportStar(require("./SearchSortOrder"), exports);
@@ -20,6 +20,7 @@ Name | Type
20
20
  `updatedAt` | Date
21
21
  `assetS3Url` | string
22
22
  `fastPlaintextUrl` | string
23
+ `pageScreenshotUrls` | Array<string>
23
24
  `systemMetadata` | [DocumentVersionMetadata](DocumentVersionMetadata.md)
24
25
 
25
26
  ## Example
@@ -42,6 +43,7 @@ const example = {
42
43
  "updatedAt": null,
43
44
  "assetS3Url": null,
44
45
  "fastPlaintextUrl": null,
46
+ "pageScreenshotUrls": null,
45
47
  "systemMetadata": null,
46
48
  } satisfies DocumentVersionResponse
47
49
 
@@ -316,7 +316,7 @@ No authorization required
316
316
 
317
317
  ## getDocumentVersion
318
318
 
319
- > DocumentVersionResponse getDocumentVersion(versionId, authorization, ksUat)
319
+ > DocumentVersionResponse getDocumentVersion(versionId, includePageScreenshots, authorization, ksUat)
320
320
 
321
321
  Get Document Version Handler
322
322
 
@@ -338,6 +338,8 @@ async function example() {
338
338
  const body = {
339
339
  // string | DocumentVersion ID
340
340
  versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
341
+ // boolean | When true, populate page_screenshot_urls with presigned URLs for every per-page WEBP screenshot the ingestion pipeline produced. Off by default to keep typical responses small. (optional)
342
+ includePageScreenshots: true,
341
343
  // string (optional)
342
344
  authorization: authorization_example,
343
345
  // string (optional)
@@ -362,6 +364,7 @@ example().catch(console.error);
362
364
  | Name | Type | Description | Notes |
363
365
  |------------- | ------------- | ------------- | -------------|
364
366
  | **versionId** | `string` | DocumentVersion ID | [Defaults to `undefined`] |
367
+ | **includePageScreenshots** | `boolean` | When true, populate page_screenshot_urls with presigned URLs for every per-page WEBP screenshot the ingestion pipeline produced. Off by default to keep typical responses small. | [Optional] [Defaults to `false`] |
365
368
  | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
366
369
  | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
367
370
 
@@ -8,6 +8,7 @@ Name | Type
8
8
  ------------ | -------------
9
9
  `steps` | [Array<StepInput>](StepInput.md)
10
10
  `checkpoint` | [CheckpointDetails](CheckpointDetails.md)
11
+ `modelId` | string
11
12
 
12
13
  ## Example
13
14
 
@@ -18,6 +19,7 @@ import type { ThreadMessageDetailsInput } from '@knowledge-stack/ksapi'
18
19
  const example = {
19
20
  "steps": null,
20
21
  "checkpoint": null,
22
+ "modelId": null,
21
23
  } satisfies ThreadMessageDetailsInput
22
24
 
23
25
  console.log(example)
@@ -8,6 +8,7 @@ Name | Type
8
8
  ------------ | -------------
9
9
  `steps` | [Array<StepOutput>](StepOutput.md)
10
10
  `checkpoint` | [CheckpointDetails](CheckpointDetails.md)
11
+ `modelId` | string
11
12
 
12
13
  ## Example
13
14
 
@@ -18,6 +19,7 @@ import type { ThreadMessageDetailsOutput } from '@knowledge-stack/ksapi'
18
19
  const example = {
19
20
  "steps": null,
20
21
  "checkpoint": null,
22
+ "modelId": null,
21
23
  } satisfies ThreadMessageDetailsOutput
22
24
 
23
25
  console.log(example)
@@ -4,98 +4,22 @@ All URIs are relative to *http://localhost:8000*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
- | [**acquireWorkflowRunLock**](WorkflowRunsApi.md#acquireworkflowrunlock) | **POST** /v1/workflow-runs/{run_id}/lock | Acquire Workflow Run Lock Handler |
8
7
  | [**approveWorkflowRunFile**](WorkflowRunsApi.md#approveworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/approve | Approve Workflow Run File Handler |
9
8
  | [**deleteWorkflowRun**](WorkflowRunsApi.md#deleteworkflowrun) | **DELETE** /v1/workflow-runs/{run_id} | Delete Workflow Run Handler |
10
9
  | [**getWorkflowRun**](WorkflowRunsApi.md#getworkflowrun) | **GET** /v1/workflow-runs/{run_id} | Get Workflow Run Handler |
11
10
  | [**rejectWorkflowRunFile**](WorkflowRunsApi.md#rejectworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/reject | Reject Workflow Run File Handler |
12
- | [**releaseWorkflowRunLock**](WorkflowRunsApi.md#releaseworkflowrunlock) | **DELETE** /v1/workflow-runs/{run_id}/lock | Release Workflow Run Lock Handler |
13
11
  | [**unapproveWorkflowRunFile**](WorkflowRunsApi.md#unapproveworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/unapprove | Unapprove Workflow Run File Handler |
14
12
  | [**workflowRunCallback**](WorkflowRunsApi.md#workflowruncallbackoperation) | **POST** /v1/workflow-runs/{run_id}/callback | Workflow Run Callback Handler |
15
13
 
16
14
 
17
15
 
18
- ## acquireWorkflowRunLock
19
-
20
- > RunLockResponse acquireWorkflowRunLock(runId, authorization, ksUat)
21
-
22
- Acquire Workflow Run Lock Handler
23
-
24
- Acquire (or renew) the reviewer lock on ``run_id``. The current holder may re-POST to refresh ``lock_acquired_at``. A different user receives 409 until the lock is released or auto-swept.
25
-
26
- ### Example
27
-
28
- ```ts
29
- import {
30
- Configuration,
31
- WorkflowRunsApi,
32
- } from '@knowledge-stack/ksapi';
33
- import type { AcquireWorkflowRunLockRequest } from '@knowledge-stack/ksapi';
34
-
35
- async function example() {
36
- console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
37
- const api = new WorkflowRunsApi();
38
-
39
- const body = {
40
- // string
41
- runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
42
- // string (optional)
43
- authorization: authorization_example,
44
- // string (optional)
45
- ksUat: ksUat_example,
46
- } satisfies AcquireWorkflowRunLockRequest;
47
-
48
- try {
49
- const data = await api.acquireWorkflowRunLock(body);
50
- console.log(data);
51
- } catch (error) {
52
- console.error(error);
53
- }
54
- }
55
-
56
- // Run the test
57
- example().catch(console.error);
58
- ```
59
-
60
- ### Parameters
61
-
62
-
63
- | Name | Type | Description | Notes |
64
- |------------- | ------------- | ------------- | -------------|
65
- | **runId** | `string` | | [Defaults to `undefined`] |
66
- | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
67
- | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
68
-
69
- ### Return type
70
-
71
- [**RunLockResponse**](RunLockResponse.md)
72
-
73
- ### Authorization
74
-
75
- No authorization required
76
-
77
- ### HTTP request headers
78
-
79
- - **Content-Type**: Not defined
80
- - **Accept**: `application/json`
81
-
82
-
83
- ### HTTP response details
84
- | Status code | Description | Response headers |
85
- |-------------|-------------|------------------|
86
- | **200** | Successful Response | - |
87
- | **422** | Validation Error | - |
88
-
89
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
90
-
91
-
92
16
  ## approveWorkflowRunFile
93
17
 
94
18
  > PathPartApprovalResponse approveWorkflowRunFile(runId, pathPartId, authorization, ksUat)
95
19
 
96
20
  Approve Workflow Run File Handler
97
21
 
98
- Approve a single generated file. Caller must hold the run lock.
22
+ Approve a generated file or the run folder itself. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to APPROVED). Folder approval still requires no descendants in ``pending`` or ``rejected`` state.
99
23
 
100
24
  ### Example
101
25
 
@@ -316,7 +240,7 @@ No authorization required
316
240
 
317
241
  Reject Workflow Run File Handler
318
242
 
319
- Reject a single generated file with a reason. Caller must hold the run lock.
243
+ Reject a generated file or the run folder itself with a reason. Open to any user with ``can_write`` on the run path — both individual child files and the run folder (the final verdict that flips the run to REJECTED).
320
244
 
321
245
  ### Example
322
246
 
@@ -390,87 +314,13 @@ No authorization required
390
314
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
391
315
 
392
316
 
393
- ## releaseWorkflowRunLock
394
-
395
- > releaseWorkflowRunLock(runId, authorization, ksUat)
396
-
397
- Release Workflow Run Lock Handler
398
-
399
- Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
400
-
401
- ### Example
402
-
403
- ```ts
404
- import {
405
- Configuration,
406
- WorkflowRunsApi,
407
- } from '@knowledge-stack/ksapi';
408
- import type { ReleaseWorkflowRunLockRequest } from '@knowledge-stack/ksapi';
409
-
410
- async function example() {
411
- console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
412
- const api = new WorkflowRunsApi();
413
-
414
- const body = {
415
- // string
416
- runId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
417
- // string (optional)
418
- authorization: authorization_example,
419
- // string (optional)
420
- ksUat: ksUat_example,
421
- } satisfies ReleaseWorkflowRunLockRequest;
422
-
423
- try {
424
- const data = await api.releaseWorkflowRunLock(body);
425
- console.log(data);
426
- } catch (error) {
427
- console.error(error);
428
- }
429
- }
430
-
431
- // Run the test
432
- example().catch(console.error);
433
- ```
434
-
435
- ### Parameters
436
-
437
-
438
- | Name | Type | Description | Notes |
439
- |------------- | ------------- | ------------- | -------------|
440
- | **runId** | `string` | | [Defaults to `undefined`] |
441
- | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
442
- | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
443
-
444
- ### Return type
445
-
446
- `void` (Empty response body)
447
-
448
- ### Authorization
449
-
450
- No authorization required
451
-
452
- ### HTTP request headers
453
-
454
- - **Content-Type**: Not defined
455
- - **Accept**: `application/json`
456
-
457
-
458
- ### HTTP response details
459
- | Status code | Description | Response headers |
460
- |-------------|-------------|------------------|
461
- | **204** | Successful Response | - |
462
- | **422** | Validation Error | - |
463
-
464
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
465
-
466
-
467
317
  ## unapproveWorkflowRunFile
468
318
 
469
319
  > PathPartApprovalResponse unapproveWorkflowRunFile(runId, pathPartId, authorization, ksUat)
470
320
 
471
321
  Unapprove Workflow Run File Handler
472
322
 
473
- Revert an approved file to ``pending``. Does NOT require the reviewer lock — anyone with ``can_write`` on the run path may unapprove (pilot plan §11.7).
323
+ Revert an approved or rejected file to ``pending``. Open to any user with ``can_write`` on the run path. Cannot unapprove a leaf whose ancestor is currently ``approved`` — unapprove the ancestor first.
474
324
 
475
325
  ### Example
476
326
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.85.0",
3
+ "version": "1.86.1",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -73,6 +73,7 @@ export interface DocumentVersionActionRequest {
73
73
 
74
74
  export interface GetDocumentVersionRequest {
75
75
  versionId: string;
76
+ includePageScreenshots?: boolean;
76
77
  authorization?: string | null;
77
78
  ksUat?: string | null;
78
79
  }
@@ -226,6 +227,7 @@ export interface DocumentVersionsApiInterface {
226
227
  /**
227
228
  * Creates request options for getDocumentVersion without sending the request
228
229
  * @param {string} versionId DocumentVersion ID
230
+ * @param {boolean} [includePageScreenshots] When true, populate page_screenshot_urls with presigned URLs for every per-page WEBP screenshot the ingestion pipeline produced. Off by default to keep typical responses small.
229
231
  * @param {string} [authorization]
230
232
  * @param {string} [ksUat]
231
233
  * @throws {RequiredError}
@@ -237,6 +239,7 @@ export interface DocumentVersionsApiInterface {
237
239
  * Get a document version by its ID.
238
240
  * @summary Get Document Version Handler
239
241
  * @param {string} versionId DocumentVersion ID
242
+ * @param {boolean} [includePageScreenshots] When true, populate page_screenshot_urls with presigned URLs for every per-page WEBP screenshot the ingestion pipeline produced. Off by default to keep typical responses small.
240
243
  * @param {string} [authorization]
241
244
  * @param {string} [ksUat]
242
245
  * @param {*} [options] Override http request option.
@@ -583,6 +586,10 @@ export class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVers
583
586
 
584
587
  const queryParameters: any = {};
585
588
 
589
+ if (requestParameters['includePageScreenshots'] != null) {
590
+ queryParameters['include_page_screenshots'] = requestParameters['includePageScreenshots'];
591
+ }
592
+
586
593
  const headerParameters: runtime.HTTPHeaders = {};
587
594
 
588
595
  if (requestParameters['authorization'] != null) {
@@ -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> {