@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
@@ -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
@@ -21,48 +21,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { CreateTagRequestToJSON, PaginatedResponseTagResponseFromJSON, TagPathPartRequestToJSON, TagResponseFromJSON, UpdateTagRequestToJSON, } from '../models/index';
24
+ import { CreateTagRequestToJSON, PaginatedResponseTagResponseFromJSON, TagResponseFromJSON, UpdateTagRequestToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class TagsApi extends runtime.BaseAPI {
29
- /**
30
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
31
- * Attach Tag Handler
32
- */
33
- attachTagToPathPartRaw(requestParameters, initOverrides) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- if (requestParameters['tagId'] == null) {
36
- throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling attachTagToPathPart().');
37
- }
38
- if (requestParameters['tagPathPartRequest'] == null) {
39
- throw new runtime.RequiredError('tagPathPartRequest', 'Required parameter "tagPathPartRequest" was null or undefined when calling attachTagToPathPart().');
40
- }
41
- const queryParameters = {};
42
- const headerParameters = {};
43
- headerParameters['Content-Type'] = 'application/json';
44
- let urlPath = `/v1/tags/{tag_id}/path-parts`;
45
- urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
46
- const response = yield this.request({
47
- path: urlPath,
48
- method: 'POST',
49
- headers: headerParameters,
50
- query: queryParameters,
51
- body: TagPathPartRequestToJSON(requestParameters['tagPathPartRequest']),
52
- }, initOverrides);
53
- return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseFromJSON(jsonValue));
54
- });
55
- }
56
- /**
57
- * Attach a tag to a path part. Requires ADMIN or OWNER role.
58
- * Attach Tag Handler
59
- */
60
- attachTagToPathPart(requestParameters, initOverrides) {
61
- return __awaiter(this, void 0, void 0, function* () {
62
- const response = yield this.attachTagToPathPartRaw(requestParameters, initOverrides);
63
- return yield response.value();
64
- });
65
- }
66
29
  /**
67
30
  * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
68
31
  * Create Tag Handler
@@ -127,41 +90,6 @@ export class TagsApi extends runtime.BaseAPI {
127
90
  yield this.deleteTagRaw(requestParameters, initOverrides);
128
91
  });
129
92
  }
130
- /**
131
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
132
- * Detach Tag Handler
133
- */
134
- detachTagFromPathPartRaw(requestParameters, initOverrides) {
135
- return __awaiter(this, void 0, void 0, function* () {
136
- if (requestParameters['tagId'] == null) {
137
- throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling detachTagFromPathPart().');
138
- }
139
- if (requestParameters['pathPartId'] == null) {
140
- throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling detachTagFromPathPart().');
141
- }
142
- const queryParameters = {};
143
- const headerParameters = {};
144
- let urlPath = `/v1/tags/{tag_id}/path-parts/{path_part_id}`;
145
- urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
146
- urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
147
- const response = yield this.request({
148
- path: urlPath,
149
- method: 'DELETE',
150
- headers: headerParameters,
151
- query: queryParameters,
152
- }, initOverrides);
153
- return new runtime.VoidApiResponse(response);
154
- });
155
- }
156
- /**
157
- * Detach a tag from a path part. Requires ADMIN or OWNER role.
158
- * Detach Tag Handler
159
- */
160
- detachTagFromPathPart(requestParameters, initOverrides) {
161
- return __awaiter(this, void 0, void 0, function* () {
162
- yield this.detachTagFromPathPartRaw(requestParameters, initOverrides);
163
- });
164
- }
165
93
  /**
166
94
  * Get a tag by its ID.
167
95
  * Get Tag Handler
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Request to bulk add or remove tags from a path part.
14
+ * @export
15
+ * @interface BulkTagRequest
16
+ */
17
+ export interface BulkTagRequest {
18
+ /**
19
+ * List of tag IDs to add/remove
20
+ * @type {Array<string>}
21
+ * @memberof BulkTagRequest
22
+ */
23
+ tagIds: Array<string>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the BulkTagRequest interface.
27
+ */
28
+ export declare function instanceOfBulkTagRequest(value: object): value is BulkTagRequest;
29
+ export declare function BulkTagRequestFromJSON(json: any): BulkTagRequest;
30
+ export declare function BulkTagRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkTagRequest;
31
+ export declare function BulkTagRequestToJSON(json: any): BulkTagRequest;
32
+ export declare function BulkTagRequestToJSONTyped(value?: BulkTagRequest | null, ignoreDiscriminator?: boolean): any;
33
+ export declare const BulkTagRequestPropertyValidationAttributesMap: {
34
+ [property: string]: {
35
+ maxLength?: number;
36
+ minLength?: number;
37
+ pattern?: string;
38
+ maximum?: number;
39
+ exclusiveMaximum?: boolean;
40
+ minimum?: number;
41
+ exclusiveMinimum?: boolean;
42
+ multipleOf?: number;
43
+ maxItems?: number;
44
+ minItems?: number;
45
+ uniqueItems?: boolean;
46
+ };
47
+ };
@@ -0,0 +1,49 @@
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
+ * Check if a given object implements the BulkTagRequest interface.
16
+ */
17
+ export function instanceOfBulkTagRequest(value) {
18
+ if (!('tagIds' in value) || value['tagIds'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function BulkTagRequestFromJSON(json) {
23
+ return BulkTagRequestFromJSONTyped(json, false);
24
+ }
25
+ export function BulkTagRequestFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'tagIds': json['tag_ids'],
31
+ };
32
+ }
33
+ export function BulkTagRequestToJSON(json) {
34
+ return BulkTagRequestToJSONTyped(json, false);
35
+ }
36
+ export function BulkTagRequestToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'tag_ids': value['tagIds'],
42
+ };
43
+ }
44
+ export const BulkTagRequestPropertyValidationAttributesMap = {
45
+ tagIds: {
46
+ maxItems: 10,
47
+ uniqueItems: false,
48
+ },
49
+ };
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { DocumentOrigin } from './DocumentOrigin';
13
13
  import type { PartType } from './PartType';
14
+ import type { TagResponse } from './TagResponse';
14
15
  import type { DocumentType } from './DocumentType';
15
16
  import type { DocumentVersionResponse } from './DocumentVersionResponse';
16
17
  /**
@@ -70,6 +71,12 @@ export interface FolderDocumentResponse {
70
71
  * @memberof FolderDocumentResponse
71
72
  */
72
73
  systemManaged: boolean;
74
+ /**
75
+ * Tags attached to this path part
76
+ * @type {Array<TagResponse>}
77
+ * @memberof FolderDocumentResponse
78
+ */
79
+ tags?: Array<TagResponse> | null;
73
80
  /**
74
81
  * Creation timestamp
75
82
  * @type {Date}
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { DocumentOriginFromJSON, DocumentOriginToJSON, } from './DocumentOrigin';
15
15
  import { PartTypeFromJSON, PartTypeToJSON, } from './PartType';
16
+ import { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
16
17
  import { DocumentTypeFromJSON, DocumentTypeToJSON, } from './DocumentType';
17
18
  import { DocumentVersionResponseFromJSON, DocumentVersionResponseToJSON, } from './DocumentVersionResponse';
18
19
  /**
@@ -56,6 +57,7 @@ export function FolderDocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
56
57
  'metadataObjId': json['metadata_obj_id'],
57
58
  'materializedPath': json['materialized_path'],
58
59
  'systemManaged': json['system_managed'],
60
+ 'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
59
61
  'createdAt': (new Date(json['created_at'])),
60
62
  'updatedAt': (new Date(json['updated_at'])),
61
63
  'folderId': json['folder_id'] == null ? undefined : json['folder_id'],
@@ -82,6 +84,7 @@ export function FolderDocumentResponseToJSONTyped(value, ignoreDiscriminator = f
82
84
  'metadata_obj_id': value['metadataObjId'],
83
85
  'materialized_path': value['materializedPath'],
84
86
  'system_managed': value['systemManaged'],
87
+ 'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
85
88
  'created_at': value['createdAt'].toISOString(),
86
89
  'updated_at': value['updatedAt'].toISOString(),
87
90
  'folder_id': value['folderId'],
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PartType } from './PartType';
13
+ import type { TagResponse } from './TagResponse';
13
14
  /**
14
15
  * Generic path part response model.
15
16
  * @export
@@ -58,6 +59,12 @@ export interface PathPartResponse {
58
59
  * @memberof PathPartResponse
59
60
  */
60
61
  systemManaged: boolean;
62
+ /**
63
+ * Tags attached to this path part
64
+ * @type {Array<TagResponse>}
65
+ * @memberof PathPartResponse
66
+ */
67
+ tags?: Array<TagResponse> | null;
61
68
  /**
62
69
  * Creation timestamp
63
70
  * @type {Date}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { PartTypeFromJSON, PartTypeToJSON, } from './PartType';
15
+ import { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
15
16
  /**
16
17
  * Check if a given object implements the PathPartResponse interface.
17
18
  */
@@ -51,6 +52,7 @@ export function PathPartResponseFromJSONTyped(json, ignoreDiscriminator) {
51
52
  'metadataObjId': json['metadata_obj_id'],
52
53
  'materializedPath': json['materialized_path'],
53
54
  'systemManaged': json['system_managed'],
55
+ 'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
54
56
  'createdAt': (new Date(json['created_at'])),
55
57
  'updatedAt': (new Date(json['updated_at'])),
56
58
  };
@@ -70,6 +72,7 @@ export function PathPartResponseToJSONTyped(value, ignoreDiscriminator = false)
70
72
  'metadata_obj_id': value['metadataObjId'],
71
73
  'materialized_path': value['materializedPath'],
72
74
  'system_managed': value['systemManaged'],
75
+ 'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
73
76
  'created_at': value['createdAt'].toISOString(),
74
77
  'updated_at': value['updatedAt'].toISOString(),
75
78
  };
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { TagResponse } from './TagResponse';
13
+ /**
14
+ * Response containing the current tags for a path part.
15
+ * @export
16
+ * @interface PathPartTagsResponse
17
+ */
18
+ export interface PathPartTagsResponse {
19
+ /**
20
+ * Tags attached to the path part
21
+ * @type {Array<TagResponse>}
22
+ * @memberof PathPartTagsResponse
23
+ */
24
+ tags: Array<TagResponse>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the PathPartTagsResponse interface.
28
+ */
29
+ export declare function instanceOfPathPartTagsResponse(value: object): value is PathPartTagsResponse;
30
+ export declare function PathPartTagsResponseFromJSON(json: any): PathPartTagsResponse;
31
+ export declare function PathPartTagsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartTagsResponse;
32
+ export declare function PathPartTagsResponseToJSON(json: any): PathPartTagsResponse;
33
+ export declare function PathPartTagsResponseToJSONTyped(value?: PathPartTagsResponse | null, ignoreDiscriminator?: boolean): any;
34
+ export declare const PathPartTagsResponsePropertyValidationAttributesMap: {
35
+ [property: string]: {
36
+ maxLength?: number;
37
+ minLength?: number;
38
+ pattern?: string;
39
+ maximum?: number;
40
+ exclusiveMaximum?: boolean;
41
+ minimum?: number;
42
+ exclusiveMinimum?: boolean;
43
+ multipleOf?: number;
44
+ maxItems?: number;
45
+ minItems?: number;
46
+ uniqueItems?: boolean;
47
+ };
48
+ };