@knowledge-stack/ksapi 1.20.1 → 1.22.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 (68) hide show
  1. package/.openapi-generator/FILES +2 -1
  2. package/README.md +2 -2
  3. package/dist/apis/DocumentsApi.d.ts +4 -0
  4. package/dist/apis/DocumentsApi.js +6 -0
  5. package/dist/apis/FoldersApi.d.ts +10 -4
  6. package/dist/apis/FoldersApi.js +11 -2
  7. package/dist/apis/PathPartsApi.d.ts +67 -5
  8. package/dist/apis/PathPartsApi.js +76 -2
  9. package/dist/apis/TagsApi.d.ts +1 -63
  10. package/dist/apis/TagsApi.js +0 -72
  11. package/dist/apis/ThreadsApi.d.ts +33 -0
  12. package/dist/apis/ThreadsApi.js +37 -0
  13. package/dist/esm/apis/DocumentsApi.d.ts +4 -0
  14. package/dist/esm/apis/DocumentsApi.js +6 -0
  15. package/dist/esm/apis/FoldersApi.d.ts +10 -4
  16. package/dist/esm/apis/FoldersApi.js +11 -2
  17. package/dist/esm/apis/PathPartsApi.d.ts +67 -5
  18. package/dist/esm/apis/PathPartsApi.js +77 -3
  19. package/dist/esm/apis/TagsApi.d.ts +1 -63
  20. package/dist/esm/apis/TagsApi.js +1 -73
  21. package/dist/esm/apis/ThreadsApi.d.ts +33 -0
  22. package/dist/esm/apis/ThreadsApi.js +37 -0
  23. package/dist/esm/models/BulkTagRequest.d.ts +47 -0
  24. package/dist/esm/models/BulkTagRequest.js +49 -0
  25. package/dist/esm/models/DocumentResponse.d.ts +7 -0
  26. package/dist/esm/models/DocumentResponse.js +3 -0
  27. package/dist/esm/models/FolderDocumentResponse.d.ts +7 -0
  28. package/dist/esm/models/FolderDocumentResponse.js +3 -0
  29. package/dist/esm/models/FolderResponse.d.ts +7 -0
  30. package/dist/esm/models/FolderResponse.js +3 -0
  31. package/dist/esm/models/PathPartResponse.d.ts +7 -0
  32. package/dist/esm/models/PathPartResponse.js +3 -0
  33. package/dist/esm/models/PathPartTagsResponse.d.ts +48 -0
  34. package/dist/esm/models/PathPartTagsResponse.js +45 -0
  35. package/dist/esm/models/index.d.ts +2 -1
  36. package/dist/esm/models/index.js +2 -1
  37. package/dist/models/BulkTagRequest.d.ts +47 -0
  38. package/dist/models/BulkTagRequest.js +57 -0
  39. package/dist/models/DocumentResponse.d.ts +7 -0
  40. package/dist/models/DocumentResponse.js +3 -0
  41. package/dist/models/FolderDocumentResponse.d.ts +7 -0
  42. package/dist/models/FolderDocumentResponse.js +3 -0
  43. package/dist/models/FolderResponse.d.ts +7 -0
  44. package/dist/models/FolderResponse.js +3 -0
  45. package/dist/models/PathPartResponse.d.ts +7 -0
  46. package/dist/models/PathPartResponse.js +3 -0
  47. package/dist/models/PathPartTagsResponse.d.ts +48 -0
  48. package/dist/models/PathPartTagsResponse.js +53 -0
  49. package/dist/models/index.d.ts +2 -1
  50. package/dist/models/index.js +2 -1
  51. package/package.json +1 -1
  52. package/src/apis/DocumentsApi.ts +12 -0
  53. package/src/apis/FoldersApi.ts +22 -4
  54. package/src/apis/PathPartsApi.ts +156 -4
  55. package/src/apis/TagsApi.ts +0 -146
  56. package/src/apis/ThreadsApi.ts +72 -0
  57. package/src/models/BulkTagRequest.ts +87 -0
  58. package/src/models/DocumentResponse.ts +15 -0
  59. package/src/models/FolderDocumentResponse.ts +15 -0
  60. package/src/models/FolderResponse.ts +16 -0
  61. package/src/models/PathPartResponse.ts +15 -0
  62. package/src/models/PathPartTagsResponse.ts +91 -0
  63. package/src/models/index.ts +2 -1
  64. package/dist/esm/models/TagPathPartRequest.d.ts +0 -47
  65. package/dist/esm/models/TagPathPartRequest.js +0 -44
  66. package/dist/models/TagPathPartRequest.d.ts +0 -47
  67. package/dist/models/TagPathPartRequest.js +0 -52
  68. 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.22.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.22.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -21,6 +21,7 @@ export interface DeleteDocumentRequest {
21
21
  }
22
22
  export interface GetDocumentRequest {
23
23
  documentId: string;
24
+ withTags?: boolean;
24
25
  ksUat?: string | null;
25
26
  }
26
27
  export interface IngestDocumentRequest {
@@ -32,6 +33,7 @@ export interface IngestDocumentRequest {
32
33
  export interface ListDocumentsRequest {
33
34
  parentPathPartId?: string | null;
34
35
  sortOrder?: PathOrder;
36
+ withTags?: boolean;
35
37
  limit?: number;
36
38
  offset?: number;
37
39
  ksUat?: string | null;
@@ -82,6 +84,7 @@ export interface DocumentsApiInterface {
82
84
  * Get a document by its document ID.
83
85
  * @summary Get Document Handler
84
86
  * @param {string} documentId
87
+ * @param {boolean} [withTags] Include tags in the response (default: false)
85
88
  * @param {string} [ksUat]
86
89
  * @param {*} [options] Override http request option.
87
90
  * @throws {RequiredError}
@@ -115,6 +118,7 @@ export interface DocumentsApiInterface {
115
118
  * @summary List Documents Handler
116
119
  * @param {string} [parentPathPartId] Parent PathPart ID (defaults to root)
117
120
  * @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
121
+ * @param {boolean} [withTags] Include tags in the response (default: false)
118
122
  * @param {number} [limit] Number of items per page
119
123
  * @param {number} [offset] Number of items to skip
120
124
  * @param {string} [ksUat]
@@ -103,6 +103,9 @@ class DocumentsApi extends runtime.BaseAPI {
103
103
  throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling getDocument().');
104
104
  }
105
105
  const queryParameters = {};
106
+ if (requestParameters['withTags'] != null) {
107
+ queryParameters['with_tags'] = requestParameters['withTags'];
108
+ }
106
109
  const headerParameters = {};
107
110
  let urlPath = `/v1/documents/{document_id}`;
108
111
  urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
@@ -197,6 +200,9 @@ class DocumentsApi extends runtime.BaseAPI {
197
200
  if (requestParameters['sortOrder'] != null) {
198
201
  queryParameters['sort_order'] = requestParameters['sortOrder'];
199
202
  }
203
+ if (requestParameters['withTags'] != null) {
204
+ queryParameters['with_tags'] = requestParameters['withTags'];
205
+ }
200
206
  if (requestParameters['limit'] != null) {
201
207
  queryParameters['limit'] = requestParameters['limit'];
202
208
  }
@@ -21,12 +21,14 @@ export interface DeleteFolderRequest {
21
21
  }
22
22
  export interface GetFolderRequest {
23
23
  folderId: string;
24
+ withTags?: boolean;
24
25
  ksUat?: string | null;
25
26
  }
26
27
  export interface ListFolderContentsRequest {
27
28
  folderId: string;
28
29
  maxDepth?: number;
29
30
  sortOrder?: PathOrder;
31
+ withTags?: boolean;
30
32
  limit?: number;
31
33
  offset?: number;
32
34
  ksUat?: string | null;
@@ -34,6 +36,7 @@ export interface ListFolderContentsRequest {
34
36
  export interface ListFoldersRequest {
35
37
  parentPathPartId?: string | null;
36
38
  sortOrder?: PathOrder;
39
+ withTags?: boolean;
37
40
  limit?: number;
38
41
  offset?: number;
39
42
  ksUat?: string | null;
@@ -84,6 +87,7 @@ export interface FoldersApiInterface {
84
87
  * Get a folder by its folder ID.
85
88
  * @summary Get Folder Handler
86
89
  * @param {string} folderId
90
+ * @param {boolean} [withTags] Include tags in the response (default: false)
87
91
  * @param {string} [ksUat]
88
92
  * @param {*} [options] Override http request option.
89
93
  * @throws {RequiredError}
@@ -96,11 +100,12 @@ export interface FoldersApiInterface {
96
100
  */
97
101
  getFolder(requestParameters: GetFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
98
102
  /**
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.
103
+ * 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
104
  * @summary List Folder Contents Handler
101
105
  * @param {string} folderId
102
106
  * @param {number} [maxDepth] Maximum depth to traverse (1&#x3D;direct children, default: 1)
103
107
  * @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
108
+ * @param {boolean} [withTags] Include tag IDs for each item (default: false)
104
109
  * @param {number} [limit] Number of items per page
105
110
  * @param {number} [offset] Number of items to skip
106
111
  * @param {string} [ksUat]
@@ -110,7 +115,7 @@ export interface FoldersApiInterface {
110
115
  */
111
116
  listFolderContentsRaw(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseFolderDocumentResponse>>;
112
117
  /**
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.
118
+ * 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
119
  * List Folder Contents Handler
115
120
  */
116
121
  listFolderContents(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderDocumentResponse>;
@@ -119,6 +124,7 @@ export interface FoldersApiInterface {
119
124
  * @summary List Folders Handler
120
125
  * @param {string} [parentPathPartId] Parent PathPart ID (defaults to root)
121
126
  * @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
127
+ * @param {boolean} [withTags] Include tags in the response (default: false)
122
128
  * @param {number} [limit] Number of items per page
123
129
  * @param {number} [offset] Number of items to skip
124
130
  * @param {string} [ksUat]
@@ -184,12 +190,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
184
190
  */
185
191
  getFolder(requestParameters: GetFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
186
192
  /**
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.
193
+ * 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
194
  * List Folder Contents Handler
189
195
  */
190
196
  listFolderContentsRaw(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseFolderDocumentResponse>>;
191
197
  /**
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.
198
+ * 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
199
  * List Folder Contents Handler
194
200
  */
195
201
  listFolderContents(requestParameters: ListFolderContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderDocumentResponse>;
@@ -103,6 +103,9 @@ class FoldersApi extends runtime.BaseAPI {
103
103
  throw new runtime.RequiredError('folderId', 'Required parameter "folderId" was null or undefined when calling getFolder().');
104
104
  }
105
105
  const queryParameters = {};
106
+ if (requestParameters['withTags'] != null) {
107
+ queryParameters['with_tags'] = requestParameters['withTags'];
108
+ }
106
109
  const headerParameters = {};
107
110
  let urlPath = `/v1/folders/{folder_id}`;
108
111
  urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
@@ -126,7 +129,7 @@ class FoldersApi extends runtime.BaseAPI {
126
129
  });
127
130
  }
128
131
  /**
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.
132
+ * 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
133
  * List Folder Contents Handler
131
134
  */
132
135
  listFolderContentsRaw(requestParameters, initOverrides) {
@@ -141,6 +144,9 @@ class FoldersApi extends runtime.BaseAPI {
141
144
  if (requestParameters['sortOrder'] != null) {
142
145
  queryParameters['sort_order'] = requestParameters['sortOrder'];
143
146
  }
147
+ if (requestParameters['withTags'] != null) {
148
+ queryParameters['with_tags'] = requestParameters['withTags'];
149
+ }
144
150
  if (requestParameters['limit'] != null) {
145
151
  queryParameters['limit'] = requestParameters['limit'];
146
152
  }
@@ -160,7 +166,7 @@ class FoldersApi extends runtime.BaseAPI {
160
166
  });
161
167
  }
162
168
  /**
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.
169
+ * 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
170
  * List Folder Contents Handler
165
171
  */
166
172
  listFolderContents(requestParameters, initOverrides) {
@@ -182,6 +188,9 @@ class FoldersApi extends runtime.BaseAPI {
182
188
  if (requestParameters['sortOrder'] != null) {
183
189
  queryParameters['sort_order'] = requestParameters['sortOrder'];
184
190
  }
191
+ if (requestParameters['withTags'] != null) {
192
+ queryParameters['with_tags'] = requestParameters['withTags'];
193
+ }
185
194
  if (requestParameters['limit'] != null) {
186
195
  queryParameters['limit'] = requestParameters['limit'];
187
196
  }
@@ -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