@knowledge-stack/ksapi 1.154.1 → 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/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/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/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/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
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PaginatedResponseTrashItemResponse, PartType, PathOrder, SortDirection } from '../models/index';
|
|
13
|
+
import type { BulkOperationResponse, BulkTrashRequest, PaginatedResponseTrashItemResponse, PartType, PathOrder, SortDirection } from '../models/index';
|
|
14
|
+
export interface BulkPermanentlyDeleteTrashRequest {
|
|
15
|
+
bulkTrashRequest: BulkTrashRequest;
|
|
16
|
+
}
|
|
17
|
+
export interface BulkRestoreTrashRequest {
|
|
18
|
+
bulkTrashRequest: BulkTrashRequest;
|
|
19
|
+
}
|
|
14
20
|
export interface ListTrashRequest {
|
|
15
21
|
sortOrder?: PathOrder;
|
|
16
22
|
sortDir?: SortDirection;
|
|
@@ -37,6 +43,48 @@ export interface RestoreTrashItemRequest {
|
|
|
37
43
|
* @interface TrashApiInterface
|
|
38
44
|
*/
|
|
39
45
|
export interface TrashApiInterface {
|
|
46
|
+
/**
|
|
47
|
+
* Creates request options for bulkPermanentlyDeleteTrash without sending the request
|
|
48
|
+
* @param {BulkTrashRequest} bulkTrashRequest
|
|
49
|
+
* @throws {RequiredError}
|
|
50
|
+
* @memberof TrashApiInterface
|
|
51
|
+
*/
|
|
52
|
+
bulkPermanentlyDeleteTrashRequestOpts(requestParameters: BulkPermanentlyDeleteTrashRequest): Promise<runtime.RequestOpts>;
|
|
53
|
+
/**
|
|
54
|
+
* 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.
|
|
55
|
+
* @summary Bulk Permanently Delete Trash Handler
|
|
56
|
+
* @param {BulkTrashRequest} bulkTrashRequest
|
|
57
|
+
* @param {*} [options] Override http request option.
|
|
58
|
+
* @throws {RequiredError}
|
|
59
|
+
* @memberof TrashApiInterface
|
|
60
|
+
*/
|
|
61
|
+
bulkPermanentlyDeleteTrashRaw(requestParameters: BulkPermanentlyDeleteTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
62
|
+
/**
|
|
63
|
+
* 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.
|
|
64
|
+
* Bulk Permanently Delete Trash Handler
|
|
65
|
+
*/
|
|
66
|
+
bulkPermanentlyDeleteTrash(requestParameters: BulkPermanentlyDeleteTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Creates request options for bulkRestoreTrash without sending the request
|
|
69
|
+
* @param {BulkTrashRequest} bulkTrashRequest
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
* @memberof TrashApiInterface
|
|
72
|
+
*/
|
|
73
|
+
bulkRestoreTrashRequestOpts(requestParameters: BulkRestoreTrashRequest): Promise<runtime.RequestOpts>;
|
|
74
|
+
/**
|
|
75
|
+
* 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``.
|
|
76
|
+
* @summary Bulk Restore Trash Handler
|
|
77
|
+
* @param {BulkTrashRequest} bulkTrashRequest
|
|
78
|
+
* @param {*} [options] Override http request option.
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
* @memberof TrashApiInterface
|
|
81
|
+
*/
|
|
82
|
+
bulkRestoreTrashRaw(requestParameters: BulkRestoreTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
83
|
+
/**
|
|
84
|
+
* 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``.
|
|
85
|
+
* Bulk Restore Trash Handler
|
|
86
|
+
*/
|
|
87
|
+
bulkRestoreTrash(requestParameters: BulkRestoreTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
40
88
|
/**
|
|
41
89
|
* Creates request options for listTrash without sending the request
|
|
42
90
|
* @param {PathOrder} [sortOrder] Sort order (default: LOGICAL = deletion recency)
|
|
@@ -125,6 +173,34 @@ export interface TrashApiInterface {
|
|
|
125
173
|
*
|
|
126
174
|
*/
|
|
127
175
|
export declare class TrashApi extends runtime.BaseAPI implements TrashApiInterface {
|
|
176
|
+
/**
|
|
177
|
+
* Creates request options for bulkPermanentlyDeleteTrash without sending the request
|
|
178
|
+
*/
|
|
179
|
+
bulkPermanentlyDeleteTrashRequestOpts(requestParameters: BulkPermanentlyDeleteTrashRequest): Promise<runtime.RequestOpts>;
|
|
180
|
+
/**
|
|
181
|
+
* 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.
|
|
182
|
+
* Bulk Permanently Delete Trash Handler
|
|
183
|
+
*/
|
|
184
|
+
bulkPermanentlyDeleteTrashRaw(requestParameters: BulkPermanentlyDeleteTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
185
|
+
/**
|
|
186
|
+
* 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.
|
|
187
|
+
* Bulk Permanently Delete Trash Handler
|
|
188
|
+
*/
|
|
189
|
+
bulkPermanentlyDeleteTrash(requestParameters: BulkPermanentlyDeleteTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
190
|
+
/**
|
|
191
|
+
* Creates request options for bulkRestoreTrash without sending the request
|
|
192
|
+
*/
|
|
193
|
+
bulkRestoreTrashRequestOpts(requestParameters: BulkRestoreTrashRequest): Promise<runtime.RequestOpts>;
|
|
194
|
+
/**
|
|
195
|
+
* 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``.
|
|
196
|
+
* Bulk Restore Trash Handler
|
|
197
|
+
*/
|
|
198
|
+
bulkRestoreTrashRaw(requestParameters: BulkRestoreTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
199
|
+
/**
|
|
200
|
+
* 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``.
|
|
201
|
+
* Bulk Restore Trash Handler
|
|
202
|
+
*/
|
|
203
|
+
bulkRestoreTrash(requestParameters: BulkRestoreTrashRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
128
204
|
/**
|
|
129
205
|
* Creates request options for listTrash without sending the request
|
|
130
206
|
*/
|
|
@@ -21,11 +21,109 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { PaginatedResponseTrashItemResponseFromJSON, } from '../models/index';
|
|
24
|
+
import { BulkOperationResponseFromJSON, BulkTrashRequestToJSON, PaginatedResponseTrashItemResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class TrashApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for bulkPermanentlyDeleteTrash without sending the request
|
|
31
|
+
*/
|
|
32
|
+
bulkPermanentlyDeleteTrashRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['bulkTrashRequest'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('bulkTrashRequest', 'Required parameter "bulkTrashRequest" was null or undefined when calling bulkPermanentlyDeleteTrash().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
40
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
41
|
+
const token = this.configuration.accessToken;
|
|
42
|
+
const tokenString = yield token("bearerAuth", []);
|
|
43
|
+
if (tokenString) {
|
|
44
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
let urlPath = `/v1/trash/bulk-delete`;
|
|
48
|
+
return {
|
|
49
|
+
path: urlPath,
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: headerParameters,
|
|
52
|
+
query: queryParameters,
|
|
53
|
+
body: BulkTrashRequestToJSON(requestParameters['bulkTrashRequest']),
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 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.
|
|
59
|
+
* Bulk Permanently Delete Trash Handler
|
|
60
|
+
*/
|
|
61
|
+
bulkPermanentlyDeleteTrashRaw(requestParameters, initOverrides) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const requestOptions = yield this.bulkPermanentlyDeleteTrashRequestOpts(requestParameters);
|
|
64
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
65
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BulkOperationResponseFromJSON(jsonValue));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 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.
|
|
70
|
+
* Bulk Permanently Delete Trash Handler
|
|
71
|
+
*/
|
|
72
|
+
bulkPermanentlyDeleteTrash(requestParameters, initOverrides) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const response = yield this.bulkPermanentlyDeleteTrashRaw(requestParameters, initOverrides);
|
|
75
|
+
return yield response.value();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for bulkRestoreTrash without sending the request
|
|
80
|
+
*/
|
|
81
|
+
bulkRestoreTrashRequestOpts(requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
if (requestParameters['bulkTrashRequest'] == null) {
|
|
84
|
+
throw new runtime.RequiredError('bulkTrashRequest', 'Required parameter "bulkTrashRequest" was null or undefined when calling bulkRestoreTrash().');
|
|
85
|
+
}
|
|
86
|
+
const queryParameters = {};
|
|
87
|
+
const headerParameters = {};
|
|
88
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
89
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
90
|
+
const token = this.configuration.accessToken;
|
|
91
|
+
const tokenString = yield token("bearerAuth", []);
|
|
92
|
+
if (tokenString) {
|
|
93
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
let urlPath = `/v1/trash/bulk-restore`;
|
|
97
|
+
return {
|
|
98
|
+
path: urlPath,
|
|
99
|
+
method: 'POST',
|
|
100
|
+
headers: headerParameters,
|
|
101
|
+
query: queryParameters,
|
|
102
|
+
body: BulkTrashRequestToJSON(requestParameters['bulkTrashRequest']),
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 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``.
|
|
108
|
+
* Bulk Restore Trash Handler
|
|
109
|
+
*/
|
|
110
|
+
bulkRestoreTrashRaw(requestParameters, initOverrides) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const requestOptions = yield this.bulkRestoreTrashRequestOpts(requestParameters);
|
|
113
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
114
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BulkOperationResponseFromJSON(jsonValue));
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* 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``.
|
|
119
|
+
* Bulk Restore Trash Handler
|
|
120
|
+
*/
|
|
121
|
+
bulkRestoreTrash(requestParameters, initOverrides) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const response = yield this.bulkRestoreTrashRaw(requestParameters, initOverrides);
|
|
124
|
+
return yield response.value();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
29
127
|
/**
|
|
30
128
|
* Creates request options for listTrash without sending the request
|
|
31
129
|
*/
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreatePermissionRequest, PaginatedResponsePermissionResponse, PermissionCapability, PermissionResponse, SortDirection, UpdatePermissionRequest, UserPermissionOrder } from '../models/index';
|
|
13
|
+
import type { BulkGrantRequest, BulkGrantResponse, BulkOperationResponse, BulkRevokeRequest, CreatePermissionRequest, PaginatedResponsePermissionResponse, PermissionCapability, PermissionResponse, SortDirection, UpdatePermissionRequest, UserPermissionOrder } from '../models/index';
|
|
14
|
+
export interface BulkGrantUserPermissionsRequest {
|
|
15
|
+
bulkGrantRequest: BulkGrantRequest;
|
|
16
|
+
}
|
|
17
|
+
export interface BulkRevokeUserPermissionsRequest {
|
|
18
|
+
bulkRevokeRequest: BulkRevokeRequest;
|
|
19
|
+
}
|
|
14
20
|
export interface CreateUserPermissionRequest {
|
|
15
21
|
createPermissionRequest: CreatePermissionRequest;
|
|
16
22
|
}
|
|
@@ -39,6 +45,48 @@ export interface UpdateUserPermissionRequest {
|
|
|
39
45
|
* @interface UserPermissionsApiInterface
|
|
40
46
|
*/
|
|
41
47
|
export interface UserPermissionsApiInterface {
|
|
48
|
+
/**
|
|
49
|
+
* Creates request options for bulkGrantUserPermissions without sending the request
|
|
50
|
+
* @param {BulkGrantRequest} bulkGrantRequest
|
|
51
|
+
* @throws {RequiredError}
|
|
52
|
+
* @memberof UserPermissionsApiInterface
|
|
53
|
+
*/
|
|
54
|
+
bulkGrantUserPermissionsRequestOpts(requestParameters: BulkGrantUserPermissionsRequest): Promise<runtime.RequestOpts>;
|
|
55
|
+
/**
|
|
56
|
+
* 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``.
|
|
57
|
+
* @summary Bulk Grant User Permissions Handler
|
|
58
|
+
* @param {BulkGrantRequest} bulkGrantRequest
|
|
59
|
+
* @param {*} [options] Override http request option.
|
|
60
|
+
* @throws {RequiredError}
|
|
61
|
+
* @memberof UserPermissionsApiInterface
|
|
62
|
+
*/
|
|
63
|
+
bulkGrantUserPermissionsRaw(requestParameters: BulkGrantUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkGrantResponse>>;
|
|
64
|
+
/**
|
|
65
|
+
* 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``.
|
|
66
|
+
* Bulk Grant User Permissions Handler
|
|
67
|
+
*/
|
|
68
|
+
bulkGrantUserPermissions(requestParameters: BulkGrantUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkGrantResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Creates request options for bulkRevokeUserPermissions without sending the request
|
|
71
|
+
* @param {BulkRevokeRequest} bulkRevokeRequest
|
|
72
|
+
* @throws {RequiredError}
|
|
73
|
+
* @memberof UserPermissionsApiInterface
|
|
74
|
+
*/
|
|
75
|
+
bulkRevokeUserPermissionsRequestOpts(requestParameters: BulkRevokeUserPermissionsRequest): Promise<runtime.RequestOpts>;
|
|
76
|
+
/**
|
|
77
|
+
* 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``.
|
|
78
|
+
* @summary Bulk Revoke User Permissions Handler
|
|
79
|
+
* @param {BulkRevokeRequest} bulkRevokeRequest
|
|
80
|
+
* @param {*} [options] Override http request option.
|
|
81
|
+
* @throws {RequiredError}
|
|
82
|
+
* @memberof UserPermissionsApiInterface
|
|
83
|
+
*/
|
|
84
|
+
bulkRevokeUserPermissionsRaw(requestParameters: BulkRevokeUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
85
|
+
/**
|
|
86
|
+
* 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``.
|
|
87
|
+
* Bulk Revoke User Permissions Handler
|
|
88
|
+
*/
|
|
89
|
+
bulkRevokeUserPermissions(requestParameters: BulkRevokeUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
42
90
|
/**
|
|
43
91
|
* Creates request options for createUserPermission without sending the request
|
|
44
92
|
* @param {CreatePermissionRequest} createPermissionRequest
|
|
@@ -146,6 +194,34 @@ export interface UserPermissionsApiInterface {
|
|
|
146
194
|
*
|
|
147
195
|
*/
|
|
148
196
|
export declare class UserPermissionsApi extends runtime.BaseAPI implements UserPermissionsApiInterface {
|
|
197
|
+
/**
|
|
198
|
+
* Creates request options for bulkGrantUserPermissions without sending the request
|
|
199
|
+
*/
|
|
200
|
+
bulkGrantUserPermissionsRequestOpts(requestParameters: BulkGrantUserPermissionsRequest): Promise<runtime.RequestOpts>;
|
|
201
|
+
/**
|
|
202
|
+
* 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``.
|
|
203
|
+
* Bulk Grant User Permissions Handler
|
|
204
|
+
*/
|
|
205
|
+
bulkGrantUserPermissionsRaw(requestParameters: BulkGrantUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkGrantResponse>>;
|
|
206
|
+
/**
|
|
207
|
+
* 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``.
|
|
208
|
+
* Bulk Grant User Permissions Handler
|
|
209
|
+
*/
|
|
210
|
+
bulkGrantUserPermissions(requestParameters: BulkGrantUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkGrantResponse>;
|
|
211
|
+
/**
|
|
212
|
+
* Creates request options for bulkRevokeUserPermissions without sending the request
|
|
213
|
+
*/
|
|
214
|
+
bulkRevokeUserPermissionsRequestOpts(requestParameters: BulkRevokeUserPermissionsRequest): Promise<runtime.RequestOpts>;
|
|
215
|
+
/**
|
|
216
|
+
* 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``.
|
|
217
|
+
* Bulk Revoke User Permissions Handler
|
|
218
|
+
*/
|
|
219
|
+
bulkRevokeUserPermissionsRaw(requestParameters: BulkRevokeUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
220
|
+
/**
|
|
221
|
+
* 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``.
|
|
222
|
+
* Bulk Revoke User Permissions Handler
|
|
223
|
+
*/
|
|
224
|
+
bulkRevokeUserPermissions(requestParameters: BulkRevokeUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
149
225
|
/**
|
|
150
226
|
* Creates request options for createUserPermission without sending the request
|
|
151
227
|
*/
|
|
@@ -21,11 +21,109 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreatePermissionRequestToJSON, PaginatedResponsePermissionResponseFromJSON, PermissionResponseFromJSON, UpdatePermissionRequestToJSON, } from '../models/index';
|
|
24
|
+
import { BulkGrantRequestToJSON, BulkGrantResponseFromJSON, BulkOperationResponseFromJSON, BulkRevokeRequestToJSON, CreatePermissionRequestToJSON, PaginatedResponsePermissionResponseFromJSON, PermissionResponseFromJSON, UpdatePermissionRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class UserPermissionsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for bulkGrantUserPermissions without sending the request
|
|
31
|
+
*/
|
|
32
|
+
bulkGrantUserPermissionsRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['bulkGrantRequest'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('bulkGrantRequest', 'Required parameter "bulkGrantRequest" was null or undefined when calling bulkGrantUserPermissions().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
40
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
41
|
+
const token = this.configuration.accessToken;
|
|
42
|
+
const tokenString = yield token("bearerAuth", []);
|
|
43
|
+
if (tokenString) {
|
|
44
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
let urlPath = `/v1/user-permissions/bulk`;
|
|
48
|
+
return {
|
|
49
|
+
path: urlPath,
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: headerParameters,
|
|
52
|
+
query: queryParameters,
|
|
53
|
+
body: BulkGrantRequestToJSON(requestParameters['bulkGrantRequest']),
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 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``.
|
|
59
|
+
* Bulk Grant User Permissions Handler
|
|
60
|
+
*/
|
|
61
|
+
bulkGrantUserPermissionsRaw(requestParameters, initOverrides) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const requestOptions = yield this.bulkGrantUserPermissionsRequestOpts(requestParameters);
|
|
64
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
65
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BulkGrantResponseFromJSON(jsonValue));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 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``.
|
|
70
|
+
* Bulk Grant User Permissions Handler
|
|
71
|
+
*/
|
|
72
|
+
bulkGrantUserPermissions(requestParameters, initOverrides) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const response = yield this.bulkGrantUserPermissionsRaw(requestParameters, initOverrides);
|
|
75
|
+
return yield response.value();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for bulkRevokeUserPermissions without sending the request
|
|
80
|
+
*/
|
|
81
|
+
bulkRevokeUserPermissionsRequestOpts(requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
if (requestParameters['bulkRevokeRequest'] == null) {
|
|
84
|
+
throw new runtime.RequiredError('bulkRevokeRequest', 'Required parameter "bulkRevokeRequest" was null or undefined when calling bulkRevokeUserPermissions().');
|
|
85
|
+
}
|
|
86
|
+
const queryParameters = {};
|
|
87
|
+
const headerParameters = {};
|
|
88
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
89
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
90
|
+
const token = this.configuration.accessToken;
|
|
91
|
+
const tokenString = yield token("bearerAuth", []);
|
|
92
|
+
if (tokenString) {
|
|
93
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
let urlPath = `/v1/user-permissions/bulk-delete`;
|
|
97
|
+
return {
|
|
98
|
+
path: urlPath,
|
|
99
|
+
method: 'POST',
|
|
100
|
+
headers: headerParameters,
|
|
101
|
+
query: queryParameters,
|
|
102
|
+
body: BulkRevokeRequestToJSON(requestParameters['bulkRevokeRequest']),
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 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``.
|
|
108
|
+
* Bulk Revoke User Permissions Handler
|
|
109
|
+
*/
|
|
110
|
+
bulkRevokeUserPermissionsRaw(requestParameters, initOverrides) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const requestOptions = yield this.bulkRevokeUserPermissionsRequestOpts(requestParameters);
|
|
113
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
114
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BulkOperationResponseFromJSON(jsonValue));
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* 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``.
|
|
119
|
+
* Bulk Revoke User Permissions Handler
|
|
120
|
+
*/
|
|
121
|
+
bulkRevokeUserPermissions(requestParameters, initOverrides) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const response = yield this.bulkRevokeUserPermissionsRaw(requestParameters, initOverrides);
|
|
124
|
+
return yield response.value();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
29
127
|
/**
|
|
30
128
|
* Creates request options for createUserPermission without sending the request
|
|
31
129
|
*/
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ export * from './ApiConnectionsApi';
|
|
|
5
5
|
export * from './ApiKeysApi';
|
|
6
6
|
export * from './AuditEventsApi';
|
|
7
7
|
export * from './AuthApi';
|
|
8
|
+
export * from './BulkDeleteApi';
|
|
8
9
|
export * from './BulkDownloadApi';
|
|
10
|
+
export * from './BulkMoveApi';
|
|
9
11
|
export * from './ChunkLineagesApi';
|
|
10
12
|
export * from './ChunksApi';
|
|
11
13
|
export * from './DataSourcesApi';
|
package/dist/esm/apis/index.js
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,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* 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.
|
|
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
|
+
* Soft-delete the selected folders and documents to Trash.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface BulkDeleteRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface BulkDeleteRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof BulkDeleteRequest
|
|
22
|
+
*/
|
|
23
|
+
folderIds?: Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof BulkDeleteRequest
|
|
28
|
+
*/
|
|
29
|
+
documentIds?: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
export declare const BulkDeleteRequestPropertyValidationAttributesMap: {
|
|
32
|
+
[property: string]: {
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
minLength?: number;
|
|
35
|
+
pattern?: string;
|
|
36
|
+
maximum?: number;
|
|
37
|
+
exclusiveMaximum?: boolean;
|
|
38
|
+
minimum?: number;
|
|
39
|
+
exclusiveMinimum?: boolean;
|
|
40
|
+
multipleOf?: number;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the BulkDeleteRequest interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfBulkDeleteRequest(value: object): value is BulkDeleteRequest;
|
|
50
|
+
export declare function BulkDeleteRequestFromJSON(json: any): BulkDeleteRequest;
|
|
51
|
+
export declare function BulkDeleteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkDeleteRequest;
|
|
52
|
+
export declare function BulkDeleteRequestToJSON(json: any): BulkDeleteRequest;
|
|
53
|
+
export declare function BulkDeleteRequestToJSONTyped(value?: BulkDeleteRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
export const BulkDeleteRequestPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the BulkDeleteRequest interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfBulkDeleteRequest(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function BulkDeleteRequestFromJSON(json) {
|
|
22
|
+
return BulkDeleteRequestFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function BulkDeleteRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'folderIds': json['folder_ids'] == null ? undefined : json['folder_ids'],
|
|
30
|
+
'documentIds': json['document_ids'] == null ? undefined : json['document_ids'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function BulkDeleteRequestToJSON(json) {
|
|
34
|
+
return BulkDeleteRequestToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function BulkDeleteRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'folder_ids': value['folderIds'],
|
|
42
|
+
'document_ids': value['documentIds'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* 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.
|
|
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
|
+
* Why a single item in a bulk operation was not applied.
|
|
14
|
+
*
|
|
15
|
+
* Every value is produced by a specific, pre-checked gate — an *unexpected*
|
|
16
|
+
* per-item error is deliberately not caught (it surfaces as a 500) rather than
|
|
17
|
+
* hidden behind a vague catch-all.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const BulkFailureReason: {
|
|
21
|
+
readonly NotFound: 'not_found';
|
|
22
|
+
readonly Forbidden: 'forbidden';
|
|
23
|
+
readonly SystemManaged: 'system_managed';
|
|
24
|
+
readonly Subsumed: 'subsumed';
|
|
25
|
+
readonly Cycle: 'cycle';
|
|
26
|
+
readonly Sealed: 'sealed';
|
|
27
|
+
readonly CheckedOut: 'checked_out';
|
|
28
|
+
readonly NameConflict: 'name_conflict';
|
|
29
|
+
readonly InProgressWorkflow: 'in_progress_workflow';
|
|
30
|
+
readonly PermissionLimit: 'permission_limit';
|
|
31
|
+
};
|
|
32
|
+
export type BulkFailureReason = typeof BulkFailureReason[keyof typeof BulkFailureReason];
|
|
33
|
+
export declare function instanceOfBulkFailureReason(value: any): boolean;
|
|
34
|
+
export declare function BulkFailureReasonFromJSON(json: any): BulkFailureReason;
|
|
35
|
+
export declare function BulkFailureReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkFailureReason;
|
|
36
|
+
export declare function BulkFailureReasonToJSON(value?: BulkFailureReason | null): any;
|
|
37
|
+
export declare function BulkFailureReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): BulkFailureReason;
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
* Why a single item in a bulk operation was not applied.
|
|
16
|
+
*
|
|
17
|
+
* Every value is produced by a specific, pre-checked gate — an *unexpected*
|
|
18
|
+
* per-item error is deliberately not caught (it surfaces as a 500) rather than
|
|
19
|
+
* hidden behind a vague catch-all.
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
export const BulkFailureReason = {
|
|
23
|
+
NotFound: 'not_found',
|
|
24
|
+
Forbidden: 'forbidden',
|
|
25
|
+
SystemManaged: 'system_managed',
|
|
26
|
+
Subsumed: 'subsumed',
|
|
27
|
+
Cycle: 'cycle',
|
|
28
|
+
Sealed: 'sealed',
|
|
29
|
+
CheckedOut: 'checked_out',
|
|
30
|
+
NameConflict: 'name_conflict',
|
|
31
|
+
InProgressWorkflow: 'in_progress_workflow',
|
|
32
|
+
PermissionLimit: 'permission_limit'
|
|
33
|
+
};
|
|
34
|
+
export function instanceOfBulkFailureReason(value) {
|
|
35
|
+
for (const key in BulkFailureReason) {
|
|
36
|
+
if (Object.prototype.hasOwnProperty.call(BulkFailureReason, key)) {
|
|
37
|
+
if (BulkFailureReason[key] === value) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
export function BulkFailureReasonFromJSON(json) {
|
|
45
|
+
return BulkFailureReasonFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
export function BulkFailureReasonFromJSONTyped(json, ignoreDiscriminator) {
|
|
48
|
+
return json;
|
|
49
|
+
}
|
|
50
|
+
export function BulkFailureReasonToJSON(value) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
export function BulkFailureReasonToJSONTyped(value, ignoreDiscriminator) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|