@knowledge-stack/ksapi 1.85.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.
@@ -159,7 +159,6 @@ docs/RejectFileRequest.md
159
159
  docs/ResolvedReferenceInput.md
160
160
  docs/ResolvedReferenceOutput.md
161
161
  docs/RootResponse.md
162
- docs/RunLockResponse.md
163
162
  docs/SSOInitiateResponse.md
164
163
  docs/ScoredChunkResponse.md
165
164
  docs/SearchSortOrder.md
@@ -415,7 +414,6 @@ src/models/RejectFileRequest.ts
415
414
  src/models/ResolvedReferenceInput.ts
416
415
  src/models/ResolvedReferenceOutput.ts
417
416
  src/models/RootResponse.ts
418
- src/models/RunLockResponse.ts
419
417
  src/models/SSOInitiateResponse.ts
420
418
  src/models/ScoredChunkResponse.ts
421
419
  src/models/SearchSortOrder.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.85.0
1
+ # @knowledge-stack/ksapi@1.86.0
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -201,12 +201,10 @@ All URIs are relative to *http://localhost:8000*
201
201
  *WorkflowMemoryApi* | [**forgetWorkflowMemoryChunk**](docs/WorkflowMemoryApi.md#forgetworkflowmemorychunk) | **DELETE** /v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id} | Forget Workflow Memory Chunk Handler
202
202
  *WorkflowMemoryApi* | [**getWorkflowMemoryChunk**](docs/WorkflowMemoryApi.md#getworkflowmemorychunk) | **GET** /v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id} | Get Workflow Memory Chunk Handler
203
203
  *WorkflowMemoryApi* | [**listWorkflowMemoryChunks**](docs/WorkflowMemoryApi.md#listworkflowmemorychunks) | **GET** /v1/workflow-definitions/{definition_id}/memory | List Workflow Memory Chunks Handler
204
- *WorkflowRunsApi* | [**acquireWorkflowRunLock**](docs/WorkflowRunsApi.md#acquireworkflowrunlock) | **POST** /v1/workflow-runs/{run_id}/lock | Acquire Workflow Run Lock Handler
205
204
  *WorkflowRunsApi* | [**approveWorkflowRunFile**](docs/WorkflowRunsApi.md#approveworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/approve | Approve Workflow Run File Handler
206
205
  *WorkflowRunsApi* | [**deleteWorkflowRun**](docs/WorkflowRunsApi.md#deleteworkflowrun) | **DELETE** /v1/workflow-runs/{run_id} | Delete Workflow Run Handler
207
206
  *WorkflowRunsApi* | [**getWorkflowRun**](docs/WorkflowRunsApi.md#getworkflowrun) | **GET** /v1/workflow-runs/{run_id} | Get Workflow Run Handler
208
207
  *WorkflowRunsApi* | [**rejectWorkflowRunFile**](docs/WorkflowRunsApi.md#rejectworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/reject | Reject Workflow Run File Handler
209
- *WorkflowRunsApi* | [**releaseWorkflowRunLock**](docs/WorkflowRunsApi.md#releaseworkflowrunlock) | **DELETE** /v1/workflow-runs/{run_id}/lock | Release Workflow Run Lock Handler
210
208
  *WorkflowRunsApi* | [**unapproveWorkflowRunFile**](docs/WorkflowRunsApi.md#unapproveworkflowrunfile) | **POST** /v1/workflow-runs/{run_id}/files/{path_part_id}/unapprove | Unapprove Workflow Run File Handler
211
209
  *WorkflowRunsApi* | [**workflowRunCallback**](docs/WorkflowRunsApi.md#workflowruncallbackoperation) | **POST** /v1/workflow-runs/{run_id}/callback | Workflow Run Callback Handler
212
210
  *WorkflowsApi* | [**cancelTemporalWorkflow**](docs/WorkflowsApi.md#canceltemporalworkflow) | **DELETE** /v1/workflows/{workflow_id} | Cancel Temporal Workflow Handler
@@ -360,7 +358,6 @@ All URIs are relative to *http://localhost:8000*
360
358
  - [ResolvedReferenceInput](docs/ResolvedReferenceInput.md)
361
359
  - [ResolvedReferenceOutput](docs/ResolvedReferenceOutput.md)
362
360
  - [RootResponse](docs/RootResponse.md)
363
- - [RunLockResponse](docs/RunLockResponse.md)
364
361
  - [SSOInitiateResponse](docs/SSOInitiateResponse.md)
365
362
  - [ScoredChunkResponse](docs/ScoredChunkResponse.md)
366
363
  - [SearchSortOrder](docs/SearchSortOrder.md)
@@ -443,7 +440,7 @@ and is automatically generated by the
443
440
  [OpenAPI Generator](https://openapi-generator.tech) project:
444
441
 
445
442
  - API version: `0.1.0`
446
- - Package version: `1.85.0`
443
+ - Package version: `1.86.0`
447
444
  - Generator version: `7.21.0`
448
445
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
449
446
 
@@ -10,12 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { PathPartApprovalResponse, RejectFileRequest, RunLockResponse, WorkflowCallbackResponse, WorkflowRunCallbackRequest, WorkflowRunResponse } from '../models/index';
14
- export interface AcquireWorkflowRunLockRequest {
15
- runId: string;
16
- authorization?: string | null;
17
- ksUat?: string | null;
18
- }
13
+ import type { PathPartApprovalResponse, RejectFileRequest, WorkflowCallbackResponse, WorkflowRunCallbackRequest, WorkflowRunResponse } from '../models/index';
19
14
  export interface ApproveWorkflowRunFileRequest {
20
15
  runId: string;
21
16
  pathPartId: string;
@@ -39,11 +34,6 @@ export interface RejectWorkflowRunFileRequest {
39
34
  authorization?: string | null;
40
35
  ksUat?: string | null;
41
36
  }
42
- export interface ReleaseWorkflowRunLockRequest {
43
- runId: string;
44
- authorization?: string | null;
45
- ksUat?: string | null;
46
- }
47
37
  export interface UnapproveWorkflowRunFileRequest {
48
38
  runId: string;
49
39
  pathPartId: string;
@@ -61,31 +51,6 @@ export interface WorkflowRunCallbackOperationRequest {
61
51
  * @interface WorkflowRunsApiInterface
62
52
  */
63
53
  export interface WorkflowRunsApiInterface {
64
- /**
65
- * Creates request options for acquireWorkflowRunLock without sending the request
66
- * @param {string} runId
67
- * @param {string} [authorization]
68
- * @param {string} [ksUat]
69
- * @throws {RequiredError}
70
- * @memberof WorkflowRunsApiInterface
71
- */
72
- acquireWorkflowRunLockRequestOpts(requestParameters: AcquireWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
73
- /**
74
- * 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.
75
- * @summary Acquire Workflow Run Lock Handler
76
- * @param {string} runId
77
- * @param {string} [authorization]
78
- * @param {string} [ksUat]
79
- * @param {*} [options] Override http request option.
80
- * @throws {RequiredError}
81
- * @memberof WorkflowRunsApiInterface
82
- */
83
- acquireWorkflowRunLockRaw(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RunLockResponse>>;
84
- /**
85
- * 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.
86
- * Acquire Workflow Run Lock Handler
87
- */
88
- acquireWorkflowRunLock(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RunLockResponse>;
89
54
  /**
90
55
  * Creates request options for approveWorkflowRunFile without sending the request
91
56
  * @param {string} runId
@@ -97,7 +62,7 @@ export interface WorkflowRunsApiInterface {
97
62
  */
98
63
  approveWorkflowRunFileRequestOpts(requestParameters: ApproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
99
64
  /**
100
- * Approve a single generated file. Caller must hold the run lock.
65
+ * 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.
101
66
  * @summary Approve Workflow Run File Handler
102
67
  * @param {string} runId
103
68
  * @param {string} pathPartId
@@ -109,7 +74,7 @@ export interface WorkflowRunsApiInterface {
109
74
  */
110
75
  approveWorkflowRunFileRaw(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
111
76
  /**
112
- * Approve a single generated file. Caller must hold the run lock.
77
+ * 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.
113
78
  * Approve Workflow Run File Handler
114
79
  */
115
80
  approveWorkflowRunFile(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
@@ -173,7 +138,7 @@ export interface WorkflowRunsApiInterface {
173
138
  */
174
139
  rejectWorkflowRunFileRequestOpts(requestParameters: RejectWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
175
140
  /**
176
- * Reject a single generated file with a reason. Caller must hold the run lock.
141
+ * 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).
177
142
  * @summary Reject Workflow Run File Handler
178
143
  * @param {string} runId
179
144
  * @param {string} pathPartId
@@ -186,35 +151,10 @@ export interface WorkflowRunsApiInterface {
186
151
  */
187
152
  rejectWorkflowRunFileRaw(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
188
153
  /**
189
- * Reject a single generated file with a reason. Caller must hold the run lock.
154
+ * 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).
190
155
  * Reject Workflow Run File Handler
191
156
  */
192
157
  rejectWorkflowRunFile(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
193
- /**
194
- * Creates request options for releaseWorkflowRunLock without sending the request
195
- * @param {string} runId
196
- * @param {string} [authorization]
197
- * @param {string} [ksUat]
198
- * @throws {RequiredError}
199
- * @memberof WorkflowRunsApiInterface
200
- */
201
- releaseWorkflowRunLockRequestOpts(requestParameters: ReleaseWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
202
- /**
203
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
204
- * @summary Release Workflow Run Lock Handler
205
- * @param {string} runId
206
- * @param {string} [authorization]
207
- * @param {string} [ksUat]
208
- * @param {*} [options] Override http request option.
209
- * @throws {RequiredError}
210
- * @memberof WorkflowRunsApiInterface
211
- */
212
- releaseWorkflowRunLockRaw(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
213
- /**
214
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
215
- * Release Workflow Run Lock Handler
216
- */
217
- releaseWorkflowRunLock(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
218
158
  /**
219
159
  * Creates request options for unapproveWorkflowRunFile without sending the request
220
160
  * @param {string} runId
@@ -226,7 +166,7 @@ export interface WorkflowRunsApiInterface {
226
166
  */
227
167
  unapproveWorkflowRunFileRequestOpts(requestParameters: UnapproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
228
168
  /**
229
- * 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).
169
+ * 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.
230
170
  * @summary Unapprove Workflow Run File Handler
231
171
  * @param {string} runId
232
172
  * @param {string} pathPartId
@@ -238,7 +178,7 @@ export interface WorkflowRunsApiInterface {
238
178
  */
239
179
  unapproveWorkflowRunFileRaw(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
240
180
  /**
241
- * 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).
181
+ * 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.
242
182
  * Unapprove Workflow Run File Handler
243
183
  */
244
184
  unapproveWorkflowRunFile(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
@@ -269,31 +209,17 @@ export interface WorkflowRunsApiInterface {
269
209
  *
270
210
  */
271
211
  export declare class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiInterface {
272
- /**
273
- * Creates request options for acquireWorkflowRunLock without sending the request
274
- */
275
- acquireWorkflowRunLockRequestOpts(requestParameters: AcquireWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
276
- /**
277
- * 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.
278
- * Acquire Workflow Run Lock Handler
279
- */
280
- acquireWorkflowRunLockRaw(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RunLockResponse>>;
281
- /**
282
- * 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.
283
- * Acquire Workflow Run Lock Handler
284
- */
285
- acquireWorkflowRunLock(requestParameters: AcquireWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RunLockResponse>;
286
212
  /**
287
213
  * Creates request options for approveWorkflowRunFile without sending the request
288
214
  */
289
215
  approveWorkflowRunFileRequestOpts(requestParameters: ApproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
290
216
  /**
291
- * Approve a single generated file. Caller must hold the run lock.
217
+ * 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.
292
218
  * Approve Workflow Run File Handler
293
219
  */
294
220
  approveWorkflowRunFileRaw(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
295
221
  /**
296
- * Approve a single generated file. Caller must hold the run lock.
222
+ * 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.
297
223
  * Approve Workflow Run File Handler
298
224
  */
299
225
  approveWorkflowRunFile(requestParameters: ApproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
@@ -326,40 +252,26 @@ export declare class WorkflowRunsApi extends runtime.BaseAPI implements Workflow
326
252
  */
327
253
  rejectWorkflowRunFileRequestOpts(requestParameters: RejectWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
328
254
  /**
329
- * Reject a single generated file with a reason. Caller must hold the run lock.
255
+ * 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).
330
256
  * Reject Workflow Run File Handler
331
257
  */
332
258
  rejectWorkflowRunFileRaw(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
333
259
  /**
334
- * Reject a single generated file with a reason. Caller must hold the run lock.
260
+ * 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).
335
261
  * Reject Workflow Run File Handler
336
262
  */
337
263
  rejectWorkflowRunFile(requestParameters: RejectWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
338
- /**
339
- * Creates request options for releaseWorkflowRunLock without sending the request
340
- */
341
- releaseWorkflowRunLockRequestOpts(requestParameters: ReleaseWorkflowRunLockRequest): Promise<runtime.RequestOpts>;
342
- /**
343
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
344
- * Release Workflow Run Lock Handler
345
- */
346
- releaseWorkflowRunLockRaw(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
347
- /**
348
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
349
- * Release Workflow Run Lock Handler
350
- */
351
- releaseWorkflowRunLock(requestParameters: ReleaseWorkflowRunLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
352
264
  /**
353
265
  * Creates request options for unapproveWorkflowRunFile without sending the request
354
266
  */
355
267
  unapproveWorkflowRunFileRequestOpts(requestParameters: UnapproveWorkflowRunFileRequest): Promise<runtime.RequestOpts>;
356
268
  /**
357
- * 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).
269
+ * 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.
358
270
  * Unapprove Workflow Run File Handler
359
271
  */
360
272
  unapproveWorkflowRunFileRaw(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartApprovalResponse>>;
361
273
  /**
362
- * 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).
274
+ * 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.
363
275
  * Unapprove Workflow Run File Handler
364
276
  */
365
277
  unapproveWorkflowRunFile(requestParameters: UnapproveWorkflowRunFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartApprovalResponse>;
@@ -62,50 +62,6 @@ const index_1 = require("../models/index");
62
62
  *
63
63
  */
64
64
  class WorkflowRunsApi extends runtime.BaseAPI {
65
- /**
66
- * Creates request options for acquireWorkflowRunLock without sending the request
67
- */
68
- acquireWorkflowRunLockRequestOpts(requestParameters) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- if (requestParameters['runId'] == null) {
71
- throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling acquireWorkflowRunLock().');
72
- }
73
- const queryParameters = {};
74
- const headerParameters = {};
75
- if (requestParameters['authorization'] != null) {
76
- headerParameters['authorization'] = String(requestParameters['authorization']);
77
- }
78
- let urlPath = `/v1/workflow-runs/{run_id}/lock`;
79
- urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
80
- return {
81
- path: urlPath,
82
- method: 'POST',
83
- headers: headerParameters,
84
- query: queryParameters,
85
- };
86
- });
87
- }
88
- /**
89
- * 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.
90
- * Acquire Workflow Run Lock Handler
91
- */
92
- acquireWorkflowRunLockRaw(requestParameters, initOverrides) {
93
- return __awaiter(this, void 0, void 0, function* () {
94
- const requestOptions = yield this.acquireWorkflowRunLockRequestOpts(requestParameters);
95
- const response = yield this.request(requestOptions, initOverrides);
96
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RunLockResponseFromJSON)(jsonValue));
97
- });
98
- }
99
- /**
100
- * 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.
101
- * Acquire Workflow Run Lock Handler
102
- */
103
- acquireWorkflowRunLock(requestParameters, initOverrides) {
104
- return __awaiter(this, void 0, void 0, function* () {
105
- const response = yield this.acquireWorkflowRunLockRaw(requestParameters, initOverrides);
106
- return yield response.value();
107
- });
108
- }
109
65
  /**
110
66
  * Creates request options for approveWorkflowRunFile without sending the request
111
67
  */
@@ -134,7 +90,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
134
90
  });
135
91
  }
136
92
  /**
137
- * Approve a single generated file. Caller must hold the run lock.
93
+ * 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.
138
94
  * Approve Workflow Run File Handler
139
95
  */
140
96
  approveWorkflowRunFileRaw(requestParameters, initOverrides) {
@@ -145,7 +101,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
145
101
  });
146
102
  }
147
103
  /**
148
- * Approve a single generated file. Caller must hold the run lock.
104
+ * 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.
149
105
  * Approve Workflow Run File Handler
150
106
  */
151
107
  approveWorkflowRunFile(requestParameters, initOverrides) {
@@ -270,7 +226,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
270
226
  });
271
227
  }
272
228
  /**
273
- * Reject a single generated file with a reason. Caller must hold the run lock.
229
+ * 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).
274
230
  * Reject Workflow Run File Handler
275
231
  */
276
232
  rejectWorkflowRunFileRaw(requestParameters, initOverrides) {
@@ -281,7 +237,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
281
237
  });
282
238
  }
283
239
  /**
284
- * Reject a single generated file with a reason. Caller must hold the run lock.
240
+ * 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).
285
241
  * Reject Workflow Run File Handler
286
242
  */
287
243
  rejectWorkflowRunFile(requestParameters, initOverrides) {
@@ -290,49 +246,6 @@ class WorkflowRunsApi extends runtime.BaseAPI {
290
246
  return yield response.value();
291
247
  });
292
248
  }
293
- /**
294
- * Creates request options for releaseWorkflowRunLock without sending the request
295
- */
296
- releaseWorkflowRunLockRequestOpts(requestParameters) {
297
- return __awaiter(this, void 0, void 0, function* () {
298
- if (requestParameters['runId'] == null) {
299
- throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling releaseWorkflowRunLock().');
300
- }
301
- const queryParameters = {};
302
- const headerParameters = {};
303
- if (requestParameters['authorization'] != null) {
304
- headerParameters['authorization'] = String(requestParameters['authorization']);
305
- }
306
- let urlPath = `/v1/workflow-runs/{run_id}/lock`;
307
- urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
308
- return {
309
- path: urlPath,
310
- method: 'DELETE',
311
- headers: headerParameters,
312
- query: queryParameters,
313
- };
314
- });
315
- }
316
- /**
317
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
318
- * Release Workflow Run Lock Handler
319
- */
320
- releaseWorkflowRunLockRaw(requestParameters, initOverrides) {
321
- return __awaiter(this, void 0, void 0, function* () {
322
- const requestOptions = yield this.releaseWorkflowRunLockRequestOpts(requestParameters);
323
- const response = yield this.request(requestOptions, initOverrides);
324
- return new runtime.VoidApiResponse(response);
325
- });
326
- }
327
- /**
328
- * Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
329
- * Release Workflow Run Lock Handler
330
- */
331
- releaseWorkflowRunLock(requestParameters, initOverrides) {
332
- return __awaiter(this, void 0, void 0, function* () {
333
- yield this.releaseWorkflowRunLockRaw(requestParameters, initOverrides);
334
- });
335
- }
336
249
  /**
337
250
  * Creates request options for unapproveWorkflowRunFile without sending the request
338
251
  */
@@ -361,7 +274,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
361
274
  });
362
275
  }
363
276
  /**
364
- * 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).
277
+ * 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.
365
278
  * Unapprove Workflow Run File Handler
366
279
  */
367
280
  unapproveWorkflowRunFileRaw(requestParameters, initOverrides) {
@@ -372,7 +285,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
372
285
  });
373
286
  }
374
287
  /**
375
- * 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).
288
+ * 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.
376
289
  * Unapprove Workflow Run File Handler
377
290
  */
378
291
  unapproveWorkflowRunFile(requestParameters, initOverrides) {