@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.
- package/.openapi-generator/FILES +4 -2
- package/README.md +6 -5
- package/dist/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/apis/DocumentCheckoutApi.js +197 -0
- package/dist/apis/WorkflowRunsApi.d.ts +13 -101
- package/dist/apis/WorkflowRunsApi.js +6 -93
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/esm/apis/DocumentCheckoutApi.js +160 -0
- package/dist/esm/apis/WorkflowRunsApi.d.ts +13 -101
- package/dist/esm/apis/WorkflowRunsApi.js +7 -94
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/DocumentCheckoutResponse.d.ts +65 -0
- package/dist/esm/models/DocumentCheckoutResponse.js +56 -0
- package/dist/esm/models/DocumentResponse.d.ts +7 -0
- package/dist/esm/models/DocumentResponse.js +3 -0
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/models/DocumentCheckoutResponse.d.ts +65 -0
- package/dist/models/DocumentCheckoutResponse.js +64 -0
- package/dist/models/DocumentResponse.d.ts +7 -0
- package/dist/models/DocumentResponse.js +3 -0
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/docs/DocumentCheckoutApi.md +233 -0
- package/docs/{RunLockResponse.md → DocumentCheckoutResponse.md} +13 -11
- package/docs/DocumentResponse.md +2 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/docs/WorkflowRunsApi.md +3 -153
- package/package.json +1 -1
- package/src/apis/DocumentCheckoutApi.ts +296 -0
- package/src/apis/WorkflowRunsApi.ts +12 -184
- package/src/apis/index.ts +1 -0
- package/src/models/DocumentCheckoutResponse.ts +110 -0
- package/src/models/DocumentResponse.ts +15 -0
- package/src/models/index.ts +1 -1
- package/dist/esm/models/RunLockResponse.d.ts +0 -59
- package/dist/esm/models/RunLockResponse.js +0 -52
- package/dist/models/RunLockResponse.d.ts +0 -59
- package/dist/models/RunLockResponse.js +0 -60
- package/src/models/RunLockResponse.ts +0 -101
|
@@ -0,0 +1,160 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { DocumentCheckoutResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class DocumentCheckoutApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for acquireDocumentCheckout without sending the request
|
|
31
|
+
*/
|
|
32
|
+
acquireDocumentCheckoutRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['pathPartId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling acquireDocumentCheckout().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
if (requestParameters['authorization'] != null) {
|
|
40
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
41
|
+
}
|
|
42
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
43
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
44
|
+
return {
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'POST',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
54
|
+
* Acquire Document Checkout Handler
|
|
55
|
+
*/
|
|
56
|
+
acquireDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const requestOptions = yield this.acquireDocumentCheckoutRequestOpts(requestParameters);
|
|
59
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentCheckoutResponseFromJSON(jsonValue));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
65
|
+
* Acquire Document Checkout Handler
|
|
66
|
+
*/
|
|
67
|
+
acquireDocumentCheckout(requestParameters, initOverrides) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const response = yield this.acquireDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
70
|
+
return yield response.value();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Creates request options for getDocumentCheckout without sending the request
|
|
75
|
+
*/
|
|
76
|
+
getDocumentCheckoutRequestOpts(requestParameters) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (requestParameters['pathPartId'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getDocumentCheckout().');
|
|
80
|
+
}
|
|
81
|
+
const queryParameters = {};
|
|
82
|
+
const headerParameters = {};
|
|
83
|
+
if (requestParameters['authorization'] != null) {
|
|
84
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
85
|
+
}
|
|
86
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
87
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
88
|
+
return {
|
|
89
|
+
path: urlPath,
|
|
90
|
+
method: 'GET',
|
|
91
|
+
headers: headerParameters,
|
|
92
|
+
query: queryParameters,
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
98
|
+
* Get Document Checkout Handler
|
|
99
|
+
*/
|
|
100
|
+
getDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const requestOptions = yield this.getDocumentCheckoutRequestOpts(requestParameters);
|
|
103
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
104
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentCheckoutResponseFromJSON(jsonValue));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
109
|
+
* Get Document Checkout Handler
|
|
110
|
+
*/
|
|
111
|
+
getDocumentCheckout(requestParameters, initOverrides) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
const response = yield this.getDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
114
|
+
return yield response.value();
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Creates request options for releaseDocumentCheckout without sending the request
|
|
119
|
+
*/
|
|
120
|
+
releaseDocumentCheckoutRequestOpts(requestParameters) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
if (requestParameters['pathPartId'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling releaseDocumentCheckout().');
|
|
124
|
+
}
|
|
125
|
+
const queryParameters = {};
|
|
126
|
+
const headerParameters = {};
|
|
127
|
+
if (requestParameters['authorization'] != null) {
|
|
128
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
129
|
+
}
|
|
130
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
131
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
132
|
+
return {
|
|
133
|
+
path: urlPath,
|
|
134
|
+
method: 'DELETE',
|
|
135
|
+
headers: headerParameters,
|
|
136
|
+
query: queryParameters,
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
142
|
+
* Release Document Checkout Handler
|
|
143
|
+
*/
|
|
144
|
+
releaseDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
const requestOptions = yield this.releaseDocumentCheckoutRequestOpts(requestParameters);
|
|
147
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
148
|
+
return new runtime.VoidApiResponse(response);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
153
|
+
* Release Document Checkout Handler
|
|
154
|
+
*/
|
|
155
|
+
releaseDocumentCheckout(requestParameters, initOverrides) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
yield this.releaseDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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``.
|
|
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``.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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``.
|
|
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``.
|
|
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>;
|
|
@@ -21,55 +21,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { PathPartApprovalResponseFromJSON, RejectFileRequestToJSON,
|
|
24
|
+
import { PathPartApprovalResponseFromJSON, RejectFileRequestToJSON, WorkflowCallbackResponseFromJSON, WorkflowRunCallbackRequestToJSON, WorkflowRunResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
29
|
-
/**
|
|
30
|
-
* Creates request options for acquireWorkflowRunLock without sending the request
|
|
31
|
-
*/
|
|
32
|
-
acquireWorkflowRunLockRequestOpts(requestParameters) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
if (requestParameters['runId'] == null) {
|
|
35
|
-
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling acquireWorkflowRunLock().');
|
|
36
|
-
}
|
|
37
|
-
const queryParameters = {};
|
|
38
|
-
const headerParameters = {};
|
|
39
|
-
if (requestParameters['authorization'] != null) {
|
|
40
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
41
|
-
}
|
|
42
|
-
let urlPath = `/v1/workflow-runs/{run_id}/lock`;
|
|
43
|
-
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
44
|
-
return {
|
|
45
|
-
path: urlPath,
|
|
46
|
-
method: 'POST',
|
|
47
|
-
headers: headerParameters,
|
|
48
|
-
query: queryParameters,
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* 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.
|
|
54
|
-
* Acquire Workflow Run Lock Handler
|
|
55
|
-
*/
|
|
56
|
-
acquireWorkflowRunLockRaw(requestParameters, initOverrides) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
const requestOptions = yield this.acquireWorkflowRunLockRequestOpts(requestParameters);
|
|
59
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => RunLockResponseFromJSON(jsonValue));
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* 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.
|
|
65
|
-
* Acquire Workflow Run Lock Handler
|
|
66
|
-
*/
|
|
67
|
-
acquireWorkflowRunLock(requestParameters, initOverrides) {
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
const response = yield this.acquireWorkflowRunLockRaw(requestParameters, initOverrides);
|
|
70
|
-
return yield response.value();
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
29
|
/**
|
|
74
30
|
* Creates request options for approveWorkflowRunFile without sending the request
|
|
75
31
|
*/
|
|
@@ -98,7 +54,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
98
54
|
});
|
|
99
55
|
}
|
|
100
56
|
/**
|
|
101
|
-
* Approve a
|
|
57
|
+
* 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.
|
|
102
58
|
* Approve Workflow Run File Handler
|
|
103
59
|
*/
|
|
104
60
|
approveWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -109,7 +65,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
109
65
|
});
|
|
110
66
|
}
|
|
111
67
|
/**
|
|
112
|
-
* Approve a
|
|
68
|
+
* 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
69
|
* Approve Workflow Run File Handler
|
|
114
70
|
*/
|
|
115
71
|
approveWorkflowRunFile(requestParameters, initOverrides) {
|
|
@@ -234,7 +190,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
234
190
|
});
|
|
235
191
|
}
|
|
236
192
|
/**
|
|
237
|
-
* Reject a
|
|
193
|
+
* 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).
|
|
238
194
|
* Reject Workflow Run File Handler
|
|
239
195
|
*/
|
|
240
196
|
rejectWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -245,7 +201,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
245
201
|
});
|
|
246
202
|
}
|
|
247
203
|
/**
|
|
248
|
-
* Reject a
|
|
204
|
+
* 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).
|
|
249
205
|
* Reject Workflow Run File Handler
|
|
250
206
|
*/
|
|
251
207
|
rejectWorkflowRunFile(requestParameters, initOverrides) {
|
|
@@ -254,49 +210,6 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
254
210
|
return yield response.value();
|
|
255
211
|
});
|
|
256
212
|
}
|
|
257
|
-
/**
|
|
258
|
-
* Creates request options for releaseWorkflowRunLock without sending the request
|
|
259
|
-
*/
|
|
260
|
-
releaseWorkflowRunLockRequestOpts(requestParameters) {
|
|
261
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
if (requestParameters['runId'] == null) {
|
|
263
|
-
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling releaseWorkflowRunLock().');
|
|
264
|
-
}
|
|
265
|
-
const queryParameters = {};
|
|
266
|
-
const headerParameters = {};
|
|
267
|
-
if (requestParameters['authorization'] != null) {
|
|
268
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
269
|
-
}
|
|
270
|
-
let urlPath = `/v1/workflow-runs/{run_id}/lock`;
|
|
271
|
-
urlPath = urlPath.replace(`{${"run_id"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
272
|
-
return {
|
|
273
|
-
path: urlPath,
|
|
274
|
-
method: 'DELETE',
|
|
275
|
-
headers: headerParameters,
|
|
276
|
-
query: queryParameters,
|
|
277
|
-
};
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
282
|
-
* Release Workflow Run Lock Handler
|
|
283
|
-
*/
|
|
284
|
-
releaseWorkflowRunLockRaw(requestParameters, initOverrides) {
|
|
285
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
const requestOptions = yield this.releaseWorkflowRunLockRequestOpts(requestParameters);
|
|
287
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
288
|
-
return new runtime.VoidApiResponse(response);
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Release the reviewer lock; only the holder may call this. DELETE /lock is idempotent: returns 204 even if no lock is held.
|
|
293
|
-
* Release Workflow Run Lock Handler
|
|
294
|
-
*/
|
|
295
|
-
releaseWorkflowRunLock(requestParameters, initOverrides) {
|
|
296
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
-
yield this.releaseWorkflowRunLockRaw(requestParameters, initOverrides);
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
213
|
/**
|
|
301
214
|
* Creates request options for unapproveWorkflowRunFile without sending the request
|
|
302
215
|
*/
|
|
@@ -325,7 +238,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
325
238
|
});
|
|
326
239
|
}
|
|
327
240
|
/**
|
|
328
|
-
* Revert an approved file to ``pending``.
|
|
241
|
+
* 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.
|
|
329
242
|
* Unapprove Workflow Run File Handler
|
|
330
243
|
*/
|
|
331
244
|
unapproveWorkflowRunFileRaw(requestParameters, initOverrides) {
|
|
@@ -336,7 +249,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
|
|
|
336
249
|
});
|
|
337
250
|
}
|
|
338
251
|
/**
|
|
339
|
-
* Revert an approved file to ``pending``.
|
|
252
|
+
* 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.
|
|
340
253
|
* Unapprove Workflow Run File Handler
|
|
341
254
|
*/
|
|
342
255
|
unapproveWorkflowRunFile(requestParameters, initOverrides) {
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './AuthApi';
|
|
|
4
4
|
export * from './ChunkLineagesApi';
|
|
5
5
|
export * from './ChunksApi';
|
|
6
6
|
export * from './DefaultApi';
|
|
7
|
+
export * from './DocumentCheckoutApi';
|
|
7
8
|
export * from './DocumentVersionsApi';
|
|
8
9
|
export * from './DocumentsApi';
|
|
9
10
|
export * from './FeaturesApi';
|
package/dist/esm/apis/index.js
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,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Active checkout state on a document.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface DocumentCheckoutResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface DocumentCheckoutResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Tenant ID
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof DocumentCheckoutResponse
|
|
22
|
+
*/
|
|
23
|
+
tenantId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Document's PathPart ID
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DocumentCheckoutResponse
|
|
28
|
+
*/
|
|
29
|
+
pathPartId: string;
|
|
30
|
+
/**
|
|
31
|
+
* User who holds the checkout
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof DocumentCheckoutResponse
|
|
34
|
+
*/
|
|
35
|
+
userId: string;
|
|
36
|
+
/**
|
|
37
|
+
* When the checkout was acquired
|
|
38
|
+
* @type {Date}
|
|
39
|
+
* @memberof DocumentCheckoutResponse
|
|
40
|
+
*/
|
|
41
|
+
acquiredAt: Date;
|
|
42
|
+
}
|
|
43
|
+
export declare const DocumentCheckoutResponsePropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
pattern?: string;
|
|
48
|
+
maximum?: number;
|
|
49
|
+
exclusiveMaximum?: boolean;
|
|
50
|
+
minimum?: number;
|
|
51
|
+
exclusiveMinimum?: boolean;
|
|
52
|
+
multipleOf?: number;
|
|
53
|
+
maxItems?: number;
|
|
54
|
+
minItems?: number;
|
|
55
|
+
uniqueItems?: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the DocumentCheckoutResponse interface.
|
|
60
|
+
*/
|
|
61
|
+
export declare function instanceOfDocumentCheckoutResponse(value: object): value is DocumentCheckoutResponse;
|
|
62
|
+
export declare function DocumentCheckoutResponseFromJSON(json: any): DocumentCheckoutResponse;
|
|
63
|
+
export declare function DocumentCheckoutResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentCheckoutResponse;
|
|
64
|
+
export declare function DocumentCheckoutResponseToJSON(json: any): DocumentCheckoutResponse;
|
|
65
|
+
export declare function DocumentCheckoutResponseToJSONTyped(value?: DocumentCheckoutResponse | null, ignoreDiscriminator?: boolean): any;
|