@knowledge-stack/ksapi 1.57.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 (77) hide show
  1. package/.openapi-generator/FILES +12 -2
  2. package/README.md +16 -6
  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/WorkflowsApi.d.ts +144 -59
  10. package/dist/apis/WorkflowsApi.js +131 -49
  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/WorkflowsApi.d.ts +144 -59
  18. package/dist/esm/apis/WorkflowsApi.js +132 -50
  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/TemporalWorkflowStatusResponse.d.ts +83 -0
  28. package/dist/esm/models/TemporalWorkflowStatusResponse.js +66 -0
  29. package/dist/esm/models/WorkflowActionResponse.d.ts +1 -1
  30. package/dist/esm/models/WorkflowCancelResponse.d.ts +53 -0
  31. package/dist/esm/models/WorkflowCancelResponse.js +48 -0
  32. package/dist/esm/models/index.d.ts +6 -1
  33. package/dist/esm/models/index.js +6 -1
  34. package/dist/models/AncestryResponse.d.ts +48 -0
  35. package/dist/models/AncestryResponse.js +53 -0
  36. package/dist/models/PathPartAncestorItem.d.ts +96 -0
  37. package/dist/models/PathPartAncestorItem.js +85 -0
  38. package/dist/models/SearchSortOrder.d.ts +26 -0
  39. package/dist/models/SearchSortOrder.js +52 -0
  40. package/dist/models/SearchablePartType.d.ts +25 -0
  41. package/dist/models/SearchablePartType.js +51 -0
  42. package/dist/models/TemporalWorkflowStatusResponse.d.ts +83 -0
  43. package/dist/models/TemporalWorkflowStatusResponse.js +74 -0
  44. package/dist/models/WorkflowActionResponse.d.ts +1 -1
  45. package/dist/models/WorkflowCancelResponse.d.ts +53 -0
  46. package/dist/models/WorkflowCancelResponse.js +56 -0
  47. package/dist/models/index.d.ts +6 -1
  48. package/dist/models/index.js +6 -1
  49. package/docs/AncestryResponse.md +35 -0
  50. package/docs/FoldersApi.md +94 -4
  51. package/docs/PathPartAncestorItem.md +51 -0
  52. package/docs/PathPartsApi.md +75 -0
  53. package/docs/{WorkflowAction.md → SearchSortOrder.md} +5 -5
  54. package/docs/SearchablePartType.md +33 -0
  55. package/docs/SectionsApi.md +75 -0
  56. package/docs/TemporalWorkflowStatusResponse.md +47 -0
  57. package/docs/WorkflowActionResponse.md +1 -1
  58. package/docs/WorkflowCancelResponse.md +37 -0
  59. package/docs/WorkflowsApi.md +183 -36
  60. package/package.json +1 -1
  61. package/src/apis/FoldersApi.ts +136 -7
  62. package/src/apis/PathPartsApi.ts +88 -0
  63. package/src/apis/SectionsApi.ts +81 -0
  64. package/src/apis/WorkflowsApi.ts +249 -90
  65. package/src/models/AncestryResponse.ts +91 -0
  66. package/src/models/PathPartAncestorItem.ts +165 -0
  67. package/src/models/SearchSortOrder.ts +54 -0
  68. package/src/models/SearchablePartType.ts +53 -0
  69. package/src/models/TemporalWorkflowStatusResponse.ts +136 -0
  70. package/src/models/WorkflowActionResponse.ts +1 -1
  71. package/src/models/WorkflowCancelResponse.ts +92 -0
  72. package/src/models/index.ts +6 -1
  73. package/dist/esm/models/WorkflowAction.d.ts +0 -25
  74. package/dist/esm/models/WorkflowAction.js +0 -43
  75. package/dist/models/WorkflowAction.d.ts +0 -25
  76. package/dist/models/WorkflowAction.js +0 -51
  77. package/src/models/WorkflowAction.ts +0 -53
@@ -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
  */