@knowledge-stack/ksapi 1.49.0 → 1.51.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 +6 -2
  2. package/README.md +7 -3
  3. package/dist/apis/TenantsApi.d.ts +98 -1
  4. package/dist/apis/TenantsApi.js +116 -0
  5. package/dist/esm/apis/TenantsApi.d.ts +98 -1
  6. package/dist/esm/apis/TenantsApi.js +116 -0
  7. package/dist/esm/models/BrandingLogoType.d.ts +26 -0
  8. package/dist/esm/models/BrandingLogoType.js +44 -0
  9. package/dist/esm/models/TenantBrandingResponse.d.ts +79 -0
  10. package/dist/esm/models/TenantBrandingResponse.js +52 -0
  11. package/dist/esm/models/TenantResponse.d.ts +10 -3
  12. package/dist/esm/models/TenantResponse.js +6 -3
  13. package/dist/esm/models/TenantSettingsResponse.d.ts +54 -0
  14. package/dist/esm/models/TenantSettingsResponse.js +49 -0
  15. package/dist/esm/models/TenantSettingsUpdate.d.ts +20 -0
  16. package/dist/esm/models/TenantSettingsUpdate.js +6 -0
  17. package/dist/esm/models/index.d.ts +3 -1
  18. package/dist/esm/models/index.js +3 -1
  19. package/dist/models/BrandingLogoType.d.ts +26 -0
  20. package/dist/models/BrandingLogoType.js +52 -0
  21. package/dist/models/TenantBrandingResponse.d.ts +79 -0
  22. package/dist/models/TenantBrandingResponse.js +60 -0
  23. package/dist/models/TenantResponse.d.ts +10 -3
  24. package/dist/models/TenantResponse.js +6 -3
  25. package/dist/models/TenantSettingsResponse.d.ts +54 -0
  26. package/dist/models/TenantSettingsResponse.js +57 -0
  27. package/dist/models/TenantSettingsUpdate.d.ts +20 -0
  28. package/dist/models/TenantSettingsUpdate.js +6 -0
  29. package/dist/models/index.d.ts +3 -1
  30. package/dist/models/index.js +3 -1
  31. package/docs/BrandingLogoType.md +33 -0
  32. package/docs/TenantBrandingResponse.md +45 -0
  33. package/docs/TenantResponse.md +3 -1
  34. package/docs/{TenantSettings.md → TenantSettingsResponse.md} +5 -4
  35. package/docs/TenantSettingsUpdate.md +6 -0
  36. package/docs/TenantsApi.md +159 -0
  37. package/package.json +1 -1
  38. package/src/apis/TenantsApi.ts +218 -0
  39. package/src/models/BrandingLogoType.ts +54 -0
  40. package/src/models/TenantBrandingResponse.ts +122 -0
  41. package/src/models/TenantResponse.ts +25 -10
  42. package/src/models/{TenantSettings.ts → TenantSettingsResponse.ts} +20 -18
  43. package/src/models/TenantSettingsUpdate.ts +24 -0
  44. package/src/models/index.ts +3 -1
  45. package/dist/esm/models/TenantSettings.d.ts +0 -54
  46. package/dist/esm/models/TenantSettings.js +0 -45
  47. package/dist/models/TenantSettings.d.ts +0 -54
  48. package/dist/models/TenantSettings.js +0 -53
@@ -7,6 +7,7 @@ docs/ApiKeyResponse.md
7
7
  docs/ApiKeysApi.md
8
8
  docs/Args.md
9
9
  docs/AuthApi.md
10
+ docs/BrandingLogoType.md
10
11
  docs/BulkTagRequest.md
11
12
  docs/ChunkBulkResponse.md
12
13
  docs/ChunkContentItem.md
@@ -113,8 +114,9 @@ docs/SubtreeChunksResponse.md
113
114
  docs/SupportedLanguage.md
114
115
  docs/TagResponse.md
115
116
  docs/TagsApi.md
117
+ docs/TenantBrandingResponse.md
116
118
  docs/TenantResponse.md
117
- docs/TenantSettings.md
119
+ docs/TenantSettingsResponse.md
118
120
  docs/TenantSettingsUpdate.md
119
121
  docs/TenantUserEditRequest.md
120
122
  docs/TenantUserResponse.md
@@ -173,6 +175,7 @@ src/index.ts
173
175
  src/models/AcceptInviteResponse.ts
174
176
  src/models/ApiKeyResponse.ts
175
177
  src/models/Args.ts
178
+ src/models/BrandingLogoType.ts
176
179
  src/models/BulkTagRequest.ts
177
180
  src/models/ChunkBulkResponse.ts
178
181
  src/models/ChunkContentItem.ts
@@ -269,8 +272,9 @@ src/models/SubtreeChunkGroup.ts
269
272
  src/models/SubtreeChunksResponse.ts
270
273
  src/models/SupportedLanguage.ts
271
274
  src/models/TagResponse.ts
275
+ src/models/TenantBrandingResponse.ts
272
276
  src/models/TenantResponse.ts
273
- src/models/TenantSettings.ts
277
+ src/models/TenantSettingsResponse.ts
274
278
  src/models/TenantSettingsUpdate.ts
275
279
  src/models/TenantUserEditRequest.ts
276
280
  src/models/TenantUserResponse.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.49.0
1
+ # @knowledge-stack/ksapi@1.51.0
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -121,12 +121,14 @@ All URIs are relative to *http://localhost:8000*
121
121
  *TagsApi* | [**updateTag**](docs/TagsApi.md#updatetagoperation) | **PATCH** /v1/tags/{tag_id} | Update Tag Handler
122
122
  *TenantsApi* | [**createTenant**](docs/TenantsApi.md#createtenantoperation) | **POST** /v1/tenants | Create Tenant
123
123
  *TenantsApi* | [**deleteTenant**](docs/TenantsApi.md#deletetenant) | **DELETE** /v1/tenants/{tenant_id} | Delete Tenant
124
+ *TenantsApi* | [**deleteTenantLogo**](docs/TenantsApi.md#deletetenantlogo) | **DELETE** /v1/tenants/{tenant_id}/branding/logo | Delete Tenant Logo
124
125
  *TenantsApi* | [**deleteTenantUser**](docs/TenantsApi.md#deletetenantuser) | **DELETE** /v1/tenants/{tenant_id}/users/{user_id} | Delete Tenant User
125
126
  *TenantsApi* | [**getTenant**](docs/TenantsApi.md#gettenant) | **GET** /v1/tenants/{tenant_id} | Get Tenant
126
127
  *TenantsApi* | [**listTenantUsers**](docs/TenantsApi.md#listtenantusers) | **GET** /v1/tenants/{tenant_id}/users | List Tenant Users
127
128
  *TenantsApi* | [**listTenants**](docs/TenantsApi.md#listtenants) | **GET** /v1/tenants | List Tenants
128
129
  *TenantsApi* | [**updateTenant**](docs/TenantsApi.md#updatetenantoperation) | **PATCH** /v1/tenants/{tenant_id} | Update Tenant
129
130
  *TenantsApi* | [**updateTenantUser**](docs/TenantsApi.md#updatetenantuser) | **PATCH** /v1/tenants/{tenant_id}/users/{user_id} | Update Tenant User
131
+ *TenantsApi* | [**uploadTenantLogo**](docs/TenantsApi.md#uploadtenantlogo) | **POST** /v1/tenants/{tenant_id}/branding/logo | Upload Tenant Logo
130
132
  *ThreadMessagesApi* | [**createThreadMessage**](docs/ThreadMessagesApi.md#createthreadmessageoperation) | **POST** /v1/threads/{thread_id}/messages | Create Thread Message Handler
131
133
  *ThreadMessagesApi* | [**getThreadMessage**](docs/ThreadMessagesApi.md#getthreadmessage) | **GET** /v1/threads/{thread_id}/messages/{message_id} | Get Thread Message Handler
132
134
  *ThreadMessagesApi* | [**listThreadMessages**](docs/ThreadMessagesApi.md#listthreadmessages) | **GET** /v1/threads/{thread_id}/messages | List Thread Messages Handler
@@ -153,6 +155,7 @@ All URIs are relative to *http://localhost:8000*
153
155
  - [AcceptInviteResponse](docs/AcceptInviteResponse.md)
154
156
  - [ApiKeyResponse](docs/ApiKeyResponse.md)
155
157
  - [Args](docs/Args.md)
158
+ - [BrandingLogoType](docs/BrandingLogoType.md)
156
159
  - [BulkTagRequest](docs/BulkTagRequest.md)
157
160
  - [ChunkBulkResponse](docs/ChunkBulkResponse.md)
158
161
  - [ChunkContentItem](docs/ChunkContentItem.md)
@@ -249,8 +252,9 @@ All URIs are relative to *http://localhost:8000*
249
252
  - [SubtreeChunksResponse](docs/SubtreeChunksResponse.md)
250
253
  - [SupportedLanguage](docs/SupportedLanguage.md)
251
254
  - [TagResponse](docs/TagResponse.md)
255
+ - [TenantBrandingResponse](docs/TenantBrandingResponse.md)
252
256
  - [TenantResponse](docs/TenantResponse.md)
253
- - [TenantSettings](docs/TenantSettings.md)
257
+ - [TenantSettingsResponse](docs/TenantSettingsResponse.md)
254
258
  - [TenantSettingsUpdate](docs/TenantSettingsUpdate.md)
255
259
  - [TenantUserEditRequest](docs/TenantUserEditRequest.md)
256
260
  - [TenantUserResponse](docs/TenantUserResponse.md)
@@ -292,7 +296,7 @@ and is automatically generated by the
292
296
  [OpenAPI Generator](https://openapi-generator.tech) project:
293
297
 
294
298
  - API version: `0.1.0`
295
- - Package version: `1.49.0`
299
+ - Package version: `1.51.0`
296
300
  - Generator version: `7.20.0`
297
301
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
298
302
 
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateTenantRequest, PaginatedResponseTenantResponse, PaginatedResponseTenantUserResponse, TenantResponse, TenantUserEditRequest, TenantUserResponse, UpdateTenantRequest } from '../models/index';
13
+ import type { BrandingLogoType, CreateTenantRequest, PaginatedResponseTenantResponse, PaginatedResponseTenantUserResponse, TenantResponse, TenantUserEditRequest, TenantUserResponse, UpdateTenantRequest } from '../models/index';
14
14
  export interface CreateTenantOperationRequest {
15
15
  createTenantRequest: CreateTenantRequest;
16
16
  authorization?: string | null;
@@ -21,6 +21,12 @@ export interface DeleteTenantRequest {
21
21
  authorization?: string | null;
22
22
  ksUat?: string | null;
23
23
  }
24
+ export interface DeleteTenantLogoRequest {
25
+ tenantId: string;
26
+ logoType?: BrandingLogoType;
27
+ authorization?: string | null;
28
+ ksUat?: string | null;
29
+ }
24
30
  export interface DeleteTenantUserRequest {
25
31
  tenantId: string;
26
32
  userId: string;
@@ -58,6 +64,13 @@ export interface UpdateTenantUserRequest {
58
64
  authorization?: string | null;
59
65
  ksUat?: string | null;
60
66
  }
67
+ export interface UploadTenantLogoRequest {
68
+ tenantId: string;
69
+ file: Blob;
70
+ authorization?: string | null;
71
+ ksUat?: string | null;
72
+ logoType?: BrandingLogoType;
73
+ }
61
74
  /**
62
75
  * TenantsApi - interface
63
76
  *
@@ -115,6 +128,33 @@ export interface TenantsApiInterface {
115
128
  * Delete Tenant
116
129
  */
117
130
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
131
+ /**
132
+ * Creates request options for deleteTenantLogo without sending the request
133
+ * @param {string} tenantId
134
+ * @param {BrandingLogoType} [logoType]
135
+ * @param {string} [authorization]
136
+ * @param {string} [ksUat]
137
+ * @throws {RequiredError}
138
+ * @memberof TenantsApiInterface
139
+ */
140
+ deleteTenantLogoRequestOpts(requestParameters: DeleteTenantLogoRequest): Promise<runtime.RequestOpts>;
141
+ /**
142
+ * Delete a branding logo. Requires OWNER or ADMIN role.
143
+ * @summary Delete Tenant Logo
144
+ * @param {string} tenantId
145
+ * @param {BrandingLogoType} [logoType]
146
+ * @param {string} [authorization]
147
+ * @param {string} [ksUat]
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ * @memberof TenantsApiInterface
151
+ */
152
+ deleteTenantLogoRaw(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
153
+ /**
154
+ * Delete a branding logo. Requires OWNER or ADMIN role.
155
+ * Delete Tenant Logo
156
+ */
157
+ deleteTenantLogo(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
118
158
  /**
119
159
  * Creates request options for deleteTenantUser without sending the request
120
160
  * @param {string} tenantId
@@ -279,6 +319,35 @@ export interface TenantsApiInterface {
279
319
  * Update Tenant User
280
320
  */
281
321
  updateTenantUser(requestParameters: UpdateTenantUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantUserResponse>;
322
+ /**
323
+ * Creates request options for uploadTenantLogo without sending the request
324
+ * @param {string} tenantId
325
+ * @param {Blob} file
326
+ * @param {string} [authorization]
327
+ * @param {string} [ksUat]
328
+ * @param {BrandingLogoType} [logoType]
329
+ * @throws {RequiredError}
330
+ * @memberof TenantsApiInterface
331
+ */
332
+ uploadTenantLogoRequestOpts(requestParameters: UploadTenantLogoRequest): Promise<runtime.RequestOpts>;
333
+ /**
334
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
335
+ * @summary Upload Tenant Logo
336
+ * @param {string} tenantId
337
+ * @param {Blob} file
338
+ * @param {string} [authorization]
339
+ * @param {string} [ksUat]
340
+ * @param {BrandingLogoType} [logoType]
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ * @memberof TenantsApiInterface
344
+ */
345
+ uploadTenantLogoRaw(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
346
+ /**
347
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
348
+ * Upload Tenant Logo
349
+ */
350
+ uploadTenantLogo(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
282
351
  }
283
352
  /**
284
353
  *
@@ -312,6 +381,20 @@ export declare class TenantsApi extends runtime.BaseAPI implements TenantsApiInt
312
381
  * Delete Tenant
313
382
  */
314
383
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
384
+ /**
385
+ * Creates request options for deleteTenantLogo without sending the request
386
+ */
387
+ deleteTenantLogoRequestOpts(requestParameters: DeleteTenantLogoRequest): Promise<runtime.RequestOpts>;
388
+ /**
389
+ * Delete a branding logo. Requires OWNER or ADMIN role.
390
+ * Delete Tenant Logo
391
+ */
392
+ deleteTenantLogoRaw(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
393
+ /**
394
+ * Delete a branding logo. Requires OWNER or ADMIN role.
395
+ * Delete Tenant Logo
396
+ */
397
+ deleteTenantLogo(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
315
398
  /**
316
399
  * Creates request options for deleteTenantUser without sending the request
317
400
  */
@@ -396,4 +479,18 @@ export declare class TenantsApi extends runtime.BaseAPI implements TenantsApiInt
396
479
  * Update Tenant User
397
480
  */
398
481
  updateTenantUser(requestParameters: UpdateTenantUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantUserResponse>;
482
+ /**
483
+ * Creates request options for uploadTenantLogo without sending the request
484
+ */
485
+ uploadTenantLogoRequestOpts(requestParameters: UploadTenantLogoRequest): Promise<runtime.RequestOpts>;
486
+ /**
487
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
488
+ * Upload Tenant Logo
489
+ */
490
+ uploadTenantLogoRaw(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
491
+ /**
492
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
493
+ * Upload Tenant Logo
494
+ */
495
+ uploadTenantLogo(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
399
496
  }
@@ -117,6 +117,53 @@ class TenantsApi extends runtime.BaseAPI {
117
117
  yield this.deleteTenantRaw(requestParameters, initOverrides);
118
118
  });
119
119
  }
120
+ /**
121
+ * Creates request options for deleteTenantLogo without sending the request
122
+ */
123
+ deleteTenantLogoRequestOpts(requestParameters) {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ if (requestParameters['tenantId'] == null) {
126
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling deleteTenantLogo().');
127
+ }
128
+ const queryParameters = {};
129
+ if (requestParameters['logoType'] != null) {
130
+ queryParameters['logo_type'] = requestParameters['logoType'];
131
+ }
132
+ const headerParameters = {};
133
+ if (requestParameters['authorization'] != null) {
134
+ headerParameters['authorization'] = String(requestParameters['authorization']);
135
+ }
136
+ let urlPath = `/v1/tenants/{tenant_id}/branding/logo`;
137
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
138
+ return {
139
+ path: urlPath,
140
+ method: 'DELETE',
141
+ headers: headerParameters,
142
+ query: queryParameters,
143
+ };
144
+ });
145
+ }
146
+ /**
147
+ * Delete a branding logo. Requires OWNER or ADMIN role.
148
+ * Delete Tenant Logo
149
+ */
150
+ deleteTenantLogoRaw(requestParameters, initOverrides) {
151
+ return __awaiter(this, void 0, void 0, function* () {
152
+ const requestOptions = yield this.deleteTenantLogoRequestOpts(requestParameters);
153
+ const response = yield this.request(requestOptions, initOverrides);
154
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TenantResponseFromJSON)(jsonValue));
155
+ });
156
+ }
157
+ /**
158
+ * Delete a branding logo. Requires OWNER or ADMIN role.
159
+ * Delete Tenant Logo
160
+ */
161
+ deleteTenantLogo(requestParameters, initOverrides) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ const response = yield this.deleteTenantLogoRaw(requestParameters, initOverrides);
164
+ return yield response.value();
165
+ });
166
+ }
120
167
  /**
121
168
  * Creates request options for deleteTenantUser without sending the request
122
169
  */
@@ -406,5 +453,74 @@ class TenantsApi extends runtime.BaseAPI {
406
453
  return yield response.value();
407
454
  });
408
455
  }
456
+ /**
457
+ * Creates request options for uploadTenantLogo without sending the request
458
+ */
459
+ uploadTenantLogoRequestOpts(requestParameters) {
460
+ return __awaiter(this, void 0, void 0, function* () {
461
+ if (requestParameters['tenantId'] == null) {
462
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling uploadTenantLogo().');
463
+ }
464
+ if (requestParameters['file'] == null) {
465
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling uploadTenantLogo().');
466
+ }
467
+ const queryParameters = {};
468
+ const headerParameters = {};
469
+ if (requestParameters['authorization'] != null) {
470
+ headerParameters['authorization'] = String(requestParameters['authorization']);
471
+ }
472
+ const consumes = [
473
+ { contentType: 'multipart/form-data' },
474
+ ];
475
+ // @ts-ignore: canConsumeForm may be unused
476
+ const canConsumeForm = runtime.canConsumeForm(consumes);
477
+ let formParams;
478
+ let useForm = false;
479
+ // use FormData to transmit files using content-type "multipart/form-data"
480
+ useForm = canConsumeForm;
481
+ if (useForm) {
482
+ formParams = new FormData();
483
+ }
484
+ else {
485
+ formParams = new URLSearchParams();
486
+ }
487
+ if (requestParameters['file'] != null) {
488
+ formParams.append('file', requestParameters['file']);
489
+ }
490
+ if (requestParameters['logoType'] != null) {
491
+ formParams.append('logo_type', requestParameters['logoType']);
492
+ }
493
+ let urlPath = `/v1/tenants/{tenant_id}/branding/logo`;
494
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
495
+ return {
496
+ path: urlPath,
497
+ method: 'POST',
498
+ headers: headerParameters,
499
+ query: queryParameters,
500
+ body: formParams,
501
+ };
502
+ });
503
+ }
504
+ /**
505
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
506
+ * Upload Tenant Logo
507
+ */
508
+ uploadTenantLogoRaw(requestParameters, initOverrides) {
509
+ return __awaiter(this, void 0, void 0, function* () {
510
+ const requestOptions = yield this.uploadTenantLogoRequestOpts(requestParameters);
511
+ const response = yield this.request(requestOptions, initOverrides);
512
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TenantResponseFromJSON)(jsonValue));
513
+ });
514
+ }
515
+ /**
516
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
517
+ * Upload Tenant Logo
518
+ */
519
+ uploadTenantLogo(requestParameters, initOverrides) {
520
+ return __awaiter(this, void 0, void 0, function* () {
521
+ const response = yield this.uploadTenantLogoRaw(requestParameters, initOverrides);
522
+ return yield response.value();
523
+ });
524
+ }
409
525
  }
410
526
  exports.TenantsApi = TenantsApi;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateTenantRequest, PaginatedResponseTenantResponse, PaginatedResponseTenantUserResponse, TenantResponse, TenantUserEditRequest, TenantUserResponse, UpdateTenantRequest } from '../models/index';
13
+ import type { BrandingLogoType, CreateTenantRequest, PaginatedResponseTenantResponse, PaginatedResponseTenantUserResponse, TenantResponse, TenantUserEditRequest, TenantUserResponse, UpdateTenantRequest } from '../models/index';
14
14
  export interface CreateTenantOperationRequest {
15
15
  createTenantRequest: CreateTenantRequest;
16
16
  authorization?: string | null;
@@ -21,6 +21,12 @@ export interface DeleteTenantRequest {
21
21
  authorization?: string | null;
22
22
  ksUat?: string | null;
23
23
  }
24
+ export interface DeleteTenantLogoRequest {
25
+ tenantId: string;
26
+ logoType?: BrandingLogoType;
27
+ authorization?: string | null;
28
+ ksUat?: string | null;
29
+ }
24
30
  export interface DeleteTenantUserRequest {
25
31
  tenantId: string;
26
32
  userId: string;
@@ -58,6 +64,13 @@ export interface UpdateTenantUserRequest {
58
64
  authorization?: string | null;
59
65
  ksUat?: string | null;
60
66
  }
67
+ export interface UploadTenantLogoRequest {
68
+ tenantId: string;
69
+ file: Blob;
70
+ authorization?: string | null;
71
+ ksUat?: string | null;
72
+ logoType?: BrandingLogoType;
73
+ }
61
74
  /**
62
75
  * TenantsApi - interface
63
76
  *
@@ -115,6 +128,33 @@ export interface TenantsApiInterface {
115
128
  * Delete Tenant
116
129
  */
117
130
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
131
+ /**
132
+ * Creates request options for deleteTenantLogo without sending the request
133
+ * @param {string} tenantId
134
+ * @param {BrandingLogoType} [logoType]
135
+ * @param {string} [authorization]
136
+ * @param {string} [ksUat]
137
+ * @throws {RequiredError}
138
+ * @memberof TenantsApiInterface
139
+ */
140
+ deleteTenantLogoRequestOpts(requestParameters: DeleteTenantLogoRequest): Promise<runtime.RequestOpts>;
141
+ /**
142
+ * Delete a branding logo. Requires OWNER or ADMIN role.
143
+ * @summary Delete Tenant Logo
144
+ * @param {string} tenantId
145
+ * @param {BrandingLogoType} [logoType]
146
+ * @param {string} [authorization]
147
+ * @param {string} [ksUat]
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ * @memberof TenantsApiInterface
151
+ */
152
+ deleteTenantLogoRaw(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
153
+ /**
154
+ * Delete a branding logo. Requires OWNER or ADMIN role.
155
+ * Delete Tenant Logo
156
+ */
157
+ deleteTenantLogo(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
118
158
  /**
119
159
  * Creates request options for deleteTenantUser without sending the request
120
160
  * @param {string} tenantId
@@ -279,6 +319,35 @@ export interface TenantsApiInterface {
279
319
  * Update Tenant User
280
320
  */
281
321
  updateTenantUser(requestParameters: UpdateTenantUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantUserResponse>;
322
+ /**
323
+ * Creates request options for uploadTenantLogo without sending the request
324
+ * @param {string} tenantId
325
+ * @param {Blob} file
326
+ * @param {string} [authorization]
327
+ * @param {string} [ksUat]
328
+ * @param {BrandingLogoType} [logoType]
329
+ * @throws {RequiredError}
330
+ * @memberof TenantsApiInterface
331
+ */
332
+ uploadTenantLogoRequestOpts(requestParameters: UploadTenantLogoRequest): Promise<runtime.RequestOpts>;
333
+ /**
334
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
335
+ * @summary Upload Tenant Logo
336
+ * @param {string} tenantId
337
+ * @param {Blob} file
338
+ * @param {string} [authorization]
339
+ * @param {string} [ksUat]
340
+ * @param {BrandingLogoType} [logoType]
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ * @memberof TenantsApiInterface
344
+ */
345
+ uploadTenantLogoRaw(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
346
+ /**
347
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
348
+ * Upload Tenant Logo
349
+ */
350
+ uploadTenantLogo(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
282
351
  }
283
352
  /**
284
353
  *
@@ -312,6 +381,20 @@ export declare class TenantsApi extends runtime.BaseAPI implements TenantsApiInt
312
381
  * Delete Tenant
313
382
  */
314
383
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
384
+ /**
385
+ * Creates request options for deleteTenantLogo without sending the request
386
+ */
387
+ deleteTenantLogoRequestOpts(requestParameters: DeleteTenantLogoRequest): Promise<runtime.RequestOpts>;
388
+ /**
389
+ * Delete a branding logo. Requires OWNER or ADMIN role.
390
+ * Delete Tenant Logo
391
+ */
392
+ deleteTenantLogoRaw(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
393
+ /**
394
+ * Delete a branding logo. Requires OWNER or ADMIN role.
395
+ * Delete Tenant Logo
396
+ */
397
+ deleteTenantLogo(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
315
398
  /**
316
399
  * Creates request options for deleteTenantUser without sending the request
317
400
  */
@@ -396,4 +479,18 @@ export declare class TenantsApi extends runtime.BaseAPI implements TenantsApiInt
396
479
  * Update Tenant User
397
480
  */
398
481
  updateTenantUser(requestParameters: UpdateTenantUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantUserResponse>;
482
+ /**
483
+ * Creates request options for uploadTenantLogo without sending the request
484
+ */
485
+ uploadTenantLogoRequestOpts(requestParameters: UploadTenantLogoRequest): Promise<runtime.RequestOpts>;
486
+ /**
487
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
488
+ * Upload Tenant Logo
489
+ */
490
+ uploadTenantLogoRaw(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
491
+ /**
492
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
493
+ * Upload Tenant Logo
494
+ */
495
+ uploadTenantLogo(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
399
496
  }
@@ -114,6 +114,53 @@ export class TenantsApi extends runtime.BaseAPI {
114
114
  yield this.deleteTenantRaw(requestParameters, initOverrides);
115
115
  });
116
116
  }
117
+ /**
118
+ * Creates request options for deleteTenantLogo without sending the request
119
+ */
120
+ deleteTenantLogoRequestOpts(requestParameters) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ if (requestParameters['tenantId'] == null) {
123
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling deleteTenantLogo().');
124
+ }
125
+ const queryParameters = {};
126
+ if (requestParameters['logoType'] != null) {
127
+ queryParameters['logo_type'] = requestParameters['logoType'];
128
+ }
129
+ const headerParameters = {};
130
+ if (requestParameters['authorization'] != null) {
131
+ headerParameters['authorization'] = String(requestParameters['authorization']);
132
+ }
133
+ let urlPath = `/v1/tenants/{tenant_id}/branding/logo`;
134
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
135
+ return {
136
+ path: urlPath,
137
+ method: 'DELETE',
138
+ headers: headerParameters,
139
+ query: queryParameters,
140
+ };
141
+ });
142
+ }
143
+ /**
144
+ * Delete a branding logo. Requires OWNER or ADMIN role.
145
+ * Delete Tenant Logo
146
+ */
147
+ deleteTenantLogoRaw(requestParameters, initOverrides) {
148
+ return __awaiter(this, void 0, void 0, function* () {
149
+ const requestOptions = yield this.deleteTenantLogoRequestOpts(requestParameters);
150
+ const response = yield this.request(requestOptions, initOverrides);
151
+ return new runtime.JSONApiResponse(response, (jsonValue) => TenantResponseFromJSON(jsonValue));
152
+ });
153
+ }
154
+ /**
155
+ * Delete a branding logo. Requires OWNER or ADMIN role.
156
+ * Delete Tenant Logo
157
+ */
158
+ deleteTenantLogo(requestParameters, initOverrides) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ const response = yield this.deleteTenantLogoRaw(requestParameters, initOverrides);
161
+ return yield response.value();
162
+ });
163
+ }
117
164
  /**
118
165
  * Creates request options for deleteTenantUser without sending the request
119
166
  */
@@ -403,4 +450,73 @@ export class TenantsApi extends runtime.BaseAPI {
403
450
  return yield response.value();
404
451
  });
405
452
  }
453
+ /**
454
+ * Creates request options for uploadTenantLogo without sending the request
455
+ */
456
+ uploadTenantLogoRequestOpts(requestParameters) {
457
+ return __awaiter(this, void 0, void 0, function* () {
458
+ if (requestParameters['tenantId'] == null) {
459
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling uploadTenantLogo().');
460
+ }
461
+ if (requestParameters['file'] == null) {
462
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling uploadTenantLogo().');
463
+ }
464
+ const queryParameters = {};
465
+ const headerParameters = {};
466
+ if (requestParameters['authorization'] != null) {
467
+ headerParameters['authorization'] = String(requestParameters['authorization']);
468
+ }
469
+ const consumes = [
470
+ { contentType: 'multipart/form-data' },
471
+ ];
472
+ // @ts-ignore: canConsumeForm may be unused
473
+ const canConsumeForm = runtime.canConsumeForm(consumes);
474
+ let formParams;
475
+ let useForm = false;
476
+ // use FormData to transmit files using content-type "multipart/form-data"
477
+ useForm = canConsumeForm;
478
+ if (useForm) {
479
+ formParams = new FormData();
480
+ }
481
+ else {
482
+ formParams = new URLSearchParams();
483
+ }
484
+ if (requestParameters['file'] != null) {
485
+ formParams.append('file', requestParameters['file']);
486
+ }
487
+ if (requestParameters['logoType'] != null) {
488
+ formParams.append('logo_type', requestParameters['logoType']);
489
+ }
490
+ let urlPath = `/v1/tenants/{tenant_id}/branding/logo`;
491
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
492
+ return {
493
+ path: urlPath,
494
+ method: 'POST',
495
+ headers: headerParameters,
496
+ query: queryParameters,
497
+ body: formParams,
498
+ };
499
+ });
500
+ }
501
+ /**
502
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
503
+ * Upload Tenant Logo
504
+ */
505
+ uploadTenantLogoRaw(requestParameters, initOverrides) {
506
+ return __awaiter(this, void 0, void 0, function* () {
507
+ const requestOptions = yield this.uploadTenantLogoRequestOpts(requestParameters);
508
+ const response = yield this.request(requestOptions, initOverrides);
509
+ return new runtime.JSONApiResponse(response, (jsonValue) => TenantResponseFromJSON(jsonValue));
510
+ });
511
+ }
512
+ /**
513
+ * Upload a branding logo (primary, dark-mode variant, or favicon). Requires OWNER or ADMIN role. Accepted image types: PNG, JPEG, SVG, WebP, ICO. Max 2 MB.
514
+ * Upload Tenant Logo
515
+ */
516
+ uploadTenantLogo(requestParameters, initOverrides) {
517
+ return __awaiter(this, void 0, void 0, function* () {
518
+ const response = yield this.uploadTenantLogoRaw(requestParameters, initOverrides);
519
+ return yield response.value();
520
+ });
521
+ }
406
522
  }
@@ -0,0 +1,26 @@
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
+ * Types of branding logos that can be uploaded.
14
+ * @export
15
+ */
16
+ export declare const BrandingLogoType: {
17
+ readonly Logo: "logo";
18
+ readonly LogoDark: "logo_dark";
19
+ readonly Favicon: "favicon";
20
+ };
21
+ export type BrandingLogoType = typeof BrandingLogoType[keyof typeof BrandingLogoType];
22
+ export declare function instanceOfBrandingLogoType(value: any): boolean;
23
+ export declare function BrandingLogoTypeFromJSON(json: any): BrandingLogoType;
24
+ export declare function BrandingLogoTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrandingLogoType;
25
+ export declare function BrandingLogoTypeToJSON(value?: BrandingLogoType | null): any;
26
+ export declare function BrandingLogoTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): BrandingLogoType;