@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.
- package/.openapi-generator/FILES +8 -0
- package/README.md +9 -2
- package/dist/apis/FoldersApi.d.ts +63 -4
- package/dist/apis/FoldersApi.js +64 -3
- package/dist/apis/PathPartsApi.d.ts +45 -1
- package/dist/apis/PathPartsApi.js +44 -0
- package/dist/apis/SectionsApi.d.ts +44 -0
- package/dist/apis/SectionsApi.js +43 -0
- package/dist/apis/TenantsApi.d.ts +4 -4
- package/dist/apis/TenantsApi.js +2 -2
- package/dist/esm/apis/FoldersApi.d.ts +63 -4
- package/dist/esm/apis/FoldersApi.js +64 -3
- package/dist/esm/apis/PathPartsApi.d.ts +45 -1
- package/dist/esm/apis/PathPartsApi.js +45 -1
- package/dist/esm/apis/SectionsApi.d.ts +44 -0
- package/dist/esm/apis/SectionsApi.js +43 -0
- package/dist/esm/apis/TenantsApi.d.ts +4 -4
- package/dist/esm/apis/TenantsApi.js +2 -2
- package/dist/esm/models/AncestryResponse.d.ts +48 -0
- package/dist/esm/models/AncestryResponse.js +45 -0
- package/dist/esm/models/PathPartAncestorItem.d.ts +96 -0
- package/dist/esm/models/PathPartAncestorItem.js +77 -0
- package/dist/esm/models/SearchSortOrder.d.ts +26 -0
- package/dist/esm/models/SearchSortOrder.js +44 -0
- package/dist/esm/models/SearchablePartType.d.ts +25 -0
- package/dist/esm/models/SearchablePartType.js +43 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/AncestryResponse.d.ts +48 -0
- package/dist/models/AncestryResponse.js +53 -0
- package/dist/models/PathPartAncestorItem.d.ts +96 -0
- package/dist/models/PathPartAncestorItem.js +85 -0
- package/dist/models/SearchSortOrder.d.ts +26 -0
- package/dist/models/SearchSortOrder.js +52 -0
- package/dist/models/SearchablePartType.d.ts +25 -0
- package/dist/models/SearchablePartType.js +51 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/AncestryResponse.md +35 -0
- package/docs/FoldersApi.md +94 -4
- package/docs/PathPartAncestorItem.md +51 -0
- package/docs/PathPartsApi.md +75 -0
- package/docs/SearchSortOrder.md +33 -0
- package/docs/SearchablePartType.md +33 -0
- package/docs/SectionsApi.md +75 -0
- package/docs/TenantsApi.md +1 -1
- package/package.json +1 -1
- package/src/apis/FoldersApi.ts +136 -7
- package/src/apis/PathPartsApi.ts +88 -0
- package/src/apis/SectionsApi.ts +81 -0
- package/src/apis/TenantsApi.ts +4 -4
- package/src/models/AncestryResponse.ts +91 -0
- package/src/models/PathPartAncestorItem.ts +165 -0
- package/src/models/SearchSortOrder.ts +54 -0
- package/src/models/SearchablePartType.ts +53 -0
- package/src/models/index.ts +4 -0
package/src/apis/FoldersApi.ts
CHANGED
|
@@ -23,6 +23,8 @@ import type {
|
|
|
23
23
|
PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator,
|
|
24
24
|
PaginatedResponseFolderResponse,
|
|
25
25
|
PathOrder,
|
|
26
|
+
SearchSortOrder,
|
|
27
|
+
SearchablePartType,
|
|
26
28
|
UpdateFolderRequest,
|
|
27
29
|
} from '../models/index';
|
|
28
30
|
import {
|
|
@@ -42,6 +44,10 @@ import {
|
|
|
42
44
|
PaginatedResponseFolderResponseToJSON,
|
|
43
45
|
PathOrderFromJSON,
|
|
44
46
|
PathOrderToJSON,
|
|
47
|
+
SearchSortOrderFromJSON,
|
|
48
|
+
SearchSortOrderToJSON,
|
|
49
|
+
SearchablePartTypeFromJSON,
|
|
50
|
+
SearchablePartTypeToJSON,
|
|
45
51
|
UpdateFolderRequestFromJSON,
|
|
46
52
|
UpdateFolderRequestToJSON,
|
|
47
53
|
} from '../models/index';
|
|
@@ -77,7 +83,6 @@ export interface ListFolderContentsRequest {
|
|
|
77
83
|
maxDepth?: number;
|
|
78
84
|
sortOrder?: PathOrder;
|
|
79
85
|
withTags?: boolean;
|
|
80
|
-
nameLike?: string | null;
|
|
81
86
|
limit?: number;
|
|
82
87
|
offset?: number;
|
|
83
88
|
authorization?: string | null;
|
|
@@ -94,6 +99,18 @@ export interface ListFoldersRequest {
|
|
|
94
99
|
ksUat?: string | null;
|
|
95
100
|
}
|
|
96
101
|
|
|
102
|
+
export interface SearchItemsRequest {
|
|
103
|
+
nameLike: string;
|
|
104
|
+
sortOrder?: SearchSortOrder;
|
|
105
|
+
partType?: SearchablePartType;
|
|
106
|
+
withTags?: boolean;
|
|
107
|
+
parentPathPartId?: string | null;
|
|
108
|
+
limit?: number;
|
|
109
|
+
offset?: number;
|
|
110
|
+
authorization?: string | null;
|
|
111
|
+
ksUat?: string | null;
|
|
112
|
+
}
|
|
113
|
+
|
|
97
114
|
export interface UpdateFolderOperationRequest {
|
|
98
115
|
folderId: string;
|
|
99
116
|
updateFolderRequest: UpdateFolderRequest;
|
|
@@ -230,7 +247,6 @@ export interface FoldersApiInterface {
|
|
|
230
247
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
231
248
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
232
249
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
233
|
-
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
234
250
|
* @param {number} [limit] Number of items per page
|
|
235
251
|
* @param {number} [offset] Number of items to skip
|
|
236
252
|
* @param {string} [authorization]
|
|
@@ -247,7 +263,6 @@ export interface FoldersApiInterface {
|
|
|
247
263
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
248
264
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
249
265
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
250
|
-
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
251
266
|
* @param {number} [limit] Number of items per page
|
|
252
267
|
* @param {number} [offset] Number of items to skip
|
|
253
268
|
* @param {string} [authorization]
|
|
@@ -300,6 +315,46 @@ export interface FoldersApiInterface {
|
|
|
300
315
|
*/
|
|
301
316
|
listFolders(requestParameters: ListFoldersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderResponse>;
|
|
302
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Creates request options for searchItems without sending the request
|
|
320
|
+
* @param {string} nameLike Case-insensitive partial name search
|
|
321
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
|
|
322
|
+
* @param {SearchablePartType} [partType] Filter by item type (default: both folders and documents)
|
|
323
|
+
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
324
|
+
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
325
|
+
* @param {number} [limit] Number of items per page
|
|
326
|
+
* @param {number} [offset] Number of items to skip
|
|
327
|
+
* @param {string} [authorization]
|
|
328
|
+
* @param {string} [ksUat]
|
|
329
|
+
* @throws {RequiredError}
|
|
330
|
+
* @memberof FoldersApiInterface
|
|
331
|
+
*/
|
|
332
|
+
searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* 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.
|
|
336
|
+
* @summary Search Items Handler
|
|
337
|
+
* @param {string} nameLike Case-insensitive partial name search
|
|
338
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
|
|
339
|
+
* @param {SearchablePartType} [partType] Filter by item type (default: both folders and documents)
|
|
340
|
+
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
341
|
+
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
342
|
+
* @param {number} [limit] Number of items per page
|
|
343
|
+
* @param {number} [offset] Number of items to skip
|
|
344
|
+
* @param {string} [authorization]
|
|
345
|
+
* @param {string} [ksUat]
|
|
346
|
+
* @param {*} [options] Override http request option.
|
|
347
|
+
* @throws {RequiredError}
|
|
348
|
+
* @memberof FoldersApiInterface
|
|
349
|
+
*/
|
|
350
|
+
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>>;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* 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.
|
|
354
|
+
* Search Items Handler
|
|
355
|
+
*/
|
|
356
|
+
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>;
|
|
357
|
+
|
|
303
358
|
/**
|
|
304
359
|
* Creates request options for updateFolder without sending the request
|
|
305
360
|
* @param {string} folderId
|
|
@@ -582,10 +637,6 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
582
637
|
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
583
638
|
}
|
|
584
639
|
|
|
585
|
-
if (requestParameters['nameLike'] != null) {
|
|
586
|
-
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
587
|
-
}
|
|
588
|
-
|
|
589
640
|
if (requestParameters['limit'] != null) {
|
|
590
641
|
queryParameters['limit'] = requestParameters['limit'];
|
|
591
642
|
}
|
|
@@ -695,6 +746,84 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
695
746
|
return await response.value();
|
|
696
747
|
}
|
|
697
748
|
|
|
749
|
+
/**
|
|
750
|
+
* Creates request options for searchItems without sending the request
|
|
751
|
+
*/
|
|
752
|
+
async searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts> {
|
|
753
|
+
if (requestParameters['nameLike'] == null) {
|
|
754
|
+
throw new runtime.RequiredError(
|
|
755
|
+
'nameLike',
|
|
756
|
+
'Required parameter "nameLike" was null or undefined when calling searchItems().'
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
const queryParameters: any = {};
|
|
761
|
+
|
|
762
|
+
if (requestParameters['nameLike'] != null) {
|
|
763
|
+
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
if (requestParameters['sortOrder'] != null) {
|
|
767
|
+
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
if (requestParameters['partType'] != null) {
|
|
771
|
+
queryParameters['part_type'] = requestParameters['partType'];
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (requestParameters['withTags'] != null) {
|
|
775
|
+
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
if (requestParameters['parentPathPartId'] != null) {
|
|
779
|
+
queryParameters['parent_path_part_id'] = requestParameters['parentPathPartId'];
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
if (requestParameters['limit'] != null) {
|
|
783
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
if (requestParameters['offset'] != null) {
|
|
787
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
791
|
+
|
|
792
|
+
if (requestParameters['authorization'] != null) {
|
|
793
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
let urlPath = `/v1/folders/search`;
|
|
798
|
+
|
|
799
|
+
return {
|
|
800
|
+
path: urlPath,
|
|
801
|
+
method: 'GET',
|
|
802
|
+
headers: headerParameters,
|
|
803
|
+
query: queryParameters,
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* 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.
|
|
809
|
+
* Search Items Handler
|
|
810
|
+
*/
|
|
811
|
+
async searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>> {
|
|
812
|
+
const requestOptions = await this.searchItemsRequestOpts(requestParameters);
|
|
813
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
814
|
+
|
|
815
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminatorFromJSON(jsonValue));
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* 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.
|
|
820
|
+
* Search Items Handler
|
|
821
|
+
*/
|
|
822
|
+
async searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator> {
|
|
823
|
+
const response = await this.searchItemsRaw(requestParameters, initOverrides);
|
|
824
|
+
return await response.value();
|
|
825
|
+
}
|
|
826
|
+
|
|
698
827
|
/**
|
|
699
828
|
* Creates request options for updateFolder without sending the request
|
|
700
829
|
*/
|
package/src/apis/PathPartsApi.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
AncestryResponse,
|
|
18
19
|
BulkTagRequest,
|
|
19
20
|
HTTPValidationError,
|
|
20
21
|
PaginatedResponsePathPartResponse,
|
|
@@ -24,6 +25,8 @@ import type {
|
|
|
24
25
|
SubtreeChunksResponse,
|
|
25
26
|
} from '../models/index';
|
|
26
27
|
import {
|
|
28
|
+
AncestryResponseFromJSON,
|
|
29
|
+
AncestryResponseToJSON,
|
|
27
30
|
BulkTagRequestFromJSON,
|
|
28
31
|
BulkTagRequestToJSON,
|
|
29
32
|
HTTPValidationErrorFromJSON,
|
|
@@ -60,6 +63,12 @@ export interface GetPathPartRequest {
|
|
|
60
63
|
ksUat?: string | null;
|
|
61
64
|
}
|
|
62
65
|
|
|
66
|
+
export interface GetPathPartAncestryRequest {
|
|
67
|
+
pathPartId: string;
|
|
68
|
+
authorization?: string | null;
|
|
69
|
+
ksUat?: string | null;
|
|
70
|
+
}
|
|
71
|
+
|
|
63
72
|
export interface GetPathPartSubtreeChunksRequest {
|
|
64
73
|
pathPartId: string;
|
|
65
74
|
authorization?: string | null;
|
|
@@ -178,6 +187,34 @@ export interface PathPartsApiInterface {
|
|
|
178
187
|
*/
|
|
179
188
|
getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
|
|
180
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Creates request options for getPathPartAncestry without sending the request
|
|
192
|
+
* @param {string} pathPartId
|
|
193
|
+
* @param {string} [authorization]
|
|
194
|
+
* @param {string} [ksUat]
|
|
195
|
+
* @throws {RequiredError}
|
|
196
|
+
* @memberof PathPartsApiInterface
|
|
197
|
+
*/
|
|
198
|
+
getPathPartAncestryRequestOpts(requestParameters: GetPathPartAncestryRequest): Promise<runtime.RequestOpts>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* 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.
|
|
202
|
+
* @summary Get Path Part Ancestry Handler
|
|
203
|
+
* @param {string} pathPartId
|
|
204
|
+
* @param {string} [authorization]
|
|
205
|
+
* @param {string} [ksUat]
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
* @memberof PathPartsApiInterface
|
|
209
|
+
*/
|
|
210
|
+
getPathPartAncestryRaw(requestParameters: GetPathPartAncestryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AncestryResponse>>;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* 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.
|
|
214
|
+
* Get Path Part Ancestry Handler
|
|
215
|
+
*/
|
|
216
|
+
getPathPartAncestry(requestParameters: GetPathPartAncestryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AncestryResponse>;
|
|
217
|
+
|
|
181
218
|
/**
|
|
182
219
|
* Creates request options for getPathPartSubtreeChunks without sending the request
|
|
183
220
|
* @param {string} pathPartId
|
|
@@ -452,6 +489,57 @@ export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterfa
|
|
|
452
489
|
return await response.value();
|
|
453
490
|
}
|
|
454
491
|
|
|
492
|
+
/**
|
|
493
|
+
* Creates request options for getPathPartAncestry without sending the request
|
|
494
|
+
*/
|
|
495
|
+
async getPathPartAncestryRequestOpts(requestParameters: GetPathPartAncestryRequest): Promise<runtime.RequestOpts> {
|
|
496
|
+
if (requestParameters['pathPartId'] == null) {
|
|
497
|
+
throw new runtime.RequiredError(
|
|
498
|
+
'pathPartId',
|
|
499
|
+
'Required parameter "pathPartId" was null or undefined when calling getPathPartAncestry().'
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
const queryParameters: any = {};
|
|
504
|
+
|
|
505
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
506
|
+
|
|
507
|
+
if (requestParameters['authorization'] != null) {
|
|
508
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
let urlPath = `/v1/path-parts/{path_part_id}/ancestry`;
|
|
513
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
514
|
+
|
|
515
|
+
return {
|
|
516
|
+
path: urlPath,
|
|
517
|
+
method: 'GET',
|
|
518
|
+
headers: headerParameters,
|
|
519
|
+
query: queryParameters,
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* 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.
|
|
525
|
+
* Get Path Part Ancestry Handler
|
|
526
|
+
*/
|
|
527
|
+
async getPathPartAncestryRaw(requestParameters: GetPathPartAncestryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AncestryResponse>> {
|
|
528
|
+
const requestOptions = await this.getPathPartAncestryRequestOpts(requestParameters);
|
|
529
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
530
|
+
|
|
531
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AncestryResponseFromJSON(jsonValue));
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* 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.
|
|
536
|
+
* Get Path Part Ancestry Handler
|
|
537
|
+
*/
|
|
538
|
+
async getPathPartAncestry(requestParameters: GetPathPartAncestryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AncestryResponse> {
|
|
539
|
+
const response = await this.getPathPartAncestryRaw(requestParameters, initOverrides);
|
|
540
|
+
return await response.value();
|
|
541
|
+
}
|
|
542
|
+
|
|
455
543
|
/**
|
|
456
544
|
* Creates request options for getPathPartSubtreeChunks without sending the request
|
|
457
545
|
*/
|
package/src/apis/SectionsApi.ts
CHANGED
|
@@ -49,6 +49,12 @@ export interface GetSectionRequest {
|
|
|
49
49
|
ksUat?: string | null;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
export interface GetSectionsBulkRequest {
|
|
53
|
+
sectionIds?: Array<string> | null;
|
|
54
|
+
authorization?: string | null;
|
|
55
|
+
ksUat?: string | null;
|
|
56
|
+
}
|
|
57
|
+
|
|
52
58
|
export interface UpdateSectionOperationRequest {
|
|
53
59
|
sectionId: string;
|
|
54
60
|
updateSectionRequest: UpdateSectionRequest;
|
|
@@ -147,6 +153,34 @@ export interface SectionsApiInterface {
|
|
|
147
153
|
*/
|
|
148
154
|
getSection(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
|
|
149
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for getSectionsBulk without sending the request
|
|
158
|
+
* @param {Array<string>} [sectionIds] Section IDs to fetch (max 200)
|
|
159
|
+
* @param {string} [authorization]
|
|
160
|
+
* @param {string} [ksUat]
|
|
161
|
+
* @throws {RequiredError}
|
|
162
|
+
* @memberof SectionsApiInterface
|
|
163
|
+
*/
|
|
164
|
+
getSectionsBulkRequestOpts(requestParameters: GetSectionsBulkRequest): Promise<runtime.RequestOpts>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
|
|
168
|
+
* @summary Get Sections Bulk Handler
|
|
169
|
+
* @param {Array<string>} [sectionIds] Section IDs to fetch (max 200)
|
|
170
|
+
* @param {string} [authorization]
|
|
171
|
+
* @param {string} [ksUat]
|
|
172
|
+
* @param {*} [options] Override http request option.
|
|
173
|
+
* @throws {RequiredError}
|
|
174
|
+
* @memberof SectionsApiInterface
|
|
175
|
+
*/
|
|
176
|
+
getSectionsBulkRaw(requestParameters: GetSectionsBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SectionResponse>>>;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
|
|
180
|
+
* Get Sections Bulk Handler
|
|
181
|
+
*/
|
|
182
|
+
getSectionsBulk(requestParameters: GetSectionsBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SectionResponse>>;
|
|
183
|
+
|
|
150
184
|
/**
|
|
151
185
|
* Creates request options for updateSection without sending the request
|
|
152
186
|
* @param {string} sectionId
|
|
@@ -338,6 +372,53 @@ export class SectionsApi extends runtime.BaseAPI implements SectionsApiInterface
|
|
|
338
372
|
return await response.value();
|
|
339
373
|
}
|
|
340
374
|
|
|
375
|
+
/**
|
|
376
|
+
* Creates request options for getSectionsBulk without sending the request
|
|
377
|
+
*/
|
|
378
|
+
async getSectionsBulkRequestOpts(requestParameters: GetSectionsBulkRequest): Promise<runtime.RequestOpts> {
|
|
379
|
+
const queryParameters: any = {};
|
|
380
|
+
|
|
381
|
+
if (requestParameters['sectionIds'] != null) {
|
|
382
|
+
queryParameters['section_ids'] = requestParameters['sectionIds'];
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
386
|
+
|
|
387
|
+
if (requestParameters['authorization'] != null) {
|
|
388
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
let urlPath = `/v1/sections/bulk`;
|
|
393
|
+
|
|
394
|
+
return {
|
|
395
|
+
path: urlPath,
|
|
396
|
+
method: 'GET',
|
|
397
|
+
headers: headerParameters,
|
|
398
|
+
query: queryParameters,
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
|
|
404
|
+
* Get Sections Bulk Handler
|
|
405
|
+
*/
|
|
406
|
+
async getSectionsBulkRaw(requestParameters: GetSectionsBulkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SectionResponse>>> {
|
|
407
|
+
const requestOptions = await this.getSectionsBulkRequestOpts(requestParameters);
|
|
408
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
409
|
+
|
|
410
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SectionResponseFromJSON));
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Batch-fetch sections by ID. Returns sections with system_metadata. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
|
|
415
|
+
* Get Sections Bulk Handler
|
|
416
|
+
*/
|
|
417
|
+
async getSectionsBulk(requestParameters: GetSectionsBulkRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SectionResponse>> {
|
|
418
|
+
const response = await this.getSectionsBulkRaw(requestParameters, initOverrides);
|
|
419
|
+
return await response.value();
|
|
420
|
+
}
|
|
421
|
+
|
|
341
422
|
/**
|
|
342
423
|
* Creates request options for updateSection without sending the request
|
|
343
424
|
*/
|
package/src/apis/TenantsApi.ts
CHANGED
|
@@ -162,7 +162,7 @@ export interface TenantsApiInterface {
|
|
|
162
162
|
deleteTenantRequestOpts(requestParameters: DeleteTenantRequest): Promise<runtime.RequestOpts>;
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
|
|
165
|
+
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
|
|
166
166
|
* @summary Delete Tenant
|
|
167
167
|
* @param {string} tenantId
|
|
168
168
|
* @param {string} [authorization]
|
|
@@ -174,7 +174,7 @@ export interface TenantsApiInterface {
|
|
|
174
174
|
deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
|
|
177
|
+
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
|
|
178
178
|
* Delete Tenant
|
|
179
179
|
*/
|
|
180
180
|
deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -515,7 +515,7 @@ export class TenantsApi extends runtime.BaseAPI implements TenantsApiInterface {
|
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
/**
|
|
518
|
-
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
|
|
518
|
+
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
|
|
519
519
|
* Delete Tenant
|
|
520
520
|
*/
|
|
521
521
|
async deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -526,7 +526,7 @@ export class TenantsApi extends runtime.BaseAPI implements TenantsApiInterface {
|
|
|
526
526
|
}
|
|
527
527
|
|
|
528
528
|
/**
|
|
529
|
-
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s S3 bucket after the DB transaction commits.
|
|
529
|
+
* Delete a tenant. Requires OWNER role in the tenant. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
|
|
530
530
|
* Delete Tenant
|
|
531
531
|
*/
|
|
532
532
|
async deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PathPartAncestorItem } from './PathPartAncestorItem';
|
|
17
|
+
import {
|
|
18
|
+
PathPartAncestorItemFromJSON,
|
|
19
|
+
PathPartAncestorItemFromJSONTyped,
|
|
20
|
+
PathPartAncestorItemToJSON,
|
|
21
|
+
PathPartAncestorItemToJSONTyped,
|
|
22
|
+
} from './PathPartAncestorItem';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Response containing the ancestry chain from root to target (inclusive).
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AncestryResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface AncestryResponse {
|
|
30
|
+
/**
|
|
31
|
+
* Ancestors ordered root-to-leaf
|
|
32
|
+
* @type {Array<PathPartAncestorItem>}
|
|
33
|
+
* @memberof AncestryResponse
|
|
34
|
+
*/
|
|
35
|
+
ancestors: Array<PathPartAncestorItem>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the AncestryResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfAncestryResponse(value: object): value is AncestryResponse {
|
|
42
|
+
if (!('ancestors' in value) || value['ancestors'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function AncestryResponseFromJSON(json: any): AncestryResponse {
|
|
47
|
+
return AncestryResponseFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function AncestryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AncestryResponse {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'ancestors': ((json['ancestors'] as Array<any>).map(PathPartAncestorItemFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AncestryResponseToJSON(json: any): AncestryResponse {
|
|
61
|
+
return AncestryResponseToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function AncestryResponseToJSONTyped(value?: AncestryResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'ancestors': ((value['ancestors'] as Array<any>).map(PathPartAncestorItemToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const AncestryResponsePropertyValidationAttributesMap: {
|
|
76
|
+
[property: string]: {
|
|
77
|
+
maxLength?: number,
|
|
78
|
+
minLength?: number,
|
|
79
|
+
pattern?: string,
|
|
80
|
+
maximum?: number,
|
|
81
|
+
exclusiveMaximum?: boolean,
|
|
82
|
+
minimum?: number,
|
|
83
|
+
exclusiveMinimum?: boolean,
|
|
84
|
+
multipleOf?: number,
|
|
85
|
+
maxItems?: number,
|
|
86
|
+
minItems?: number,
|
|
87
|
+
uniqueItems?: boolean
|
|
88
|
+
}
|
|
89
|
+
} = {
|
|
90
|
+
}
|
|
91
|
+
|