@knowledge-stack/ksapi 1.11.1 → 1.12.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 (43) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/dist/apis/TagsApi.d.ts +237 -0
  4. package/dist/apis/TagsApi.js +272 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/TagsApi.d.ts +237 -0
  8. package/dist/esm/apis/TagsApi.js +268 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +1 -0
  11. package/dist/esm/models/CreateTagRequest.d.ts +59 -0
  12. package/dist/esm/models/CreateTagRequest.js +61 -0
  13. package/dist/esm/models/PaginatedResponseTagResponse.d.ts +66 -0
  14. package/dist/esm/models/PaginatedResponseTagResponse.js +70 -0
  15. package/dist/esm/models/TagPathPartRequest.d.ts +47 -0
  16. package/dist/esm/models/TagPathPartRequest.js +44 -0
  17. package/dist/esm/models/TagResponse.d.ts +83 -0
  18. package/dist/esm/models/TagResponse.js +66 -0
  19. package/dist/esm/models/UpdateTagRequest.d.ts +59 -0
  20. package/dist/esm/models/UpdateTagRequest.js +59 -0
  21. package/dist/esm/models/index.d.ts +5 -0
  22. package/dist/esm/models/index.js +5 -0
  23. package/dist/models/CreateTagRequest.d.ts +59 -0
  24. package/dist/models/CreateTagRequest.js +69 -0
  25. package/dist/models/PaginatedResponseTagResponse.d.ts +66 -0
  26. package/dist/models/PaginatedResponseTagResponse.js +78 -0
  27. package/dist/models/TagPathPartRequest.d.ts +47 -0
  28. package/dist/models/TagPathPartRequest.js +52 -0
  29. package/dist/models/TagResponse.d.ts +83 -0
  30. package/dist/models/TagResponse.js +74 -0
  31. package/dist/models/UpdateTagRequest.d.ts +59 -0
  32. package/dist/models/UpdateTagRequest.js +67 -0
  33. package/dist/models/index.d.ts +5 -0
  34. package/dist/models/index.js +5 -0
  35. package/package.json +1 -1
  36. package/src/apis/TagsApi.ts +517 -0
  37. package/src/apis/index.ts +1 -0
  38. package/src/models/CreateTagRequest.ts +111 -0
  39. package/src/models/PaginatedResponseTagResponse.ts +130 -0
  40. package/src/models/TagPathPartRequest.ts +83 -0
  41. package/src/models/TagResponse.ts +136 -0
  42. package/src/models/UpdateTagRequest.ts +110 -0
  43. package/src/models/index.ts +5 -0
@@ -0,0 +1,237 @@
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 * 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;
18
+ }
19
+ export interface CreateTagOperationRequest {
20
+ createTagRequest: CreateTagRequest;
21
+ ksUat?: string;
22
+ }
23
+ export interface DeleteTagRequest {
24
+ tagId: string;
25
+ ksUat?: string;
26
+ }
27
+ export interface DetachTagFromPathPartRequest {
28
+ tagId: string;
29
+ pathPartId: string;
30
+ ksUat?: string;
31
+ }
32
+ export interface GetTagRequest {
33
+ tagId: string;
34
+ ksUat?: string;
35
+ }
36
+ export interface ListTagsRequest {
37
+ limit?: number;
38
+ offset?: number;
39
+ ksUat?: string;
40
+ }
41
+ export interface UpdateTagOperationRequest {
42
+ tagId: string;
43
+ updateTagRequest: UpdateTagRequest;
44
+ ksUat?: string;
45
+ }
46
+ /**
47
+ * TagsApi - interface
48
+ *
49
+ * @export
50
+ * @interface TagsApiInterface
51
+ */
52
+ export interface TagsApiInterface {
53
+ /**
54
+ * Attach a tag to a path part.
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.
66
+ * Attach Tag Handler
67
+ */
68
+ attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
69
+ /**
70
+ * Create a new tag for the current tenant.
71
+ * @summary Create Tag Handler
72
+ * @param {CreateTagRequest} createTagRequest
73
+ * @param {string} [ksUat]
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ * @memberof TagsApiInterface
77
+ */
78
+ createTagRaw(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
79
+ /**
80
+ * Create a new tag for the current tenant.
81
+ * Create Tag Handler
82
+ */
83
+ createTag(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
84
+ /**
85
+ * Delete a tag and all its path_part associations.
86
+ * @summary Delete Tag Handler
87
+ * @param {string} tagId
88
+ * @param {string} [ksUat]
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ * @memberof TagsApiInterface
92
+ */
93
+ deleteTagRaw(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
94
+ /**
95
+ * Delete a tag and all its path_part associations.
96
+ * Delete Tag Handler
97
+ */
98
+ deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
99
+ /**
100
+ * Detach a tag from a path part.
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.
112
+ * Detach Tag Handler
113
+ */
114
+ detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
115
+ /**
116
+ * Get a tag by its ID.
117
+ * @summary Get Tag Handler
118
+ * @param {string} tagId
119
+ * @param {string} [ksUat]
120
+ * @param {*} [options] Override http request option.
121
+ * @throws {RequiredError}
122
+ * @memberof TagsApiInterface
123
+ */
124
+ getTagRaw(requestParameters: GetTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
125
+ /**
126
+ * Get a tag by its ID.
127
+ * Get Tag Handler
128
+ */
129
+ getTag(requestParameters: GetTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
130
+ /**
131
+ * List all tags for the current tenant.
132
+ * @summary List Tags Handler
133
+ * @param {number} [limit] Number of items per page
134
+ * @param {number} [offset] Number of items to skip
135
+ * @param {string} [ksUat]
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ * @memberof TagsApiInterface
139
+ */
140
+ listTagsRaw(requestParameters: ListTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseTagResponse>>;
141
+ /**
142
+ * List all tags for the current tenant.
143
+ * List Tags Handler
144
+ */
145
+ listTags(requestParameters: ListTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseTagResponse>;
146
+ /**
147
+ * Update a tag (name, color, and/or description).
148
+ * @summary Update Tag Handler
149
+ * @param {string} tagId
150
+ * @param {UpdateTagRequest} updateTagRequest
151
+ * @param {string} [ksUat]
152
+ * @param {*} [options] Override http request option.
153
+ * @throws {RequiredError}
154
+ * @memberof TagsApiInterface
155
+ */
156
+ updateTagRaw(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
157
+ /**
158
+ * Update a tag (name, color, and/or description).
159
+ * Update Tag Handler
160
+ */
161
+ updateTag(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
162
+ }
163
+ /**
164
+ *
165
+ */
166
+ export declare class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
167
+ /**
168
+ * Attach a tag to a path part.
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.
174
+ * Attach Tag Handler
175
+ */
176
+ attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
177
+ /**
178
+ * Create a new tag for the current tenant.
179
+ * Create Tag Handler
180
+ */
181
+ createTagRaw(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
182
+ /**
183
+ * Create a new tag for the current tenant.
184
+ * Create Tag Handler
185
+ */
186
+ createTag(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
187
+ /**
188
+ * Delete a tag and all its path_part associations.
189
+ * Delete Tag Handler
190
+ */
191
+ deleteTagRaw(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
192
+ /**
193
+ * Delete a tag and all its path_part associations.
194
+ * Delete Tag Handler
195
+ */
196
+ deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
197
+ /**
198
+ * Detach a tag from a path part.
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.
204
+ * Detach Tag Handler
205
+ */
206
+ detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
207
+ /**
208
+ * Get a tag by its ID.
209
+ * Get Tag Handler
210
+ */
211
+ getTagRaw(requestParameters: GetTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
212
+ /**
213
+ * Get a tag by its ID.
214
+ * Get Tag Handler
215
+ */
216
+ getTag(requestParameters: GetTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
217
+ /**
218
+ * List all tags for the current tenant.
219
+ * List Tags Handler
220
+ */
221
+ listTagsRaw(requestParameters: ListTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseTagResponse>>;
222
+ /**
223
+ * List all tags for the current tenant.
224
+ * List Tags Handler
225
+ */
226
+ listTags(requestParameters?: ListTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseTagResponse>;
227
+ /**
228
+ * Update a tag (name, color, and/or description).
229
+ * Update Tag Handler
230
+ */
231
+ updateTagRaw(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
232
+ /**
233
+ * Update a tag (name, color, and/or description).
234
+ * Update Tag Handler
235
+ */
236
+ updateTag(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
237
+ }
@@ -0,0 +1,268 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { CreateTagRequestToJSON, PaginatedResponseTagResponseFromJSON, TagPathPartRequestToJSON, TagResponseFromJSON, UpdateTagRequestToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class TagsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Attach a tag to a path part.
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.
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
+ /**
67
+ * Create a new tag for the current tenant.
68
+ * Create Tag Handler
69
+ */
70
+ createTagRaw(requestParameters, initOverrides) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (requestParameters['createTagRequest'] == null) {
73
+ throw new runtime.RequiredError('createTagRequest', 'Required parameter "createTagRequest" was null or undefined when calling createTag().');
74
+ }
75
+ const queryParameters = {};
76
+ const headerParameters = {};
77
+ headerParameters['Content-Type'] = 'application/json';
78
+ let urlPath = `/v1/tags`;
79
+ const response = yield this.request({
80
+ path: urlPath,
81
+ method: 'POST',
82
+ headers: headerParameters,
83
+ query: queryParameters,
84
+ body: CreateTagRequestToJSON(requestParameters['createTagRequest']),
85
+ }, initOverrides);
86
+ return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseFromJSON(jsonValue));
87
+ });
88
+ }
89
+ /**
90
+ * Create a new tag for the current tenant.
91
+ * Create Tag Handler
92
+ */
93
+ createTag(requestParameters, initOverrides) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const response = yield this.createTagRaw(requestParameters, initOverrides);
96
+ return yield response.value();
97
+ });
98
+ }
99
+ /**
100
+ * Delete a tag and all its path_part associations.
101
+ * Delete Tag Handler
102
+ */
103
+ deleteTagRaw(requestParameters, initOverrides) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ if (requestParameters['tagId'] == null) {
106
+ throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling deleteTag().');
107
+ }
108
+ const queryParameters = {};
109
+ const headerParameters = {};
110
+ let urlPath = `/v1/tags/{tag_id}`;
111
+ urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
112
+ const response = yield this.request({
113
+ path: urlPath,
114
+ method: 'DELETE',
115
+ headers: headerParameters,
116
+ query: queryParameters,
117
+ }, initOverrides);
118
+ return new runtime.VoidApiResponse(response);
119
+ });
120
+ }
121
+ /**
122
+ * Delete a tag and all its path_part associations.
123
+ * Delete Tag Handler
124
+ */
125
+ deleteTag(requestParameters, initOverrides) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ yield this.deleteTagRaw(requestParameters, initOverrides);
128
+ });
129
+ }
130
+ /**
131
+ * Detach a tag from a path part.
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.
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
+ /**
166
+ * Get a tag by its ID.
167
+ * Get Tag Handler
168
+ */
169
+ getTagRaw(requestParameters, initOverrides) {
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ if (requestParameters['tagId'] == null) {
172
+ throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling getTag().');
173
+ }
174
+ const queryParameters = {};
175
+ const headerParameters = {};
176
+ let urlPath = `/v1/tags/{tag_id}`;
177
+ urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
178
+ const response = yield this.request({
179
+ path: urlPath,
180
+ method: 'GET',
181
+ headers: headerParameters,
182
+ query: queryParameters,
183
+ }, initOverrides);
184
+ return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseFromJSON(jsonValue));
185
+ });
186
+ }
187
+ /**
188
+ * Get a tag by its ID.
189
+ * Get Tag Handler
190
+ */
191
+ getTag(requestParameters, initOverrides) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const response = yield this.getTagRaw(requestParameters, initOverrides);
194
+ return yield response.value();
195
+ });
196
+ }
197
+ /**
198
+ * List all tags for the current tenant.
199
+ * List Tags Handler
200
+ */
201
+ listTagsRaw(requestParameters, initOverrides) {
202
+ return __awaiter(this, void 0, void 0, function* () {
203
+ const queryParameters = {};
204
+ if (requestParameters['limit'] != null) {
205
+ queryParameters['limit'] = requestParameters['limit'];
206
+ }
207
+ if (requestParameters['offset'] != null) {
208
+ queryParameters['offset'] = requestParameters['offset'];
209
+ }
210
+ const headerParameters = {};
211
+ let urlPath = `/v1/tags`;
212
+ const response = yield this.request({
213
+ path: urlPath,
214
+ method: 'GET',
215
+ headers: headerParameters,
216
+ query: queryParameters,
217
+ }, initOverrides);
218
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseTagResponseFromJSON(jsonValue));
219
+ });
220
+ }
221
+ /**
222
+ * List all tags for the current tenant.
223
+ * List Tags Handler
224
+ */
225
+ listTags() {
226
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
227
+ const response = yield this.listTagsRaw(requestParameters, initOverrides);
228
+ return yield response.value();
229
+ });
230
+ }
231
+ /**
232
+ * Update a tag (name, color, and/or description).
233
+ * Update Tag Handler
234
+ */
235
+ updateTagRaw(requestParameters, initOverrides) {
236
+ return __awaiter(this, void 0, void 0, function* () {
237
+ if (requestParameters['tagId'] == null) {
238
+ throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling updateTag().');
239
+ }
240
+ if (requestParameters['updateTagRequest'] == null) {
241
+ throw new runtime.RequiredError('updateTagRequest', 'Required parameter "updateTagRequest" was null or undefined when calling updateTag().');
242
+ }
243
+ const queryParameters = {};
244
+ const headerParameters = {};
245
+ headerParameters['Content-Type'] = 'application/json';
246
+ let urlPath = `/v1/tags/{tag_id}`;
247
+ urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
248
+ const response = yield this.request({
249
+ path: urlPath,
250
+ method: 'PATCH',
251
+ headers: headerParameters,
252
+ query: queryParameters,
253
+ body: UpdateTagRequestToJSON(requestParameters['updateTagRequest']),
254
+ }, initOverrides);
255
+ return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseFromJSON(jsonValue));
256
+ });
257
+ }
258
+ /**
259
+ * Update a tag (name, color, and/or description).
260
+ * Update Tag Handler
261
+ */
262
+ updateTag(requestParameters, initOverrides) {
263
+ return __awaiter(this, void 0, void 0, function* () {
264
+ const response = yield this.updateTagRaw(requestParameters, initOverrides);
265
+ return yield response.value();
266
+ });
267
+ }
268
+ }
@@ -8,6 +8,7 @@ export * from './FoldersApi';
8
8
  export * from './InvitesApi';
9
9
  export * from './PathPartsApi';
10
10
  export * from './SectionsApi';
11
+ export * from './TagsApi';
11
12
  export * from './TenantsApi';
12
13
  export * from './ThreadMessagesApi';
13
14
  export * from './ThreadsApi';
@@ -10,6 +10,7 @@ export * from './FoldersApi';
10
10
  export * from './InvitesApi';
11
11
  export * from './PathPartsApi';
12
12
  export * from './SectionsApi';
13
+ export * from './TagsApi';
13
14
  export * from './TenantsApi';
14
15
  export * from './ThreadMessagesApi';
15
16
  export * from './ThreadsApi';
@@ -0,0 +1,59 @@
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 create a new tag.
14
+ * @export
15
+ * @interface CreateTagRequest
16
+ */
17
+ export interface CreateTagRequest {
18
+ /**
19
+ * Tag name
20
+ * @type {string}
21
+ * @memberof CreateTagRequest
22
+ */
23
+ name: string;
24
+ /**
25
+ * Tag color as 6-character hex string (e.g. 'FF5733')
26
+ * @type {string}
27
+ * @memberof CreateTagRequest
28
+ */
29
+ color?: string;
30
+ /**
31
+ * Optional tag description
32
+ * @type {string}
33
+ * @memberof CreateTagRequest
34
+ */
35
+ description?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the CreateTagRequest interface.
39
+ */
40
+ export declare function instanceOfCreateTagRequest(value: object): value is CreateTagRequest;
41
+ export declare function CreateTagRequestFromJSON(json: any): CreateTagRequest;
42
+ export declare function CreateTagRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTagRequest;
43
+ export declare function CreateTagRequestToJSON(json: any): CreateTagRequest;
44
+ export declare function CreateTagRequestToJSONTyped(value?: CreateTagRequest | null, ignoreDiscriminator?: boolean): any;
45
+ export declare const CreateTagRequestPropertyValidationAttributesMap: {
46
+ [property: string]: {
47
+ maxLength?: number;
48
+ minLength?: number;
49
+ pattern?: string;
50
+ maximum?: number;
51
+ exclusiveMaximum?: boolean;
52
+ minimum?: number;
53
+ exclusiveMinimum?: boolean;
54
+ multipleOf?: number;
55
+ maxItems?: number;
56
+ minItems?: number;
57
+ uniqueItems?: boolean;
58
+ };
59
+ };
@@ -0,0 +1,61 @@
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 CreateTagRequest interface.
16
+ */
17
+ export function instanceOfCreateTagRequest(value) {
18
+ if (!('name' in value) || value['name'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function CreateTagRequestFromJSON(json) {
23
+ return CreateTagRequestFromJSONTyped(json, false);
24
+ }
25
+ export function CreateTagRequestFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'name': json['name'],
31
+ 'color': json['color'] == null ? undefined : json['color'],
32
+ 'description': json['description'] == null ? undefined : json['description'],
33
+ };
34
+ }
35
+ export function CreateTagRequestToJSON(json) {
36
+ return CreateTagRequestToJSONTyped(json, false);
37
+ }
38
+ export function CreateTagRequestToJSONTyped(value, ignoreDiscriminator = false) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'name': value['name'],
44
+ 'color': value['color'],
45
+ 'description': value['description'],
46
+ };
47
+ }
48
+ export const CreateTagRequestPropertyValidationAttributesMap = {
49
+ name: {
50
+ maxLength: 100,
51
+ minLength: 1,
52
+ },
53
+ color: {
54
+ maxLength: 6,
55
+ minLength: 6,
56
+ pattern: '/^[0-9A-Fa-f]{6}$/',
57
+ },
58
+ description: {
59
+ maxLength: 500,
60
+ },
61
+ };