@knowledge-stack/ksapi 1.20.1 → 1.21.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 (48) hide show
  1. package/.openapi-generator/FILES +2 -1
  2. package/README.md +2 -2
  3. package/dist/apis/FoldersApi.d.ts +6 -4
  4. package/dist/apis/FoldersApi.js +5 -2
  5. package/dist/apis/PathPartsApi.d.ts +67 -5
  6. package/dist/apis/PathPartsApi.js +76 -2
  7. package/dist/apis/TagsApi.d.ts +1 -63
  8. package/dist/apis/TagsApi.js +0 -72
  9. package/dist/esm/apis/FoldersApi.d.ts +6 -4
  10. package/dist/esm/apis/FoldersApi.js +5 -2
  11. package/dist/esm/apis/PathPartsApi.d.ts +67 -5
  12. package/dist/esm/apis/PathPartsApi.js +77 -3
  13. package/dist/esm/apis/TagsApi.d.ts +1 -63
  14. package/dist/esm/apis/TagsApi.js +1 -73
  15. package/dist/esm/models/BulkTagRequest.d.ts +47 -0
  16. package/dist/esm/models/BulkTagRequest.js +49 -0
  17. package/dist/esm/models/FolderDocumentResponse.d.ts +7 -0
  18. package/dist/esm/models/FolderDocumentResponse.js +3 -0
  19. package/dist/esm/models/PathPartResponse.d.ts +7 -0
  20. package/dist/esm/models/PathPartResponse.js +3 -0
  21. package/dist/esm/models/PathPartTagsResponse.d.ts +48 -0
  22. package/dist/esm/models/PathPartTagsResponse.js +45 -0
  23. package/dist/esm/models/index.d.ts +2 -1
  24. package/dist/esm/models/index.js +2 -1
  25. package/dist/models/BulkTagRequest.d.ts +47 -0
  26. package/dist/models/BulkTagRequest.js +57 -0
  27. package/dist/models/FolderDocumentResponse.d.ts +7 -0
  28. package/dist/models/FolderDocumentResponse.js +3 -0
  29. package/dist/models/PathPartResponse.d.ts +7 -0
  30. package/dist/models/PathPartResponse.js +3 -0
  31. package/dist/models/PathPartTagsResponse.d.ts +48 -0
  32. package/dist/models/PathPartTagsResponse.js +53 -0
  33. package/dist/models/index.d.ts +2 -1
  34. package/dist/models/index.js +2 -1
  35. package/package.json +1 -1
  36. package/src/apis/FoldersApi.ts +10 -4
  37. package/src/apis/PathPartsApi.ts +156 -4
  38. package/src/apis/TagsApi.ts +0 -146
  39. package/src/models/BulkTagRequest.ts +87 -0
  40. package/src/models/FolderDocumentResponse.ts +15 -0
  41. package/src/models/PathPartResponse.ts +15 -0
  42. package/src/models/PathPartTagsResponse.ts +91 -0
  43. package/src/models/index.ts +2 -1
  44. package/dist/esm/models/TagPathPartRequest.d.ts +0 -47
  45. package/dist/esm/models/TagPathPartRequest.js +0 -44
  46. package/dist/models/TagPathPartRequest.d.ts +0 -47
  47. package/dist/models/TagPathPartRequest.js +0 -52
  48. package/src/models/TagPathPartRequest.ts +0 -83
@@ -22,6 +22,7 @@ src/apis/UsersApi.ts
22
22
  src/apis/WorkflowsApi.ts
23
23
  src/apis/index.ts
24
24
  src/index.ts
25
+ src/models/BulkTagRequest.ts
25
26
  src/models/ChunkLineageResponse.ts
26
27
  src/models/ChunkMetadataInput.ts
27
28
  src/models/ChunkMetadataOutput.ts
@@ -84,6 +85,7 @@ src/models/PasswordResetRequest.ts
84
85
  src/models/PasswordResetWithTokenRequest.ts
85
86
  src/models/PathOrder.ts
86
87
  src/models/PathPartResponse.ts
88
+ src/models/PathPartTagsResponse.ts
87
89
  src/models/PermissionCapability.ts
88
90
  src/models/PermissionResponse.ts
89
91
  src/models/PipelineState.ts
@@ -94,7 +96,6 @@ src/models/RootResponse.ts
94
96
  src/models/ScoredChunkResponse.ts
95
97
  src/models/SectionResponse.ts
96
98
  src/models/SignInRequest.ts
97
- src/models/TagPathPartRequest.ts
98
99
  src/models/TagResponse.ts
99
100
  src/models/TenantResponse.ts
100
101
  src/models/TenantUserInTenantResponse.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @knowledge-stack/ksapi@1.20.1
1
+ ## @knowledge-stack/ksapi@1.21.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @knowledge-stack/ksapi@1.20.1 --save
39
+ npm install @knowledge-stack/ksapi@1.21.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -27,6 +27,7 @@ export interface ListFolderContentsRequest {
27
27
  folderId: string;
28
28
  maxDepth?: number;
29
29
  sortOrder?: PathOrder;
30
+ withTags?: boolean;
30
31
  limit?: number;
31
32
  offset?: number;
32
33
  ksUat?: string | null;
@@ -96,11 +97,12 @@ export interface FoldersApiInterface {
96
97
  */
97
98
  getFolder(requestParameters: GetFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
98
99
  /**
99
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
100
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
100
101
  * @summary List Folder Contents Handler
101
102
  * @param {string} folderId
102
103
  * @param {number} [maxDepth] Maximum depth to traverse (1&#x3D;direct children, default: 1)
103
104
  * @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
105
+ * @param {boolean} [withTags] Include tag IDs for each item (default: false)
104
106
  * @param {number} [limit] Number of items per page
105
107
  * @param {number} [offset] Number of items to skip
106
108
  * @param {string} [ksUat]
@@ -110,7 +112,7 @@ export interface FoldersApiInterface {
110
112
  */
111
113
  listFolderContentsRaw(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseFolderDocumentResponse>>;
112
114
  /**
113
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
115
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
114
116
  * List Folder Contents Handler
115
117
  */
116
118
  listFolderContents(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderDocumentResponse>;
@@ -184,12 +186,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
184
186
  */
185
187
  getFolder(requestParameters: GetFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
186
188
  /**
187
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
189
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
188
190
  * List Folder Contents Handler
189
191
  */
190
192
  listFolderContentsRaw(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseFolderDocumentResponse>>;
191
193
  /**
192
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
194
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
193
195
  * List Folder Contents Handler
194
196
  */
195
197
  listFolderContents(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderDocumentResponse>;
@@ -126,7 +126,7 @@ class FoldersApi extends runtime.BaseAPI {
126
126
  });
127
127
  }
128
128
  /**
129
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
129
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
130
130
  * List Folder Contents Handler
131
131
  */
132
132
  listFolderContentsRaw(requestParameters, initOverrides) {
@@ -141,6 +141,9 @@ class FoldersApi extends runtime.BaseAPI {
141
141
  if (requestParameters['sortOrder'] != null) {
142
142
  queryParameters['sort_order'] = requestParameters['sortOrder'];
143
143
  }
144
+ if (requestParameters['withTags'] != null) {
145
+ queryParameters['with_tags'] = requestParameters['withTags'];
146
+ }
144
147
  if (requestParameters['limit'] != null) {
145
148
  queryParameters['limit'] = requestParameters['limit'];
146
149
  }
@@ -160,7 +163,7 @@ class FoldersApi extends runtime.BaseAPI {
160
163
  });
161
164
  }
162
165
  /**
163
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
166
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
164
167
  * List Folder Contents Handler
165
168
  */
166
169
  listFolderContents(requestParameters, initOverrides) {
@@ -10,7 +10,17 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { PaginatedResponsePathPartResponse, PathOrder, PathPartResponse } from '../models/index';
13
+ import type { BulkTagRequest, PaginatedResponsePathPartResponse, PathOrder, PathPartResponse, PathPartTagsResponse } from '../models/index';
14
+ export interface BulkAddPathPartTagsRequest {
15
+ pathPartId: string;
16
+ bulkTagRequest: BulkTagRequest;
17
+ ksUat?: string | null;
18
+ }
19
+ export interface BulkRemovePathPartTagsRequest {
20
+ pathPartId: string;
21
+ bulkTagRequest: BulkTagRequest;
22
+ ksUat?: string | null;
23
+ }
14
24
  export interface GetPathPartRequest {
15
25
  pathPartId: string;
16
26
  ksUat?: string | null;
@@ -31,7 +41,39 @@ export interface ListPathPartsRequest {
31
41
  */
32
42
  export interface PathPartsApiInterface {
33
43
  /**
34
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
44
+ * Bulk add tags to a path part. Idempotent already-attached tags are skipped. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
45
+ * @summary Bulk Add Path Part Tags Handler
46
+ * @param {string} pathPartId
47
+ * @param {BulkTagRequest} bulkTagRequest
48
+ * @param {string} [ksUat]
49
+ * @param {*} [options] Override http request option.
50
+ * @throws {RequiredError}
51
+ * @memberof PathPartsApiInterface
52
+ */
53
+ bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
54
+ /**
55
+ * Bulk add tags to a path part. Idempotent — already-attached tags are skipped. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
56
+ * Bulk Add Path Part Tags Handler
57
+ */
58
+ bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
59
+ /**
60
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
61
+ * @summary Bulk Remove Path Part Tags Handler
62
+ * @param {string} pathPartId
63
+ * @param {BulkTagRequest} bulkTagRequest
64
+ * @param {string} [ksUat]
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ * @memberof PathPartsApiInterface
68
+ */
69
+ bulkRemovePathPartTagsRaw(requestParameters: BulkRemovePathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
70
+ /**
71
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
72
+ * Bulk Remove Path Part Tags Handler
73
+ */
74
+ bulkRemovePathPartTags(requestParameters: BulkRemovePathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
75
+ /**
76
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
35
77
  * @summary Get Path Part Handler
36
78
  * @param {string} pathPartId
37
79
  * @param {string} [ksUat]
@@ -41,7 +83,7 @@ export interface PathPartsApiInterface {
41
83
  */
42
84
  getPathPartRaw(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartResponse>>;
43
85
  /**
44
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
86
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
45
87
  * Get Path Part Handler
46
88
  */
47
89
  getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
@@ -70,12 +112,32 @@ export interface PathPartsApiInterface {
70
112
  */
71
113
  export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
72
114
  /**
73
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
115
+ * Bulk add tags to a path part. Idempotent already-attached tags are skipped. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
116
+ * Bulk Add Path Part Tags Handler
117
+ */
118
+ bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
119
+ /**
120
+ * Bulk add tags to a path part. Idempotent — already-attached tags are skipped. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
121
+ * Bulk Add Path Part Tags Handler
122
+ */
123
+ bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
124
+ /**
125
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
126
+ * Bulk Remove Path Part Tags Handler
127
+ */
128
+ bulkRemovePathPartTagsRaw(requestParameters: BulkRemovePathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
129
+ /**
130
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
131
+ * Bulk Remove Path Part Tags Handler
132
+ */
133
+ bulkRemovePathPartTags(requestParameters: BulkRemovePathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
134
+ /**
135
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
74
136
  * Get Path Part Handler
75
137
  */
76
138
  getPathPartRaw(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartResponse>>;
77
139
  /**
78
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
140
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
79
141
  * Get Path Part Handler
80
142
  */
81
143
  getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
@@ -30,7 +30,81 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class PathPartsApi extends runtime.BaseAPI {
32
32
  /**
33
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
33
+ * Bulk add tags to a path part. Idempotent already-attached tags are skipped. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
34
+ * Bulk Add Path Part Tags Handler
35
+ */
36
+ bulkAddPathPartTagsRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['pathPartId'] == null) {
39
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling bulkAddPathPartTags().');
40
+ }
41
+ if (requestParameters['bulkTagRequest'] == null) {
42
+ throw new runtime.RequiredError('bulkTagRequest', 'Required parameter "bulkTagRequest" was null or undefined when calling bulkAddPathPartTags().');
43
+ }
44
+ const queryParameters = {};
45
+ const headerParameters = {};
46
+ headerParameters['Content-Type'] = 'application/json';
47
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
48
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
49
+ const response = yield this.request({
50
+ path: urlPath,
51
+ method: 'POST',
52
+ headers: headerParameters,
53
+ query: queryParameters,
54
+ body: (0, index_1.BulkTagRequestToJSON)(requestParameters['bulkTagRequest']),
55
+ }, initOverrides);
56
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PathPartTagsResponseFromJSON)(jsonValue));
57
+ });
58
+ }
59
+ /**
60
+ * Bulk add tags to a path part. Idempotent — already-attached tags are skipped. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
61
+ * Bulk Add Path Part Tags Handler
62
+ */
63
+ bulkAddPathPartTags(requestParameters, initOverrides) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const response = yield this.bulkAddPathPartTagsRaw(requestParameters, initOverrides);
66
+ return yield response.value();
67
+ });
68
+ }
69
+ /**
70
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
71
+ * Bulk Remove Path Part Tags Handler
72
+ */
73
+ bulkRemovePathPartTagsRaw(requestParameters, initOverrides) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ if (requestParameters['pathPartId'] == null) {
76
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling bulkRemovePathPartTags().');
77
+ }
78
+ if (requestParameters['bulkTagRequest'] == null) {
79
+ throw new runtime.RequiredError('bulkTagRequest', 'Required parameter "bulkTagRequest" was null or undefined when calling bulkRemovePathPartTags().');
80
+ }
81
+ const queryParameters = {};
82
+ const headerParameters = {};
83
+ headerParameters['Content-Type'] = 'application/json';
84
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
85
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
86
+ const response = yield this.request({
87
+ path: urlPath,
88
+ method: 'DELETE',
89
+ headers: headerParameters,
90
+ query: queryParameters,
91
+ body: (0, index_1.BulkTagRequestToJSON)(requestParameters['bulkTagRequest']),
92
+ }, initOverrides);
93
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PathPartTagsResponseFromJSON)(jsonValue));
94
+ });
95
+ }
96
+ /**
97
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
98
+ * Bulk Remove Path Part Tags Handler
99
+ */
100
+ bulkRemovePathPartTags(requestParameters, initOverrides) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ const response = yield this.bulkRemovePathPartTagsRaw(requestParameters, initOverrides);
103
+ return yield response.value();
104
+ });
105
+ }
106
+ /**
107
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
34
108
  * Get Path Part Handler
35
109
  */
36
110
  getPathPartRaw(requestParameters, initOverrides) {
@@ -52,7 +126,7 @@ class PathPartsApi extends runtime.BaseAPI {
52
126
  });
53
127
  }
54
128
  /**
55
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
129
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
56
130
  * Get Path Part Handler
57
131
  */
58
132
  getPathPart(requestParameters, initOverrides) {
@@ -10,12 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateTagRequest, PaginatedResponseTagResponse, TagPathPartRequest, TagResponse, UpdateTagRequest } from '../models/index';
14
- export interface AttachTagToPathPartRequest {
15
- tagId: string;
16
- tagPathPartRequest: TagPathPartRequest;
17
- ksUat?: string | null;
18
- }
13
+ import type { CreateTagRequest, PaginatedResponseTagResponse, TagResponse, UpdateTagRequest } from '../models/index';
19
14
  export interface CreateTagOperationRequest {
20
15
  createTagRequest: CreateTagRequest;
21
16
  ksUat?: string | null;
@@ -24,11 +19,6 @@ export interface DeleteTagRequest {
24
19
  tagId: string;
25
20
  ksUat?: string | null;
26
21
  }
27
- export interface DetachTagFromPathPartRequest {
28
- tagId: string;
29
- pathPartId: string;
30
- ksUat?: string | null;
31
- }
32
22
  export interface GetTagRequest {
33
23
  tagId: string;
34
24
  ksUat?: string | null;
@@ -50,22 +40,6 @@ export interface UpdateTagOperationRequest {
50
40
  * @interface TagsApiInterface
51
41
  */
52
42
  export interface TagsApiInterface {
53
- /**
54
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
55
- * @summary Attach Tag Handler
56
- * @param {string} tagId
57
- * @param {TagPathPartRequest} tagPathPartRequest
58
- * @param {string} [ksUat]
59
- * @param {*} [options] Override http request option.
60
- * @throws {RequiredError}
61
- * @memberof TagsApiInterface
62
- */
63
- attachTagToPathPartRaw(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
64
- /**
65
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
66
- * Attach Tag Handler
67
- */
68
- attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
69
43
  /**
70
44
  * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
71
45
  * @summary Create Tag Handler
@@ -96,22 +70,6 @@ export interface TagsApiInterface {
96
70
  * Delete Tag Handler
97
71
  */
98
72
  deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
99
- /**
100
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
101
- * @summary Detach Tag Handler
102
- * @param {string} tagId
103
- * @param {string} pathPartId
104
- * @param {string} [ksUat]
105
- * @param {*} [options] Override http request option.
106
- * @throws {RequiredError}
107
- * @memberof TagsApiInterface
108
- */
109
- detachTagFromPathPartRaw(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
110
- /**
111
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
112
- * Detach Tag Handler
113
- */
114
- detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
115
73
  /**
116
74
  * Get a tag by its ID.
117
75
  * @summary Get Tag Handler
@@ -164,16 +122,6 @@ export interface TagsApiInterface {
164
122
  *
165
123
  */
166
124
  export declare class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
167
- /**
168
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
169
- * Attach Tag Handler
170
- */
171
- attachTagToPathPartRaw(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
172
- /**
173
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
174
- * Attach Tag Handler
175
- */
176
- attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
177
125
  /**
178
126
  * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
179
127
  * Create Tag Handler
@@ -194,16 +142,6 @@ export declare class TagsApi extends runtime.BaseAPI implements TagsApiInterface
194
142
  * Delete Tag Handler
195
143
  */
196
144
  deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
197
- /**
198
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
199
- * Detach Tag Handler
200
- */
201
- detachTagFromPathPartRaw(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
202
- /**
203
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
204
- * Detach Tag Handler
205
- */
206
- detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
207
145
  /**
208
146
  * Get a tag by its ID.
209
147
  * Get Tag Handler
@@ -29,43 +29,6 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class TagsApi extends runtime.BaseAPI {
32
- /**
33
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
34
- * Attach Tag Handler
35
- */
36
- attachTagToPathPartRaw(requestParameters, initOverrides) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- if (requestParameters['tagId'] == null) {
39
- throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling attachTagToPathPart().');
40
- }
41
- if (requestParameters['tagPathPartRequest'] == null) {
42
- throw new runtime.RequiredError('tagPathPartRequest', 'Required parameter "tagPathPartRequest" was null or undefined when calling attachTagToPathPart().');
43
- }
44
- const queryParameters = {};
45
- const headerParameters = {};
46
- headerParameters['Content-Type'] = 'application/json';
47
- let urlPath = `/v1/tags/{tag_id}/path-parts`;
48
- urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
49
- const response = yield this.request({
50
- path: urlPath,
51
- method: 'POST',
52
- headers: headerParameters,
53
- query: queryParameters,
54
- body: (0, index_1.TagPathPartRequestToJSON)(requestParameters['tagPathPartRequest']),
55
- }, initOverrides);
56
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TagResponseFromJSON)(jsonValue));
57
- });
58
- }
59
- /**
60
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
61
- * Attach Tag Handler
62
- */
63
- attachTagToPathPart(requestParameters, initOverrides) {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- const response = yield this.attachTagToPathPartRaw(requestParameters, initOverrides);
66
- return yield response.value();
67
- });
68
- }
69
32
  /**
70
33
  * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
71
34
  * Create Tag Handler
@@ -130,41 +93,6 @@ class TagsApi extends runtime.BaseAPI {
130
93
  yield this.deleteTagRaw(requestParameters, initOverrides);
131
94
  });
132
95
  }
133
- /**
134
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
135
- * Detach Tag Handler
136
- */
137
- detachTagFromPathPartRaw(requestParameters, initOverrides) {
138
- return __awaiter(this, void 0, void 0, function* () {
139
- if (requestParameters['tagId'] == null) {
140
- throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling detachTagFromPathPart().');
141
- }
142
- if (requestParameters['pathPartId'] == null) {
143
- throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling detachTagFromPathPart().');
144
- }
145
- const queryParameters = {};
146
- const headerParameters = {};
147
- let urlPath = `/v1/tags/{tag_id}/path-parts/{path_part_id}`;
148
- urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
149
- urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
150
- const response = yield this.request({
151
- path: urlPath,
152
- method: 'DELETE',
153
- headers: headerParameters,
154
- query: queryParameters,
155
- }, initOverrides);
156
- return new runtime.VoidApiResponse(response);
157
- });
158
- }
159
- /**
160
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
161
- * Detach Tag Handler
162
- */
163
- detachTagFromPathPart(requestParameters, initOverrides) {
164
- return __awaiter(this, void 0, void 0, function* () {
165
- yield this.detachTagFromPathPartRaw(requestParameters, initOverrides);
166
- });
167
- }
168
96
  /**
169
97
  * Get a tag by its ID.
170
98
  * Get Tag Handler
@@ -27,6 +27,7 @@ export interface ListFolderContentsRequest {
27
27
  folderId: string;
28
28
  maxDepth?: number;
29
29
  sortOrder?: PathOrder;
30
+ withTags?: boolean;
30
31
  limit?: number;
31
32
  offset?: number;
32
33
  ksUat?: string | null;
@@ -96,11 +97,12 @@ export interface FoldersApiInterface {
96
97
  */
97
98
  getFolder(requestParameters: GetFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
98
99
  /**
99
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
100
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
100
101
  * @summary List Folder Contents Handler
101
102
  * @param {string} folderId
102
103
  * @param {number} [maxDepth] Maximum depth to traverse (1&#x3D;direct children, default: 1)
103
104
  * @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
105
+ * @param {boolean} [withTags] Include tag IDs for each item (default: false)
104
106
  * @param {number} [limit] Number of items per page
105
107
  * @param {number} [offset] Number of items to skip
106
108
  * @param {string} [ksUat]
@@ -110,7 +112,7 @@ export interface FoldersApiInterface {
110
112
  */
111
113
  listFolderContentsRaw(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseFolderDocumentResponse>>;
112
114
  /**
113
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
115
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
114
116
  * List Folder Contents Handler
115
117
  */
116
118
  listFolderContents(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderDocumentResponse>;
@@ -184,12 +186,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
184
186
  */
185
187
  getFolder(requestParameters: GetFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
186
188
  /**
187
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
189
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
188
190
  * List Folder Contents Handler
189
191
  */
190
192
  listFolderContentsRaw(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseFolderDocumentResponse>>;
191
193
  /**
192
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
194
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
193
195
  * List Folder Contents Handler
194
196
  */
195
197
  listFolderContents(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderDocumentResponse>;
@@ -123,7 +123,7 @@ export class FoldersApi extends runtime.BaseAPI {
123
123
  });
124
124
  }
125
125
  /**
126
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
126
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
127
127
  * List Folder Contents Handler
128
128
  */
129
129
  listFolderContentsRaw(requestParameters, initOverrides) {
@@ -138,6 +138,9 @@ export class FoldersApi extends runtime.BaseAPI {
138
138
  if (requestParameters['sortOrder'] != null) {
139
139
  queryParameters['sort_order'] = requestParameters['sortOrder'];
140
140
  }
141
+ if (requestParameters['withTags'] != null) {
142
+ queryParameters['with_tags'] = requestParameters['withTags'];
143
+ }
141
144
  if (requestParameters['limit'] != null) {
142
145
  queryParameters['limit'] = requestParameters['limit'];
143
146
  }
@@ -157,7 +160,7 @@ export class FoldersApi extends runtime.BaseAPI {
157
160
  });
158
161
  }
159
162
  /**
160
- * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
163
+ * List all contents (folders and documents) under a folder. Returns enriched responses with: - Folders: basic folder metadata - Documents: full document metadata including document_type, document_origin, active_version When with_tags=true, each item includes a tags field with the full tag objects. This is the preferred way to list folder contents when you need document metadata. For generic path traversal of folders only, use GET /path-parts.
161
164
  * List Folder Contents Handler
162
165
  */
163
166
  listFolderContents(requestParameters, initOverrides) {