@knowledge-stack/ksapi 1.58.0 → 1.59.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 (50) 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/esm/apis/FoldersApi.d.ts +63 -4
  10. package/dist/esm/apis/FoldersApi.js +64 -3
  11. package/dist/esm/apis/PathPartsApi.d.ts +45 -1
  12. package/dist/esm/apis/PathPartsApi.js +45 -1
  13. package/dist/esm/apis/SectionsApi.d.ts +44 -0
  14. package/dist/esm/apis/SectionsApi.js +43 -0
  15. package/dist/esm/models/AncestryResponse.d.ts +48 -0
  16. package/dist/esm/models/AncestryResponse.js +45 -0
  17. package/dist/esm/models/PathPartAncestorItem.d.ts +96 -0
  18. package/dist/esm/models/PathPartAncestorItem.js +77 -0
  19. package/dist/esm/models/SearchSortOrder.d.ts +26 -0
  20. package/dist/esm/models/SearchSortOrder.js +44 -0
  21. package/dist/esm/models/SearchablePartType.d.ts +25 -0
  22. package/dist/esm/models/SearchablePartType.js +43 -0
  23. package/dist/esm/models/index.d.ts +4 -0
  24. package/dist/esm/models/index.js +4 -0
  25. package/dist/models/AncestryResponse.d.ts +48 -0
  26. package/dist/models/AncestryResponse.js +53 -0
  27. package/dist/models/PathPartAncestorItem.d.ts +96 -0
  28. package/dist/models/PathPartAncestorItem.js +85 -0
  29. package/dist/models/SearchSortOrder.d.ts +26 -0
  30. package/dist/models/SearchSortOrder.js +52 -0
  31. package/dist/models/SearchablePartType.d.ts +25 -0
  32. package/dist/models/SearchablePartType.js +51 -0
  33. package/dist/models/index.d.ts +4 -0
  34. package/dist/models/index.js +4 -0
  35. package/docs/AncestryResponse.md +35 -0
  36. package/docs/FoldersApi.md +94 -4
  37. package/docs/PathPartAncestorItem.md +51 -0
  38. package/docs/PathPartsApi.md +75 -0
  39. package/docs/SearchSortOrder.md +33 -0
  40. package/docs/SearchablePartType.md +33 -0
  41. package/docs/SectionsApi.md +75 -0
  42. package/package.json +1 -1
  43. package/src/apis/FoldersApi.ts +136 -7
  44. package/src/apis/PathPartsApi.ts +88 -0
  45. package/src/apis/SectionsApi.ts +81 -0
  46. package/src/models/AncestryResponse.ts +91 -0
  47. package/src/models/PathPartAncestorItem.ts +165 -0
  48. package/src/models/SearchSortOrder.ts +54 -0
  49. package/src/models/SearchablePartType.ts +53 -0
  50. package/src/models/index.ts +4 -0
@@ -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\&#39;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\&#39;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
  */
@@ -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
  */
@@ -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
  */
@@ -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
+
@@ -0,0 +1,165 @@
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 { PartType } from './PartType';
17
+ import {
18
+ PartTypeFromJSON,
19
+ PartTypeFromJSONTyped,
20
+ PartTypeToJSON,
21
+ PartTypeToJSONTyped,
22
+ } from './PartType';
23
+
24
+ /**
25
+ * Single ancestor item in an ancestry chain.
26
+ * @export
27
+ * @interface PathPartAncestorItem
28
+ */
29
+ export interface PathPartAncestorItem {
30
+ /**
31
+ * PathPart ID
32
+ * @type {string}
33
+ * @memberof PathPartAncestorItem
34
+ */
35
+ pathPartId: string;
36
+ /**
37
+ * Item name
38
+ * @type {string}
39
+ * @memberof PathPartAncestorItem
40
+ */
41
+ name: string;
42
+ /**
43
+ *
44
+ * @type {PartType}
45
+ * @memberof PathPartAncestorItem
46
+ */
47
+ partType: PartType;
48
+ /**
49
+ * Parent PathPart ID
50
+ * @type {string}
51
+ * @memberof PathPartAncestorItem
52
+ */
53
+ parentPathId: string | null;
54
+ /**
55
+ * ID of the underlying object
56
+ * @type {string}
57
+ * @memberof PathPartAncestorItem
58
+ */
59
+ metadataObjId: string | null;
60
+ /**
61
+ * Full materialized path from root
62
+ * @type {string}
63
+ * @memberof PathPartAncestorItem
64
+ */
65
+ materializedPath: string;
66
+ /**
67
+ * Whether this path part is system-managed
68
+ * @type {boolean}
69
+ * @memberof PathPartAncestorItem
70
+ */
71
+ systemManaged: boolean;
72
+ /**
73
+ * Creation timestamp
74
+ * @type {Date}
75
+ * @memberof PathPartAncestorItem
76
+ */
77
+ createdAt: Date;
78
+ /**
79
+ * Last update timestamp
80
+ * @type {Date}
81
+ * @memberof PathPartAncestorItem
82
+ */
83
+ updatedAt: Date;
84
+ }
85
+
86
+
87
+
88
+ /**
89
+ * Check if a given object implements the PathPartAncestorItem interface.
90
+ */
91
+ export function instanceOfPathPartAncestorItem(value: object): value is PathPartAncestorItem {
92
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
93
+ if (!('name' in value) || value['name'] === undefined) return false;
94
+ if (!('partType' in value) || value['partType'] === undefined) return false;
95
+ if (!('parentPathId' in value) || value['parentPathId'] === undefined) return false;
96
+ if (!('metadataObjId' in value) || value['metadataObjId'] === undefined) return false;
97
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined) return false;
98
+ if (!('systemManaged' in value) || value['systemManaged'] === undefined) return false;
99
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
100
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
101
+ return true;
102
+ }
103
+
104
+ export function PathPartAncestorItemFromJSON(json: any): PathPartAncestorItem {
105
+ return PathPartAncestorItemFromJSONTyped(json, false);
106
+ }
107
+
108
+ export function PathPartAncestorItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartAncestorItem {
109
+ if (json == null) {
110
+ return json;
111
+ }
112
+ return {
113
+
114
+ 'pathPartId': json['path_part_id'],
115
+ 'name': json['name'],
116
+ 'partType': PartTypeFromJSON(json['part_type']),
117
+ 'parentPathId': json['parent_path_id'],
118
+ 'metadataObjId': json['metadata_obj_id'],
119
+ 'materializedPath': json['materialized_path'],
120
+ 'systemManaged': json['system_managed'],
121
+ 'createdAt': (new Date(json['created_at'])),
122
+ 'updatedAt': (new Date(json['updated_at'])),
123
+ };
124
+ }
125
+
126
+ export function PathPartAncestorItemToJSON(json: any): PathPartAncestorItem {
127
+ return PathPartAncestorItemToJSONTyped(json, false);
128
+ }
129
+
130
+ export function PathPartAncestorItemToJSONTyped(value?: PathPartAncestorItem | null, ignoreDiscriminator: boolean = false): any {
131
+ if (value == null) {
132
+ return value;
133
+ }
134
+
135
+ return {
136
+
137
+ 'path_part_id': value['pathPartId'],
138
+ 'name': value['name'],
139
+ 'part_type': PartTypeToJSON(value['partType']),
140
+ 'parent_path_id': value['parentPathId'],
141
+ 'metadata_obj_id': value['metadataObjId'],
142
+ 'materialized_path': value['materializedPath'],
143
+ 'system_managed': value['systemManaged'],
144
+ 'created_at': value['createdAt'].toISOString(),
145
+ 'updated_at': value['updatedAt'].toISOString(),
146
+ };
147
+ }
148
+
149
+ export const PathPartAncestorItemPropertyValidationAttributesMap: {
150
+ [property: string]: {
151
+ maxLength?: number,
152
+ minLength?: number,
153
+ pattern?: string,
154
+ maximum?: number,
155
+ exclusiveMaximum?: boolean,
156
+ minimum?: number,
157
+ exclusiveMinimum?: boolean,
158
+ multipleOf?: number,
159
+ maxItems?: number,
160
+ minItems?: number,
161
+ uniqueItems?: boolean
162
+ }
163
+ } = {
164
+ }
165
+