@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.
Files changed (138) hide show
  1. package/.openapi-generator/FILES +28 -0
  2. package/README.md +20 -2
  3. package/dist/apis/BulkDeleteApi.d.ts +64 -0
  4. package/dist/apis/BulkDeleteApi.js +115 -0
  5. package/dist/apis/BulkMoveApi.d.ts +64 -0
  6. package/dist/apis/BulkMoveApi.js +115 -0
  7. package/dist/apis/DocumentsApi.d.ts +6 -6
  8. package/dist/apis/DocumentsApi.js +6 -6
  9. package/dist/apis/TrashApi.d.ts +77 -1
  10. package/dist/apis/TrashApi.js +98 -0
  11. package/dist/apis/UserPermissionsApi.d.ts +77 -1
  12. package/dist/apis/UserPermissionsApi.js +98 -0
  13. package/dist/apis/index.d.ts +2 -0
  14. package/dist/apis/index.js +2 -0
  15. package/dist/esm/apis/BulkDeleteApi.d.ts +64 -0
  16. package/dist/esm/apis/BulkDeleteApi.js +78 -0
  17. package/dist/esm/apis/BulkMoveApi.d.ts +64 -0
  18. package/dist/esm/apis/BulkMoveApi.js +78 -0
  19. package/dist/esm/apis/DocumentsApi.d.ts +6 -6
  20. package/dist/esm/apis/DocumentsApi.js +6 -6
  21. package/dist/esm/apis/TrashApi.d.ts +77 -1
  22. package/dist/esm/apis/TrashApi.js +99 -1
  23. package/dist/esm/apis/UserPermissionsApi.d.ts +77 -1
  24. package/dist/esm/apis/UserPermissionsApi.js +99 -1
  25. package/dist/esm/apis/index.d.ts +2 -0
  26. package/dist/esm/apis/index.js +2 -0
  27. package/dist/esm/models/BulkDeleteRequest.d.ts +53 -0
  28. package/dist/esm/models/BulkDeleteRequest.js +44 -0
  29. package/dist/esm/models/BulkFailureReason.d.ts +37 -0
  30. package/dist/esm/models/BulkFailureReason.js +55 -0
  31. package/dist/esm/models/BulkGrantItem.d.ts +66 -0
  32. package/dist/esm/models/BulkGrantItem.js +55 -0
  33. package/dist/esm/models/BulkGrantItemFailure.d.ts +60 -0
  34. package/dist/esm/models/BulkGrantItemFailure.js +53 -0
  35. package/dist/esm/models/BulkGrantRequest.d.ts +54 -0
  36. package/dist/esm/models/BulkGrantRequest.js +47 -0
  37. package/dist/esm/models/BulkGrantResponse.d.ts +55 -0
  38. package/dist/esm/models/BulkGrantResponse.js +46 -0
  39. package/dist/esm/models/BulkGrantSuccess.d.ts +72 -0
  40. package/dist/esm/models/BulkGrantSuccess.js +61 -0
  41. package/dist/esm/models/BulkItemFailure.d.ts +54 -0
  42. package/dist/esm/models/BulkItemFailure.js +49 -0
  43. package/dist/esm/models/BulkMoveRequest.d.ts +59 -0
  44. package/dist/esm/models/BulkMoveRequest.js +48 -0
  45. package/dist/esm/models/BulkOperationResponse.d.ts +54 -0
  46. package/dist/esm/models/BulkOperationResponse.js +45 -0
  47. package/dist/esm/models/BulkRevokeRequest.d.ts +53 -0
  48. package/dist/esm/models/BulkRevokeRequest.js +46 -0
  49. package/dist/esm/models/BulkTrashRequest.d.ts +47 -0
  50. package/dist/esm/models/BulkTrashRequest.js +42 -0
  51. package/dist/esm/models/CreateUploadRequest.d.ts +6 -0
  52. package/dist/esm/models/CreateUploadRequest.js +2 -0
  53. package/dist/esm/models/DocumentVersionMetadata.d.ts +18 -0
  54. package/dist/esm/models/DocumentVersionMetadata.js +6 -0
  55. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +18 -0
  56. package/dist/esm/models/DocumentVersionMetadataUpdate.js +6 -0
  57. package/dist/esm/models/ErrorResponse.d.ts +1 -0
  58. package/dist/esm/models/ErrorResponse.js +1 -0
  59. package/dist/esm/models/index.d.ts +12 -0
  60. package/dist/esm/models/index.js +12 -0
  61. package/dist/models/BulkDeleteRequest.d.ts +53 -0
  62. package/dist/models/BulkDeleteRequest.js +52 -0
  63. package/dist/models/BulkFailureReason.d.ts +37 -0
  64. package/dist/models/BulkFailureReason.js +63 -0
  65. package/dist/models/BulkGrantItem.d.ts +66 -0
  66. package/dist/models/BulkGrantItem.js +63 -0
  67. package/dist/models/BulkGrantItemFailure.d.ts +60 -0
  68. package/dist/models/BulkGrantItemFailure.js +61 -0
  69. package/dist/models/BulkGrantRequest.d.ts +54 -0
  70. package/dist/models/BulkGrantRequest.js +55 -0
  71. package/dist/models/BulkGrantResponse.d.ts +55 -0
  72. package/dist/models/BulkGrantResponse.js +54 -0
  73. package/dist/models/BulkGrantSuccess.d.ts +72 -0
  74. package/dist/models/BulkGrantSuccess.js +69 -0
  75. package/dist/models/BulkItemFailure.d.ts +54 -0
  76. package/dist/models/BulkItemFailure.js +57 -0
  77. package/dist/models/BulkMoveRequest.d.ts +59 -0
  78. package/dist/models/BulkMoveRequest.js +56 -0
  79. package/dist/models/BulkOperationResponse.d.ts +54 -0
  80. package/dist/models/BulkOperationResponse.js +53 -0
  81. package/dist/models/BulkRevokeRequest.d.ts +53 -0
  82. package/dist/models/BulkRevokeRequest.js +54 -0
  83. package/dist/models/BulkTrashRequest.d.ts +47 -0
  84. package/dist/models/BulkTrashRequest.js +50 -0
  85. package/dist/models/CreateUploadRequest.d.ts +6 -0
  86. package/dist/models/CreateUploadRequest.js +2 -0
  87. package/dist/models/DocumentVersionMetadata.d.ts +18 -0
  88. package/dist/models/DocumentVersionMetadata.js +6 -0
  89. package/dist/models/DocumentVersionMetadataUpdate.d.ts +18 -0
  90. package/dist/models/DocumentVersionMetadataUpdate.js +6 -0
  91. package/dist/models/ErrorResponse.d.ts +1 -0
  92. package/dist/models/ErrorResponse.js +1 -0
  93. package/dist/models/index.d.ts +12 -0
  94. package/dist/models/index.js +12 -0
  95. package/docs/BulkDeleteApi.md +84 -0
  96. package/docs/BulkDeleteRequest.md +37 -0
  97. package/docs/BulkFailureReason.md +33 -0
  98. package/docs/BulkGrantItem.md +41 -0
  99. package/docs/BulkGrantItemFailure.md +39 -0
  100. package/docs/BulkGrantRequest.md +37 -0
  101. package/docs/BulkGrantResponse.md +37 -0
  102. package/docs/BulkGrantSuccess.md +43 -0
  103. package/docs/BulkItemFailure.md +37 -0
  104. package/docs/BulkMoveApi.md +84 -0
  105. package/docs/BulkMoveRequest.md +39 -0
  106. package/docs/BulkOperationResponse.md +37 -0
  107. package/docs/BulkRevokeRequest.md +37 -0
  108. package/docs/BulkTrashRequest.md +35 -0
  109. package/docs/CreateUploadRequest.md +2 -0
  110. package/docs/DocumentVersionMetadata.md +6 -0
  111. package/docs/DocumentVersionMetadataUpdate.md +6 -0
  112. package/docs/DocumentsApi.md +7 -7
  113. package/docs/TrashApi.md +152 -0
  114. package/docs/UserPermissionsApi.md +152 -0
  115. package/package.json +1 -1
  116. package/src/apis/BulkDeleteApi.ts +133 -0
  117. package/src/apis/BulkMoveApi.ts +133 -0
  118. package/src/apis/DocumentsApi.ts +14 -14
  119. package/src/apis/TrashApi.ts +176 -0
  120. package/src/apis/UserPermissionsApi.ts +182 -0
  121. package/src/apis/index.ts +2 -0
  122. package/src/models/BulkDeleteRequest.ts +90 -0
  123. package/src/models/BulkFailureReason.ts +65 -0
  124. package/src/models/BulkGrantItem.ts +119 -0
  125. package/src/models/BulkGrantItemFailure.ts +111 -0
  126. package/src/models/BulkGrantRequest.ts +99 -0
  127. package/src/models/BulkGrantResponse.ts +105 -0
  128. package/src/models/BulkGrantSuccess.ts +129 -0
  129. package/src/models/BulkItemFailure.ts +102 -0
  130. package/src/models/BulkMoveRequest.ts +99 -0
  131. package/src/models/BulkOperationResponse.ts +98 -0
  132. package/src/models/BulkRevokeRequest.ts +91 -0
  133. package/src/models/BulkTrashRequest.ts +82 -0
  134. package/src/models/CreateUploadRequest.ts +8 -0
  135. package/src/models/DocumentVersionMetadata.ts +24 -0
  136. package/src/models/DocumentVersionMetadataUpdate.ts +24 -0
  137. package/src/models/ErrorResponse.ts +1 -0
  138. 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 &#x3D; 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
  */
@@ -62,6 +62,104 @@ const index_1 = require("../models/index");
62
62
  *
63
63
  */
64
64
  class TrashApi extends runtime.BaseAPI {
65
+ /**
66
+ * Creates request options for bulkPermanentlyDeleteTrash without sending the request
67
+ */
68
+ bulkPermanentlyDeleteTrashRequestOpts(requestParameters) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ if (requestParameters['bulkTrashRequest'] == null) {
71
+ throw new runtime.RequiredError('bulkTrashRequest', 'Required parameter "bulkTrashRequest" was null or undefined when calling bulkPermanentlyDeleteTrash().');
72
+ }
73
+ const queryParameters = {};
74
+ const headerParameters = {};
75
+ headerParameters['Content-Type'] = 'application/json';
76
+ if (this.configuration && this.configuration.accessToken) {
77
+ const token = this.configuration.accessToken;
78
+ const tokenString = yield token("bearerAuth", []);
79
+ if (tokenString) {
80
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
81
+ }
82
+ }
83
+ let urlPath = `/v1/trash/bulk-delete`;
84
+ return {
85
+ path: urlPath,
86
+ method: 'POST',
87
+ headers: headerParameters,
88
+ query: queryParameters,
89
+ body: (0, index_1.BulkTrashRequestToJSON)(requestParameters['bulkTrashRequest']),
90
+ };
91
+ });
92
+ }
93
+ /**
94
+ * 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.
95
+ * Bulk Permanently Delete Trash Handler
96
+ */
97
+ bulkPermanentlyDeleteTrashRaw(requestParameters, initOverrides) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ const requestOptions = yield this.bulkPermanentlyDeleteTrashRequestOpts(requestParameters);
100
+ const response = yield this.request(requestOptions, initOverrides);
101
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BulkOperationResponseFromJSON)(jsonValue));
102
+ });
103
+ }
104
+ /**
105
+ * 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.
106
+ * Bulk Permanently Delete Trash Handler
107
+ */
108
+ bulkPermanentlyDeleteTrash(requestParameters, initOverrides) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ const response = yield this.bulkPermanentlyDeleteTrashRaw(requestParameters, initOverrides);
111
+ return yield response.value();
112
+ });
113
+ }
114
+ /**
115
+ * Creates request options for bulkRestoreTrash without sending the request
116
+ */
117
+ bulkRestoreTrashRequestOpts(requestParameters) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ if (requestParameters['bulkTrashRequest'] == null) {
120
+ throw new runtime.RequiredError('bulkTrashRequest', 'Required parameter "bulkTrashRequest" was null or undefined when calling bulkRestoreTrash().');
121
+ }
122
+ const queryParameters = {};
123
+ const headerParameters = {};
124
+ headerParameters['Content-Type'] = 'application/json';
125
+ if (this.configuration && this.configuration.accessToken) {
126
+ const token = this.configuration.accessToken;
127
+ const tokenString = yield token("bearerAuth", []);
128
+ if (tokenString) {
129
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
130
+ }
131
+ }
132
+ let urlPath = `/v1/trash/bulk-restore`;
133
+ return {
134
+ path: urlPath,
135
+ method: 'POST',
136
+ headers: headerParameters,
137
+ query: queryParameters,
138
+ body: (0, index_1.BulkTrashRequestToJSON)(requestParameters['bulkTrashRequest']),
139
+ };
140
+ });
141
+ }
142
+ /**
143
+ * 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``.
144
+ * Bulk Restore Trash Handler
145
+ */
146
+ bulkRestoreTrashRaw(requestParameters, initOverrides) {
147
+ return __awaiter(this, void 0, void 0, function* () {
148
+ const requestOptions = yield this.bulkRestoreTrashRequestOpts(requestParameters);
149
+ const response = yield this.request(requestOptions, initOverrides);
150
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BulkOperationResponseFromJSON)(jsonValue));
151
+ });
152
+ }
153
+ /**
154
+ * 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``.
155
+ * Bulk Restore Trash Handler
156
+ */
157
+ bulkRestoreTrash(requestParameters, initOverrides) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ const response = yield this.bulkRestoreTrashRaw(requestParameters, initOverrides);
160
+ return yield response.value();
161
+ });
162
+ }
65
163
  /**
66
164
  * Creates request options for listTrash without sending the request
67
165
  */
@@ -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
  */
@@ -62,6 +62,104 @@ const index_1 = require("../models/index");
62
62
  *
63
63
  */
64
64
  class UserPermissionsApi extends runtime.BaseAPI {
65
+ /**
66
+ * Creates request options for bulkGrantUserPermissions without sending the request
67
+ */
68
+ bulkGrantUserPermissionsRequestOpts(requestParameters) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ if (requestParameters['bulkGrantRequest'] == null) {
71
+ throw new runtime.RequiredError('bulkGrantRequest', 'Required parameter "bulkGrantRequest" was null or undefined when calling bulkGrantUserPermissions().');
72
+ }
73
+ const queryParameters = {};
74
+ const headerParameters = {};
75
+ headerParameters['Content-Type'] = 'application/json';
76
+ if (this.configuration && this.configuration.accessToken) {
77
+ const token = this.configuration.accessToken;
78
+ const tokenString = yield token("bearerAuth", []);
79
+ if (tokenString) {
80
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
81
+ }
82
+ }
83
+ let urlPath = `/v1/user-permissions/bulk`;
84
+ return {
85
+ path: urlPath,
86
+ method: 'POST',
87
+ headers: headerParameters,
88
+ query: queryParameters,
89
+ body: (0, index_1.BulkGrantRequestToJSON)(requestParameters['bulkGrantRequest']),
90
+ };
91
+ });
92
+ }
93
+ /**
94
+ * 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``.
95
+ * Bulk Grant User Permissions Handler
96
+ */
97
+ bulkGrantUserPermissionsRaw(requestParameters, initOverrides) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ const requestOptions = yield this.bulkGrantUserPermissionsRequestOpts(requestParameters);
100
+ const response = yield this.request(requestOptions, initOverrides);
101
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BulkGrantResponseFromJSON)(jsonValue));
102
+ });
103
+ }
104
+ /**
105
+ * 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``.
106
+ * Bulk Grant User Permissions Handler
107
+ */
108
+ bulkGrantUserPermissions(requestParameters, initOverrides) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ const response = yield this.bulkGrantUserPermissionsRaw(requestParameters, initOverrides);
111
+ return yield response.value();
112
+ });
113
+ }
114
+ /**
115
+ * Creates request options for bulkRevokeUserPermissions without sending the request
116
+ */
117
+ bulkRevokeUserPermissionsRequestOpts(requestParameters) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ if (requestParameters['bulkRevokeRequest'] == null) {
120
+ throw new runtime.RequiredError('bulkRevokeRequest', 'Required parameter "bulkRevokeRequest" was null or undefined when calling bulkRevokeUserPermissions().');
121
+ }
122
+ const queryParameters = {};
123
+ const headerParameters = {};
124
+ headerParameters['Content-Type'] = 'application/json';
125
+ if (this.configuration && this.configuration.accessToken) {
126
+ const token = this.configuration.accessToken;
127
+ const tokenString = yield token("bearerAuth", []);
128
+ if (tokenString) {
129
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
130
+ }
131
+ }
132
+ let urlPath = `/v1/user-permissions/bulk-delete`;
133
+ return {
134
+ path: urlPath,
135
+ method: 'POST',
136
+ headers: headerParameters,
137
+ query: queryParameters,
138
+ body: (0, index_1.BulkRevokeRequestToJSON)(requestParameters['bulkRevokeRequest']),
139
+ };
140
+ });
141
+ }
142
+ /**
143
+ * 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``.
144
+ * Bulk Revoke User Permissions Handler
145
+ */
146
+ bulkRevokeUserPermissionsRaw(requestParameters, initOverrides) {
147
+ return __awaiter(this, void 0, void 0, function* () {
148
+ const requestOptions = yield this.bulkRevokeUserPermissionsRequestOpts(requestParameters);
149
+ const response = yield this.request(requestOptions, initOverrides);
150
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BulkOperationResponseFromJSON)(jsonValue));
151
+ });
152
+ }
153
+ /**
154
+ * 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``.
155
+ * Bulk Revoke User Permissions Handler
156
+ */
157
+ bulkRevokeUserPermissions(requestParameters, initOverrides) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ const response = yield this.bulkRevokeUserPermissionsRaw(requestParameters, initOverrides);
160
+ return yield response.value();
161
+ });
162
+ }
65
163
  /**
66
164
  * Creates request options for createUserPermission without sending the request
67
165
  */
@@ -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';
@@ -23,7 +23,9 @@ __exportStar(require("./ApiConnectionsApi"), exports);
23
23
  __exportStar(require("./ApiKeysApi"), exports);
24
24
  __exportStar(require("./AuditEventsApi"), exports);
25
25
  __exportStar(require("./AuthApi"), exports);
26
+ __exportStar(require("./BulkDeleteApi"), exports);
26
27
  __exportStar(require("./BulkDownloadApi"), exports);
28
+ __exportStar(require("./BulkMoveApi"), exports);
27
29
  __exportStar(require("./ChunkLineagesApi"), exports);
28
30
  __exportStar(require("./ChunksApi"), exports);
29
31
  __exportStar(require("./DataSourcesApi"), exports);
@@ -0,0 +1,64 @@
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
+ import * as runtime from '../runtime';
13
+ import type { BulkDeleteRequest, BulkOperationResponse } from '../models/index';
14
+ export interface BulkDeleteOperationRequest {
15
+ bulkDeleteRequest: BulkDeleteRequest;
16
+ }
17
+ /**
18
+ * BulkDeleteApi - interface
19
+ *
20
+ * @export
21
+ * @interface BulkDeleteApiInterface
22
+ */
23
+ export interface BulkDeleteApiInterface {
24
+ /**
25
+ * Creates request options for bulkDelete without sending the request
26
+ * @param {BulkDeleteRequest} bulkDeleteRequest
27
+ * @throws {RequiredError}
28
+ * @memberof BulkDeleteApiInterface
29
+ */
30
+ bulkDeleteRequestOpts(requestParameters: BulkDeleteOperationRequest): Promise<runtime.RequestOpts>;
31
+ /**
32
+ * Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
33
+ * @summary Bulk Delete Handler
34
+ * @param {BulkDeleteRequest} bulkDeleteRequest
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ * @memberof BulkDeleteApiInterface
38
+ */
39
+ bulkDeleteRaw(requestParameters: BulkDeleteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
40
+ /**
41
+ * Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
42
+ * Bulk Delete Handler
43
+ */
44
+ bulkDelete(requestParameters: BulkDeleteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
45
+ }
46
+ /**
47
+ *
48
+ */
49
+ export declare class BulkDeleteApi extends runtime.BaseAPI implements BulkDeleteApiInterface {
50
+ /**
51
+ * Creates request options for bulkDelete without sending the request
52
+ */
53
+ bulkDeleteRequestOpts(requestParameters: BulkDeleteOperationRequest): Promise<runtime.RequestOpts>;
54
+ /**
55
+ * Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
56
+ * Bulk Delete Handler
57
+ */
58
+ bulkDeleteRaw(requestParameters: BulkDeleteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
59
+ /**
60
+ * Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
61
+ * Bulk Delete Handler
62
+ */
63
+ bulkDelete(requestParameters: BulkDeleteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
64
+ }
@@ -0,0 +1,78 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { BulkDeleteRequestToJSON, BulkOperationResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class BulkDeleteApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for bulkDelete without sending the request
31
+ */
32
+ bulkDeleteRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['bulkDeleteRequest'] == null) {
35
+ throw new runtime.RequiredError('bulkDeleteRequest', 'Required parameter "bulkDeleteRequest" was null or undefined when calling bulkDelete().');
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/bulk-delete`;
48
+ return {
49
+ path: urlPath,
50
+ method: 'POST',
51
+ headers: headerParameters,
52
+ query: queryParameters,
53
+ body: BulkDeleteRequestToJSON(requestParameters['bulkDeleteRequest']),
54
+ };
55
+ });
56
+ }
57
+ /**
58
+ * Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
59
+ * Bulk Delete Handler
60
+ */
61
+ bulkDeleteRaw(requestParameters, initOverrides) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const requestOptions = yield this.bulkDeleteRequestOpts(requestParameters);
64
+ const response = yield this.request(requestOptions, initOverrides);
65
+ return new runtime.JSONApiResponse(response, (jsonValue) => BulkOperationResponseFromJSON(jsonValue));
66
+ });
67
+ }
68
+ /**
69
+ * Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
70
+ * Bulk Delete Handler
71
+ */
72
+ bulkDelete(requestParameters, initOverrides) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const response = yield this.bulkDeleteRaw(requestParameters, initOverrides);
75
+ return yield response.value();
76
+ });
77
+ }
78
+ }
@@ -0,0 +1,64 @@
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
+ import * as runtime from '../runtime';
13
+ import type { BulkMoveRequest, BulkOperationResponse } from '../models/index';
14
+ export interface BulkMoveOperationRequest {
15
+ bulkMoveRequest: BulkMoveRequest;
16
+ }
17
+ /**
18
+ * BulkMoveApi - interface
19
+ *
20
+ * @export
21
+ * @interface BulkMoveApiInterface
22
+ */
23
+ export interface BulkMoveApiInterface {
24
+ /**
25
+ * Creates request options for bulkMove without sending the request
26
+ * @param {BulkMoveRequest} bulkMoveRequest
27
+ * @throws {RequiredError}
28
+ * @memberof BulkMoveApiInterface
29
+ */
30
+ bulkMoveRequestOpts(requestParameters: BulkMoveOperationRequest): Promise<runtime.RequestOpts>;
31
+ /**
32
+ * Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
33
+ * @summary Bulk Move Handler
34
+ * @param {BulkMoveRequest} bulkMoveRequest
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ * @memberof BulkMoveApiInterface
38
+ */
39
+ bulkMoveRaw(requestParameters: BulkMoveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
40
+ /**
41
+ * Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
42
+ * Bulk Move Handler
43
+ */
44
+ bulkMove(requestParameters: BulkMoveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
45
+ }
46
+ /**
47
+ *
48
+ */
49
+ export declare class BulkMoveApi extends runtime.BaseAPI implements BulkMoveApiInterface {
50
+ /**
51
+ * Creates request options for bulkMove without sending the request
52
+ */
53
+ bulkMoveRequestOpts(requestParameters: BulkMoveOperationRequest): Promise<runtime.RequestOpts>;
54
+ /**
55
+ * Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
56
+ * Bulk Move Handler
57
+ */
58
+ bulkMoveRaw(requestParameters: BulkMoveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
59
+ /**
60
+ * Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
61
+ * Bulk Move Handler
62
+ */
63
+ bulkMove(requestParameters: BulkMoveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
64
+ }