@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
@@ -29,6 +29,12 @@ export interface ListThreadsRequest {
29
29
  offset?: number;
30
30
  ksUat?: string | null;
31
31
  }
32
+ export interface StreamThreadRequest {
33
+ threadId: string;
34
+ lastMessageId?: string | null;
35
+ lastEntryId?: string | null;
36
+ ksUat?: string | null;
37
+ }
32
38
  export interface UpdateThreadOperationRequest {
33
39
  threadId: string;
34
40
  updateThreadRequest: UpdateThreadRequest;
@@ -103,6 +109,23 @@ export interface ThreadsApiInterface {
103
109
  * List Threads Handler
104
110
  */
105
111
  listThreads(requestParameters: ListThreadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseThreadResponse>;
112
+ /**
113
+ * SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
114
+ * @summary Stream Thread Handler
115
+ * @param {string} threadId
116
+ * @param {string} [lastMessageId]
117
+ * @param {string} [lastEntryId]
118
+ * @param {string} [ksUat]
119
+ * @param {*} [options] Override http request option.
120
+ * @throws {RequiredError}
121
+ * @memberof ThreadsApiInterface
122
+ */
123
+ streamThreadRaw(requestParameters: StreamThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
124
+ /**
125
+ * SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
126
+ * Stream Thread Handler
127
+ */
128
+ streamThread(requestParameters: StreamThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
106
129
  /**
107
130
  * Update a thread\'s title and/or parent_thread_id.
108
131
  * @summary Update Thread Handler
@@ -164,6 +187,16 @@ export declare class ThreadsApi extends runtime.BaseAPI implements ThreadsApiInt
164
187
  * List Threads Handler
165
188
  */
166
189
  listThreads(requestParameters?: ListThreadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseThreadResponse>;
190
+ /**
191
+ * SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
192
+ * Stream Thread Handler
193
+ */
194
+ streamThreadRaw(requestParameters: StreamThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
195
+ /**
196
+ * SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
197
+ * Stream Thread Handler
198
+ */
199
+ streamThread(requestParameters: StreamThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
167
200
  /**
168
201
  * Update a thread\'s title and/or parent_thread_id.
169
202
  * Update Thread Handler
@@ -162,6 +162,43 @@ class ThreadsApi extends runtime.BaseAPI {
162
162
  return yield response.value();
163
163
  });
164
164
  }
165
+ /**
166
+ * SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
167
+ * Stream Thread Handler
168
+ */
169
+ streamThreadRaw(requestParameters, initOverrides) {
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ if (requestParameters['threadId'] == null) {
172
+ throw new runtime.RequiredError('threadId', 'Required parameter "threadId" was null or undefined when calling streamThread().');
173
+ }
174
+ const queryParameters = {};
175
+ if (requestParameters['lastMessageId'] != null) {
176
+ queryParameters['last_message_id'] = requestParameters['lastMessageId'];
177
+ }
178
+ if (requestParameters['lastEntryId'] != null) {
179
+ queryParameters['last_entry_id'] = requestParameters['lastEntryId'];
180
+ }
181
+ const headerParameters = {};
182
+ let urlPath = `/v1/threads/{thread_id}/stream`;
183
+ urlPath = urlPath.replace(`{${"thread_id"}}`, encodeURIComponent(String(requestParameters['threadId'])));
184
+ const response = yield this.request({
185
+ path: urlPath,
186
+ method: 'GET',
187
+ headers: headerParameters,
188
+ query: queryParameters,
189
+ }, initOverrides);
190
+ return new runtime.VoidApiResponse(response);
191
+ });
192
+ }
193
+ /**
194
+ * SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
195
+ * Stream Thread Handler
196
+ */
197
+ streamThread(requestParameters, initOverrides) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ yield this.streamThreadRaw(requestParameters, initOverrides);
200
+ });
201
+ }
165
202
  /**
166
203
  * Update a thread\'s title and/or parent_thread_id.
167
204
  * Update Thread Handler
@@ -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]
@@ -100,6 +100,9 @@ export class DocumentsApi extends runtime.BaseAPI {
100
100
  throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling getDocument().');
101
101
  }
102
102
  const queryParameters = {};
103
+ if (requestParameters['withTags'] != null) {
104
+ queryParameters['with_tags'] = requestParameters['withTags'];
105
+ }
103
106
  const headerParameters = {};
104
107
  let urlPath = `/v1/documents/{document_id}`;
105
108
  urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
@@ -194,6 +197,9 @@ export class DocumentsApi extends runtime.BaseAPI {
194
197
  if (requestParameters['sortOrder'] != null) {
195
198
  queryParameters['sort_order'] = requestParameters['sortOrder'];
196
199
  }
200
+ if (requestParameters['withTags'] != null) {
201
+ queryParameters['with_tags'] = requestParameters['withTags'];
202
+ }
197
203
  if (requestParameters['limit'] != null) {
198
204
  queryParameters['limit'] = requestParameters['limit'];
199
205
  }
@@ -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>;
@@ -100,6 +100,9 @@ export class FoldersApi extends runtime.BaseAPI {
100
100
  throw new runtime.RequiredError('folderId', 'Required parameter "folderId" was null or undefined when calling getFolder().');
101
101
  }
102
102
  const queryParameters = {};
103
+ if (requestParameters['withTags'] != null) {
104
+ queryParameters['with_tags'] = requestParameters['withTags'];
105
+ }
103
106
  const headerParameters = {};
104
107
  let urlPath = `/v1/folders/{folder_id}`;
105
108
  urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
@@ -123,7 +126,7 @@ export class FoldersApi extends runtime.BaseAPI {
123
126
  });
124
127
  }
125
128
  /**
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.
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.
127
130
  * List Folder Contents Handler
128
131
  */
129
132
  listFolderContentsRaw(requestParameters, initOverrides) {
@@ -138,6 +141,9 @@ export class FoldersApi extends runtime.BaseAPI {
138
141
  if (requestParameters['sortOrder'] != null) {
139
142
  queryParameters['sort_order'] = requestParameters['sortOrder'];
140
143
  }
144
+ if (requestParameters['withTags'] != null) {
145
+ queryParameters['with_tags'] = requestParameters['withTags'];
146
+ }
141
147
  if (requestParameters['limit'] != null) {
142
148
  queryParameters['limit'] = requestParameters['limit'];
143
149
  }
@@ -157,7 +163,7 @@ export class FoldersApi extends runtime.BaseAPI {
157
163
  });
158
164
  }
159
165
  /**
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.
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.
161
167
  * List Folder Contents Handler
162
168
  */
163
169
  listFolderContents(requestParameters, initOverrides) {
@@ -179,6 +185,9 @@ export class FoldersApi extends runtime.BaseAPI {
179
185
  if (requestParameters['sortOrder'] != null) {
180
186
  queryParameters['sort_order'] = requestParameters['sortOrder'];
181
187
  }
188
+ if (requestParameters['withTags'] != null) {
189
+ queryParameters['with_tags'] = requestParameters['withTags'];
190
+ }
182
191
  if (requestParameters['limit'] != null) {
183
192
  queryParameters['limit'] = requestParameters['limit'];
184
193
  }
@@ -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>;
@@ -21,13 +21,87 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { PaginatedResponsePathPartResponseFromJSON, PathPartResponseFromJSON, } from '../models/index';
24
+ import { BulkTagRequestToJSON, PaginatedResponsePathPartResponseFromJSON, PathPartResponseFromJSON, PathPartTagsResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class PathPartsApi extends runtime.BaseAPI {
29
29
  /**
30
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
30
+ * 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.
31
+ * Bulk Add Path Part Tags Handler
32
+ */
33
+ bulkAddPathPartTagsRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['pathPartId'] == null) {
36
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling bulkAddPathPartTags().');
37
+ }
38
+ if (requestParameters['bulkTagRequest'] == null) {
39
+ throw new runtime.RequiredError('bulkTagRequest', 'Required parameter "bulkTagRequest" was null or undefined when calling bulkAddPathPartTags().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ headerParameters['Content-Type'] = 'application/json';
44
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
45
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
46
+ const response = yield this.request({
47
+ path: urlPath,
48
+ method: 'POST',
49
+ headers: headerParameters,
50
+ query: queryParameters,
51
+ body: BulkTagRequestToJSON(requestParameters['bulkTagRequest']),
52
+ }, initOverrides);
53
+ return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
54
+ });
55
+ }
56
+ /**
57
+ * 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.
58
+ * Bulk Add Path Part Tags Handler
59
+ */
60
+ bulkAddPathPartTags(requestParameters, initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const response = yield this.bulkAddPathPartTagsRaw(requestParameters, initOverrides);
63
+ return yield response.value();
64
+ });
65
+ }
66
+ /**
67
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
68
+ * Bulk Remove Path Part Tags Handler
69
+ */
70
+ bulkRemovePathPartTagsRaw(requestParameters, initOverrides) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (requestParameters['pathPartId'] == null) {
73
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling bulkRemovePathPartTags().');
74
+ }
75
+ if (requestParameters['bulkTagRequest'] == null) {
76
+ throw new runtime.RequiredError('bulkTagRequest', 'Required parameter "bulkTagRequest" was null or undefined when calling bulkRemovePathPartTags().');
77
+ }
78
+ const queryParameters = {};
79
+ const headerParameters = {};
80
+ headerParameters['Content-Type'] = 'application/json';
81
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
82
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
83
+ const response = yield this.request({
84
+ path: urlPath,
85
+ method: 'DELETE',
86
+ headers: headerParameters,
87
+ query: queryParameters,
88
+ body: BulkTagRequestToJSON(requestParameters['bulkTagRequest']),
89
+ }, initOverrides);
90
+ return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
91
+ });
92
+ }
93
+ /**
94
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
95
+ * Bulk Remove Path Part Tags Handler
96
+ */
97
+ bulkRemovePathPartTags(requestParameters, initOverrides) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ const response = yield this.bulkRemovePathPartTagsRaw(requestParameters, initOverrides);
100
+ return yield response.value();
101
+ });
102
+ }
103
+ /**
104
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
31
105
  * Get Path Part Handler
32
106
  */
33
107
  getPathPartRaw(requestParameters, initOverrides) {
@@ -49,7 +123,7 @@ export class PathPartsApi extends runtime.BaseAPI {
49
123
  });
50
124
  }
51
125
  /**
52
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
126
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
53
127
  * Get Path Part Handler
54
128
  */
55
129
  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