@knowledge-stack/ksapi 1.58.0 → 1.59.1

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 (56) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +9 -2
  3. package/dist/apis/FoldersApi.d.ts +63 -4
  4. package/dist/apis/FoldersApi.js +64 -3
  5. package/dist/apis/PathPartsApi.d.ts +45 -1
  6. package/dist/apis/PathPartsApi.js +44 -0
  7. package/dist/apis/SectionsApi.d.ts +44 -0
  8. package/dist/apis/SectionsApi.js +43 -0
  9. package/dist/apis/TenantsApi.d.ts +4 -4
  10. package/dist/apis/TenantsApi.js +2 -2
  11. package/dist/esm/apis/FoldersApi.d.ts +63 -4
  12. package/dist/esm/apis/FoldersApi.js +64 -3
  13. package/dist/esm/apis/PathPartsApi.d.ts +45 -1
  14. package/dist/esm/apis/PathPartsApi.js +45 -1
  15. package/dist/esm/apis/SectionsApi.d.ts +44 -0
  16. package/dist/esm/apis/SectionsApi.js +43 -0
  17. package/dist/esm/apis/TenantsApi.d.ts +4 -4
  18. package/dist/esm/apis/TenantsApi.js +2 -2
  19. package/dist/esm/models/AncestryResponse.d.ts +48 -0
  20. package/dist/esm/models/AncestryResponse.js +45 -0
  21. package/dist/esm/models/PathPartAncestorItem.d.ts +96 -0
  22. package/dist/esm/models/PathPartAncestorItem.js +77 -0
  23. package/dist/esm/models/SearchSortOrder.d.ts +26 -0
  24. package/dist/esm/models/SearchSortOrder.js +44 -0
  25. package/dist/esm/models/SearchablePartType.d.ts +25 -0
  26. package/dist/esm/models/SearchablePartType.js +43 -0
  27. package/dist/esm/models/index.d.ts +4 -0
  28. package/dist/esm/models/index.js +4 -0
  29. package/dist/models/AncestryResponse.d.ts +48 -0
  30. package/dist/models/AncestryResponse.js +53 -0
  31. package/dist/models/PathPartAncestorItem.d.ts +96 -0
  32. package/dist/models/PathPartAncestorItem.js +85 -0
  33. package/dist/models/SearchSortOrder.d.ts +26 -0
  34. package/dist/models/SearchSortOrder.js +52 -0
  35. package/dist/models/SearchablePartType.d.ts +25 -0
  36. package/dist/models/SearchablePartType.js +51 -0
  37. package/dist/models/index.d.ts +4 -0
  38. package/dist/models/index.js +4 -0
  39. package/docs/AncestryResponse.md +35 -0
  40. package/docs/FoldersApi.md +94 -4
  41. package/docs/PathPartAncestorItem.md +51 -0
  42. package/docs/PathPartsApi.md +75 -0
  43. package/docs/SearchSortOrder.md +33 -0
  44. package/docs/SearchablePartType.md +33 -0
  45. package/docs/SectionsApi.md +75 -0
  46. package/docs/TenantsApi.md +1 -1
  47. package/package.json +1 -1
  48. package/src/apis/FoldersApi.ts +136 -7
  49. package/src/apis/PathPartsApi.ts +88 -0
  50. package/src/apis/SectionsApi.ts +81 -0
  51. package/src/apis/TenantsApi.ts +4 -4
  52. package/src/models/AncestryResponse.ts +91 -0
  53. package/src/models/PathPartAncestorItem.ts +165 -0
  54. package/src/models/SearchSortOrder.ts +54 -0
  55. package/src/models/SearchablePartType.ts +53 -0
  56. package/src/models/index.ts +4 -0
@@ -3,6 +3,7 @@
3
3
  .openapi-generator-ignore
4
4
  README.md
5
5
  docs/AcceptInviteResponse.md
6
+ docs/AncestryResponse.md
6
7
  docs/ApiKeyResponse.md
7
8
  docs/ApiKeysApi.md
8
9
  docs/Args.md
@@ -95,6 +96,7 @@ docs/PartType.md
95
96
  docs/PasswordResetRequest.md
96
97
  docs/PasswordResetWithTokenRequest.md
97
98
  docs/PathOrder.md
99
+ docs/PathPartAncestorItem.md
98
100
  docs/PathPartResponse.md
99
101
  docs/PathPartTagsResponse.md
100
102
  docs/PathPartsApi.md
@@ -110,7 +112,9 @@ docs/ResolvedReferenceOutput.md
110
112
  docs/RootResponse.md
111
113
  docs/SSOInitiateResponse.md
112
114
  docs/ScoredChunkResponse.md
115
+ docs/SearchSortOrder.md
113
116
  docs/SearchType.md
117
+ docs/SearchablePartType.md
114
118
  docs/SectionContentItem.md
115
119
  docs/SectionContentItemOrChunkContentItem.md
116
120
  docs/SectionResponse.md
@@ -186,6 +190,7 @@ src/apis/WorkflowsApi.ts
186
190
  src/apis/index.ts
187
191
  src/index.ts
188
192
  src/models/AcceptInviteResponse.ts
193
+ src/models/AncestryResponse.ts
189
194
  src/models/ApiKeyResponse.ts
190
195
  src/models/Args.ts
191
196
  src/models/BrandingLogoType.ts
@@ -268,6 +273,7 @@ src/models/PartType.ts
268
273
  src/models/PasswordResetRequest.ts
269
274
  src/models/PasswordResetWithTokenRequest.ts
270
275
  src/models/PathOrder.ts
276
+ src/models/PathPartAncestorItem.ts
271
277
  src/models/PathPartResponse.ts
272
278
  src/models/PathPartTagsResponse.ts
273
279
  src/models/PermissionCapability.ts
@@ -282,7 +288,9 @@ src/models/ResolvedReferenceOutput.ts
282
288
  src/models/RootResponse.ts
283
289
  src/models/SSOInitiateResponse.ts
284
290
  src/models/ScoredChunkResponse.ts
291
+ src/models/SearchSortOrder.ts
285
292
  src/models/SearchType.ts
293
+ src/models/SearchablePartType.ts
286
294
  src/models/SectionContentItem.ts
287
295
  src/models/SectionContentItemOrChunkContentItem.ts
288
296
  src/models/SectionResponse.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.58.0
1
+ # @knowledge-stack/ksapi@1.59.1
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -101,6 +101,7 @@ All URIs are relative to *http://localhost:8000*
101
101
  *FoldersApi* | [**getFolder**](docs/FoldersApi.md#getfolder) | **GET** /v1/folders/{folder_id} | Get Folder Handler
102
102
  *FoldersApi* | [**listFolderContents**](docs/FoldersApi.md#listfoldercontents) | **GET** /v1/folders/{folder_id}/contents | List Folder Contents Handler
103
103
  *FoldersApi* | [**listFolders**](docs/FoldersApi.md#listfolders) | **GET** /v1/folders | List Folders Handler
104
+ *FoldersApi* | [**searchItems**](docs/FoldersApi.md#searchitems) | **GET** /v1/folders/search | Search Items Handler
104
105
  *FoldersApi* | [**updateFolder**](docs/FoldersApi.md#updatefolderoperation) | **PATCH** /v1/folders/{folder_id} | Update Folder Handler
105
106
  *InvitesApi* | [**acceptInvite**](docs/InvitesApi.md#acceptinvite) | **POST** /v1/invites/{invite_id}/accept | Accept Invite
106
107
  *InvitesApi* | [**createInvite**](docs/InvitesApi.md#createinvite) | **POST** /v1/invites | Create Invite
@@ -109,12 +110,14 @@ All URIs are relative to *http://localhost:8000*
109
110
  *PathPartsApi* | [**bulkAddPathPartTags**](docs/PathPartsApi.md#bulkaddpathparttags) | **POST** /v1/path-parts/{path_part_id}/tags | Bulk Add Path Part Tags Handler
110
111
  *PathPartsApi* | [**bulkRemovePathPartTags**](docs/PathPartsApi.md#bulkremovepathparttags) | **DELETE** /v1/path-parts/{path_part_id}/tags | Bulk Remove Path Part Tags Handler
111
112
  *PathPartsApi* | [**getPathPart**](docs/PathPartsApi.md#getpathpart) | **GET** /v1/path-parts/{path_part_id} | Get Path Part Handler
113
+ *PathPartsApi* | [**getPathPartAncestry**](docs/PathPartsApi.md#getpathpartancestry) | **GET** /v1/path-parts/{path_part_id}/ancestry | Get Path Part Ancestry Handler
112
114
  *PathPartsApi* | [**getPathPartSubtreeChunks**](docs/PathPartsApi.md#getpathpartsubtreechunks) | **GET** /v1/path-parts/{path_part_id}/subtree_chunks | Get Path Part Subtree Chunks Handler
113
115
  *PathPartsApi* | [**getPathPartTags**](docs/PathPartsApi.md#getpathparttags) | **GET** /v1/path-parts/{path_part_id}/tags | Get Path Part Tags Handler
114
116
  *PathPartsApi* | [**listPathParts**](docs/PathPartsApi.md#listpathparts) | **GET** /v1/path-parts | List Path Parts Handler
115
117
  *SectionsApi* | [**createSection**](docs/SectionsApi.md#createsectionoperation) | **POST** /v1/sections | Create Section Handler
116
118
  *SectionsApi* | [**deleteSection**](docs/SectionsApi.md#deletesection) | **DELETE** /v1/sections/{section_id} | Delete Section Handler
117
119
  *SectionsApi* | [**getSection**](docs/SectionsApi.md#getsection) | **GET** /v1/sections/{section_id} | Get Section Handler
120
+ *SectionsApi* | [**getSectionsBulk**](docs/SectionsApi.md#getsectionsbulk) | **GET** /v1/sections/bulk | Get Sections Bulk Handler
118
121
  *SectionsApi* | [**updateSection**](docs/SectionsApi.md#updatesectionoperation) | **PATCH** /v1/sections/{section_id} | Update Section Handler
119
122
  *TagsApi* | [**createTag**](docs/TagsApi.md#createtagoperation) | **POST** /v1/tags | Create Tag Handler
120
123
  *TagsApi* | [**deleteTag**](docs/TagsApi.md#deletetag) | **DELETE** /v1/tags/{tag_id} | Delete Tag Handler
@@ -157,6 +160,7 @@ All URIs are relative to *http://localhost:8000*
157
160
  ### Models
158
161
 
159
162
  - [AcceptInviteResponse](docs/AcceptInviteResponse.md)
163
+ - [AncestryResponse](docs/AncestryResponse.md)
160
164
  - [ApiKeyResponse](docs/ApiKeyResponse.md)
161
165
  - [Args](docs/Args.md)
162
166
  - [BrandingLogoType](docs/BrandingLogoType.md)
@@ -239,6 +243,7 @@ All URIs are relative to *http://localhost:8000*
239
243
  - [PasswordResetRequest](docs/PasswordResetRequest.md)
240
244
  - [PasswordResetWithTokenRequest](docs/PasswordResetWithTokenRequest.md)
241
245
  - [PathOrder](docs/PathOrder.md)
246
+ - [PathPartAncestorItem](docs/PathPartAncestorItem.md)
242
247
  - [PathPartResponse](docs/PathPartResponse.md)
243
248
  - [PathPartTagsResponse](docs/PathPartTagsResponse.md)
244
249
  - [PermissionCapability](docs/PermissionCapability.md)
@@ -253,7 +258,9 @@ All URIs are relative to *http://localhost:8000*
253
258
  - [RootResponse](docs/RootResponse.md)
254
259
  - [SSOInitiateResponse](docs/SSOInitiateResponse.md)
255
260
  - [ScoredChunkResponse](docs/ScoredChunkResponse.md)
261
+ - [SearchSortOrder](docs/SearchSortOrder.md)
256
262
  - [SearchType](docs/SearchType.md)
263
+ - [SearchablePartType](docs/SearchablePartType.md)
257
264
  - [SectionContentItem](docs/SectionContentItem.md)
258
265
  - [SectionContentItemOrChunkContentItem](docs/SectionContentItemOrChunkContentItem.md)
259
266
  - [SectionResponse](docs/SectionResponse.md)
@@ -311,7 +318,7 @@ and is automatically generated by the
311
318
  [OpenAPI Generator](https://openapi-generator.tech) project:
312
319
 
313
320
  - API version: `0.1.0`
314
- - Package version: `1.58.0`
321
+ - Package version: `1.59.1`
315
322
  - Generator version: `7.20.0`
316
323
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
317
324
 
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
13
+ import type { CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, SearchSortOrder, SearchablePartType, UpdateFolderRequest } from '../models/index';
14
14
  export interface CreateFolderOperationRequest {
15
15
  createFolderRequest: CreateFolderRequest;
16
16
  authorization?: string | null;
@@ -38,7 +38,6 @@ export interface ListFolderContentsRequest {
38
38
  maxDepth?: number;
39
39
  sortOrder?: PathOrder;
40
40
  withTags?: boolean;
41
- nameLike?: string | null;
42
41
  limit?: number;
43
42
  offset?: number;
44
43
  authorization?: string | null;
@@ -53,6 +52,17 @@ export interface ListFoldersRequest {
53
52
  authorization?: string | null;
54
53
  ksUat?: string | null;
55
54
  }
55
+ export interface SearchItemsRequest {
56
+ nameLike: string;
57
+ sortOrder?: SearchSortOrder;
58
+ partType?: SearchablePartType;
59
+ withTags?: boolean;
60
+ parentPathPartId?: string | null;
61
+ limit?: number;
62
+ offset?: number;
63
+ authorization?: string | null;
64
+ ksUat?: string | null;
65
+ }
56
66
  export interface UpdateFolderOperationRequest {
57
67
  folderId: string;
58
68
  updateFolderRequest: UpdateFolderRequest;
@@ -176,7 +186,6 @@ export interface FoldersApiInterface {
176
186
  * @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
177
187
  * @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
178
188
  * @param {boolean} [withTags] Include tag IDs for each item (default: false)
179
- * @param {string} [nameLike] Case-insensitive partial name search filter
180
189
  * @param {number} [limit] Number of items per page
181
190
  * @param {number} [offset] Number of items to skip
182
191
  * @param {string} [authorization]
@@ -192,7 +201,6 @@ export interface FoldersApiInterface {
192
201
  * @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
193
202
  * @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
194
203
  * @param {boolean} [withTags] Include tag IDs for each item (default: false)
195
- * @param {string} [nameLike] Case-insensitive partial name search filter
196
204
  * @param {number} [limit] Number of items per page
197
205
  * @param {number} [offset] Number of items to skip
198
206
  * @param {string} [authorization]
@@ -240,6 +248,43 @@ export interface FoldersApiInterface {
240
248
  * List Folders Handler
241
249
  */
242
250
  listFolders(requestParameters: ListFoldersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderResponse>;
251
+ /**
252
+ * Creates request options for searchItems without sending the request
253
+ * @param {string} nameLike Case-insensitive partial name search
254
+ * @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
255
+ * @param {SearchablePartType} [partType] Filter by item type (default: both folders and documents)
256
+ * @param {boolean} [withTags] Include tags in the response (default: false)
257
+ * @param {string} [parentPathPartId] Scope search to descendants of this folder\&#39;s path part
258
+ * @param {number} [limit] Number of items per page
259
+ * @param {number} [offset] Number of items to skip
260
+ * @param {string} [authorization]
261
+ * @param {string} [ksUat]
262
+ * @throws {RequiredError}
263
+ * @memberof FoldersApiInterface
264
+ */
265
+ searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
266
+ /**
267
+ * Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
268
+ * @summary Search Items Handler
269
+ * @param {string} nameLike Case-insensitive partial name search
270
+ * @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
271
+ * @param {SearchablePartType} [partType] Filter by item type (default: both folders and documents)
272
+ * @param {boolean} [withTags] Include tags in the response (default: false)
273
+ * @param {string} [parentPathPartId] Scope search to descendants of this folder\&#39;s path part
274
+ * @param {number} [limit] Number of items per page
275
+ * @param {number} [offset] Number of items to skip
276
+ * @param {string} [authorization]
277
+ * @param {string} [ksUat]
278
+ * @param {*} [options] Override http request option.
279
+ * @throws {RequiredError}
280
+ * @memberof FoldersApiInterface
281
+ */
282
+ searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>>;
283
+ /**
284
+ * Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
285
+ * Search Items Handler
286
+ */
287
+ searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>;
243
288
  /**
244
289
  * Creates request options for updateFolder without sending the request
245
290
  * @param {string} folderId
@@ -356,6 +401,20 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
356
401
  * List Folders Handler
357
402
  */
358
403
  listFolders(requestParameters?: ListFoldersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderResponse>;
404
+ /**
405
+ * Creates request options for searchItems without sending the request
406
+ */
407
+ searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
408
+ /**
409
+ * Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
410
+ * Search Items Handler
411
+ */
412
+ searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>>;
413
+ /**
414
+ * Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
415
+ * Search Items Handler
416
+ */
417
+ searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>;
359
418
  /**
360
419
  * Creates request options for updateFolder without sending the request
361
420
  */
@@ -232,9 +232,6 @@ class FoldersApi extends runtime.BaseAPI {
232
232
  if (requestParameters['withTags'] != null) {
233
233
  queryParameters['with_tags'] = requestParameters['withTags'];
234
234
  }
235
- if (requestParameters['nameLike'] != null) {
236
- queryParameters['name_like'] = requestParameters['nameLike'];
237
- }
238
235
  if (requestParameters['limit'] != null) {
239
236
  queryParameters['limit'] = requestParameters['limit'];
240
237
  }
@@ -331,6 +328,70 @@ class FoldersApi extends runtime.BaseAPI {
331
328
  return yield response.value();
332
329
  });
333
330
  }
331
+ /**
332
+ * Creates request options for searchItems without sending the request
333
+ */
334
+ searchItemsRequestOpts(requestParameters) {
335
+ return __awaiter(this, void 0, void 0, function* () {
336
+ if (requestParameters['nameLike'] == null) {
337
+ throw new runtime.RequiredError('nameLike', 'Required parameter "nameLike" was null or undefined when calling searchItems().');
338
+ }
339
+ const queryParameters = {};
340
+ if (requestParameters['nameLike'] != null) {
341
+ queryParameters['name_like'] = requestParameters['nameLike'];
342
+ }
343
+ if (requestParameters['sortOrder'] != null) {
344
+ queryParameters['sort_order'] = requestParameters['sortOrder'];
345
+ }
346
+ if (requestParameters['partType'] != null) {
347
+ queryParameters['part_type'] = requestParameters['partType'];
348
+ }
349
+ if (requestParameters['withTags'] != null) {
350
+ queryParameters['with_tags'] = requestParameters['withTags'];
351
+ }
352
+ if (requestParameters['parentPathPartId'] != null) {
353
+ queryParameters['parent_path_part_id'] = requestParameters['parentPathPartId'];
354
+ }
355
+ if (requestParameters['limit'] != null) {
356
+ queryParameters['limit'] = requestParameters['limit'];
357
+ }
358
+ if (requestParameters['offset'] != null) {
359
+ queryParameters['offset'] = requestParameters['offset'];
360
+ }
361
+ const headerParameters = {};
362
+ if (requestParameters['authorization'] != null) {
363
+ headerParameters['authorization'] = String(requestParameters['authorization']);
364
+ }
365
+ let urlPath = `/v1/folders/search`;
366
+ return {
367
+ path: urlPath,
368
+ method: 'GET',
369
+ headers: headerParameters,
370
+ query: queryParameters,
371
+ };
372
+ });
373
+ }
374
+ /**
375
+ * Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
376
+ * Search Items Handler
377
+ */
378
+ searchItemsRaw(requestParameters, initOverrides) {
379
+ return __awaiter(this, void 0, void 0, function* () {
380
+ const requestOptions = yield this.searchItemsRequestOpts(requestParameters);
381
+ const response = yield this.request(requestOptions, initOverrides);
382
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminatorFromJSON)(jsonValue));
383
+ });
384
+ }
385
+ /**
386
+ * Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
387
+ * Search Items Handler
388
+ */
389
+ searchItems(requestParameters, initOverrides) {
390
+ return __awaiter(this, void 0, void 0, function* () {
391
+ const response = yield this.searchItemsRaw(requestParameters, initOverrides);
392
+ return yield response.value();
393
+ });
394
+ }
334
395
  /**
335
396
  * Creates request options for updateFolder without sending the request
336
397
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BulkTagRequest, PaginatedResponsePathPartResponse, PathOrder, PathPartResponse, PathPartTagsResponse, SubtreeChunksResponse } from '../models/index';
13
+ import type { AncestryResponse, BulkTagRequest, PaginatedResponsePathPartResponse, PathOrder, PathPartResponse, PathPartTagsResponse, SubtreeChunksResponse } from '../models/index';
14
14
  export interface BulkAddPathPartTagsRequest {
15
15
  pathPartId: string;
16
16
  bulkTagRequest: BulkTagRequest;
@@ -28,6 +28,11 @@ export interface GetPathPartRequest {
28
28
  authorization?: string | null;
29
29
  ksUat?: string | null;
30
30
  }
31
+ export interface GetPathPartAncestryRequest {
32
+ pathPartId: string;
33
+ authorization?: string | null;
34
+ ksUat?: string | null;
35
+ }
31
36
  export interface GetPathPartSubtreeChunksRequest {
32
37
  pathPartId: string;
33
38
  authorization?: string | null;
@@ -134,6 +139,31 @@ export interface PathPartsApiInterface {
134
139
  * Get Path Part Handler
135
140
  */
136
141
  getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
142
+ /**
143
+ * Creates request options for getPathPartAncestry without sending the request
144
+ * @param {string} pathPartId
145
+ * @param {string} [authorization]
146
+ * @param {string} [ksUat]
147
+ * @throws {RequiredError}
148
+ * @memberof PathPartsApiInterface
149
+ */
150
+ getPathPartAncestryRequestOpts(requestParameters: GetPathPartAncestryRequest): Promise<runtime.RequestOpts>;
151
+ /**
152
+ * Get the full ancestry chain for a path part (root to leaf, inclusive). Returns all ancestors from the root down to and including the target path part. Authorization is checked on the leaf — if the user can read the leaf, they can navigate its ancestors.
153
+ * @summary Get Path Part Ancestry Handler
154
+ * @param {string} pathPartId
155
+ * @param {string} [authorization]
156
+ * @param {string} [ksUat]
157
+ * @param {*} [options] Override http request option.
158
+ * @throws {RequiredError}
159
+ * @memberof PathPartsApiInterface
160
+ */
161
+ getPathPartAncestryRaw(requestParameters: GetPathPartAncestryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AncestryResponse>>;
162
+ /**
163
+ * Get the full ancestry chain for a path part (root to leaf, inclusive). Returns all ancestors from the root down to and including the target path part. Authorization is checked on the leaf — if the user can read the leaf, they can navigate its ancestors.
164
+ * Get Path Part Ancestry Handler
165
+ */
166
+ getPathPartAncestry(requestParameters: GetPathPartAncestryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AncestryResponse>;
137
167
  /**
138
168
  * Creates request options for getPathPartSubtreeChunks without sending the request
139
169
  * @param {string} pathPartId
@@ -266,6 +296,20 @@ export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsAp
266
296
  * Get Path Part Handler
267
297
  */
268
298
  getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
299
+ /**
300
+ * Creates request options for getPathPartAncestry without sending the request
301
+ */
302
+ getPathPartAncestryRequestOpts(requestParameters: GetPathPartAncestryRequest): Promise<runtime.RequestOpts>;
303
+ /**
304
+ * Get the full ancestry chain for a path part (root to leaf, inclusive). Returns all ancestors from the root down to and including the target path part. Authorization is checked on the leaf — if the user can read the leaf, they can navigate its ancestors.
305
+ * Get Path Part Ancestry Handler
306
+ */
307
+ getPathPartAncestryRaw(requestParameters: GetPathPartAncestryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AncestryResponse>>;
308
+ /**
309
+ * Get the full ancestry chain for a path part (root to leaf, inclusive). Returns all ancestors from the root down to and including the target path part. Authorization is checked on the leaf — if the user can read the leaf, they can navigate its ancestors.
310
+ * Get Path Part Ancestry Handler
311
+ */
312
+ getPathPartAncestry(requestParameters: GetPathPartAncestryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AncestryResponse>;
269
313
  /**
270
314
  * Creates request options for getPathPartSubtreeChunks without sending the request
271
315
  */
@@ -171,6 +171,50 @@ class PathPartsApi extends runtime.BaseAPI {
171
171
  return yield response.value();
172
172
  });
173
173
  }
174
+ /**
175
+ * Creates request options for getPathPartAncestry without sending the request
176
+ */
177
+ getPathPartAncestryRequestOpts(requestParameters) {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ if (requestParameters['pathPartId'] == null) {
180
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getPathPartAncestry().');
181
+ }
182
+ const queryParameters = {};
183
+ const headerParameters = {};
184
+ if (requestParameters['authorization'] != null) {
185
+ headerParameters['authorization'] = String(requestParameters['authorization']);
186
+ }
187
+ let urlPath = `/v1/path-parts/{path_part_id}/ancestry`;
188
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
189
+ return {
190
+ path: urlPath,
191
+ method: 'GET',
192
+ headers: headerParameters,
193
+ query: queryParameters,
194
+ };
195
+ });
196
+ }
197
+ /**
198
+ * Get the full ancestry chain for a path part (root to leaf, inclusive). Returns all ancestors from the root down to and including the target path part. Authorization is checked on the leaf — if the user can read the leaf, they can navigate its ancestors.
199
+ * Get Path Part Ancestry Handler
200
+ */
201
+ getPathPartAncestryRaw(requestParameters, initOverrides) {
202
+ return __awaiter(this, void 0, void 0, function* () {
203
+ const requestOptions = yield this.getPathPartAncestryRequestOpts(requestParameters);
204
+ const response = yield this.request(requestOptions, initOverrides);
205
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AncestryResponseFromJSON)(jsonValue));
206
+ });
207
+ }
208
+ /**
209
+ * Get the full ancestry chain for a path part (root to leaf, inclusive). Returns all ancestors from the root down to and including the target path part. Authorization is checked on the leaf — if the user can read the leaf, they can navigate its ancestors.
210
+ * Get Path Part Ancestry Handler
211
+ */
212
+ getPathPartAncestry(requestParameters, initOverrides) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ const response = yield this.getPathPartAncestryRaw(requestParameters, initOverrides);
215
+ return yield response.value();
216
+ });
217
+ }
174
218
  /**
175
219
  * Creates request options for getPathPartSubtreeChunks without sending the request
176
220
  */
@@ -26,6 +26,11 @@ export interface GetSectionRequest {
26
26
  authorization?: string | null;
27
27
  ksUat?: string | null;
28
28
  }
29
+ export interface GetSectionsBulkRequest {
30
+ sectionIds?: Array<string> | null;
31
+ authorization?: string | null;
32
+ ksUat?: string | null;
33
+ }
29
34
  export interface UpdateSectionOperationRequest {
30
35
  sectionId: string;
31
36
  updateSectionRequest: UpdateSectionRequest;
@@ -114,6 +119,31 @@ export interface SectionsApiInterface {
114
119
  * Get Section Handler
115
120
  */
116
121
  getSection(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
122
+ /**
123
+ * Creates request options for getSectionsBulk without sending the request
124
+ * @param {Array<string>} [sectionIds] Section IDs to fetch (max 200)
125
+ * @param {string} [authorization]
126
+ * @param {string} [ksUat]
127
+ * @throws {RequiredError}
128
+ * @memberof SectionsApiInterface
129
+ */
130
+ getSectionsBulkRequestOpts(requestParameters: GetSectionsBulkRequest): Promise<runtime.RequestOpts>;
131
+ /**
132
+ * Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
133
+ * @summary Get Sections Bulk Handler
134
+ * @param {Array<string>} [sectionIds] Section IDs to fetch (max 200)
135
+ * @param {string} [authorization]
136
+ * @param {string} [ksUat]
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ * @memberof SectionsApiInterface
140
+ */
141
+ getSectionsBulkRaw(requestParameters: GetSectionsBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SectionResponse>>>;
142
+ /**
143
+ * Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
144
+ * Get Sections Bulk Handler
145
+ */
146
+ getSectionsBulk(requestParameters: GetSectionsBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SectionResponse>>;
117
147
  /**
118
148
  * Creates request options for updateSection without sending the request
119
149
  * @param {string} sectionId
@@ -188,6 +218,20 @@ export declare class SectionsApi extends runtime.BaseAPI implements SectionsApiI
188
218
  * Get Section Handler
189
219
  */
190
220
  getSection(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
221
+ /**
222
+ * Creates request options for getSectionsBulk without sending the request
223
+ */
224
+ getSectionsBulkRequestOpts(requestParameters: GetSectionsBulkRequest): Promise<runtime.RequestOpts>;
225
+ /**
226
+ * Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
227
+ * Get Sections Bulk Handler
228
+ */
229
+ getSectionsBulkRaw(requestParameters: GetSectionsBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SectionResponse>>>;
230
+ /**
231
+ * Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
232
+ * Get Sections Bulk Handler
233
+ */
234
+ getSectionsBulk(requestParameters?: GetSectionsBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SectionResponse>>;
191
235
  /**
192
236
  * Creates request options for updateSection without sending the request
193
237
  */
@@ -161,6 +161,49 @@ class SectionsApi extends runtime.BaseAPI {
161
161
  return yield response.value();
162
162
  });
163
163
  }
164
+ /**
165
+ * Creates request options for getSectionsBulk without sending the request
166
+ */
167
+ getSectionsBulkRequestOpts(requestParameters) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const queryParameters = {};
170
+ if (requestParameters['sectionIds'] != null) {
171
+ queryParameters['section_ids'] = requestParameters['sectionIds'];
172
+ }
173
+ const headerParameters = {};
174
+ if (requestParameters['authorization'] != null) {
175
+ headerParameters['authorization'] = String(requestParameters['authorization']);
176
+ }
177
+ let urlPath = `/v1/sections/bulk`;
178
+ return {
179
+ path: urlPath,
180
+ method: 'GET',
181
+ headers: headerParameters,
182
+ query: queryParameters,
183
+ };
184
+ });
185
+ }
186
+ /**
187
+ * Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
188
+ * Get Sections Bulk Handler
189
+ */
190
+ getSectionsBulkRaw(requestParameters, initOverrides) {
191
+ return __awaiter(this, void 0, void 0, function* () {
192
+ const requestOptions = yield this.getSectionsBulkRequestOpts(requestParameters);
193
+ const response = yield this.request(requestOptions, initOverrides);
194
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.SectionResponseFromJSON));
195
+ });
196
+ }
197
+ /**
198
+ * Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
199
+ * Get Sections Bulk Handler
200
+ */
201
+ getSectionsBulk() {
202
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
203
+ const response = yield this.getSectionsBulkRaw(requestParameters, initOverrides);
204
+ return yield response.value();
205
+ });
206
+ }
164
207
  /**
165
208
  * Creates request options for updateSection without sending the request
166
209
  */
@@ -113,7 +113,7 @@ export interface TenantsApiInterface {
113
113
  */
114
114
  deleteTenantRequestOpts(requestParameters: DeleteTenantRequest): Promise<runtime.RequestOpts>;
115
115
  /**
116
- * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
116
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
117
117
  * @summary Delete Tenant
118
118
  * @param {string} tenantId
119
119
  * @param {string} [authorization]
@@ -124,7 +124,7 @@ export interface TenantsApiInterface {
124
124
  */
125
125
  deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
126
126
  /**
127
- * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
127
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
128
128
  * Delete Tenant
129
129
  */
130
130
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -372,12 +372,12 @@ export declare class TenantsApi extends runtime.BaseAPI implements TenantsApiInt
372
372
  */
373
373
  deleteTenantRequestOpts(requestParameters: DeleteTenantRequest): Promise<runtime.RequestOpts>;
374
374
  /**
375
- * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
375
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
376
376
  * Delete Tenant
377
377
  */
378
378
  deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
379
379
  /**
380
- * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
380
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
381
381
  * Delete Tenant
382
382
  */
383
383
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -98,7 +98,7 @@ class TenantsApi extends runtime.BaseAPI {
98
98
  });
99
99
  }
100
100
  /**
101
- * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
101
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
102
102
  * Delete Tenant
103
103
  */
104
104
  deleteTenantRaw(requestParameters, initOverrides) {
@@ -109,7 +109,7 @@ class TenantsApi extends runtime.BaseAPI {
109
109
  });
110
110
  }
111
111
  /**
112
- * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
112
+ * Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
113
113
  * Delete Tenant
114
114
  */
115
115
  deleteTenant(requestParameters, initOverrides) {