@knowledge-stack/ksapi 1.20.1 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.openapi-generator/FILES +2 -1
  2. package/README.md +2 -2
  3. package/dist/apis/FoldersApi.d.ts +6 -4
  4. package/dist/apis/FoldersApi.js +5 -2
  5. package/dist/apis/PathPartsApi.d.ts +67 -5
  6. package/dist/apis/PathPartsApi.js +76 -2
  7. package/dist/apis/TagsApi.d.ts +1 -63
  8. package/dist/apis/TagsApi.js +0 -72
  9. package/dist/esm/apis/FoldersApi.d.ts +6 -4
  10. package/dist/esm/apis/FoldersApi.js +5 -2
  11. package/dist/esm/apis/PathPartsApi.d.ts +67 -5
  12. package/dist/esm/apis/PathPartsApi.js +77 -3
  13. package/dist/esm/apis/TagsApi.d.ts +1 -63
  14. package/dist/esm/apis/TagsApi.js +1 -73
  15. package/dist/esm/models/BulkTagRequest.d.ts +47 -0
  16. package/dist/esm/models/BulkTagRequest.js +49 -0
  17. package/dist/esm/models/FolderDocumentResponse.d.ts +7 -0
  18. package/dist/esm/models/FolderDocumentResponse.js +3 -0
  19. package/dist/esm/models/PathPartResponse.d.ts +7 -0
  20. package/dist/esm/models/PathPartResponse.js +3 -0
  21. package/dist/esm/models/PathPartTagsResponse.d.ts +48 -0
  22. package/dist/esm/models/PathPartTagsResponse.js +45 -0
  23. package/dist/esm/models/index.d.ts +2 -1
  24. package/dist/esm/models/index.js +2 -1
  25. package/dist/models/BulkTagRequest.d.ts +47 -0
  26. package/dist/models/BulkTagRequest.js +57 -0
  27. package/dist/models/FolderDocumentResponse.d.ts +7 -0
  28. package/dist/models/FolderDocumentResponse.js +3 -0
  29. package/dist/models/PathPartResponse.d.ts +7 -0
  30. package/dist/models/PathPartResponse.js +3 -0
  31. package/dist/models/PathPartTagsResponse.d.ts +48 -0
  32. package/dist/models/PathPartTagsResponse.js +53 -0
  33. package/dist/models/index.d.ts +2 -1
  34. package/dist/models/index.js +2 -1
  35. package/package.json +1 -1
  36. package/src/apis/FoldersApi.ts +10 -4
  37. package/src/apis/PathPartsApi.ts +156 -4
  38. package/src/apis/TagsApi.ts +0 -146
  39. package/src/models/BulkTagRequest.ts +87 -0
  40. package/src/models/FolderDocumentResponse.ts +15 -0
  41. package/src/models/PathPartResponse.ts +15 -0
  42. package/src/models/PathPartTagsResponse.ts +91 -0
  43. package/src/models/index.ts +2 -1
  44. package/dist/esm/models/TagPathPartRequest.d.ts +0 -47
  45. package/dist/esm/models/TagPathPartRequest.js +0 -44
  46. package/dist/models/TagPathPartRequest.d.ts +0 -47
  47. package/dist/models/TagPathPartRequest.js +0 -52
  48. package/src/models/TagPathPartRequest.ts +0 -83
@@ -15,12 +15,16 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ BulkTagRequest,
18
19
  HTTPValidationError,
19
20
  PaginatedResponsePathPartResponse,
20
21
  PathOrder,
21
22
  PathPartResponse,
23
+ PathPartTagsResponse,
22
24
  } from '../models/index';
23
25
  import {
26
+ BulkTagRequestFromJSON,
27
+ BulkTagRequestToJSON,
24
28
  HTTPValidationErrorFromJSON,
25
29
  HTTPValidationErrorToJSON,
26
30
  PaginatedResponsePathPartResponseFromJSON,
@@ -29,8 +33,22 @@ import {
29
33
  PathOrderToJSON,
30
34
  PathPartResponseFromJSON,
31
35
  PathPartResponseToJSON,
36
+ PathPartTagsResponseFromJSON,
37
+ PathPartTagsResponseToJSON,
32
38
  } from '../models/index';
33
39
 
40
+ export interface BulkAddPathPartTagsRequest {
41
+ pathPartId: string;
42
+ bulkTagRequest: BulkTagRequest;
43
+ ksUat?: string | null;
44
+ }
45
+
46
+ export interface BulkRemovePathPartTagsRequest {
47
+ pathPartId: string;
48
+ bulkTagRequest: BulkTagRequest;
49
+ ksUat?: string | null;
50
+ }
51
+
34
52
  export interface GetPathPartRequest {
35
53
  pathPartId: string;
36
54
  ksUat?: string | null;
@@ -53,7 +71,43 @@ export interface ListPathPartsRequest {
53
71
  */
54
72
  export interface PathPartsApiInterface {
55
73
  /**
56
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
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} [ksUat]
79
+ * @param {*} [options] Override http request option.
80
+ * @throws {RequiredError}
81
+ * @memberof PathPartsApiInterface
82
+ */
83
+ bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
84
+
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
+
91
+ /**
92
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
93
+ * @summary Bulk Remove Path Part Tags Handler
94
+ * @param {string} pathPartId
95
+ * @param {BulkTagRequest} bulkTagRequest
96
+ * @param {string} [ksUat]
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ * @memberof PathPartsApiInterface
100
+ */
101
+ bulkRemovePathPartTagsRaw(requestParameters: BulkRemovePathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>>;
102
+
103
+ /**
104
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
105
+ * Bulk Remove Path Part Tags Handler
106
+ */
107
+ bulkRemovePathPartTags(requestParameters: BulkRemovePathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
108
+
109
+ /**
110
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
57
111
  * @summary Get Path Part Handler
58
112
  * @param {string} pathPartId
59
113
  * @param {string} [ksUat]
@@ -64,7 +118,7 @@ export interface PathPartsApiInterface {
64
118
  getPathPartRaw(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartResponse>>;
65
119
 
66
120
  /**
67
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
121
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
68
122
  * Get Path Part Handler
69
123
  */
70
124
  getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse>;
@@ -98,7 +152,105 @@ export interface PathPartsApiInterface {
98
152
  export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
99
153
 
100
154
  /**
101
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
155
+ * 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.
156
+ * Bulk Add Path Part Tags Handler
157
+ */
158
+ async bulkAddPathPartTagsRaw(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>> {
159
+ if (requestParameters['pathPartId'] == null) {
160
+ throw new runtime.RequiredError(
161
+ 'pathPartId',
162
+ 'Required parameter "pathPartId" was null or undefined when calling bulkAddPathPartTags().'
163
+ );
164
+ }
165
+
166
+ if (requestParameters['bulkTagRequest'] == null) {
167
+ throw new runtime.RequiredError(
168
+ 'bulkTagRequest',
169
+ 'Required parameter "bulkTagRequest" was null or undefined when calling bulkAddPathPartTags().'
170
+ );
171
+ }
172
+
173
+ const queryParameters: any = {};
174
+
175
+ const headerParameters: runtime.HTTPHeaders = {};
176
+
177
+ headerParameters['Content-Type'] = 'application/json';
178
+
179
+
180
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
181
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
182
+
183
+ const response = await this.request({
184
+ path: urlPath,
185
+ method: 'POST',
186
+ headers: headerParameters,
187
+ query: queryParameters,
188
+ body: BulkTagRequestToJSON(requestParameters['bulkTagRequest']),
189
+ }, initOverrides);
190
+
191
+ return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
192
+ }
193
+
194
+ /**
195
+ * 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.
196
+ * Bulk Add Path Part Tags Handler
197
+ */
198
+ async bulkAddPathPartTags(requestParameters: BulkAddPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse> {
199
+ const response = await this.bulkAddPathPartTagsRaw(requestParameters, initOverrides);
200
+ return await response.value();
201
+ }
202
+
203
+ /**
204
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
205
+ * Bulk Remove Path Part Tags Handler
206
+ */
207
+ async bulkRemovePathPartTagsRaw(requestParameters: BulkRemovePathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartTagsResponse>> {
208
+ if (requestParameters['pathPartId'] == null) {
209
+ throw new runtime.RequiredError(
210
+ 'pathPartId',
211
+ 'Required parameter "pathPartId" was null or undefined when calling bulkRemovePathPartTags().'
212
+ );
213
+ }
214
+
215
+ if (requestParameters['bulkTagRequest'] == null) {
216
+ throw new runtime.RequiredError(
217
+ 'bulkTagRequest',
218
+ 'Required parameter "bulkTagRequest" was null or undefined when calling bulkRemovePathPartTags().'
219
+ );
220
+ }
221
+
222
+ const queryParameters: any = {};
223
+
224
+ const headerParameters: runtime.HTTPHeaders = {};
225
+
226
+ headerParameters['Content-Type'] = 'application/json';
227
+
228
+
229
+ let urlPath = `/v1/path-parts/{path_part_id}/tags`;
230
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
231
+
232
+ const response = await this.request({
233
+ path: urlPath,
234
+ method: 'DELETE',
235
+ headers: headerParameters,
236
+ query: queryParameters,
237
+ body: BulkTagRequestToJSON(requestParameters['bulkTagRequest']),
238
+ }, initOverrides);
239
+
240
+ return new runtime.JSONApiResponse(response, (jsonValue) => PathPartTagsResponseFromJSON(jsonValue));
241
+ }
242
+
243
+ /**
244
+ * Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
245
+ * Bulk Remove Path Part Tags Handler
246
+ */
247
+ async bulkRemovePathPartTags(requestParameters: BulkRemovePathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse> {
248
+ const response = await this.bulkRemovePathPartTagsRaw(requestParameters, initOverrides);
249
+ return await response.value();
250
+ }
251
+
252
+ /**
253
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
102
254
  * Get Path Part Handler
103
255
  */
104
256
  async getPathPartRaw(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PathPartResponse>> {
@@ -128,7 +280,7 @@ export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterfa
128
280
  }
129
281
 
130
282
  /**
131
- * Get a path part by its ID. Returns the path part if it exists and belongs to the user\'s tenant.
283
+ * Get a path part by its ID. Returns the path part with its attached tag IDs.
132
284
  * Get Path Part Handler
133
285
  */
134
286
  async getPathPart(requestParameters: GetPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartResponse> {
@@ -18,7 +18,6 @@ import type {
18
18
  CreateTagRequest,
19
19
  HTTPValidationError,
20
20
  PaginatedResponseTagResponse,
21
- TagPathPartRequest,
22
21
  TagResponse,
23
22
  UpdateTagRequest,
24
23
  } from '../models/index';
@@ -29,20 +28,12 @@ import {
29
28
  HTTPValidationErrorToJSON,
30
29
  PaginatedResponseTagResponseFromJSON,
31
30
  PaginatedResponseTagResponseToJSON,
32
- TagPathPartRequestFromJSON,
33
- TagPathPartRequestToJSON,
34
31
  TagResponseFromJSON,
35
32
  TagResponseToJSON,
36
33
  UpdateTagRequestFromJSON,
37
34
  UpdateTagRequestToJSON,
38
35
  } from '../models/index';
39
36
 
40
- export interface AttachTagToPathPartRequest {
41
- tagId: string;
42
- tagPathPartRequest: TagPathPartRequest;
43
- ksUat?: string | null;
44
- }
45
-
46
37
  export interface CreateTagOperationRequest {
47
38
  createTagRequest: CreateTagRequest;
48
39
  ksUat?: string | null;
@@ -53,12 +44,6 @@ export interface DeleteTagRequest {
53
44
  ksUat?: string | null;
54
45
  }
55
46
 
56
- export interface DetachTagFromPathPartRequest {
57
- tagId: string;
58
- pathPartId: string;
59
- ksUat?: string | null;
60
- }
61
-
62
47
  export interface GetTagRequest {
63
48
  tagId: string;
64
49
  ksUat?: string | null;
@@ -83,24 +68,6 @@ export interface UpdateTagOperationRequest {
83
68
  * @interface TagsApiInterface
84
69
  */
85
70
  export interface TagsApiInterface {
86
- /**
87
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
88
- * @summary Attach Tag Handler
89
- * @param {string} tagId
90
- * @param {TagPathPartRequest} tagPathPartRequest
91
- * @param {string} [ksUat]
92
- * @param {*} [options] Override http request option.
93
- * @throws {RequiredError}
94
- * @memberof TagsApiInterface
95
- */
96
- attachTagToPathPartRaw(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
97
-
98
- /**
99
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
100
- * Attach Tag Handler
101
- */
102
- attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
103
-
104
71
  /**
105
72
  * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
106
73
  * @summary Create Tag Handler
@@ -135,24 +102,6 @@ export interface TagsApiInterface {
135
102
  */
136
103
  deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
137
104
 
138
- /**
139
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
140
- * @summary Detach Tag Handler
141
- * @param {string} tagId
142
- * @param {string} pathPartId
143
- * @param {string} [ksUat]
144
- * @param {*} [options] Override http request option.
145
- * @throws {RequiredError}
146
- * @memberof TagsApiInterface
147
- */
148
- detachTagFromPathPartRaw(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
149
-
150
- /**
151
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
152
- * Detach Tag Handler
153
- */
154
- detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
155
-
156
105
  /**
157
106
  * Get a tag by its ID.
158
107
  * @summary Get Tag Handler
@@ -213,55 +162,6 @@ export interface TagsApiInterface {
213
162
  */
214
163
  export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
215
164
 
216
- /**
217
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
218
- * Attach Tag Handler
219
- */
220
- async attachTagToPathPartRaw(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>> {
221
- if (requestParameters['tagId'] == null) {
222
- throw new runtime.RequiredError(
223
- 'tagId',
224
- 'Required parameter "tagId" was null or undefined when calling attachTagToPathPart().'
225
- );
226
- }
227
-
228
- if (requestParameters['tagPathPartRequest'] == null) {
229
- throw new runtime.RequiredError(
230
- 'tagPathPartRequest',
231
- 'Required parameter "tagPathPartRequest" was null or undefined when calling attachTagToPathPart().'
232
- );
233
- }
234
-
235
- const queryParameters: any = {};
236
-
237
- const headerParameters: runtime.HTTPHeaders = {};
238
-
239
- headerParameters['Content-Type'] = 'application/json';
240
-
241
-
242
- let urlPath = `/v1/tags/{tag_id}/path-parts`;
243
- urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
244
-
245
- const response = await this.request({
246
- path: urlPath,
247
- method: 'POST',
248
- headers: headerParameters,
249
- query: queryParameters,
250
- body: TagPathPartRequestToJSON(requestParameters['tagPathPartRequest']),
251
- }, initOverrides);
252
-
253
- return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseFromJSON(jsonValue));
254
- }
255
-
256
- /**
257
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
258
- * Attach Tag Handler
259
- */
260
- async attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse> {
261
- const response = await this.attachTagToPathPartRaw(requestParameters, initOverrides);
262
- return await response.value();
263
- }
264
-
265
165
  /**
266
166
  * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
267
167
  * Create Tag Handler
@@ -341,52 +241,6 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
341
241
  await this.deleteTagRaw(requestParameters, initOverrides);
342
242
  }
343
243
 
344
- /**
345
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
346
- * Detach Tag Handler
347
- */
348
- async detachTagFromPathPartRaw(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
349
- if (requestParameters['tagId'] == null) {
350
- throw new runtime.RequiredError(
351
- 'tagId',
352
- 'Required parameter "tagId" was null or undefined when calling detachTagFromPathPart().'
353
- );
354
- }
355
-
356
- if (requestParameters['pathPartId'] == null) {
357
- throw new runtime.RequiredError(
358
- 'pathPartId',
359
- 'Required parameter "pathPartId" was null or undefined when calling detachTagFromPathPart().'
360
- );
361
- }
362
-
363
- const queryParameters: any = {};
364
-
365
- const headerParameters: runtime.HTTPHeaders = {};
366
-
367
-
368
- let urlPath = `/v1/tags/{tag_id}/path-parts/{path_part_id}`;
369
- urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
370
- urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
371
-
372
- const response = await this.request({
373
- path: urlPath,
374
- method: 'DELETE',
375
- headers: headerParameters,
376
- query: queryParameters,
377
- }, initOverrides);
378
-
379
- return new runtime.VoidApiResponse(response);
380
- }
381
-
382
- /**
383
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
384
- * Detach Tag Handler
385
- */
386
- async detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
387
- await this.detachTagFromPathPartRaw(requestParameters, initOverrides);
388
- }
389
-
390
244
  /**
391
245
  * Get a tag by its ID.
392
246
  * Get Tag Handler
@@ -0,0 +1,87 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Request to bulk add or remove tags from a path part.
18
+ * @export
19
+ * @interface BulkTagRequest
20
+ */
21
+ export interface BulkTagRequest {
22
+ /**
23
+ * List of tag IDs to add/remove
24
+ * @type {Array<string>}
25
+ * @memberof BulkTagRequest
26
+ */
27
+ tagIds: Array<string>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the BulkTagRequest interface.
32
+ */
33
+ export function instanceOfBulkTagRequest(value: object): value is BulkTagRequest {
34
+ if (!('tagIds' in value) || value['tagIds'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function BulkTagRequestFromJSON(json: any): BulkTagRequest {
39
+ return BulkTagRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function BulkTagRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkTagRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'tagIds': json['tag_ids'],
49
+ };
50
+ }
51
+
52
+ export function BulkTagRequestToJSON(json: any): BulkTagRequest {
53
+ return BulkTagRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function BulkTagRequestToJSONTyped(value?: BulkTagRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'tag_ids': value['tagIds'],
64
+ };
65
+ }
66
+
67
+ export const BulkTagRequestPropertyValidationAttributesMap: {
68
+ [property: string]: {
69
+ maxLength?: number,
70
+ minLength?: number,
71
+ pattern?: string,
72
+ maximum?: number,
73
+ exclusiveMaximum?: boolean,
74
+ minimum?: number,
75
+ exclusiveMinimum?: boolean,
76
+ multipleOf?: number,
77
+ maxItems?: number,
78
+ minItems?: number,
79
+ uniqueItems?: boolean
80
+ }
81
+ } = {
82
+ tagIds: {
83
+ maxItems: 10,
84
+ uniqueItems: false,
85
+ },
86
+ }
87
+
@@ -27,6 +27,13 @@ import {
27
27
  PartTypeToJSON,
28
28
  PartTypeToJSONTyped,
29
29
  } from './PartType';
30
+ import type { TagResponse } from './TagResponse';
31
+ import {
32
+ TagResponseFromJSON,
33
+ TagResponseFromJSONTyped,
34
+ TagResponseToJSON,
35
+ TagResponseToJSONTyped,
36
+ } from './TagResponse';
30
37
  import type { DocumentType } from './DocumentType';
31
38
  import {
32
39
  DocumentTypeFromJSON,
@@ -99,6 +106,12 @@ export interface FolderDocumentResponse {
99
106
  * @memberof FolderDocumentResponse
100
107
  */
101
108
  systemManaged: boolean;
109
+ /**
110
+ * Tags attached to this path part
111
+ * @type {Array<TagResponse>}
112
+ * @memberof FolderDocumentResponse
113
+ */
114
+ tags?: Array<TagResponse> | null;
102
115
  /**
103
116
  * Creation timestamp
104
117
  * @type {Date}
@@ -191,6 +204,7 @@ export function FolderDocumentResponseFromJSONTyped(json: any, ignoreDiscriminat
191
204
  'metadataObjId': json['metadata_obj_id'],
192
205
  'materializedPath': json['materialized_path'],
193
206
  'systemManaged': json['system_managed'],
207
+ 'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
194
208
  'createdAt': (new Date(json['created_at'])),
195
209
  'updatedAt': (new Date(json['updated_at'])),
196
210
  'folderId': json['folder_id'] == null ? undefined : json['folder_id'],
@@ -221,6 +235,7 @@ export function FolderDocumentResponseToJSONTyped(value?: FolderDocumentResponse
221
235
  'metadata_obj_id': value['metadataObjId'],
222
236
  'materialized_path': value['materializedPath'],
223
237
  'system_managed': value['systemManaged'],
238
+ 'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagResponseToJSON)),
224
239
  'created_at': value['createdAt'].toISOString(),
225
240
  'updated_at': value['updatedAt'].toISOString(),
226
241
  'folder_id': value['folderId'],
@@ -20,6 +20,13 @@ import {
20
20
  PartTypeToJSON,
21
21
  PartTypeToJSONTyped,
22
22
  } from './PartType';
23
+ import type { TagResponse } from './TagResponse';
24
+ import {
25
+ TagResponseFromJSON,
26
+ TagResponseFromJSONTyped,
27
+ TagResponseToJSON,
28
+ TagResponseToJSONTyped,
29
+ } from './TagResponse';
23
30
 
24
31
  /**
25
32
  * Generic path part response model.
@@ -69,6 +76,12 @@ export interface PathPartResponse {
69
76
  * @memberof PathPartResponse
70
77
  */
71
78
  systemManaged: boolean;
79
+ /**
80
+ * Tags attached to this path part
81
+ * @type {Array<TagResponse>}
82
+ * @memberof PathPartResponse
83
+ */
84
+ tags?: Array<TagResponse> | null;
72
85
  /**
73
86
  * Creation timestamp
74
87
  * @type {Date}
@@ -118,6 +131,7 @@ export function PathPartResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
118
131
  'metadataObjId': json['metadata_obj_id'],
119
132
  'materializedPath': json['materialized_path'],
120
133
  'systemManaged': json['system_managed'],
134
+ 'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
121
135
  'createdAt': (new Date(json['created_at'])),
122
136
  'updatedAt': (new Date(json['updated_at'])),
123
137
  };
@@ -141,6 +155,7 @@ export function PathPartResponseToJSONTyped(value?: PathPartResponse | null, ign
141
155
  'metadata_obj_id': value['metadataObjId'],
142
156
  'materialized_path': value['materializedPath'],
143
157
  'system_managed': value['systemManaged'],
158
+ 'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagResponseToJSON)),
144
159
  'created_at': value['createdAt'].toISOString(),
145
160
  'updated_at': value['updatedAt'].toISOString(),
146
161
  };
@@ -0,0 +1,91 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { TagResponse } from './TagResponse';
17
+ import {
18
+ TagResponseFromJSON,
19
+ TagResponseFromJSONTyped,
20
+ TagResponseToJSON,
21
+ TagResponseToJSONTyped,
22
+ } from './TagResponse';
23
+
24
+ /**
25
+ * Response containing the current tags for a path part.
26
+ * @export
27
+ * @interface PathPartTagsResponse
28
+ */
29
+ export interface PathPartTagsResponse {
30
+ /**
31
+ * Tags attached to the path part
32
+ * @type {Array<TagResponse>}
33
+ * @memberof PathPartTagsResponse
34
+ */
35
+ tags: Array<TagResponse>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the PathPartTagsResponse interface.
40
+ */
41
+ export function instanceOfPathPartTagsResponse(value: object): value is PathPartTagsResponse {
42
+ if (!('tags' in value) || value['tags'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function PathPartTagsResponseFromJSON(json: any): PathPartTagsResponse {
47
+ return PathPartTagsResponseFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function PathPartTagsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartTagsResponse {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'tags': ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function PathPartTagsResponseToJSON(json: any): PathPartTagsResponse {
61
+ return PathPartTagsResponseToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PathPartTagsResponseToJSONTyped(value?: PathPartTagsResponse | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'tags': ((value['tags'] as Array<any>).map(TagResponseToJSON)),
72
+ };
73
+ }
74
+
75
+ export const PathPartTagsResponsePropertyValidationAttributesMap: {
76
+ [property: string]: {
77
+ maxLength?: number,
78
+ minLength?: number,
79
+ pattern?: string,
80
+ maximum?: number,
81
+ exclusiveMaximum?: boolean,
82
+ minimum?: number,
83
+ exclusiveMinimum?: boolean,
84
+ multipleOf?: number,
85
+ maxItems?: number,
86
+ minItems?: number,
87
+ uniqueItems?: boolean
88
+ }
89
+ } = {
90
+ }
91
+