@knowledge-stack/ksapi 1.70.0 → 1.70.2

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.70.0
1
+ # @knowledge-stack/ksapi@1.70.2
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -114,13 +114,13 @@ All URIs are relative to *http://localhost:8000*
114
114
  *InvitesApi* | [**createInvite**](docs/InvitesApi.md#createinvite) | **POST** /v1/invites | Create Invite
115
115
  *InvitesApi* | [**deleteInvite**](docs/InvitesApi.md#deleteinvite) | **DELETE** /v1/invites/{invite_id} | Delete Invite
116
116
  *InvitesApi* | [**listInvites**](docs/InvitesApi.md#listinvites) | **GET** /v1/invites | List Invites Handler
117
- *PathPartsApi* | [**bulkAddPathPartTags**](docs/PathPartsApi.md#bulkaddpathparttags) | **POST** /v1/path-parts/{path_part_id}/tags | Bulk Add Path Part Tags Handler
118
117
  *PathPartsApi* | [**bulkRemovePathPartTags**](docs/PathPartsApi.md#bulkremovepathparttags) | **DELETE** /v1/path-parts/{path_part_id}/tags | Bulk Remove Path Part Tags Handler
119
118
  *PathPartsApi* | [**getPathPart**](docs/PathPartsApi.md#getpathpart) | **GET** /v1/path-parts/{path_part_id} | Get Path Part Handler
120
119
  *PathPartsApi* | [**getPathPartAncestry**](docs/PathPartsApi.md#getpathpartancestry) | **GET** /v1/path-parts/{path_part_id}/ancestry | Get Path Part Ancestry Handler
121
120
  *PathPartsApi* | [**getPathPartSubtreeChunks**](docs/PathPartsApi.md#getpathpartsubtreechunks) | **GET** /v1/path-parts/{path_part_id}/subtree_chunks | Get Path Part Subtree Chunks Handler
122
121
  *PathPartsApi* | [**getPathPartTags**](docs/PathPartsApi.md#getpathparttags) | **GET** /v1/path-parts/{path_part_id}/tags | Get Path Part Tags Handler
123
122
  *PathPartsApi* | [**listPathParts**](docs/PathPartsApi.md#listpathparts) | **GET** /v1/path-parts | List Path Parts Handler
123
+ *PathPartsApi* | [**setPathPartTags**](docs/PathPartsApi.md#setpathparttags) | **POST** /v1/path-parts/{path_part_id}/tags | Set Path Part Tags Handler
124
124
  *SectionsApi* | [**createSection**](docs/SectionsApi.md#createsectionoperation) | **POST** /v1/sections | Create Section Handler
125
125
  *SectionsApi* | [**deleteSection**](docs/SectionsApi.md#deletesection) | **DELETE** /v1/sections/{section_id} | Delete Section Handler
126
126
  *SectionsApi* | [**dissolveSection**](docs/SectionsApi.md#dissolvesection) | **POST** /v1/sections/{section_id}/dissolve | Dissolve Section Handler
@@ -385,7 +385,7 @@ and is automatically generated by the
385
385
  [OpenAPI Generator](https://openapi-generator.tech) project:
386
386
 
387
387
  - API version: `0.1.0`
388
- - Package version: `1.70.0`
388
+ - Package version: `1.70.2`
389
389
  - Generator version: `7.21.0`
390
390
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
391
391
 
@@ -11,12 +11,6 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { AncestryResponse, BulkTagRequest, PaginatedResponsePathPartResponse, PathOrder, PathPartResponse, PathPartTagsResponse, SubtreeChunksResponse } from '../models/index';
14
- export interface BulkAddPathPartTagsRequest {
15
- pathPartId: string;
16
- bulkTagRequest: BulkTagRequest;
17
- authorization?: string | null;
18
- ksUat?: string | null;
19
- }
20
14
  export interface BulkRemovePathPartTagsRequest {
21
15
  pathPartId: string;
22
16
  bulkTagRequest: BulkTagRequest;
@@ -53,6 +47,12 @@ export interface ListPathPartsRequest {
53
47
  authorization?: string | null;
54
48
  ksUat?: string | null;
55
49
  }
50
+ export interface SetPathPartTagsRequest {
51
+ pathPartId: string;
52
+ bulkTagRequest: BulkTagRequest;
53
+ authorization?: string | null;
54
+ ksUat?: string | null;
55
+ }
56
56
  /**
57
57
  * PathPartsApi - interface
58
58
  *
@@ -60,33 +60,6 @@ export interface ListPathPartsRequest {
60
60
  * @interface PathPartsApiInterface
61
61
  */
62
62
  export interface PathPartsApiInterface {
63
- /**
64
- * Creates request options for bulkAddPathPartTags without sending the request
65
- * @param {string} pathPartId
66
- * @param {BulkTagRequest} bulkTagRequest
67
- * @param {string} [authorization]
68
- * @param {string} [ksUat]
69
- * @throws {RequiredError}
70
- * @memberof PathPartsApiInterface
71
- */
72
- bulkAddPathPartTagsRequestOpts(requestParameters: BulkAddPathPartTagsRequest): Promise<runtime.RequestOpts>;
73
- /**
74
- * 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.
75
- * @summary Bulk Add Path Part Tags Handler
76
- * @param {string} pathPartId
77
- * @param {BulkTagRequest} bulkTagRequest
78
- * @param {string} [authorization]
79
- * @param {string} [ksUat]
80
- * @param {*} [options] Override http request option.
81
- * @throws {RequiredError}
82
- * @memberof PathPartsApiInterface
83
- */
84
- bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
85
- /**
86
- * 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.
87
- * Bulk Add Path Part Tags Handler
88
- */
89
- bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
90
63
  /**
91
64
  * Creates request options for bulkRemovePathPartTags without sending the request
92
65
  * @param {string} pathPartId
@@ -249,25 +222,38 @@ export interface PathPartsApiInterface {
249
222
  * List Path Parts Handler
250
223
  */
251
224
  listPathParts(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
252
- }
253
- /**
254
- *
255
- */
256
- export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
257
225
  /**
258
- * Creates request options for bulkAddPathPartTags without sending the request
226
+ * Creates request options for setPathPartTags without sending the request
227
+ * @param {string} pathPartId
228
+ * @param {BulkTagRequest} bulkTagRequest
229
+ * @param {string} [authorization]
230
+ * @param {string} [ksUat]
231
+ * @throws {RequiredError}
232
+ * @memberof PathPartsApiInterface
259
233
  */
260
- bulkAddPathPartTagsRequestOpts(requestParameters: BulkAddPathPartTagsRequest): Promise<runtime.RequestOpts>;
234
+ setPathPartTagsRequestOpts(requestParameters: SetPathPartTagsRequest): Promise<runtime.RequestOpts>;
261
235
  /**
262
- * 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.
263
- * Bulk Add Path Part Tags Handler
236
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
237
+ * @summary Set Path Part Tags Handler
238
+ * @param {string} pathPartId
239
+ * @param {BulkTagRequest} bulkTagRequest
240
+ * @param {string} [authorization]
241
+ * @param {string} [ksUat]
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ * @memberof PathPartsApiInterface
264
245
  */
265
- bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
246
+ setPathPartTagsRaw(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
266
247
  /**
267
- * 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.
268
- * Bulk Add Path Part Tags Handler
248
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
249
+ * Set Path Part Tags Handler
269
250
  */
270
- bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
251
+ setPathPartTags(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
252
+ }
253
+ /**
254
+ *
255
+ */
256
+ export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
271
257
  /**
272
258
  * Creates request options for bulkRemovePathPartTags without sending the request
273
259
  */
@@ -352,4 +338,18 @@ export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsAp
352
338
  * List Path Parts Handler
353
339
  */
354
340
  listPathParts(requestParameters?: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
341
+ /**
342
+ * Creates request options for setPathPartTags without sending the request
343
+ */
344
+ setPathPartTagsRequestOpts(requestParameters: SetPathPartTagsRequest): Promise<runtime.RequestOpts>;
345
+ /**
346
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
347
+ * Set Path Part Tags Handler
348
+ */
349
+ setPathPartTagsRaw(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
350
+ /**
351
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
352
+ * Set Path Part Tags Handler
353
+ */
354
+ setPathPartTags(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
355
355
  }
@@ -62,55 +62,6 @@ const index_1 = require("../models/index");
62
62
  *
63
63
  */
64
64
  class PathPartsApi extends runtime.BaseAPI {
65
- /**
66
- * Creates request options for bulkAddPathPartTags without sending the request
67
- */
68
- bulkAddPathPartTagsRequestOpts(requestParameters) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- if (requestParameters['pathPartId'] == null) {
71
- throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling bulkAddPathPartTags().');
72
- }
73
- if (requestParameters['bulkTagRequest'] == null) {
74
- throw new runtime.RequiredError('bulkTagRequest', 'Required parameter "bulkTagRequest" was null or undefined when calling bulkAddPathPartTags().');
75
- }
76
- const queryParameters = {};
77
- const headerParameters = {};
78
- headerParameters['Content-Type'] = 'application/json';
79
- if (requestParameters['authorization'] != null) {
80
- headerParameters['authorization'] = String(requestParameters['authorization']);
81
- }
82
- let urlPath = `/v1/path-parts/{path_part_id}/tags`;
83
- urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
84
- return {
85
- path: urlPath,
86
- method: 'POST',
87
- headers: headerParameters,
88
- query: queryParameters,
89
- body: (0, index_1.BulkTagRequestToJSON)(requestParameters['bulkTagRequest']),
90
- };
91
- });
92
- }
93
- /**
94
- * 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.
95
- * Bulk Add Path Part Tags Handler
96
- */
97
- bulkAddPathPartTagsRaw(requestParameters, initOverrides) {
98
- return __awaiter(this, void 0, void 0, function* () {
99
- const requestOptions = yield this.bulkAddPathPartTagsRequestOpts(requestParameters);
100
- const response = yield this.request(requestOptions, initOverrides);
101
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PathPartTagsResponseFromJSON)(jsonValue));
102
- });
103
- }
104
- /**
105
- * 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.
106
- * Bulk Add Path Part Tags Handler
107
- */
108
- bulkAddPathPartTags(requestParameters, initOverrides) {
109
- return __awaiter(this, void 0, void 0, function* () {
110
- const response = yield this.bulkAddPathPartTagsRaw(requestParameters, initOverrides);
111
- return yield response.value();
112
- });
113
- }
114
65
  /**
115
66
  * Creates request options for bulkRemovePathPartTags without sending the request
116
67
  */
@@ -394,5 +345,54 @@ class PathPartsApi extends runtime.BaseAPI {
394
345
  return yield response.value();
395
346
  });
396
347
  }
348
+ /**
349
+ * Creates request options for setPathPartTags without sending the request
350
+ */
351
+ setPathPartTagsRequestOpts(requestParameters) {
352
+ return __awaiter(this, void 0, void 0, function* () {
353
+ if (requestParameters['pathPartId'] == null) {
354
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling setPathPartTags().');
355
+ }
356
+ if (requestParameters['bulkTagRequest'] == null) {
357
+ throw new runtime.RequiredError('bulkTagRequest', 'Required parameter "bulkTagRequest" was null or undefined when calling setPathPartTags().');
358
+ }
359
+ const queryParameters = {};
360
+ const headerParameters = {};
361
+ headerParameters['Content-Type'] = 'application/json';
362
+ if (requestParameters['authorization'] != null) {
363
+ headerParameters['authorization'] = String(requestParameters['authorization']);
364
+ }
365
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
366
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
367
+ return {
368
+ path: urlPath,
369
+ method: 'POST',
370
+ headers: headerParameters,
371
+ query: queryParameters,
372
+ body: (0, index_1.BulkTagRequestToJSON)(requestParameters['bulkTagRequest']),
373
+ };
374
+ });
375
+ }
376
+ /**
377
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
378
+ * Set Path Part Tags Handler
379
+ */
380
+ setPathPartTagsRaw(requestParameters, initOverrides) {
381
+ return __awaiter(this, void 0, void 0, function* () {
382
+ const requestOptions = yield this.setPathPartTagsRequestOpts(requestParameters);
383
+ const response = yield this.request(requestOptions, initOverrides);
384
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PathPartTagsResponseFromJSON)(jsonValue));
385
+ });
386
+ }
387
+ /**
388
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
389
+ * Set Path Part Tags Handler
390
+ */
391
+ setPathPartTags(requestParameters, initOverrides) {
392
+ return __awaiter(this, void 0, void 0, function* () {
393
+ const response = yield this.setPathPartTagsRaw(requestParameters, initOverrides);
394
+ return yield response.value();
395
+ });
396
+ }
397
397
  }
398
398
  exports.PathPartsApi = PathPartsApi;
@@ -11,12 +11,6 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { AncestryResponse, BulkTagRequest, PaginatedResponsePathPartResponse, PathOrder, PathPartResponse, PathPartTagsResponse, SubtreeChunksResponse } from '../models/index';
14
- export interface BulkAddPathPartTagsRequest {
15
- pathPartId: string;
16
- bulkTagRequest: BulkTagRequest;
17
- authorization?: string | null;
18
- ksUat?: string | null;
19
- }
20
14
  export interface BulkRemovePathPartTagsRequest {
21
15
  pathPartId: string;
22
16
  bulkTagRequest: BulkTagRequest;
@@ -53,6 +47,12 @@ export interface ListPathPartsRequest {
53
47
  authorization?: string | null;
54
48
  ksUat?: string | null;
55
49
  }
50
+ export interface SetPathPartTagsRequest {
51
+ pathPartId: string;
52
+ bulkTagRequest: BulkTagRequest;
53
+ authorization?: string | null;
54
+ ksUat?: string | null;
55
+ }
56
56
  /**
57
57
  * PathPartsApi - interface
58
58
  *
@@ -60,33 +60,6 @@ export interface ListPathPartsRequest {
60
60
  * @interface PathPartsApiInterface
61
61
  */
62
62
  export interface PathPartsApiInterface {
63
- /**
64
- * Creates request options for bulkAddPathPartTags without sending the request
65
- * @param {string} pathPartId
66
- * @param {BulkTagRequest} bulkTagRequest
67
- * @param {string} [authorization]
68
- * @param {string} [ksUat]
69
- * @throws {RequiredError}
70
- * @memberof PathPartsApiInterface
71
- */
72
- bulkAddPathPartTagsRequestOpts(requestParameters: BulkAddPathPartTagsRequest): Promise<runtime.RequestOpts>;
73
- /**
74
- * 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.
75
- * @summary Bulk Add Path Part Tags Handler
76
- * @param {string} pathPartId
77
- * @param {BulkTagRequest} bulkTagRequest
78
- * @param {string} [authorization]
79
- * @param {string} [ksUat]
80
- * @param {*} [options] Override http request option.
81
- * @throws {RequiredError}
82
- * @memberof PathPartsApiInterface
83
- */
84
- bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
85
- /**
86
- * 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.
87
- * Bulk Add Path Part Tags Handler
88
- */
89
- bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
90
63
  /**
91
64
  * Creates request options for bulkRemovePathPartTags without sending the request
92
65
  * @param {string} pathPartId
@@ -249,25 +222,38 @@ export interface PathPartsApiInterface {
249
222
  * List Path Parts Handler
250
223
  */
251
224
  listPathParts(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
252
- }
253
- /**
254
- *
255
- */
256
- export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
257
225
  /**
258
- * Creates request options for bulkAddPathPartTags without sending the request
226
+ * Creates request options for setPathPartTags without sending the request
227
+ * @param {string} pathPartId
228
+ * @param {BulkTagRequest} bulkTagRequest
229
+ * @param {string} [authorization]
230
+ * @param {string} [ksUat]
231
+ * @throws {RequiredError}
232
+ * @memberof PathPartsApiInterface
259
233
  */
260
- bulkAddPathPartTagsRequestOpts(requestParameters: BulkAddPathPartTagsRequest): Promise<runtime.RequestOpts>;
234
+ setPathPartTagsRequestOpts(requestParameters: SetPathPartTagsRequest): Promise<runtime.RequestOpts>;
261
235
  /**
262
- * 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.
263
- * Bulk Add Path Part Tags Handler
236
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
237
+ * @summary Set Path Part Tags Handler
238
+ * @param {string} pathPartId
239
+ * @param {BulkTagRequest} bulkTagRequest
240
+ * @param {string} [authorization]
241
+ * @param {string} [ksUat]
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ * @memberof PathPartsApiInterface
264
245
  */
265
- bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
246
+ setPathPartTagsRaw(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
266
247
  /**
267
- * 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.
268
- * Bulk Add Path Part Tags Handler
248
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
249
+ * Set Path Part Tags Handler
269
250
  */
270
- bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
251
+ setPathPartTags(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
252
+ }
253
+ /**
254
+ *
255
+ */
256
+ export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
271
257
  /**
272
258
  * Creates request options for bulkRemovePathPartTags without sending the request
273
259
  */
@@ -352,4 +338,18 @@ export declare class PathPartsApi extends runtime.BaseAPI implements PathPartsAp
352
338
  * List Path Parts Handler
353
339
  */
354
340
  listPathParts(requestParameters?: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
341
+ /**
342
+ * Creates request options for setPathPartTags without sending the request
343
+ */
344
+ setPathPartTagsRequestOpts(requestParameters: SetPathPartTagsRequest): Promise<runtime.RequestOpts>;
345
+ /**
346
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
347
+ * Set Path Part Tags Handler
348
+ */
349
+ setPathPartTagsRaw(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
350
+ /**
351
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
352
+ * Set Path Part Tags Handler
353
+ */
354
+ setPathPartTags(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
355
355
  }
@@ -26,55 +26,6 @@ import { AncestryResponseFromJSON, BulkTagRequestToJSON, PaginatedResponsePathPa
26
26
  *
27
27
  */
28
28
  export class PathPartsApi extends runtime.BaseAPI {
29
- /**
30
- * Creates request options for bulkAddPathPartTags without sending the request
31
- */
32
- bulkAddPathPartTagsRequestOpts(requestParameters) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- if (requestParameters['pathPartId'] == null) {
35
- throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling bulkAddPathPartTags().');
36
- }
37
- if (requestParameters['bulkTagRequest'] == null) {
38
- throw new runtime.RequiredError('bulkTagRequest', 'Required parameter "bulkTagRequest" was null or undefined when calling bulkAddPathPartTags().');
39
- }
40
- const queryParameters = {};
41
- const headerParameters = {};
42
- headerParameters['Content-Type'] = 'application/json';
43
- if (requestParameters['authorization'] != null) {
44
- headerParameters['authorization'] = String(requestParameters['authorization']);
45
- }
46
- let urlPath = `/v1/path-parts/{path_part_id}/tags`;
47
- urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
48
- return {
49
- path: urlPath,
50
- method: 'POST',
51
- headers: headerParameters,
52
- query: queryParameters,
53
- body: BulkTagRequestToJSON(requestParameters['bulkTagRequest']),
54
- };
55
- });
56
- }
57
- /**
58
- * 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.
59
- * Bulk Add Path Part Tags Handler
60
- */
61
- bulkAddPathPartTagsRaw(requestParameters, initOverrides) {
62
- return __awaiter(this, void 0, void 0, function* () {
63
- const requestOptions = yield this.bulkAddPathPartTagsRequestOpts(requestParameters);
64
- const response = yield this.request(requestOptions, initOverrides);
65
- return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
66
- });
67
- }
68
- /**
69
- * 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.
70
- * Bulk Add Path Part Tags Handler
71
- */
72
- bulkAddPathPartTags(requestParameters, initOverrides) {
73
- return __awaiter(this, void 0, void 0, function* () {
74
- const response = yield this.bulkAddPathPartTagsRaw(requestParameters, initOverrides);
75
- return yield response.value();
76
- });
77
- }
78
29
  /**
79
30
  * Creates request options for bulkRemovePathPartTags without sending the request
80
31
  */
@@ -358,4 +309,53 @@ export class PathPartsApi extends runtime.BaseAPI {
358
309
  return yield response.value();
359
310
  });
360
311
  }
312
+ /**
313
+ * Creates request options for setPathPartTags without sending the request
314
+ */
315
+ setPathPartTagsRequestOpts(requestParameters) {
316
+ return __awaiter(this, void 0, void 0, function* () {
317
+ if (requestParameters['pathPartId'] == null) {
318
+ throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling setPathPartTags().');
319
+ }
320
+ if (requestParameters['bulkTagRequest'] == null) {
321
+ throw new runtime.RequiredError('bulkTagRequest', 'Required parameter "bulkTagRequest" was null or undefined when calling setPathPartTags().');
322
+ }
323
+ const queryParameters = {};
324
+ const headerParameters = {};
325
+ headerParameters['Content-Type'] = 'application/json';
326
+ if (requestParameters['authorization'] != null) {
327
+ headerParameters['authorization'] = String(requestParameters['authorization']);
328
+ }
329
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
330
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
331
+ return {
332
+ path: urlPath,
333
+ method: 'POST',
334
+ headers: headerParameters,
335
+ query: queryParameters,
336
+ body: BulkTagRequestToJSON(requestParameters['bulkTagRequest']),
337
+ };
338
+ });
339
+ }
340
+ /**
341
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
342
+ * Set Path Part Tags Handler
343
+ */
344
+ setPathPartTagsRaw(requestParameters, initOverrides) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ const requestOptions = yield this.setPathPartTagsRequestOpts(requestParameters);
347
+ const response = yield this.request(requestOptions, initOverrides);
348
+ return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
349
+ });
350
+ }
351
+ /**
352
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
353
+ * Set Path Part Tags Handler
354
+ */
355
+ setPathPartTags(requestParameters, initOverrides) {
356
+ return __awaiter(this, void 0, void 0, function* () {
357
+ const response = yield this.setPathPartTagsRaw(requestParameters, initOverrides);
358
+ return yield response.value();
359
+ });
360
+ }
361
361
  }
@@ -10,13 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Request to bulk add or remove tags from a path part.
13
+ * Request to set or remove tags on a path part.
14
14
  * @export
15
15
  * @interface BulkTagRequest
16
16
  */
17
17
  export interface BulkTagRequest {
18
18
  /**
19
- * List of tag IDs to add/remove
19
+ * List of tag IDs to set/remove
20
20
  * @type {Array<string>}
21
21
  * @memberof BulkTagRequest
22
22
  */
@@ -10,13 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Request to bulk add or remove tags from a path part.
13
+ * Request to set or remove tags on a path part.
14
14
  * @export
15
15
  * @interface BulkTagRequest
16
16
  */
17
17
  export interface BulkTagRequest {
18
18
  /**
19
- * List of tag IDs to add/remove
19
+ * List of tag IDs to set/remove
20
20
  * @type {Array<string>}
21
21
  * @memberof BulkTagRequest
22
22
  */
@@ -1,7 +1,7 @@
1
1
 
2
2
  # BulkTagRequest
3
3
 
4
- Request to bulk add or remove tags from a path part.
4
+ Request to set or remove tags on a path part.
5
5
 
6
6
  ## Properties
7
7
 
@@ -4,93 +4,16 @@ All URIs are relative to *http://localhost:8000*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
- | [**bulkAddPathPartTags**](PathPartsApi.md#bulkaddpathparttags) | **POST** /v1/path-parts/{path_part_id}/tags | Bulk Add Path Part Tags Handler |
8
7
  | [**bulkRemovePathPartTags**](PathPartsApi.md#bulkremovepathparttags) | **DELETE** /v1/path-parts/{path_part_id}/tags | Bulk Remove Path Part Tags Handler |
9
8
  | [**getPathPart**](PathPartsApi.md#getpathpart) | **GET** /v1/path-parts/{path_part_id} | Get Path Part Handler |
10
9
  | [**getPathPartAncestry**](PathPartsApi.md#getpathpartancestry) | **GET** /v1/path-parts/{path_part_id}/ancestry | Get Path Part Ancestry Handler |
11
10
  | [**getPathPartSubtreeChunks**](PathPartsApi.md#getpathpartsubtreechunks) | **GET** /v1/path-parts/{path_part_id}/subtree_chunks | Get Path Part Subtree Chunks Handler |
12
11
  | [**getPathPartTags**](PathPartsApi.md#getpathparttags) | **GET** /v1/path-parts/{path_part_id}/tags | Get Path Part Tags Handler |
13
12
  | [**listPathParts**](PathPartsApi.md#listpathparts) | **GET** /v1/path-parts | List Path Parts Handler |
13
+ | [**setPathPartTags**](PathPartsApi.md#setpathparttags) | **POST** /v1/path-parts/{path_part_id}/tags | Set Path Part Tags Handler |
14
14
 
15
15
 
16
16
 
17
- ## bulkAddPathPartTags
18
-
19
- > PathPartTagsResponse bulkAddPathPartTags(pathPartId, bulkTagRequest, authorization, ksUat)
20
-
21
- Bulk Add Path Part Tags Handler
22
-
23
- Bulk add tags to a path part. Idempotent — already-attached tags are skipped. Returns 400 if any tag_id doesn\&#39;t exist (FK violation). Requires write permission on the target path part.
24
-
25
- ### Example
26
-
27
- ```ts
28
- import {
29
- Configuration,
30
- PathPartsApi,
31
- } from '@knowledge-stack/ksapi';
32
- import type { BulkAddPathPartTagsRequest } from '@knowledge-stack/ksapi';
33
-
34
- async function example() {
35
- console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
36
- const api = new PathPartsApi();
37
-
38
- const body = {
39
- // string
40
- pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
41
- // BulkTagRequest
42
- bulkTagRequest: ...,
43
- // string (optional)
44
- authorization: authorization_example,
45
- // string (optional)
46
- ksUat: ksUat_example,
47
- } satisfies BulkAddPathPartTagsRequest;
48
-
49
- try {
50
- const data = await api.bulkAddPathPartTags(body);
51
- console.log(data);
52
- } catch (error) {
53
- console.error(error);
54
- }
55
- }
56
-
57
- // Run the test
58
- example().catch(console.error);
59
- ```
60
-
61
- ### Parameters
62
-
63
-
64
- | Name | Type | Description | Notes |
65
- |------------- | ------------- | ------------- | -------------|
66
- | **pathPartId** | `string` | | [Defaults to `undefined`] |
67
- | **bulkTagRequest** | [BulkTagRequest](BulkTagRequest.md) | | |
68
- | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
69
- | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
70
-
71
- ### Return type
72
-
73
- [**PathPartTagsResponse**](PathPartTagsResponse.md)
74
-
75
- ### Authorization
76
-
77
- No authorization required
78
-
79
- ### HTTP request headers
80
-
81
- - **Content-Type**: `application/json`
82
- - **Accept**: `application/json`
83
-
84
-
85
- ### HTTP response details
86
- | Status code | Description | Response headers |
87
- |-------------|-------------|------------------|
88
- | **201** | Successful Response | - |
89
- | **422** | Validation Error | - |
90
-
91
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
92
-
93
-
94
17
  ## bulkRemovePathPartTags
95
18
 
96
19
  > PathPartTagsResponse bulkRemovePathPartTags(pathPartId, bulkTagRequest, authorization, ksUat)
@@ -552,3 +475,80 @@ No authorization required
552
475
 
553
476
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
554
477
 
478
+
479
+ ## setPathPartTags
480
+
481
+ > PathPartTagsResponse setPathPartTags(pathPartId, bulkTagRequest, authorization, ksUat)
482
+
483
+ Set Path Part Tags Handler
484
+
485
+ Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\&#39;t exist (FK violation). Requires write permission on the target path part.
486
+
487
+ ### Example
488
+
489
+ ```ts
490
+ import {
491
+ Configuration,
492
+ PathPartsApi,
493
+ } from '@knowledge-stack/ksapi';
494
+ import type { SetPathPartTagsRequest } from '@knowledge-stack/ksapi';
495
+
496
+ async function example() {
497
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
498
+ const api = new PathPartsApi();
499
+
500
+ const body = {
501
+ // string
502
+ pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
503
+ // BulkTagRequest
504
+ bulkTagRequest: ...,
505
+ // string (optional)
506
+ authorization: authorization_example,
507
+ // string (optional)
508
+ ksUat: ksUat_example,
509
+ } satisfies SetPathPartTagsRequest;
510
+
511
+ try {
512
+ const data = await api.setPathPartTags(body);
513
+ console.log(data);
514
+ } catch (error) {
515
+ console.error(error);
516
+ }
517
+ }
518
+
519
+ // Run the test
520
+ example().catch(console.error);
521
+ ```
522
+
523
+ ### Parameters
524
+
525
+
526
+ | Name | Type | Description | Notes |
527
+ |------------- | ------------- | ------------- | -------------|
528
+ | **pathPartId** | `string` | | [Defaults to `undefined`] |
529
+ | **bulkTagRequest** | [BulkTagRequest](BulkTagRequest.md) | | |
530
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
531
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
532
+
533
+ ### Return type
534
+
535
+ [**PathPartTagsResponse**](PathPartTagsResponse.md)
536
+
537
+ ### Authorization
538
+
539
+ No authorization required
540
+
541
+ ### HTTP request headers
542
+
543
+ - **Content-Type**: `application/json`
544
+ - **Accept**: `application/json`
545
+
546
+
547
+ ### HTTP response details
548
+ | Status code | Description | Response headers |
549
+ |-------------|-------------|------------------|
550
+ | **200** | Successful Response | - |
551
+ | **422** | Validation Error | - |
552
+
553
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
554
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.70.0",
3
+ "version": "1.70.2",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -43,13 +43,6 @@ import {
43
43
  SubtreeChunksResponseToJSON,
44
44
  } from '../models/index';
45
45
 
46
- export interface BulkAddPathPartTagsRequest {
47
- pathPartId: string;
48
- bulkTagRequest: BulkTagRequest;
49
- authorization?: string | null;
50
- ksUat?: string | null;
51
- }
52
-
53
46
  export interface BulkRemovePathPartTagsRequest {
54
47
  pathPartId: string;
55
48
  bulkTagRequest: BulkTagRequest;
@@ -92,6 +85,13 @@ export interface ListPathPartsRequest {
92
85
  ksUat?: string | null;
93
86
  }
94
87
 
88
+ export interface SetPathPartTagsRequest {
89
+ pathPartId: string;
90
+ bulkTagRequest: BulkTagRequest;
91
+ authorization?: string | null;
92
+ ksUat?: string | null;
93
+ }
94
+
95
95
  /**
96
96
  * PathPartsApi - interface
97
97
  *
@@ -99,36 +99,6 @@ export interface ListPathPartsRequest {
99
99
  * @interface PathPartsApiInterface
100
100
  */
101
101
  export interface PathPartsApiInterface {
102
- /**
103
- * Creates request options for bulkAddPathPartTags without sending the request
104
- * @param {string} pathPartId
105
- * @param {BulkTagRequest} bulkTagRequest
106
- * @param {string} [authorization]
107
- * @param {string} [ksUat]
108
- * @throws {RequiredError}
109
- * @memberof PathPartsApiInterface
110
- */
111
- bulkAddPathPartTagsRequestOpts(requestParameters: BulkAddPathPartTagsRequest): Promise<runtime.RequestOpts>;
112
-
113
- /**
114
- * 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.
115
- * @summary Bulk Add Path Part Tags Handler
116
- * @param {string} pathPartId
117
- * @param {BulkTagRequest} bulkTagRequest
118
- * @param {string} [authorization]
119
- * @param {string} [ksUat]
120
- * @param {*} [options] Override http request option.
121
- * @throws {RequiredError}
122
- * @memberof PathPartsApiInterface
123
- */
124
- bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
125
-
126
- /**
127
- * 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.
128
- * Bulk Add Path Part Tags Handler
129
- */
130
- bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
131
-
132
102
  /**
133
103
  * Creates request options for bulkRemovePathPartTags without sending the request
134
104
  * @param {string} pathPartId
@@ -309,73 +279,42 @@ export interface PathPartsApiInterface {
309
279
  */
310
280
  listPathParts(requestParameters: ListPathPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePathPartResponse>;
311
281
 
312
- }
313
-
314
- /**
315
- *
316
- */
317
- export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
318
-
319
282
  /**
320
- * Creates request options for bulkAddPathPartTags without sending the request
283
+ * Creates request options for setPathPartTags without sending the request
284
+ * @param {string} pathPartId
285
+ * @param {BulkTagRequest} bulkTagRequest
286
+ * @param {string} [authorization]
287
+ * @param {string} [ksUat]
288
+ * @throws {RequiredError}
289
+ * @memberof PathPartsApiInterface
321
290
  */
322
- async bulkAddPathPartTagsRequestOpts(requestParameters: BulkAddPathPartTagsRequest): Promise<runtime.RequestOpts> {
323
- if (requestParameters['pathPartId'] == null) {
324
- throw new runtime.RequiredError(
325
- 'pathPartId',
326
- 'Required parameter "pathPartId" was null or undefined when calling bulkAddPathPartTags().'
327
- );
328
- }
329
-
330
- if (requestParameters['bulkTagRequest'] == null) {
331
- throw new runtime.RequiredError(
332
- 'bulkTagRequest',
333
- 'Required parameter "bulkTagRequest" was null or undefined when calling bulkAddPathPartTags().'
334
- );
335
- }
336
-
337
- const queryParameters: any = {};
338
-
339
- const headerParameters: runtime.HTTPHeaders = {};
340
-
341
- headerParameters['Content-Type'] = 'application/json';
342
-
343
- if (requestParameters['authorization'] != null) {
344
- headerParameters['authorization'] = String(requestParameters['authorization']);
345
- }
346
-
347
-
348
- let urlPath = `/v1/path-parts/{path_part_id}/tags`;
349
- urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
350
-
351
- return {
352
- path: urlPath,
353
- method: 'POST',
354
- headers: headerParameters,
355
- query: queryParameters,
356
- body: BulkTagRequestToJSON(requestParameters['bulkTagRequest']),
357
- };
358
- }
291
+ setPathPartTagsRequestOpts(requestParameters: SetPathPartTagsRequest): Promise<runtime.RequestOpts>;
359
292
 
360
293
  /**
361
- * 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.
362
- * Bulk Add Path Part Tags Handler
294
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
295
+ * @summary Set Path Part Tags Handler
296
+ * @param {string} pathPartId
297
+ * @param {BulkTagRequest} bulkTagRequest
298
+ * @param {string} [authorization]
299
+ * @param {string} [ksUat]
300
+ * @param {*} [options] Override http request option.
301
+ * @throws {RequiredError}
302
+ * @memberof PathPartsApiInterface
363
303
  */
364
- async bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>> {
365
- const requestOptions = await this.bulkAddPathPartTagsRequestOpts(requestParameters);
366
- const response = await this.request(requestOptions, initOverrides);
367
-
368
- return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
369
- }
304
+ setPathPartTagsRaw(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
370
305
 
371
306
  /**
372
- * 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.
373
- * Bulk Add Path Part Tags Handler
307
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
308
+ * Set Path Part Tags Handler
374
309
  */
375
- async bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse> {
376
- const response = await this.bulkAddPathPartTagsRaw(requestParameters, initOverrides);
377
- return await response.value();
378
- }
310
+ setPathPartTags(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
311
+
312
+ }
313
+
314
+ /**
315
+ *
316
+ */
317
+ export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
379
318
 
380
319
  /**
381
320
  * Creates request options for bulkRemovePathPartTags without sending the request
@@ -709,4 +648,65 @@ export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterfa
709
648
  return await response.value();
710
649
  }
711
650
 
651
+ /**
652
+ * Creates request options for setPathPartTags without sending the request
653
+ */
654
+ async setPathPartTagsRequestOpts(requestParameters: SetPathPartTagsRequest): Promise<runtime.RequestOpts> {
655
+ if (requestParameters['pathPartId'] == null) {
656
+ throw new runtime.RequiredError(
657
+ 'pathPartId',
658
+ 'Required parameter "pathPartId" was null or undefined when calling setPathPartTags().'
659
+ );
660
+ }
661
+
662
+ if (requestParameters['bulkTagRequest'] == null) {
663
+ throw new runtime.RequiredError(
664
+ 'bulkTagRequest',
665
+ 'Required parameter "bulkTagRequest" was null or undefined when calling setPathPartTags().'
666
+ );
667
+ }
668
+
669
+ const queryParameters: any = {};
670
+
671
+ const headerParameters: runtime.HTTPHeaders = {};
672
+
673
+ headerParameters['Content-Type'] = 'application/json';
674
+
675
+ if (requestParameters['authorization'] != null) {
676
+ headerParameters['authorization'] = String(requestParameters['authorization']);
677
+ }
678
+
679
+
680
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
681
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
682
+
683
+ return {
684
+ path: urlPath,
685
+ method: 'POST',
686
+ headers: headerParameters,
687
+ query: queryParameters,
688
+ body: BulkTagRequestToJSON(requestParameters['bulkTagRequest']),
689
+ };
690
+ }
691
+
692
+ /**
693
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
694
+ * Set Path Part Tags Handler
695
+ */
696
+ async setPathPartTagsRaw(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>> {
697
+ const requestOptions = await this.setPathPartTagsRequestOpts(requestParameters);
698
+ const response = await this.request(requestOptions, initOverrides);
699
+
700
+ return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
701
+ }
702
+
703
+ /**
704
+ * Set tags on a path part, replacing any existing tags. The provided tag_ids become the complete tag set for the path part. Tags not in the list are removed; missing tags are added. An empty list clears all tags. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
705
+ * Set Path Part Tags Handler
706
+ */
707
+ async setPathPartTags(requestParameters: SetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse> {
708
+ const response = await this.setPathPartTagsRaw(requestParameters, initOverrides);
709
+ return await response.value();
710
+ }
711
+
712
712
  }
@@ -14,13 +14,13 @@
14
14
 
15
15
  import { mapValues } from '../runtime';
16
16
  /**
17
- * Request to bulk add or remove tags from a path part.
17
+ * Request to set or remove tags on a path part.
18
18
  * @export
19
19
  * @interface BulkTagRequest
20
20
  */
21
21
  export interface BulkTagRequest {
22
22
  /**
23
- * List of tag IDs to add/remove
23
+ * List of tag IDs to set/remove
24
24
  * @type {Array<string>}
25
25
  * @memberof BulkTagRequest
26
26
  */