@knowledge-stack/ksapi 1.153.0 → 1.155.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 +28 -0
- package/README.md +20 -2
- package/dist/apis/BulkDeleteApi.d.ts +64 -0
- package/dist/apis/BulkDeleteApi.js +115 -0
- package/dist/apis/BulkMoveApi.d.ts +64 -0
- package/dist/apis/BulkMoveApi.js +115 -0
- package/dist/apis/DocumentsApi.d.ts +6 -6
- package/dist/apis/DocumentsApi.js +6 -6
- package/dist/apis/TrashApi.d.ts +77 -1
- package/dist/apis/TrashApi.js +98 -0
- package/dist/apis/UserPermissionsApi.d.ts +77 -1
- package/dist/apis/UserPermissionsApi.js +98 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/BulkDeleteApi.d.ts +64 -0
- package/dist/esm/apis/BulkDeleteApi.js +78 -0
- package/dist/esm/apis/BulkMoveApi.d.ts +64 -0
- package/dist/esm/apis/BulkMoveApi.js +78 -0
- package/dist/esm/apis/DocumentsApi.d.ts +6 -6
- package/dist/esm/apis/DocumentsApi.js +6 -6
- package/dist/esm/apis/TrashApi.d.ts +77 -1
- package/dist/esm/apis/TrashApi.js +99 -1
- package/dist/esm/apis/UserPermissionsApi.d.ts +77 -1
- package/dist/esm/apis/UserPermissionsApi.js +99 -1
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/BulkDeleteRequest.d.ts +53 -0
- package/dist/esm/models/BulkDeleteRequest.js +44 -0
- package/dist/esm/models/BulkFailureReason.d.ts +37 -0
- package/dist/esm/models/BulkFailureReason.js +55 -0
- package/dist/esm/models/BulkGrantItem.d.ts +66 -0
- package/dist/esm/models/BulkGrantItem.js +55 -0
- package/dist/esm/models/BulkGrantItemFailure.d.ts +60 -0
- package/dist/esm/models/BulkGrantItemFailure.js +53 -0
- package/dist/esm/models/BulkGrantRequest.d.ts +54 -0
- package/dist/esm/models/BulkGrantRequest.js +47 -0
- package/dist/esm/models/BulkGrantResponse.d.ts +55 -0
- package/dist/esm/models/BulkGrantResponse.js +46 -0
- package/dist/esm/models/BulkGrantSuccess.d.ts +72 -0
- package/dist/esm/models/BulkGrantSuccess.js +61 -0
- package/dist/esm/models/BulkItemFailure.d.ts +54 -0
- package/dist/esm/models/BulkItemFailure.js +49 -0
- package/dist/esm/models/BulkMoveRequest.d.ts +59 -0
- package/dist/esm/models/BulkMoveRequest.js +48 -0
- package/dist/esm/models/BulkOperationResponse.d.ts +54 -0
- package/dist/esm/models/BulkOperationResponse.js +45 -0
- package/dist/esm/models/BulkRevokeRequest.d.ts +53 -0
- package/dist/esm/models/BulkRevokeRequest.js +46 -0
- package/dist/esm/models/BulkTrashRequest.d.ts +47 -0
- package/dist/esm/models/BulkTrashRequest.js +42 -0
- package/dist/esm/models/CreateUploadRequest.d.ts +6 -0
- package/dist/esm/models/CreateUploadRequest.js +2 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +18 -0
- package/dist/esm/models/DocumentVersionMetadata.js +6 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +18 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +6 -0
- package/dist/esm/models/ErrorResponse.d.ts +1 -0
- package/dist/esm/models/ErrorResponse.js +1 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/BulkDeleteRequest.d.ts +53 -0
- package/dist/models/BulkDeleteRequest.js +52 -0
- package/dist/models/BulkFailureReason.d.ts +37 -0
- package/dist/models/BulkFailureReason.js +63 -0
- package/dist/models/BulkGrantItem.d.ts +66 -0
- package/dist/models/BulkGrantItem.js +63 -0
- package/dist/models/BulkGrantItemFailure.d.ts +60 -0
- package/dist/models/BulkGrantItemFailure.js +61 -0
- package/dist/models/BulkGrantRequest.d.ts +54 -0
- package/dist/models/BulkGrantRequest.js +55 -0
- package/dist/models/BulkGrantResponse.d.ts +55 -0
- package/dist/models/BulkGrantResponse.js +54 -0
- package/dist/models/BulkGrantSuccess.d.ts +72 -0
- package/dist/models/BulkGrantSuccess.js +69 -0
- package/dist/models/BulkItemFailure.d.ts +54 -0
- package/dist/models/BulkItemFailure.js +57 -0
- package/dist/models/BulkMoveRequest.d.ts +59 -0
- package/dist/models/BulkMoveRequest.js +56 -0
- package/dist/models/BulkOperationResponse.d.ts +54 -0
- package/dist/models/BulkOperationResponse.js +53 -0
- package/dist/models/BulkRevokeRequest.d.ts +53 -0
- package/dist/models/BulkRevokeRequest.js +54 -0
- package/dist/models/BulkTrashRequest.d.ts +47 -0
- package/dist/models/BulkTrashRequest.js +50 -0
- package/dist/models/CreateUploadRequest.d.ts +6 -0
- package/dist/models/CreateUploadRequest.js +2 -0
- package/dist/models/DocumentVersionMetadata.d.ts +18 -0
- package/dist/models/DocumentVersionMetadata.js +6 -0
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +18 -0
- package/dist/models/DocumentVersionMetadataUpdate.js +6 -0
- package/dist/models/ErrorResponse.d.ts +1 -0
- package/dist/models/ErrorResponse.js +1 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/BulkDeleteApi.md +84 -0
- package/docs/BulkDeleteRequest.md +37 -0
- package/docs/BulkFailureReason.md +33 -0
- package/docs/BulkGrantItem.md +41 -0
- package/docs/BulkGrantItemFailure.md +39 -0
- package/docs/BulkGrantRequest.md +37 -0
- package/docs/BulkGrantResponse.md +37 -0
- package/docs/BulkGrantSuccess.md +43 -0
- package/docs/BulkItemFailure.md +37 -0
- package/docs/BulkMoveApi.md +84 -0
- package/docs/BulkMoveRequest.md +39 -0
- package/docs/BulkOperationResponse.md +37 -0
- package/docs/BulkRevokeRequest.md +37 -0
- package/docs/BulkTrashRequest.md +35 -0
- package/docs/CreateUploadRequest.md +2 -0
- package/docs/DocumentVersionMetadata.md +6 -0
- package/docs/DocumentVersionMetadataUpdate.md +6 -0
- package/docs/DocumentsApi.md +7 -7
- package/docs/TrashApi.md +152 -0
- package/docs/UserPermissionsApi.md +152 -0
- package/package.json +1 -1
- package/src/apis/BulkDeleteApi.ts +133 -0
- package/src/apis/BulkMoveApi.ts +133 -0
- package/src/apis/DocumentsApi.ts +14 -14
- package/src/apis/TrashApi.ts +176 -0
- package/src/apis/UserPermissionsApi.ts +182 -0
- package/src/apis/index.ts +2 -0
- package/src/models/BulkDeleteRequest.ts +90 -0
- package/src/models/BulkFailureReason.ts +65 -0
- package/src/models/BulkGrantItem.ts +119 -0
- package/src/models/BulkGrantItemFailure.ts +111 -0
- package/src/models/BulkGrantRequest.ts +99 -0
- package/src/models/BulkGrantResponse.ts +105 -0
- package/src/models/BulkGrantSuccess.ts +129 -0
- package/src/models/BulkItemFailure.ts +102 -0
- package/src/models/BulkMoveRequest.ts +99 -0
- package/src/models/BulkOperationResponse.ts +98 -0
- package/src/models/BulkRevokeRequest.ts +91 -0
- package/src/models/BulkTrashRequest.ts +82 -0
- package/src/models/CreateUploadRequest.ts +8 -0
- package/src/models/DocumentVersionMetadata.ts +24 -0
- package/src/models/DocumentVersionMetadataUpdate.ts +24 -0
- package/src/models/ErrorResponse.ts +1 -0
- package/src/models/index.ts +12 -0
package/src/apis/DocumentsApi.ts
CHANGED
|
@@ -120,13 +120,13 @@ export interface IngestDocumentRequest {
|
|
|
120
120
|
file: Blob;
|
|
121
121
|
pathPartId: string;
|
|
122
122
|
name?: string | null;
|
|
123
|
+
tagIds?: Array<string>;
|
|
124
|
+
idempotencyKey?: string | null;
|
|
123
125
|
ingestionMode?: IngestionMode;
|
|
124
126
|
chunkType?: ChunkType;
|
|
125
127
|
secondaryTaxonomy?: ImageTaxonomy;
|
|
126
128
|
pageDpi?: number;
|
|
127
129
|
workflowRunId?: string | null;
|
|
128
|
-
tagIds?: Array<string>;
|
|
129
|
-
idempotencyKey?: string | null;
|
|
130
130
|
workflowDefinitionId?: string | null;
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -381,13 +381,13 @@ export interface DocumentsApiInterface {
|
|
|
381
381
|
* @param {Blob} file
|
|
382
382
|
* @param {string} pathPartId Parent path part ID (must be a FOLDER type)
|
|
383
383
|
* @param {string} [name] Document name (defaults to filename)
|
|
384
|
+
* @param {Array<string>} [tagIds] Tag IDs applied to the created document.
|
|
385
|
+
* @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
|
|
384
386
|
* @param {IngestionMode} [ingestionMode]
|
|
385
387
|
* @param {ChunkType} [chunkType]
|
|
386
388
|
* @param {ImageTaxonomy} [secondaryTaxonomy]
|
|
387
389
|
* @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
|
|
388
390
|
* @param {string} [workflowRunId] Workflow run context for assumed agent uploads.
|
|
389
|
-
* @param {Array<string>} [tagIds] Tag IDs applied to the created document.
|
|
390
|
-
* @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
|
|
391
391
|
* @param {string} [workflowDefinitionId] Workflow definition context for assumed agent uploads.
|
|
392
392
|
* @throws {RequiredError}
|
|
393
393
|
* @memberof DocumentsApiInterface
|
|
@@ -400,13 +400,13 @@ export interface DocumentsApiInterface {
|
|
|
400
400
|
* @param {Blob} file
|
|
401
401
|
* @param {string} pathPartId Parent path part ID (must be a FOLDER type)
|
|
402
402
|
* @param {string} [name] Document name (defaults to filename)
|
|
403
|
+
* @param {Array<string>} [tagIds] Tag IDs applied to the created document.
|
|
404
|
+
* @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
|
|
403
405
|
* @param {IngestionMode} [ingestionMode]
|
|
404
406
|
* @param {ChunkType} [chunkType]
|
|
405
407
|
* @param {ImageTaxonomy} [secondaryTaxonomy]
|
|
406
408
|
* @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
|
|
407
409
|
* @param {string} [workflowRunId] Workflow run context for assumed agent uploads.
|
|
408
|
-
* @param {Array<string>} [tagIds] Tag IDs applied to the created document.
|
|
409
|
-
* @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
|
|
410
410
|
* @param {string} [workflowDefinitionId] Workflow definition context for assumed agent uploads.
|
|
411
411
|
* @param {*} [options] Override http request option.
|
|
412
412
|
* @throws {RequiredError}
|
|
@@ -1109,6 +1109,14 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
|
|
|
1109
1109
|
formParams.append('name', requestParameters['name'] as any);
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
|
+
if (requestParameters['tagIds'] != null) {
|
|
1113
|
+
formParams.append('tag_ids', requestParameters['tagIds']!.join(runtime.COLLECTION_FORMATS["csv"]));
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
1117
|
+
formParams.append('idempotency_key', requestParameters['idempotencyKey'] as any);
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1112
1120
|
if (requestParameters['ingestionMode'] != null) {
|
|
1113
1121
|
formParams.append('ingestion_mode', requestParameters['ingestionMode'] as any);
|
|
1114
1122
|
}
|
|
@@ -1129,14 +1137,6 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
|
|
|
1129
1137
|
formParams.append('workflow_run_id', requestParameters['workflowRunId'] as any);
|
|
1130
1138
|
}
|
|
1131
1139
|
|
|
1132
|
-
if (requestParameters['tagIds'] != null) {
|
|
1133
|
-
formParams.append('tag_ids', requestParameters['tagIds']!.join(runtime.COLLECTION_FORMATS["csv"]));
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
1137
|
-
formParams.append('idempotency_key', requestParameters['idempotencyKey'] as any);
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
1140
|
if (requestParameters['workflowDefinitionId'] != null) {
|
|
1141
1141
|
formParams.append('workflow_definition_id', requestParameters['workflowDefinitionId'] as any);
|
|
1142
1142
|
}
|
package/src/apis/TrashApi.ts
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
BulkOperationResponse,
|
|
19
|
+
BulkTrashRequest,
|
|
18
20
|
ErrorResponse,
|
|
19
21
|
HTTPValidationError,
|
|
20
22
|
PaginatedResponseTrashItemResponse,
|
|
@@ -23,6 +25,10 @@ import type {
|
|
|
23
25
|
SortDirection,
|
|
24
26
|
} from '../models/index';
|
|
25
27
|
import {
|
|
28
|
+
BulkOperationResponseFromJSON,
|
|
29
|
+
BulkOperationResponseToJSON,
|
|
30
|
+
BulkTrashRequestFromJSON,
|
|
31
|
+
BulkTrashRequestToJSON,
|
|
26
32
|
ErrorResponseFromJSON,
|
|
27
33
|
ErrorResponseToJSON,
|
|
28
34
|
HTTPValidationErrorFromJSON,
|
|
@@ -37,6 +43,14 @@ import {
|
|
|
37
43
|
SortDirectionToJSON,
|
|
38
44
|
} from '../models/index';
|
|
39
45
|
|
|
46
|
+
export interface BulkPermanentlyDeleteTrashRequest {
|
|
47
|
+
bulkTrashRequest: BulkTrashRequest;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface BulkRestoreTrashRequest {
|
|
51
|
+
bulkTrashRequest: BulkTrashRequest;
|
|
52
|
+
}
|
|
53
|
+
|
|
40
54
|
export interface ListTrashRequest {
|
|
41
55
|
sortOrder?: PathOrder;
|
|
42
56
|
sortDir?: SortDirection;
|
|
@@ -66,6 +80,54 @@ export interface RestoreTrashItemRequest {
|
|
|
66
80
|
* @interface TrashApiInterface
|
|
67
81
|
*/
|
|
68
82
|
export interface TrashApiInterface {
|
|
83
|
+
/**
|
|
84
|
+
* Creates request options for bulkPermanentlyDeleteTrash without sending the request
|
|
85
|
+
* @param {BulkTrashRequest} bulkTrashRequest
|
|
86
|
+
* @throws {RequiredError}
|
|
87
|
+
* @memberof TrashApiInterface
|
|
88
|
+
*/
|
|
89
|
+
bulkPermanentlyDeleteTrashRequestOpts(requestParameters: BulkPermanentlyDeleteTrashRequest): Promise<runtime.RequestOpts>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Permanently delete the selected trashed objects (by PDO id), per item. An object not visible in the caller\'s trash scope lands in ``failed`` as ``not_found``; the rest are hard-deleted and their Qdrant points purged.
|
|
93
|
+
* @summary Bulk Permanently Delete Trash Handler
|
|
94
|
+
* @param {BulkTrashRequest} bulkTrashRequest
|
|
95
|
+
* @param {*} [options] Override http request option.
|
|
96
|
+
* @throws {RequiredError}
|
|
97
|
+
* @memberof TrashApiInterface
|
|
98
|
+
*/
|
|
99
|
+
bulkPermanentlyDeleteTrashRaw(requestParameters: BulkPermanentlyDeleteTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Permanently delete the selected trashed objects (by PDO id), per item. An object not visible in the caller\'s trash scope lands in ``failed`` as ``not_found``; the rest are hard-deleted and their Qdrant points purged.
|
|
103
|
+
* Bulk Permanently Delete Trash Handler
|
|
104
|
+
*/
|
|
105
|
+
bulkPermanentlyDeleteTrash(requestParameters: BulkPermanentlyDeleteTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Creates request options for bulkRestoreTrash without sending the request
|
|
109
|
+
* @param {BulkTrashRequest} bulkTrashRequest
|
|
110
|
+
* @throws {RequiredError}
|
|
111
|
+
* @memberof TrashApiInterface
|
|
112
|
+
*/
|
|
113
|
+
bulkRestoreTrashRequestOpts(requestParameters: BulkRestoreTrashRequest): Promise<runtime.RequestOpts>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Restore the selected trashed objects (by PDO id), reporting per item. An object not visible in the caller\'s trash scope lands in ``failed`` as ``not_found``; a live name collision at the original location that auto-rename cannot resolve lands as ``name_conflict``.
|
|
117
|
+
* @summary Bulk Restore Trash Handler
|
|
118
|
+
* @param {BulkTrashRequest} bulkTrashRequest
|
|
119
|
+
* @param {*} [options] Override http request option.
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
* @memberof TrashApiInterface
|
|
122
|
+
*/
|
|
123
|
+
bulkRestoreTrashRaw(requestParameters: BulkRestoreTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Restore the selected trashed objects (by PDO id), reporting per item. An object not visible in the caller\'s trash scope lands in ``failed`` as ``not_found``; a live name collision at the original location that auto-rename cannot resolve lands as ``name_conflict``.
|
|
127
|
+
* Bulk Restore Trash Handler
|
|
128
|
+
*/
|
|
129
|
+
bulkRestoreTrash(requestParameters: BulkRestoreTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
130
|
+
|
|
69
131
|
/**
|
|
70
132
|
* Creates request options for listTrash without sending the request
|
|
71
133
|
* @param {PathOrder} [sortOrder] Sort order (default: LOGICAL = deletion recency)
|
|
@@ -165,6 +227,120 @@ export interface TrashApiInterface {
|
|
|
165
227
|
*/
|
|
166
228
|
export class TrashApi extends runtime.BaseAPI implements TrashApiInterface {
|
|
167
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Creates request options for bulkPermanentlyDeleteTrash without sending the request
|
|
232
|
+
*/
|
|
233
|
+
async bulkPermanentlyDeleteTrashRequestOpts(requestParameters: BulkPermanentlyDeleteTrashRequest): Promise<runtime.RequestOpts> {
|
|
234
|
+
if (requestParameters['bulkTrashRequest'] == null) {
|
|
235
|
+
throw new runtime.RequiredError(
|
|
236
|
+
'bulkTrashRequest',
|
|
237
|
+
'Required parameter "bulkTrashRequest" was null or undefined when calling bulkPermanentlyDeleteTrash().'
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const queryParameters: any = {};
|
|
242
|
+
|
|
243
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
244
|
+
|
|
245
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
246
|
+
|
|
247
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
248
|
+
const token = this.configuration.accessToken;
|
|
249
|
+
const tokenString = await token("bearerAuth", []);
|
|
250
|
+
|
|
251
|
+
if (tokenString) {
|
|
252
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
let urlPath = `/v1/trash/bulk-delete`;
|
|
257
|
+
|
|
258
|
+
return {
|
|
259
|
+
path: urlPath,
|
|
260
|
+
method: 'POST',
|
|
261
|
+
headers: headerParameters,
|
|
262
|
+
query: queryParameters,
|
|
263
|
+
body: BulkTrashRequestToJSON(requestParameters['bulkTrashRequest']),
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Permanently delete the selected trashed objects (by PDO id), per item. An object not visible in the caller\'s trash scope lands in ``failed`` as ``not_found``; the rest are hard-deleted and their Qdrant points purged.
|
|
269
|
+
* Bulk Permanently Delete Trash Handler
|
|
270
|
+
*/
|
|
271
|
+
async bulkPermanentlyDeleteTrashRaw(requestParameters: BulkPermanentlyDeleteTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>> {
|
|
272
|
+
const requestOptions = await this.bulkPermanentlyDeleteTrashRequestOpts(requestParameters);
|
|
273
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
274
|
+
|
|
275
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BulkOperationResponseFromJSON(jsonValue));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Permanently delete the selected trashed objects (by PDO id), per item. An object not visible in the caller\'s trash scope lands in ``failed`` as ``not_found``; the rest are hard-deleted and their Qdrant points purged.
|
|
280
|
+
* Bulk Permanently Delete Trash Handler
|
|
281
|
+
*/
|
|
282
|
+
async bulkPermanentlyDeleteTrash(requestParameters: BulkPermanentlyDeleteTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse> {
|
|
283
|
+
const response = await this.bulkPermanentlyDeleteTrashRaw(requestParameters, initOverrides);
|
|
284
|
+
return await response.value();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Creates request options for bulkRestoreTrash without sending the request
|
|
289
|
+
*/
|
|
290
|
+
async bulkRestoreTrashRequestOpts(requestParameters: BulkRestoreTrashRequest): Promise<runtime.RequestOpts> {
|
|
291
|
+
if (requestParameters['bulkTrashRequest'] == null) {
|
|
292
|
+
throw new runtime.RequiredError(
|
|
293
|
+
'bulkTrashRequest',
|
|
294
|
+
'Required parameter "bulkTrashRequest" was null or undefined when calling bulkRestoreTrash().'
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const queryParameters: any = {};
|
|
299
|
+
|
|
300
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
301
|
+
|
|
302
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
303
|
+
|
|
304
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
305
|
+
const token = this.configuration.accessToken;
|
|
306
|
+
const tokenString = await token("bearerAuth", []);
|
|
307
|
+
|
|
308
|
+
if (tokenString) {
|
|
309
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
let urlPath = `/v1/trash/bulk-restore`;
|
|
314
|
+
|
|
315
|
+
return {
|
|
316
|
+
path: urlPath,
|
|
317
|
+
method: 'POST',
|
|
318
|
+
headers: headerParameters,
|
|
319
|
+
query: queryParameters,
|
|
320
|
+
body: BulkTrashRequestToJSON(requestParameters['bulkTrashRequest']),
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Restore the selected trashed objects (by PDO id), reporting per item. An object not visible in the caller\'s trash scope lands in ``failed`` as ``not_found``; a live name collision at the original location that auto-rename cannot resolve lands as ``name_conflict``.
|
|
326
|
+
* Bulk Restore Trash Handler
|
|
327
|
+
*/
|
|
328
|
+
async bulkRestoreTrashRaw(requestParameters: BulkRestoreTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>> {
|
|
329
|
+
const requestOptions = await this.bulkRestoreTrashRequestOpts(requestParameters);
|
|
330
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
331
|
+
|
|
332
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BulkOperationResponseFromJSON(jsonValue));
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Restore the selected trashed objects (by PDO id), reporting per item. An object not visible in the caller\'s trash scope lands in ``failed`` as ``not_found``; a live name collision at the original location that auto-rename cannot resolve lands as ``name_conflict``.
|
|
337
|
+
* Bulk Restore Trash Handler
|
|
338
|
+
*/
|
|
339
|
+
async bulkRestoreTrash(requestParameters: BulkRestoreTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse> {
|
|
340
|
+
const response = await this.bulkRestoreTrashRaw(requestParameters, initOverrides);
|
|
341
|
+
return await response.value();
|
|
342
|
+
}
|
|
343
|
+
|
|
168
344
|
/**
|
|
169
345
|
* Creates request options for listTrash without sending the request
|
|
170
346
|
*/
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
BulkGrantRequest,
|
|
19
|
+
BulkGrantResponse,
|
|
20
|
+
BulkOperationResponse,
|
|
21
|
+
BulkRevokeRequest,
|
|
18
22
|
CreatePermissionRequest,
|
|
19
23
|
ErrorResponse,
|
|
20
24
|
HTTPValidationError,
|
|
@@ -26,6 +30,14 @@ import type {
|
|
|
26
30
|
UserPermissionOrder,
|
|
27
31
|
} from '../models/index';
|
|
28
32
|
import {
|
|
33
|
+
BulkGrantRequestFromJSON,
|
|
34
|
+
BulkGrantRequestToJSON,
|
|
35
|
+
BulkGrantResponseFromJSON,
|
|
36
|
+
BulkGrantResponseToJSON,
|
|
37
|
+
BulkOperationResponseFromJSON,
|
|
38
|
+
BulkOperationResponseToJSON,
|
|
39
|
+
BulkRevokeRequestFromJSON,
|
|
40
|
+
BulkRevokeRequestToJSON,
|
|
29
41
|
CreatePermissionRequestFromJSON,
|
|
30
42
|
CreatePermissionRequestToJSON,
|
|
31
43
|
ErrorResponseFromJSON,
|
|
@@ -46,6 +58,14 @@ import {
|
|
|
46
58
|
UserPermissionOrderToJSON,
|
|
47
59
|
} from '../models/index';
|
|
48
60
|
|
|
61
|
+
export interface BulkGrantUserPermissionsRequest {
|
|
62
|
+
bulkGrantRequest: BulkGrantRequest;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface BulkRevokeUserPermissionsRequest {
|
|
66
|
+
bulkRevokeRequest: BulkRevokeRequest;
|
|
67
|
+
}
|
|
68
|
+
|
|
49
69
|
export interface CreateUserPermissionRequest {
|
|
50
70
|
createPermissionRequest: CreatePermissionRequest;
|
|
51
71
|
}
|
|
@@ -78,6 +98,54 @@ export interface UpdateUserPermissionRequest {
|
|
|
78
98
|
* @interface UserPermissionsApiInterface
|
|
79
99
|
*/
|
|
80
100
|
export interface UserPermissionsApiInterface {
|
|
101
|
+
/**
|
|
102
|
+
* Creates request options for bulkGrantUserPermissions without sending the request
|
|
103
|
+
* @param {BulkGrantRequest} bulkGrantRequest
|
|
104
|
+
* @throws {RequiredError}
|
|
105
|
+
* @memberof UserPermissionsApiInterface
|
|
106
|
+
*/
|
|
107
|
+
bulkGrantUserPermissionsRequestOpts(requestParameters: BulkGrantUserPermissionsRequest): Promise<runtime.RequestOpts>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Grant many (user, object, capability) permissions (admin/owner only). Each grant is applied in its own transaction, reporting a per-item outcome keyed on the (user_id, object_id) pair: a missing/trashed object or a user not in the tenant is ``not_found``, hitting the per-user cap is ``permission_limit``, and an already-covered grant is ``subsumed``.
|
|
111
|
+
* @summary Bulk Grant User Permissions Handler
|
|
112
|
+
* @param {BulkGrantRequest} bulkGrantRequest
|
|
113
|
+
* @param {*} [options] Override http request option.
|
|
114
|
+
* @throws {RequiredError}
|
|
115
|
+
* @memberof UserPermissionsApiInterface
|
|
116
|
+
*/
|
|
117
|
+
bulkGrantUserPermissionsRaw(requestParameters: BulkGrantUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkGrantResponse>>;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Grant many (user, object, capability) permissions (admin/owner only). Each grant is applied in its own transaction, reporting a per-item outcome keyed on the (user_id, object_id) pair: a missing/trashed object or a user not in the tenant is ``not_found``, hitting the per-user cap is ``permission_limit``, and an already-covered grant is ``subsumed``.
|
|
121
|
+
* Bulk Grant User Permissions Handler
|
|
122
|
+
*/
|
|
123
|
+
bulkGrantUserPermissions(requestParameters: BulkGrantUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkGrantResponse>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Creates request options for bulkRevokeUserPermissions without sending the request
|
|
127
|
+
* @param {BulkRevokeRequest} bulkRevokeRequest
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
* @memberof UserPermissionsApiInterface
|
|
130
|
+
*/
|
|
131
|
+
bulkRevokeUserPermissionsRequestOpts(requestParameters: BulkRevokeUserPermissionsRequest): Promise<runtime.RequestOpts>;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Revoke many permissions by their ids (admin/owner only), per item. A permission id not found in the tenant lands in ``failed`` as ``not_found``.
|
|
135
|
+
* @summary Bulk Revoke User Permissions Handler
|
|
136
|
+
* @param {BulkRevokeRequest} bulkRevokeRequest
|
|
137
|
+
* @param {*} [options] Override http request option.
|
|
138
|
+
* @throws {RequiredError}
|
|
139
|
+
* @memberof UserPermissionsApiInterface
|
|
140
|
+
*/
|
|
141
|
+
bulkRevokeUserPermissionsRaw(requestParameters: BulkRevokeUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Revoke many permissions by their ids (admin/owner only), per item. A permission id not found in the tenant lands in ``failed`` as ``not_found``.
|
|
145
|
+
* Bulk Revoke User Permissions Handler
|
|
146
|
+
*/
|
|
147
|
+
bulkRevokeUserPermissions(requestParameters: BulkRevokeUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
148
|
+
|
|
81
149
|
/**
|
|
82
150
|
* Creates request options for createUserPermission without sending the request
|
|
83
151
|
* @param {CreatePermissionRequest} createPermissionRequest
|
|
@@ -199,6 +267,120 @@ export interface UserPermissionsApiInterface {
|
|
|
199
267
|
*/
|
|
200
268
|
export class UserPermissionsApi extends runtime.BaseAPI implements UserPermissionsApiInterface {
|
|
201
269
|
|
|
270
|
+
/**
|
|
271
|
+
* Creates request options for bulkGrantUserPermissions without sending the request
|
|
272
|
+
*/
|
|
273
|
+
async bulkGrantUserPermissionsRequestOpts(requestParameters: BulkGrantUserPermissionsRequest): Promise<runtime.RequestOpts> {
|
|
274
|
+
if (requestParameters['bulkGrantRequest'] == null) {
|
|
275
|
+
throw new runtime.RequiredError(
|
|
276
|
+
'bulkGrantRequest',
|
|
277
|
+
'Required parameter "bulkGrantRequest" was null or undefined when calling bulkGrantUserPermissions().'
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const queryParameters: any = {};
|
|
282
|
+
|
|
283
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
284
|
+
|
|
285
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
286
|
+
|
|
287
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
288
|
+
const token = this.configuration.accessToken;
|
|
289
|
+
const tokenString = await token("bearerAuth", []);
|
|
290
|
+
|
|
291
|
+
if (tokenString) {
|
|
292
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
let urlPath = `/v1/user-permissions/bulk`;
|
|
297
|
+
|
|
298
|
+
return {
|
|
299
|
+
path: urlPath,
|
|
300
|
+
method: 'POST',
|
|
301
|
+
headers: headerParameters,
|
|
302
|
+
query: queryParameters,
|
|
303
|
+
body: BulkGrantRequestToJSON(requestParameters['bulkGrantRequest']),
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Grant many (user, object, capability) permissions (admin/owner only). Each grant is applied in its own transaction, reporting a per-item outcome keyed on the (user_id, object_id) pair: a missing/trashed object or a user not in the tenant is ``not_found``, hitting the per-user cap is ``permission_limit``, and an already-covered grant is ``subsumed``.
|
|
309
|
+
* Bulk Grant User Permissions Handler
|
|
310
|
+
*/
|
|
311
|
+
async bulkGrantUserPermissionsRaw(requestParameters: BulkGrantUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkGrantResponse>> {
|
|
312
|
+
const requestOptions = await this.bulkGrantUserPermissionsRequestOpts(requestParameters);
|
|
313
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
314
|
+
|
|
315
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BulkGrantResponseFromJSON(jsonValue));
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Grant many (user, object, capability) permissions (admin/owner only). Each grant is applied in its own transaction, reporting a per-item outcome keyed on the (user_id, object_id) pair: a missing/trashed object or a user not in the tenant is ``not_found``, hitting the per-user cap is ``permission_limit``, and an already-covered grant is ``subsumed``.
|
|
320
|
+
* Bulk Grant User Permissions Handler
|
|
321
|
+
*/
|
|
322
|
+
async bulkGrantUserPermissions(requestParameters: BulkGrantUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkGrantResponse> {
|
|
323
|
+
const response = await this.bulkGrantUserPermissionsRaw(requestParameters, initOverrides);
|
|
324
|
+
return await response.value();
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Creates request options for bulkRevokeUserPermissions without sending the request
|
|
329
|
+
*/
|
|
330
|
+
async bulkRevokeUserPermissionsRequestOpts(requestParameters: BulkRevokeUserPermissionsRequest): Promise<runtime.RequestOpts> {
|
|
331
|
+
if (requestParameters['bulkRevokeRequest'] == null) {
|
|
332
|
+
throw new runtime.RequiredError(
|
|
333
|
+
'bulkRevokeRequest',
|
|
334
|
+
'Required parameter "bulkRevokeRequest" was null or undefined when calling bulkRevokeUserPermissions().'
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
const queryParameters: any = {};
|
|
339
|
+
|
|
340
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
341
|
+
|
|
342
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
343
|
+
|
|
344
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
345
|
+
const token = this.configuration.accessToken;
|
|
346
|
+
const tokenString = await token("bearerAuth", []);
|
|
347
|
+
|
|
348
|
+
if (tokenString) {
|
|
349
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
let urlPath = `/v1/user-permissions/bulk-delete`;
|
|
354
|
+
|
|
355
|
+
return {
|
|
356
|
+
path: urlPath,
|
|
357
|
+
method: 'POST',
|
|
358
|
+
headers: headerParameters,
|
|
359
|
+
query: queryParameters,
|
|
360
|
+
body: BulkRevokeRequestToJSON(requestParameters['bulkRevokeRequest']),
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Revoke many permissions by their ids (admin/owner only), per item. A permission id not found in the tenant lands in ``failed`` as ``not_found``.
|
|
366
|
+
* Bulk Revoke User Permissions Handler
|
|
367
|
+
*/
|
|
368
|
+
async bulkRevokeUserPermissionsRaw(requestParameters: BulkRevokeUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>> {
|
|
369
|
+
const requestOptions = await this.bulkRevokeUserPermissionsRequestOpts(requestParameters);
|
|
370
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
371
|
+
|
|
372
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BulkOperationResponseFromJSON(jsonValue));
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Revoke many permissions by their ids (admin/owner only), per item. A permission id not found in the tenant lands in ``failed`` as ``not_found``.
|
|
377
|
+
* Bulk Revoke User Permissions Handler
|
|
378
|
+
*/
|
|
379
|
+
async bulkRevokeUserPermissions(requestParameters: BulkRevokeUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse> {
|
|
380
|
+
const response = await this.bulkRevokeUserPermissionsRaw(requestParameters, initOverrides);
|
|
381
|
+
return await response.value();
|
|
382
|
+
}
|
|
383
|
+
|
|
202
384
|
/**
|
|
203
385
|
* Creates request options for createUserPermission without sending the request
|
|
204
386
|
*/
|
package/src/apis/index.ts
CHANGED
|
@@ -7,7 +7,9 @@ export * from './ApiConnectionsApi';
|
|
|
7
7
|
export * from './ApiKeysApi';
|
|
8
8
|
export * from './AuditEventsApi';
|
|
9
9
|
export * from './AuthApi';
|
|
10
|
+
export * from './BulkDeleteApi';
|
|
10
11
|
export * from './BulkDownloadApi';
|
|
12
|
+
export * from './BulkMoveApi';
|
|
11
13
|
export * from './ChunkLineagesApi';
|
|
12
14
|
export * from './ChunksApi';
|
|
13
15
|
export * from './DataSourcesApi';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Soft-delete the selected folders and documents to Trash.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface BulkDeleteRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface BulkDeleteRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {Array<string>}
|
|
25
|
+
* @memberof BulkDeleteRequest
|
|
26
|
+
*/
|
|
27
|
+
folderIds?: Array<string>;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {Array<string>}
|
|
31
|
+
* @memberof BulkDeleteRequest
|
|
32
|
+
*/
|
|
33
|
+
documentIds?: Array<string>;
|
|
34
|
+
}
|
|
35
|
+
export const BulkDeleteRequestPropertyValidationAttributesMap: {
|
|
36
|
+
[property: string]: {
|
|
37
|
+
maxLength?: number,
|
|
38
|
+
minLength?: number,
|
|
39
|
+
pattern?: string,
|
|
40
|
+
maximum?: number,
|
|
41
|
+
exclusiveMaximum?: boolean,
|
|
42
|
+
minimum?: number,
|
|
43
|
+
exclusiveMinimum?: boolean,
|
|
44
|
+
multipleOf?: number,
|
|
45
|
+
maxItems?: number,
|
|
46
|
+
minItems?: number,
|
|
47
|
+
uniqueItems?: boolean
|
|
48
|
+
}
|
|
49
|
+
} = {
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the BulkDeleteRequest interface.
|
|
55
|
+
*/
|
|
56
|
+
export function instanceOfBulkDeleteRequest(value: object): value is BulkDeleteRequest {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function BulkDeleteRequestFromJSON(json: any): BulkDeleteRequest {
|
|
61
|
+
return BulkDeleteRequestFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function BulkDeleteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkDeleteRequest {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'folderIds': json['folder_ids'] == null ? undefined : json['folder_ids'],
|
|
71
|
+
'documentIds': json['document_ids'] == null ? undefined : json['document_ids'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function BulkDeleteRequestToJSON(json: any): BulkDeleteRequest {
|
|
76
|
+
return BulkDeleteRequestToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function BulkDeleteRequestToJSONTyped(value?: BulkDeleteRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'folder_ids': value['folderIds'],
|
|
87
|
+
'document_ids': value['documentIds'],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Why a single item in a bulk operation was not applied.
|
|
18
|
+
*
|
|
19
|
+
* Every value is produced by a specific, pre-checked gate — an *unexpected*
|
|
20
|
+
* per-item error is deliberately not caught (it surfaces as a 500) rather than
|
|
21
|
+
* hidden behind a vague catch-all.
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const BulkFailureReason = {
|
|
25
|
+
NotFound: 'not_found',
|
|
26
|
+
Forbidden: 'forbidden',
|
|
27
|
+
SystemManaged: 'system_managed',
|
|
28
|
+
Subsumed: 'subsumed',
|
|
29
|
+
Cycle: 'cycle',
|
|
30
|
+
Sealed: 'sealed',
|
|
31
|
+
CheckedOut: 'checked_out',
|
|
32
|
+
NameConflict: 'name_conflict',
|
|
33
|
+
InProgressWorkflow: 'in_progress_workflow',
|
|
34
|
+
PermissionLimit: 'permission_limit'
|
|
35
|
+
} as const;
|
|
36
|
+
export type BulkFailureReason = typeof BulkFailureReason[keyof typeof BulkFailureReason];
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export function instanceOfBulkFailureReason(value: any): boolean {
|
|
40
|
+
for (const key in BulkFailureReason) {
|
|
41
|
+
if (Object.prototype.hasOwnProperty.call(BulkFailureReason, key)) {
|
|
42
|
+
if (BulkFailureReason[key as keyof typeof BulkFailureReason] === value) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function BulkFailureReasonFromJSON(json: any): BulkFailureReason {
|
|
51
|
+
return BulkFailureReasonFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function BulkFailureReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkFailureReason {
|
|
55
|
+
return json as BulkFailureReason;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function BulkFailureReasonToJSON(value?: BulkFailureReason | null): any {
|
|
59
|
+
return value as any;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function BulkFailureReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): BulkFailureReason {
|
|
63
|
+
return value as BulkFailureReason;
|
|
64
|
+
}
|
|
65
|
+
|