@knowledge-stack/ksapi 1.12.0 → 1.13.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 (106) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/dist/apis/ChunksApi.js +1 -1
  4. package/dist/apis/TagsApi.d.ts +20 -20
  5. package/dist/apis/TagsApi.js +10 -10
  6. package/dist/apis/ThreadsApi.d.ts +4 -4
  7. package/dist/apis/ThreadsApi.js +2 -2
  8. package/dist/apis/UserPermissionsApi.d.ts +154 -0
  9. package/dist/apis/UserPermissionsApi.js +192 -0
  10. package/dist/apis/index.d.ts +1 -0
  11. package/dist/apis/index.js +1 -0
  12. package/dist/esm/apis/ChunksApi.js +1 -1
  13. package/dist/esm/apis/TagsApi.d.ts +20 -20
  14. package/dist/esm/apis/TagsApi.js +10 -10
  15. package/dist/esm/apis/ThreadsApi.d.ts +4 -4
  16. package/dist/esm/apis/ThreadsApi.js +2 -2
  17. package/dist/esm/apis/UserPermissionsApi.d.ts +154 -0
  18. package/dist/esm/apis/UserPermissionsApi.js +188 -0
  19. package/dist/esm/apis/index.d.ts +1 -0
  20. package/dist/esm/apis/index.js +1 -0
  21. package/dist/esm/models/ChunkResponse.d.ts +6 -0
  22. package/dist/esm/models/ChunkResponse.js +4 -0
  23. package/dist/esm/models/CreatePermissionRequest.d.ts +66 -0
  24. package/dist/esm/models/CreatePermissionRequest.js +57 -0
  25. package/dist/esm/models/DocumentContentPathPart.d.ts +6 -0
  26. package/dist/esm/models/DocumentContentPathPart.js +4 -0
  27. package/dist/esm/models/DocumentResponse.d.ts +6 -0
  28. package/dist/esm/models/DocumentResponse.js +4 -0
  29. package/dist/esm/models/DocumentVersionResponse.d.ts +6 -0
  30. package/dist/esm/models/DocumentVersionResponse.js +4 -0
  31. package/dist/esm/models/FolderDocumentResponse.d.ts +6 -0
  32. package/dist/esm/models/FolderDocumentResponse.js +4 -0
  33. package/dist/esm/models/FolderResponse.d.ts +6 -0
  34. package/dist/esm/models/FolderResponse.js +4 -0
  35. package/dist/esm/models/PaginatedResponsePermissionResponse.d.ts +66 -0
  36. package/dist/esm/models/PaginatedResponsePermissionResponse.js +70 -0
  37. package/dist/esm/models/PathPartResponse.d.ts +6 -0
  38. package/dist/esm/models/PathPartResponse.js +4 -0
  39. package/dist/esm/models/PermissionCapability.d.ts +25 -0
  40. package/dist/esm/models/PermissionCapability.js +43 -0
  41. package/dist/esm/models/PermissionResponse.d.ts +84 -0
  42. package/dist/esm/models/PermissionResponse.js +69 -0
  43. package/dist/esm/models/SectionResponse.d.ts +6 -0
  44. package/dist/esm/models/SectionResponse.js +4 -0
  45. package/dist/esm/models/ThreadMessageResponse.d.ts +6 -0
  46. package/dist/esm/models/ThreadMessageResponse.js +4 -0
  47. package/dist/esm/models/ThreadResponse.d.ts +6 -0
  48. package/dist/esm/models/ThreadResponse.js +4 -0
  49. package/dist/esm/models/UpdatePermissionRequest.d.ts +54 -0
  50. package/dist/esm/models/UpdatePermissionRequest.js +45 -0
  51. package/dist/esm/models/index.d.ts +5 -0
  52. package/dist/esm/models/index.js +5 -0
  53. package/dist/models/ChunkResponse.d.ts +6 -0
  54. package/dist/models/ChunkResponse.js +4 -0
  55. package/dist/models/CreatePermissionRequest.d.ts +66 -0
  56. package/dist/models/CreatePermissionRequest.js +65 -0
  57. package/dist/models/DocumentContentPathPart.d.ts +6 -0
  58. package/dist/models/DocumentContentPathPart.js +4 -0
  59. package/dist/models/DocumentResponse.d.ts +6 -0
  60. package/dist/models/DocumentResponse.js +4 -0
  61. package/dist/models/DocumentVersionResponse.d.ts +6 -0
  62. package/dist/models/DocumentVersionResponse.js +4 -0
  63. package/dist/models/FolderDocumentResponse.d.ts +6 -0
  64. package/dist/models/FolderDocumentResponse.js +4 -0
  65. package/dist/models/FolderResponse.d.ts +6 -0
  66. package/dist/models/FolderResponse.js +4 -0
  67. package/dist/models/PaginatedResponsePermissionResponse.d.ts +66 -0
  68. package/dist/models/PaginatedResponsePermissionResponse.js +78 -0
  69. package/dist/models/PathPartResponse.d.ts +6 -0
  70. package/dist/models/PathPartResponse.js +4 -0
  71. package/dist/models/PermissionCapability.d.ts +25 -0
  72. package/dist/models/PermissionCapability.js +51 -0
  73. package/dist/models/PermissionResponse.d.ts +84 -0
  74. package/dist/models/PermissionResponse.js +77 -0
  75. package/dist/models/SectionResponse.d.ts +6 -0
  76. package/dist/models/SectionResponse.js +4 -0
  77. package/dist/models/ThreadMessageResponse.d.ts +6 -0
  78. package/dist/models/ThreadMessageResponse.js +4 -0
  79. package/dist/models/ThreadResponse.d.ts +6 -0
  80. package/dist/models/ThreadResponse.js +4 -0
  81. package/dist/models/UpdatePermissionRequest.d.ts +54 -0
  82. package/dist/models/UpdatePermissionRequest.js +53 -0
  83. package/dist/models/index.d.ts +5 -0
  84. package/dist/models/index.js +5 -0
  85. package/package.json +1 -1
  86. package/src/apis/ChunksApi.ts +1 -1
  87. package/src/apis/TagsApi.ts +20 -20
  88. package/src/apis/ThreadsApi.ts +4 -4
  89. package/src/apis/UserPermissionsApi.ts +362 -0
  90. package/src/apis/index.ts +1 -0
  91. package/src/models/ChunkResponse.ts +9 -0
  92. package/src/models/CreatePermissionRequest.ts +120 -0
  93. package/src/models/DocumentContentPathPart.ts +9 -0
  94. package/src/models/DocumentResponse.ts +9 -0
  95. package/src/models/DocumentVersionResponse.ts +9 -0
  96. package/src/models/FolderDocumentResponse.ts +9 -0
  97. package/src/models/FolderResponse.ts +9 -0
  98. package/src/models/PaginatedResponsePermissionResponse.ts +130 -0
  99. package/src/models/PathPartResponse.ts +9 -0
  100. package/src/models/PermissionCapability.ts +53 -0
  101. package/src/models/PermissionResponse.ts +147 -0
  102. package/src/models/SectionResponse.ts +9 -0
  103. package/src/models/ThreadMessageResponse.ts +9 -0
  104. package/src/models/ThreadResponse.ts +9 -0
  105. package/src/models/UpdatePermissionRequest.ts +100 -0
  106. package/src/models/index.ts +5 -0
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.UserPermissionsApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class UserPermissionsApi extends runtime.BaseAPI {
32
+ /**
33
+ * Create a path permission for a user in a tenant (admin/owner only).
34
+ * Create User Permission Handler
35
+ */
36
+ createUserPermissionRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['createPermissionRequest'] == null) {
39
+ throw new runtime.RequiredError('createPermissionRequest', 'Required parameter "createPermissionRequest" was null or undefined when calling createUserPermission().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ headerParameters['Content-Type'] = 'application/json';
44
+ let urlPath = `/v1/user-permissions`;
45
+ const response = yield this.request({
46
+ path: urlPath,
47
+ method: 'POST',
48
+ headers: headerParameters,
49
+ query: queryParameters,
50
+ body: (0, index_1.CreatePermissionRequestToJSON)(requestParameters['createPermissionRequest']),
51
+ }, initOverrides);
52
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PermissionResponseFromJSON)(jsonValue));
53
+ });
54
+ }
55
+ /**
56
+ * Create a path permission for a user in a tenant (admin/owner only).
57
+ * Create User Permission Handler
58
+ */
59
+ createUserPermission(requestParameters, initOverrides) {
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ const response = yield this.createUserPermissionRaw(requestParameters, initOverrides);
62
+ return yield response.value();
63
+ });
64
+ }
65
+ /**
66
+ * Delete a path permission (admin/owner only).
67
+ * Delete User Permission Handler
68
+ */
69
+ deleteUserPermissionRaw(requestParameters, initOverrides) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ if (requestParameters['permissionId'] == null) {
72
+ throw new runtime.RequiredError('permissionId', 'Required parameter "permissionId" was null or undefined when calling deleteUserPermission().');
73
+ }
74
+ if (requestParameters['tenantId'] == null) {
75
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling deleteUserPermission().');
76
+ }
77
+ const queryParameters = {};
78
+ if (requestParameters['tenantId'] != null) {
79
+ queryParameters['tenant_id'] = requestParameters['tenantId'];
80
+ }
81
+ const headerParameters = {};
82
+ let urlPath = `/v1/user-permissions/{permission_id}`;
83
+ urlPath = urlPath.replace(`{${"permission_id"}}`, encodeURIComponent(String(requestParameters['permissionId'])));
84
+ const response = yield this.request({
85
+ path: urlPath,
86
+ method: 'DELETE',
87
+ headers: headerParameters,
88
+ query: queryParameters,
89
+ }, initOverrides);
90
+ return new runtime.VoidApiResponse(response);
91
+ });
92
+ }
93
+ /**
94
+ * Delete a path permission (admin/owner only).
95
+ * Delete User Permission Handler
96
+ */
97
+ deleteUserPermission(requestParameters, initOverrides) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ yield this.deleteUserPermissionRaw(requestParameters, initOverrides);
100
+ });
101
+ }
102
+ /**
103
+ * List path permissions for a user in a tenant (admin/owner only).
104
+ * List User Permissions Handler
105
+ */
106
+ listUserPermissionsRaw(requestParameters, initOverrides) {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ if (requestParameters['tenantId'] == null) {
109
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling listUserPermissions().');
110
+ }
111
+ if (requestParameters['userId'] == null) {
112
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling listUserPermissions().');
113
+ }
114
+ const queryParameters = {};
115
+ if (requestParameters['tenantId'] != null) {
116
+ queryParameters['tenant_id'] = requestParameters['tenantId'];
117
+ }
118
+ if (requestParameters['userId'] != null) {
119
+ queryParameters['user_id'] = requestParameters['userId'];
120
+ }
121
+ if (requestParameters['limit'] != null) {
122
+ queryParameters['limit'] = requestParameters['limit'];
123
+ }
124
+ if (requestParameters['offset'] != null) {
125
+ queryParameters['offset'] = requestParameters['offset'];
126
+ }
127
+ const headerParameters = {};
128
+ let urlPath = `/v1/user-permissions`;
129
+ const response = yield this.request({
130
+ path: urlPath,
131
+ method: 'GET',
132
+ headers: headerParameters,
133
+ query: queryParameters,
134
+ }, initOverrides);
135
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedResponsePermissionResponseFromJSON)(jsonValue));
136
+ });
137
+ }
138
+ /**
139
+ * List path permissions for a user in a tenant (admin/owner only).
140
+ * List User Permissions Handler
141
+ */
142
+ listUserPermissions(requestParameters, initOverrides) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const response = yield this.listUserPermissionsRaw(requestParameters, initOverrides);
145
+ return yield response.value();
146
+ });
147
+ }
148
+ /**
149
+ * Update a path permission (admin/owner only).
150
+ * Update User Permission Handler
151
+ */
152
+ updateUserPermissionRaw(requestParameters, initOverrides) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ if (requestParameters['permissionId'] == null) {
155
+ throw new runtime.RequiredError('permissionId', 'Required parameter "permissionId" was null or undefined when calling updateUserPermission().');
156
+ }
157
+ if (requestParameters['tenantId'] == null) {
158
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling updateUserPermission().');
159
+ }
160
+ if (requestParameters['updatePermissionRequest'] == null) {
161
+ throw new runtime.RequiredError('updatePermissionRequest', 'Required parameter "updatePermissionRequest" was null or undefined when calling updateUserPermission().');
162
+ }
163
+ const queryParameters = {};
164
+ if (requestParameters['tenantId'] != null) {
165
+ queryParameters['tenant_id'] = requestParameters['tenantId'];
166
+ }
167
+ const headerParameters = {};
168
+ headerParameters['Content-Type'] = 'application/json';
169
+ let urlPath = `/v1/user-permissions/{permission_id}`;
170
+ urlPath = urlPath.replace(`{${"permission_id"}}`, encodeURIComponent(String(requestParameters['permissionId'])));
171
+ const response = yield this.request({
172
+ path: urlPath,
173
+ method: 'PATCH',
174
+ headers: headerParameters,
175
+ query: queryParameters,
176
+ body: (0, index_1.UpdatePermissionRequestToJSON)(requestParameters['updatePermissionRequest']),
177
+ }, initOverrides);
178
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PermissionResponseFromJSON)(jsonValue));
179
+ });
180
+ }
181
+ /**
182
+ * Update a path permission (admin/owner only).
183
+ * Update User Permission Handler
184
+ */
185
+ updateUserPermission(requestParameters, initOverrides) {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ const response = yield this.updateUserPermissionRaw(requestParameters, initOverrides);
188
+ return yield response.value();
189
+ });
190
+ }
191
+ }
192
+ exports.UserPermissionsApi = UserPermissionsApi;
@@ -12,4 +12,5 @@ export * from './TagsApi';
12
12
  export * from './TenantsApi';
13
13
  export * from './ThreadMessagesApi';
14
14
  export * from './ThreadsApi';
15
+ export * from './UserPermissionsApi';
15
16
  export * from './UsersApi';
@@ -30,4 +30,5 @@ __exportStar(require("./TagsApi"), exports);
30
30
  __exportStar(require("./TenantsApi"), exports);
31
31
  __exportStar(require("./ThreadMessagesApi"), exports);
32
32
  __exportStar(require("./ThreadsApi"), exports);
33
+ __exportStar(require("./UserPermissionsApi"), exports);
33
34
  __exportStar(require("./UsersApi"), exports);
@@ -174,7 +174,7 @@ export class ChunksApi extends runtime.BaseAPI {
174
174
  const queryParameters = {};
175
175
  const headerParameters = {};
176
176
  headerParameters['Content-Type'] = 'application/json';
177
- let urlPath = `/v1/chunks/{chunk_id}/metadata`;
177
+ let urlPath = `/v1/chunks/{chunk_id}`;
178
178
  urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
179
179
  const response = yield this.request({
180
180
  path: urlPath,
@@ -51,7 +51,7 @@ export interface UpdateTagOperationRequest {
51
51
  */
52
52
  export interface TagsApiInterface {
53
53
  /**
54
- * Attach a tag to a path part.
54
+ * Attach a tag to a path part. Requires ADMIN or OWNER role.
55
55
  * @summary Attach Tag Handler
56
56
  * @param {string} tagId
57
57
  * @param {TagPathPartRequest} tagPathPartRequest
@@ -62,12 +62,12 @@ export interface TagsApiInterface {
62
62
  */
63
63
  attachTagToPathPartRaw(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
64
64
  /**
65
- * Attach a tag to a path part.
65
+ * Attach a tag to a path part. Requires ADMIN or OWNER role.
66
66
  * Attach Tag Handler
67
67
  */
68
68
  attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
69
69
  /**
70
- * Create a new tag for the current tenant.
70
+ * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
71
71
  * @summary Create Tag Handler
72
72
  * @param {CreateTagRequest} createTagRequest
73
73
  * @param {string} [ksUat]
@@ -77,12 +77,12 @@ export interface TagsApiInterface {
77
77
  */
78
78
  createTagRaw(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
79
79
  /**
80
- * Create a new tag for the current tenant.
80
+ * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
81
81
  * Create Tag Handler
82
82
  */
83
83
  createTag(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
84
84
  /**
85
- * Delete a tag and all its path_part associations.
85
+ * Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
86
86
  * @summary Delete Tag Handler
87
87
  * @param {string} tagId
88
88
  * @param {string} [ksUat]
@@ -92,12 +92,12 @@ export interface TagsApiInterface {
92
92
  */
93
93
  deleteTagRaw(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
94
94
  /**
95
- * Delete a tag and all its path_part associations.
95
+ * Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
96
96
  * Delete Tag Handler
97
97
  */
98
98
  deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
99
99
  /**
100
- * Detach a tag from a path part.
100
+ * Detach a tag from a path part. Requires ADMIN or OWNER role.
101
101
  * @summary Detach Tag Handler
102
102
  * @param {string} tagId
103
103
  * @param {string} pathPartId
@@ -108,7 +108,7 @@ export interface TagsApiInterface {
108
108
  */
109
109
  detachTagFromPathPartRaw(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
110
110
  /**
111
- * Detach a tag from a path part.
111
+ * Detach a tag from a path part. Requires ADMIN or OWNER role.
112
112
  * Detach Tag Handler
113
113
  */
114
114
  detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -144,7 +144,7 @@ export interface TagsApiInterface {
144
144
  */
145
145
  listTags(requestParameters: ListTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseTagResponse>;
146
146
  /**
147
- * Update a tag (name, color, and/or description).
147
+ * Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
148
148
  * @summary Update Tag Handler
149
149
  * @param {string} tagId
150
150
  * @param {UpdateTagRequest} updateTagRequest
@@ -155,7 +155,7 @@ export interface TagsApiInterface {
155
155
  */
156
156
  updateTagRaw(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
157
157
  /**
158
- * Update a tag (name, color, and/or description).
158
+ * Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
159
159
  * Update Tag Handler
160
160
  */
161
161
  updateTag(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
@@ -165,42 +165,42 @@ export interface TagsApiInterface {
165
165
  */
166
166
  export declare class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
167
167
  /**
168
- * Attach a tag to a path part.
168
+ * Attach a tag to a path part. Requires ADMIN or OWNER role.
169
169
  * Attach Tag Handler
170
170
  */
171
171
  attachTagToPathPartRaw(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
172
172
  /**
173
- * Attach a tag to a path part.
173
+ * Attach a tag to a path part. Requires ADMIN or OWNER role.
174
174
  * Attach Tag Handler
175
175
  */
176
176
  attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
177
177
  /**
178
- * Create a new tag for the current tenant.
178
+ * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
179
179
  * Create Tag Handler
180
180
  */
181
181
  createTagRaw(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
182
182
  /**
183
- * Create a new tag for the current tenant.
183
+ * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
184
184
  * Create Tag Handler
185
185
  */
186
186
  createTag(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
187
187
  /**
188
- * Delete a tag and all its path_part associations.
188
+ * Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
189
189
  * Delete Tag Handler
190
190
  */
191
191
  deleteTagRaw(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
192
192
  /**
193
- * Delete a tag and all its path_part associations.
193
+ * Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
194
194
  * Delete Tag Handler
195
195
  */
196
196
  deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
197
197
  /**
198
- * Detach a tag from a path part.
198
+ * Detach a tag from a path part. Requires ADMIN or OWNER role.
199
199
  * Detach Tag Handler
200
200
  */
201
201
  detachTagFromPathPartRaw(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
202
202
  /**
203
- * Detach a tag from a path part.
203
+ * Detach a tag from a path part. Requires ADMIN or OWNER role.
204
204
  * Detach Tag Handler
205
205
  */
206
206
  detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -225,12 +225,12 @@ export declare class TagsApi extends runtime.BaseAPI implements TagsApiInterface
225
225
  */
226
226
  listTags(requestParameters?: ListTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseTagResponse>;
227
227
  /**
228
- * Update a tag (name, color, and/or description).
228
+ * Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
229
229
  * Update Tag Handler
230
230
  */
231
231
  updateTagRaw(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
232
232
  /**
233
- * Update a tag (name, color, and/or description).
233
+ * Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
234
234
  * Update Tag Handler
235
235
  */
236
236
  updateTag(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
@@ -27,7 +27,7 @@ import { CreateTagRequestToJSON, PaginatedResponseTagResponseFromJSON, TagPathPa
27
27
  */
28
28
  export class TagsApi extends runtime.BaseAPI {
29
29
  /**
30
- * Attach a tag to a path part.
30
+ * Attach a tag to a path part. Requires ADMIN or OWNER role.
31
31
  * Attach Tag Handler
32
32
  */
33
33
  attachTagToPathPartRaw(requestParameters, initOverrides) {
@@ -54,7 +54,7 @@ export class TagsApi extends runtime.BaseAPI {
54
54
  });
55
55
  }
56
56
  /**
57
- * Attach a tag to a path part.
57
+ * Attach a tag to a path part. Requires ADMIN or OWNER role.
58
58
  * Attach Tag Handler
59
59
  */
60
60
  attachTagToPathPart(requestParameters, initOverrides) {
@@ -64,7 +64,7 @@ export class TagsApi extends runtime.BaseAPI {
64
64
  });
65
65
  }
66
66
  /**
67
- * Create a new tag for the current tenant.
67
+ * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
68
68
  * Create Tag Handler
69
69
  */
70
70
  createTagRaw(requestParameters, initOverrides) {
@@ -87,7 +87,7 @@ export class TagsApi extends runtime.BaseAPI {
87
87
  });
88
88
  }
89
89
  /**
90
- * Create a new tag for the current tenant.
90
+ * Create a new tag for the current tenant. Requires ADMIN or OWNER role.
91
91
  * Create Tag Handler
92
92
  */
93
93
  createTag(requestParameters, initOverrides) {
@@ -97,7 +97,7 @@ export class TagsApi extends runtime.BaseAPI {
97
97
  });
98
98
  }
99
99
  /**
100
- * Delete a tag and all its path_part associations.
100
+ * Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
101
101
  * Delete Tag Handler
102
102
  */
103
103
  deleteTagRaw(requestParameters, initOverrides) {
@@ -119,7 +119,7 @@ export class TagsApi extends runtime.BaseAPI {
119
119
  });
120
120
  }
121
121
  /**
122
- * Delete a tag and all its path_part associations.
122
+ * Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
123
123
  * Delete Tag Handler
124
124
  */
125
125
  deleteTag(requestParameters, initOverrides) {
@@ -128,7 +128,7 @@ export class TagsApi extends runtime.BaseAPI {
128
128
  });
129
129
  }
130
130
  /**
131
- * Detach a tag from a path part.
131
+ * Detach a tag from a path part. Requires ADMIN or OWNER role.
132
132
  * Detach Tag Handler
133
133
  */
134
134
  detachTagFromPathPartRaw(requestParameters, initOverrides) {
@@ -154,7 +154,7 @@ export class TagsApi extends runtime.BaseAPI {
154
154
  });
155
155
  }
156
156
  /**
157
- * Detach a tag from a path part.
157
+ * Detach a tag from a path part. Requires ADMIN or OWNER role.
158
158
  * Detach Tag Handler
159
159
  */
160
160
  detachTagFromPathPart(requestParameters, initOverrides) {
@@ -229,7 +229,7 @@ export class TagsApi extends runtime.BaseAPI {
229
229
  });
230
230
  }
231
231
  /**
232
- * Update a tag (name, color, and/or description).
232
+ * Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
233
233
  * Update Tag Handler
234
234
  */
235
235
  updateTagRaw(requestParameters, initOverrides) {
@@ -256,7 +256,7 @@ export class TagsApi extends runtime.BaseAPI {
256
256
  });
257
257
  }
258
258
  /**
259
- * Update a tag (name, color, and/or description).
259
+ * Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
260
260
  * Update Tag Handler
261
261
  */
262
262
  updateTag(requestParameters, initOverrides) {
@@ -57,7 +57,7 @@ export interface ThreadsApiInterface {
57
57
  */
58
58
  createThread(requestParameters: CreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ThreadResponse>;
59
59
  /**
60
- * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
60
+ * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
61
61
  * @summary Delete Thread Handler
62
62
  * @param {string} threadId
63
63
  * @param {string} [ksUat]
@@ -67,7 +67,7 @@ export interface ThreadsApiInterface {
67
67
  */
68
68
  deleteThreadRaw(requestParameters: DeleteThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
69
69
  /**
70
- * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
70
+ * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
71
71
  * Delete Thread Handler
72
72
  */
73
73
  deleteThread(requestParameters: DeleteThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -135,12 +135,12 @@ export declare class ThreadsApi extends runtime.BaseAPI implements ThreadsApiInt
135
135
  */
136
136
  createThread(requestParameters: CreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ThreadResponse>;
137
137
  /**
138
- * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
138
+ * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
139
139
  * Delete Thread Handler
140
140
  */
141
141
  deleteThreadRaw(requestParameters: DeleteThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
142
142
  /**
143
- * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
143
+ * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
144
144
  * Delete Thread Handler
145
145
  */
146
146
  deleteThread(requestParameters: DeleteThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -60,7 +60,7 @@ export class ThreadsApi extends runtime.BaseAPI {
60
60
  });
61
61
  }
62
62
  /**
63
- * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
63
+ * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
64
64
  * Delete Thread Handler
65
65
  */
66
66
  deleteThreadRaw(requestParameters, initOverrides) {
@@ -82,7 +82,7 @@ export class ThreadsApi extends runtime.BaseAPI {
82
82
  });
83
83
  }
84
84
  /**
85
- * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
85
+ * Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
86
86
  * Delete Thread Handler
87
87
  */
88
88
  deleteThread(requestParameters, initOverrides) {
@@ -0,0 +1,154 @@
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 { CreatePermissionRequest, PaginatedResponsePermissionResponse, PermissionResponse, UpdatePermissionRequest } from '../models/index';
14
+ export interface CreateUserPermissionRequest {
15
+ createPermissionRequest: CreatePermissionRequest;
16
+ ksUat?: string;
17
+ }
18
+ export interface DeleteUserPermissionRequest {
19
+ permissionId: string;
20
+ tenantId: string;
21
+ ksUat?: string;
22
+ }
23
+ export interface ListUserPermissionsRequest {
24
+ tenantId: string;
25
+ userId: string;
26
+ limit?: number;
27
+ offset?: number;
28
+ ksUat?: string;
29
+ }
30
+ export interface UpdateUserPermissionRequest {
31
+ permissionId: string;
32
+ tenantId: string;
33
+ updatePermissionRequest: UpdatePermissionRequest;
34
+ ksUat?: string;
35
+ }
36
+ /**
37
+ * UserPermissionsApi - interface
38
+ *
39
+ * @export
40
+ * @interface UserPermissionsApiInterface
41
+ */
42
+ export interface UserPermissionsApiInterface {
43
+ /**
44
+ * Create a path permission for a user in a tenant (admin/owner only).
45
+ * @summary Create User Permission Handler
46
+ * @param {CreatePermissionRequest} createPermissionRequest
47
+ * @param {string} [ksUat]
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ * @memberof UserPermissionsApiInterface
51
+ */
52
+ createUserPermissionRaw(requestParameters: CreateUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionResponse>>;
53
+ /**
54
+ * Create a path permission for a user in a tenant (admin/owner only).
55
+ * Create User Permission Handler
56
+ */
57
+ createUserPermission(requestParameters: CreateUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionResponse>;
58
+ /**
59
+ * Delete a path permission (admin/owner only).
60
+ * @summary Delete User Permission Handler
61
+ * @param {string} permissionId
62
+ * @param {string} tenantId Tenant ID the permission belongs to
63
+ * @param {string} [ksUat]
64
+ * @param {*} [options] Override http request option.
65
+ * @throws {RequiredError}
66
+ * @memberof UserPermissionsApiInterface
67
+ */
68
+ deleteUserPermissionRaw(requestParameters: DeleteUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
69
+ /**
70
+ * Delete a path permission (admin/owner only).
71
+ * Delete User Permission Handler
72
+ */
73
+ deleteUserPermission(requestParameters: DeleteUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
74
+ /**
75
+ * List path permissions for a user in a tenant (admin/owner only).
76
+ * @summary List User Permissions Handler
77
+ * @param {string} tenantId Tenant ID to list permissions for
78
+ * @param {string} userId User ID to list permissions for
79
+ * @param {number} [limit] Number of items per page
80
+ * @param {number} [offset] Number of items to skip
81
+ * @param {string} [ksUat]
82
+ * @param {*} [options] Override http request option.
83
+ * @throws {RequiredError}
84
+ * @memberof UserPermissionsApiInterface
85
+ */
86
+ listUserPermissionsRaw(requestParameters: ListUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponsePermissionResponse>>;
87
+ /**
88
+ * List path permissions for a user in a tenant (admin/owner only).
89
+ * List User Permissions Handler
90
+ */
91
+ listUserPermissions(requestParameters: ListUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePermissionResponse>;
92
+ /**
93
+ * Update a path permission (admin/owner only).
94
+ * @summary Update User Permission Handler
95
+ * @param {string} permissionId
96
+ * @param {string} tenantId Tenant ID the permission belongs to
97
+ * @param {UpdatePermissionRequest} updatePermissionRequest
98
+ * @param {string} [ksUat]
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ * @memberof UserPermissionsApiInterface
102
+ */
103
+ updateUserPermissionRaw(requestParameters: UpdateUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionResponse>>;
104
+ /**
105
+ * Update a path permission (admin/owner only).
106
+ * Update User Permission Handler
107
+ */
108
+ updateUserPermission(requestParameters: UpdateUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionResponse>;
109
+ }
110
+ /**
111
+ *
112
+ */
113
+ export declare class UserPermissionsApi extends runtime.BaseAPI implements UserPermissionsApiInterface {
114
+ /**
115
+ * Create a path permission for a user in a tenant (admin/owner only).
116
+ * Create User Permission Handler
117
+ */
118
+ createUserPermissionRaw(requestParameters: CreateUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionResponse>>;
119
+ /**
120
+ * Create a path permission for a user in a tenant (admin/owner only).
121
+ * Create User Permission Handler
122
+ */
123
+ createUserPermission(requestParameters: CreateUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionResponse>;
124
+ /**
125
+ * Delete a path permission (admin/owner only).
126
+ * Delete User Permission Handler
127
+ */
128
+ deleteUserPermissionRaw(requestParameters: DeleteUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
129
+ /**
130
+ * Delete a path permission (admin/owner only).
131
+ * Delete User Permission Handler
132
+ */
133
+ deleteUserPermission(requestParameters: DeleteUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
134
+ /**
135
+ * List path permissions for a user in a tenant (admin/owner only).
136
+ * List User Permissions Handler
137
+ */
138
+ listUserPermissionsRaw(requestParameters: ListUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponsePermissionResponse>>;
139
+ /**
140
+ * List path permissions for a user in a tenant (admin/owner only).
141
+ * List User Permissions Handler
142
+ */
143
+ listUserPermissions(requestParameters: ListUserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponsePermissionResponse>;
144
+ /**
145
+ * Update a path permission (admin/owner only).
146
+ * Update User Permission Handler
147
+ */
148
+ updateUserPermissionRaw(requestParameters: UpdateUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionResponse>>;
149
+ /**
150
+ * Update a path permission (admin/owner only).
151
+ * Update User Permission Handler
152
+ */
153
+ updateUserPermission(requestParameters: UpdateUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionResponse>;
154
+ }