@knowledge-stack/ksapi 1.48.1 → 1.50.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 (72) hide show
  1. package/.openapi-generator/FILES +8 -2
  2. package/README.md +8 -3
  3. package/dist/apis/DocumentsApi.d.ts +7 -1
  4. package/dist/apis/DocumentsApi.js +6 -0
  5. package/dist/apis/TenantsApi.d.ts +98 -1
  6. package/dist/apis/TenantsApi.js +116 -0
  7. package/dist/esm/apis/DocumentsApi.d.ts +7 -1
  8. package/dist/esm/apis/DocumentsApi.js +6 -0
  9. package/dist/esm/apis/TenantsApi.d.ts +98 -1
  10. package/dist/esm/apis/TenantsApi.js +116 -0
  11. package/dist/esm/models/BrandingLogoType.d.ts +26 -0
  12. package/dist/esm/models/BrandingLogoType.js +44 -0
  13. package/dist/esm/models/ChunkMetadataInput.d.ts +7 -0
  14. package/dist/esm/models/ChunkMetadataInput.js +3 -0
  15. package/dist/esm/models/ChunkMetadataOutput.d.ts +7 -0
  16. package/dist/esm/models/ChunkMetadataOutput.js +3 -0
  17. package/dist/esm/models/ImageTaxonomy.d.ts +25 -0
  18. package/dist/esm/models/ImageTaxonomy.js +43 -0
  19. package/dist/esm/models/TenantBrandingResponse.d.ts +79 -0
  20. package/dist/esm/models/TenantBrandingResponse.js +52 -0
  21. package/dist/esm/models/TenantResponse.d.ts +10 -3
  22. package/dist/esm/models/TenantResponse.js +6 -3
  23. package/dist/esm/models/TenantSettingsResponse.d.ts +54 -0
  24. package/dist/esm/models/TenantSettingsResponse.js +49 -0
  25. package/dist/esm/models/TenantSettingsUpdate.d.ts +20 -0
  26. package/dist/esm/models/TenantSettingsUpdate.js +6 -0
  27. package/dist/esm/models/index.d.ts +4 -1
  28. package/dist/esm/models/index.js +4 -1
  29. package/dist/models/BrandingLogoType.d.ts +26 -0
  30. package/dist/models/BrandingLogoType.js +52 -0
  31. package/dist/models/ChunkMetadataInput.d.ts +7 -0
  32. package/dist/models/ChunkMetadataInput.js +3 -0
  33. package/dist/models/ChunkMetadataOutput.d.ts +7 -0
  34. package/dist/models/ChunkMetadataOutput.js +3 -0
  35. package/dist/models/ImageTaxonomy.d.ts +25 -0
  36. package/dist/models/ImageTaxonomy.js +51 -0
  37. package/dist/models/TenantBrandingResponse.d.ts +79 -0
  38. package/dist/models/TenantBrandingResponse.js +60 -0
  39. package/dist/models/TenantResponse.d.ts +10 -3
  40. package/dist/models/TenantResponse.js +6 -3
  41. package/dist/models/TenantSettingsResponse.d.ts +54 -0
  42. package/dist/models/TenantSettingsResponse.js +57 -0
  43. package/dist/models/TenantSettingsUpdate.d.ts +20 -0
  44. package/dist/models/TenantSettingsUpdate.js +6 -0
  45. package/dist/models/index.d.ts +4 -1
  46. package/dist/models/index.js +4 -1
  47. package/docs/BrandingLogoType.md +33 -0
  48. package/docs/ChunkMetadataInput.md +2 -0
  49. package/docs/ChunkMetadataOutput.md +2 -0
  50. package/docs/DocumentsApi.md +8 -2
  51. package/docs/ImageTaxonomy.md +33 -0
  52. package/docs/TenantBrandingResponse.md +45 -0
  53. package/docs/TenantResponse.md +3 -1
  54. package/docs/{TenantSettings.md → TenantSettingsResponse.md} +5 -4
  55. package/docs/TenantSettingsUpdate.md +6 -0
  56. package/docs/TenantsApi.md +159 -0
  57. package/package.json +1 -1
  58. package/src/apis/DocumentsApi.ts +17 -0
  59. package/src/apis/TenantsApi.ts +218 -0
  60. package/src/models/BrandingLogoType.ts +54 -0
  61. package/src/models/ChunkMetadataInput.ts +15 -0
  62. package/src/models/ChunkMetadataOutput.ts +15 -0
  63. package/src/models/ImageTaxonomy.ts +53 -0
  64. package/src/models/TenantBrandingResponse.ts +122 -0
  65. package/src/models/TenantResponse.ts +25 -10
  66. package/src/models/{TenantSettings.ts → TenantSettingsResponse.ts} +20 -18
  67. package/src/models/TenantSettingsUpdate.ts +24 -0
  68. package/src/models/index.ts +4 -1
  69. package/dist/esm/models/TenantSettings.d.ts +0 -54
  70. package/dist/esm/models/TenantSettings.js +0 -45
  71. package/dist/models/TenantSettings.d.ts +0 -54
  72. package/dist/models/TenantSettings.js +0 -53
@@ -6,12 +6,14 @@ All URIs are relative to *http://localhost:8000*
6
6
  |------------- | ------------- | -------------|
7
7
  | [**createTenant**](TenantsApi.md#createtenantoperation) | **POST** /v1/tenants | Create Tenant |
8
8
  | [**deleteTenant**](TenantsApi.md#deletetenant) | **DELETE** /v1/tenants/{tenant_id} | Delete Tenant |
9
+ | [**deleteTenantLogo**](TenantsApi.md#deletetenantlogo) | **DELETE** /v1/tenants/{tenant_id}/branding/logo | Delete Tenant Logo |
9
10
  | [**deleteTenantUser**](TenantsApi.md#deletetenantuser) | **DELETE** /v1/tenants/{tenant_id}/users/{user_id} | Delete Tenant User |
10
11
  | [**getTenant**](TenantsApi.md#gettenant) | **GET** /v1/tenants/{tenant_id} | Get Tenant |
11
12
  | [**listTenantUsers**](TenantsApi.md#listtenantusers) | **GET** /v1/tenants/{tenant_id}/users | List Tenant Users |
12
13
  | [**listTenants**](TenantsApi.md#listtenants) | **GET** /v1/tenants | List Tenants |
13
14
  | [**updateTenant**](TenantsApi.md#updatetenantoperation) | **PATCH** /v1/tenants/{tenant_id} | Update Tenant |
14
15
  | [**updateTenantUser**](TenantsApi.md#updatetenantuser) | **PATCH** /v1/tenants/{tenant_id}/users/{user_id} | Update Tenant User |
16
+ | [**uploadTenantLogo**](TenantsApi.md#uploadtenantlogo) | **POST** /v1/tenants/{tenant_id}/branding/logo | Upload Tenant Logo |
15
17
 
16
18
 
17
19
 
@@ -163,6 +165,83 @@ No authorization required
163
165
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
164
166
 
165
167
 
168
+ ## deleteTenantLogo
169
+
170
+ > TenantResponse deleteTenantLogo(tenantId, logoType, authorization, ksUat)
171
+
172
+ Delete Tenant Logo
173
+
174
+ Delete a branding logo. Requires OWNER or ADMIN role.
175
+
176
+ ### Example
177
+
178
+ ```ts
179
+ import {
180
+ Configuration,
181
+ TenantsApi,
182
+ } from '@knowledge-stack/ksapi';
183
+ import type { DeleteTenantLogoRequest } from '@knowledge-stack/ksapi';
184
+
185
+ async function example() {
186
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
187
+ const api = new TenantsApi();
188
+
189
+ const body = {
190
+ // string
191
+ tenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
192
+ // BrandingLogoType (optional)
193
+ logoType: ...,
194
+ // string (optional)
195
+ authorization: authorization_example,
196
+ // string (optional)
197
+ ksUat: ksUat_example,
198
+ } satisfies DeleteTenantLogoRequest;
199
+
200
+ try {
201
+ const data = await api.deleteTenantLogo(body);
202
+ console.log(data);
203
+ } catch (error) {
204
+ console.error(error);
205
+ }
206
+ }
207
+
208
+ // Run the test
209
+ example().catch(console.error);
210
+ ```
211
+
212
+ ### Parameters
213
+
214
+
215
+ | Name | Type | Description | Notes |
216
+ |------------- | ------------- | ------------- | -------------|
217
+ | **tenantId** | `string` | | [Defaults to `undefined`] |
218
+ | **logoType** | `BrandingLogoType` | | [Optional] [Defaults to `undefined`] [Enum: logo, logo_dark, favicon] |
219
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
220
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
221
+
222
+ ### Return type
223
+
224
+ [**TenantResponse**](TenantResponse.md)
225
+
226
+ ### Authorization
227
+
228
+ No authorization required
229
+
230
+ ### HTTP request headers
231
+
232
+ - **Content-Type**: Not defined
233
+ - **Accept**: `application/json`
234
+
235
+
236
+ ### HTTP response details
237
+ | Status code | Description | Response headers |
238
+ |-------------|-------------|------------------|
239
+ | **200** | Successful Response | - |
240
+ | **422** | Validation Error | - |
241
+
242
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
243
+
244
+
166
245
  ## deleteTenantUser
167
246
 
168
247
  > deleteTenantUser(tenantId, userId, authorization, ksUat)
@@ -627,3 +706,83 @@ No authorization required
627
706
 
628
707
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
629
708
 
709
+
710
+ ## uploadTenantLogo
711
+
712
+ > TenantResponse uploadTenantLogo(tenantId, file, authorization, ksUat, logoType)
713
+
714
+ Upload Tenant Logo
715
+
716
+ 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.
717
+
718
+ ### Example
719
+
720
+ ```ts
721
+ import {
722
+ Configuration,
723
+ TenantsApi,
724
+ } from '@knowledge-stack/ksapi';
725
+ import type { UploadTenantLogoRequest } from '@knowledge-stack/ksapi';
726
+
727
+ async function example() {
728
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
729
+ const api = new TenantsApi();
730
+
731
+ const body = {
732
+ // string
733
+ tenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
734
+ // Blob
735
+ file: BINARY_DATA_HERE,
736
+ // string (optional)
737
+ authorization: authorization_example,
738
+ // string (optional)
739
+ ksUat: ksUat_example,
740
+ // BrandingLogoType (optional)
741
+ logoType: ...,
742
+ } satisfies UploadTenantLogoRequest;
743
+
744
+ try {
745
+ const data = await api.uploadTenantLogo(body);
746
+ console.log(data);
747
+ } catch (error) {
748
+ console.error(error);
749
+ }
750
+ }
751
+
752
+ // Run the test
753
+ example().catch(console.error);
754
+ ```
755
+
756
+ ### Parameters
757
+
758
+
759
+ | Name | Type | Description | Notes |
760
+ |------------- | ------------- | ------------- | -------------|
761
+ | **tenantId** | `string` | | [Defaults to `undefined`] |
762
+ | **file** | `Blob` | | [Defaults to `undefined`] |
763
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
764
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
765
+ | **logoType** | `BrandingLogoType` | | [Optional] [Defaults to `undefined`] [Enum: logo, logo_dark, favicon] |
766
+
767
+ ### Return type
768
+
769
+ [**TenantResponse**](TenantResponse.md)
770
+
771
+ ### Authorization
772
+
773
+ No authorization required
774
+
775
+ ### HTTP request headers
776
+
777
+ - **Content-Type**: `multipart/form-data`
778
+ - **Accept**: `application/json`
779
+
780
+
781
+ ### HTTP response details
782
+ | Status code | Description | Response headers |
783
+ |-------------|-------------|------------------|
784
+ | **200** | Successful Response | - |
785
+ | **422** | Validation Error | - |
786
+
787
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
788
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.48.1",
3
+ "version": "1.50.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -19,6 +19,7 @@ import type {
19
19
  CreateDocumentRequest,
20
20
  DocumentResponse,
21
21
  HTTPValidationError,
22
+ ImageTaxonomy,
22
23
  IngestDocumentResponse,
23
24
  IngestionMode,
24
25
  PaginatedResponseDocumentResponse,
@@ -34,6 +35,8 @@ import {
34
35
  DocumentResponseToJSON,
35
36
  HTTPValidationErrorFromJSON,
36
37
  HTTPValidationErrorToJSON,
38
+ ImageTaxonomyFromJSON,
39
+ ImageTaxonomyToJSON,
37
40
  IngestDocumentResponseFromJSON,
38
41
  IngestDocumentResponseToJSON,
39
42
  IngestionModeFromJSON,
@@ -73,6 +76,7 @@ export interface IngestDocumentRequest {
73
76
  name?: string | null;
74
77
  ingestionMode?: IngestionMode;
75
78
  chunkType?: ChunkType;
79
+ secondaryTaxonomy?: ImageTaxonomy;
76
80
  pageDpi?: number;
77
81
  }
78
82
 
@@ -83,6 +87,7 @@ export interface IngestDocumentVersionRequest {
83
87
  ksUat?: string | null;
84
88
  ingestionMode?: IngestionMode;
85
89
  chunkType?: ChunkType;
90
+ secondaryTaxonomy?: ImageTaxonomy;
86
91
  pageDpi?: number;
87
92
  }
88
93
 
@@ -205,6 +210,7 @@ export interface DocumentsApiInterface {
205
210
  * @param {string} [name] Document name (defaults to filename)
206
211
  * @param {IngestionMode} [ingestionMode]
207
212
  * @param {ChunkType} [chunkType]
213
+ * @param {ImageTaxonomy} [secondaryTaxonomy]
208
214
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
209
215
  * @throws {RequiredError}
210
216
  * @memberof DocumentsApiInterface
@@ -221,6 +227,7 @@ export interface DocumentsApiInterface {
221
227
  * @param {string} [name] Document name (defaults to filename)
222
228
  * @param {IngestionMode} [ingestionMode]
223
229
  * @param {ChunkType} [chunkType]
230
+ * @param {ImageTaxonomy} [secondaryTaxonomy]
224
231
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
225
232
  * @param {*} [options] Override http request option.
226
233
  * @throws {RequiredError}
@@ -242,6 +249,7 @@ export interface DocumentsApiInterface {
242
249
  * @param {string} [ksUat]
243
250
  * @param {IngestionMode} [ingestionMode]
244
251
  * @param {ChunkType} [chunkType]
252
+ * @param {ImageTaxonomy} [secondaryTaxonomy]
245
253
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
246
254
  * @throws {RequiredError}
247
255
  * @memberof DocumentsApiInterface
@@ -257,6 +265,7 @@ export interface DocumentsApiInterface {
257
265
  * @param {string} [ksUat]
258
266
  * @param {IngestionMode} [ingestionMode]
259
267
  * @param {ChunkType} [chunkType]
268
+ * @param {ImageTaxonomy} [secondaryTaxonomy]
260
269
  * @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
261
270
  * @param {*} [options] Override http request option.
262
271
  * @throws {RequiredError}
@@ -563,6 +572,10 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
563
572
  formParams.append('chunk_type', requestParameters['chunkType'] as any);
564
573
  }
565
574
 
575
+ if (requestParameters['secondaryTaxonomy'] != null) {
576
+ formParams.append('secondary_taxonomy', requestParameters['secondaryTaxonomy'] as any);
577
+ }
578
+
566
579
  if (requestParameters['pageDpi'] != null) {
567
580
  formParams.append('page_dpi', requestParameters['pageDpi'] as any);
568
581
  }
@@ -653,6 +666,10 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
653
666
  formParams.append('chunk_type', requestParameters['chunkType'] as any);
654
667
  }
655
668
 
669
+ if (requestParameters['secondaryTaxonomy'] != null) {
670
+ formParams.append('secondary_taxonomy', requestParameters['secondaryTaxonomy'] as any);
671
+ }
672
+
656
673
  if (requestParameters['pageDpi'] != null) {
657
674
  formParams.append('page_dpi', requestParameters['pageDpi'] as any);
658
675
  }
@@ -15,6 +15,7 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ BrandingLogoType,
18
19
  CreateTenantRequest,
19
20
  HTTPValidationError,
20
21
  PaginatedResponseTenantResponse,
@@ -25,6 +26,8 @@ import type {
25
26
  UpdateTenantRequest,
26
27
  } from '../models/index';
27
28
  import {
29
+ BrandingLogoTypeFromJSON,
30
+ BrandingLogoTypeToJSON,
28
31
  CreateTenantRequestFromJSON,
29
32
  CreateTenantRequestToJSON,
30
33
  HTTPValidationErrorFromJSON,
@@ -55,6 +58,13 @@ export interface DeleteTenantRequest {
55
58
  ksUat?: string | null;
56
59
  }
57
60
 
61
+ export interface DeleteTenantLogoRequest {
62
+ tenantId: string;
63
+ logoType?: BrandingLogoType;
64
+ authorization?: string | null;
65
+ ksUat?: string | null;
66
+ }
67
+
58
68
  export interface DeleteTenantUserRequest {
59
69
  tenantId: string;
60
70
  userId: string;
@@ -98,6 +108,14 @@ export interface UpdateTenantUserRequest {
98
108
  ksUat?: string | null;
99
109
  }
100
110
 
111
+ export interface UploadTenantLogoRequest {
112
+ tenantId: string;
113
+ file: Blob;
114
+ authorization?: string | null;
115
+ ksUat?: string | null;
116
+ logoType?: BrandingLogoType;
117
+ }
118
+
101
119
  /**
102
120
  * TenantsApi - interface
103
121
  *
@@ -161,6 +179,36 @@ export interface TenantsApiInterface {
161
179
  */
162
180
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
163
181
 
182
+ /**
183
+ * Creates request options for deleteTenantLogo without sending the request
184
+ * @param {string} tenantId
185
+ * @param {BrandingLogoType} [logoType]
186
+ * @param {string} [authorization]
187
+ * @param {string} [ksUat]
188
+ * @throws {RequiredError}
189
+ * @memberof TenantsApiInterface
190
+ */
191
+ deleteTenantLogoRequestOpts(requestParameters: DeleteTenantLogoRequest): Promise<runtime.RequestOpts>;
192
+
193
+ /**
194
+ * Delete a branding logo. Requires OWNER or ADMIN role.
195
+ * @summary Delete Tenant Logo
196
+ * @param {string} tenantId
197
+ * @param {BrandingLogoType} [logoType]
198
+ * @param {string} [authorization]
199
+ * @param {string} [ksUat]
200
+ * @param {*} [options] Override http request option.
201
+ * @throws {RequiredError}
202
+ * @memberof TenantsApiInterface
203
+ */
204
+ deleteTenantLogoRaw(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
205
+
206
+ /**
207
+ * Delete a branding logo. Requires OWNER or ADMIN role.
208
+ * Delete Tenant Logo
209
+ */
210
+ deleteTenantLogo(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
211
+
164
212
  /**
165
213
  * Creates request options for deleteTenantUser without sending the request
166
214
  * @param {string} tenantId
@@ -343,6 +391,38 @@ export interface TenantsApiInterface {
343
391
  */
344
392
  updateTenantUser(requestParameters: UpdateTenantUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantUserResponse>;
345
393
 
394
+ /**
395
+ * Creates request options for uploadTenantLogo without sending the request
396
+ * @param {string} tenantId
397
+ * @param {Blob} file
398
+ * @param {string} [authorization]
399
+ * @param {string} [ksUat]
400
+ * @param {BrandingLogoType} [logoType]
401
+ * @throws {RequiredError}
402
+ * @memberof TenantsApiInterface
403
+ */
404
+ uploadTenantLogoRequestOpts(requestParameters: UploadTenantLogoRequest): Promise<runtime.RequestOpts>;
405
+
406
+ /**
407
+ * 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.
408
+ * @summary Upload Tenant Logo
409
+ * @param {string} tenantId
410
+ * @param {Blob} file
411
+ * @param {string} [authorization]
412
+ * @param {string} [ksUat]
413
+ * @param {BrandingLogoType} [logoType]
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ * @memberof TenantsApiInterface
417
+ */
418
+ uploadTenantLogoRaw(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
419
+
420
+ /**
421
+ * 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.
422
+ * Upload Tenant Logo
423
+ */
424
+ uploadTenantLogo(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
425
+
346
426
  }
347
427
 
348
428
  /**
@@ -453,6 +533,61 @@ export class TenantsApi extends runtime.BaseAPI implements TenantsApiInterface {
453
533
  await this.deleteTenantRaw(requestParameters, initOverrides);
454
534
  }
455
535
 
536
+ /**
537
+ * Creates request options for deleteTenantLogo without sending the request
538
+ */
539
+ async deleteTenantLogoRequestOpts(requestParameters: DeleteTenantLogoRequest): Promise<runtime.RequestOpts> {
540
+ if (requestParameters['tenantId'] == null) {
541
+ throw new runtime.RequiredError(
542
+ 'tenantId',
543
+ 'Required parameter "tenantId" was null or undefined when calling deleteTenantLogo().'
544
+ );
545
+ }
546
+
547
+ const queryParameters: any = {};
548
+
549
+ if (requestParameters['logoType'] != null) {
550
+ queryParameters['logo_type'] = requestParameters['logoType'];
551
+ }
552
+
553
+ const headerParameters: runtime.HTTPHeaders = {};
554
+
555
+ if (requestParameters['authorization'] != null) {
556
+ headerParameters['authorization'] = String(requestParameters['authorization']);
557
+ }
558
+
559
+
560
+ let urlPath = `/v1/tenants/{tenant_id}/branding/logo`;
561
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
562
+
563
+ return {
564
+ path: urlPath,
565
+ method: 'DELETE',
566
+ headers: headerParameters,
567
+ query: queryParameters,
568
+ };
569
+ }
570
+
571
+ /**
572
+ * Delete a branding logo. Requires OWNER or ADMIN role.
573
+ * Delete Tenant Logo
574
+ */
575
+ async deleteTenantLogoRaw(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>> {
576
+ const requestOptions = await this.deleteTenantLogoRequestOpts(requestParameters);
577
+ const response = await this.request(requestOptions, initOverrides);
578
+
579
+ return new runtime.JSONApiResponse(response, (jsonValue) => TenantResponseFromJSON(jsonValue));
580
+ }
581
+
582
+ /**
583
+ * Delete a branding logo. Requires OWNER or ADMIN role.
584
+ * Delete Tenant Logo
585
+ */
586
+ async deleteTenantLogo(requestParameters: DeleteTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse> {
587
+ const response = await this.deleteTenantLogoRaw(requestParameters, initOverrides);
588
+ return await response.value();
589
+ }
590
+
456
591
  /**
457
592
  * Creates request options for deleteTenantUser without sending the request
458
593
  */
@@ -802,4 +937,87 @@ export class TenantsApi extends runtime.BaseAPI implements TenantsApiInterface {
802
937
  return await response.value();
803
938
  }
804
939
 
940
+ /**
941
+ * Creates request options for uploadTenantLogo without sending the request
942
+ */
943
+ async uploadTenantLogoRequestOpts(requestParameters: UploadTenantLogoRequest): Promise<runtime.RequestOpts> {
944
+ if (requestParameters['tenantId'] == null) {
945
+ throw new runtime.RequiredError(
946
+ 'tenantId',
947
+ 'Required parameter "tenantId" was null or undefined when calling uploadTenantLogo().'
948
+ );
949
+ }
950
+
951
+ if (requestParameters['file'] == null) {
952
+ throw new runtime.RequiredError(
953
+ 'file',
954
+ 'Required parameter "file" was null or undefined when calling uploadTenantLogo().'
955
+ );
956
+ }
957
+
958
+ const queryParameters: any = {};
959
+
960
+ const headerParameters: runtime.HTTPHeaders = {};
961
+
962
+ if (requestParameters['authorization'] != null) {
963
+ headerParameters['authorization'] = String(requestParameters['authorization']);
964
+ }
965
+
966
+ const consumes: runtime.Consume[] = [
967
+ { contentType: 'multipart/form-data' },
968
+ ];
969
+ // @ts-ignore: canConsumeForm may be unused
970
+ const canConsumeForm = runtime.canConsumeForm(consumes);
971
+
972
+ let formParams: { append(param: string, value: any): any };
973
+ let useForm = false;
974
+ // use FormData to transmit files using content-type "multipart/form-data"
975
+ useForm = canConsumeForm;
976
+ if (useForm) {
977
+ formParams = new FormData();
978
+ } else {
979
+ formParams = new URLSearchParams();
980
+ }
981
+
982
+ if (requestParameters['file'] != null) {
983
+ formParams.append('file', requestParameters['file'] as any);
984
+ }
985
+
986
+ if (requestParameters['logoType'] != null) {
987
+ formParams.append('logo_type', requestParameters['logoType'] as any);
988
+ }
989
+
990
+
991
+ let urlPath = `/v1/tenants/{tenant_id}/branding/logo`;
992
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
993
+
994
+ return {
995
+ path: urlPath,
996
+ method: 'POST',
997
+ headers: headerParameters,
998
+ query: queryParameters,
999
+ body: formParams,
1000
+ };
1001
+ }
1002
+
1003
+ /**
1004
+ * 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.
1005
+ * Upload Tenant Logo
1006
+ */
1007
+ async uploadTenantLogoRaw(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>> {
1008
+ const requestOptions = await this.uploadTenantLogoRequestOpts(requestParameters);
1009
+ const response = await this.request(requestOptions, initOverrides);
1010
+
1011
+ return new runtime.JSONApiResponse(response, (jsonValue) => TenantResponseFromJSON(jsonValue));
1012
+ }
1013
+
1014
+ /**
1015
+ * 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.
1016
+ * Upload Tenant Logo
1017
+ */
1018
+ async uploadTenantLogo(requestParameters: UploadTenantLogoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse> {
1019
+ const response = await this.uploadTenantLogoRaw(requestParameters, initOverrides);
1020
+ return await response.value();
1021
+ }
1022
+
805
1023
  }
@@ -0,0 +1,54 @@
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
+
16
+ /**
17
+ * Types of branding logos that can be uploaded.
18
+ * @export
19
+ */
20
+ export const BrandingLogoType = {
21
+ Logo: 'logo',
22
+ LogoDark: 'logo_dark',
23
+ Favicon: 'favicon'
24
+ } as const;
25
+ export type BrandingLogoType = typeof BrandingLogoType[keyof typeof BrandingLogoType];
26
+
27
+
28
+ export function instanceOfBrandingLogoType(value: any): boolean {
29
+ for (const key in BrandingLogoType) {
30
+ if (Object.prototype.hasOwnProperty.call(BrandingLogoType, key)) {
31
+ if (BrandingLogoType[key as keyof typeof BrandingLogoType] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function BrandingLogoTypeFromJSON(json: any): BrandingLogoType {
40
+ return BrandingLogoTypeFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function BrandingLogoTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrandingLogoType {
44
+ return json as BrandingLogoType;
45
+ }
46
+
47
+ export function BrandingLogoTypeToJSON(value?: BrandingLogoType | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function BrandingLogoTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): BrandingLogoType {
52
+ return value as BrandingLogoType;
53
+ }
54
+
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { ImageTaxonomy } from './ImageTaxonomy';
17
+ import {
18
+ ImageTaxonomyFromJSON,
19
+ ImageTaxonomyFromJSONTyped,
20
+ ImageTaxonomyToJSON,
21
+ ImageTaxonomyToJSONTyped,
22
+ } from './ImageTaxonomy';
16
23
  import type { IngestionMode } from './IngestionMode';
17
24
  import {
18
25
  IngestionModeFromJSON,
@@ -64,6 +71,12 @@ export interface ChunkMetadataInput {
64
71
  * @memberof ChunkMetadataInput
65
72
  */
66
73
  extractedTextS3Uri?: string | null;
74
+ /**
75
+ *
76
+ * @type {ImageTaxonomy}
77
+ * @memberof ChunkMetadataInput
78
+ */
79
+ secondaryTaxonomy?: ImageTaxonomy;
67
80
  /**
68
81
  * Worksheet name this chunk was extracted from (XLSX only)
69
82
  * @type {string}
@@ -144,6 +157,7 @@ export function ChunkMetadataInputFromJSONTyped(json: any, ignoreDiscriminator:
144
157
  'summary': json['summary'] == null ? undefined : json['summary'],
145
158
  'ingestionMode': json['ingestion_mode'] == null ? undefined : IngestionModeFromJSON(json['ingestion_mode']),
146
159
  'extractedTextS3Uri': json['extracted_text_s3_uri'] == null ? undefined : json['extracted_text_s3_uri'],
160
+ 'secondaryTaxonomy': json['secondary_taxonomy'] == null ? undefined : ImageTaxonomyFromJSON(json['secondary_taxonomy']),
147
161
  'sheetName': json['sheet_name'] == null ? undefined : json['sheet_name'],
148
162
  'blockType': json['block_type'] == null ? undefined : json['block_type'],
149
163
  'sourceUri': json['source_uri'] == null ? undefined : json['source_uri'],
@@ -172,6 +186,7 @@ export function ChunkMetadataInputToJSONTyped(value?: ChunkMetadataInput | null,
172
186
  'summary': value['summary'],
173
187
  'ingestion_mode': IngestionModeToJSON(value['ingestionMode']),
174
188
  'extracted_text_s3_uri': value['extractedTextS3Uri'],
189
+ 'secondary_taxonomy': ImageTaxonomyToJSON(value['secondaryTaxonomy']),
175
190
  'sheet_name': value['sheetName'],
176
191
  'block_type': value['blockType'],
177
192
  'source_uri': value['sourceUri'],
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { ImageTaxonomy } from './ImageTaxonomy';
17
+ import {
18
+ ImageTaxonomyFromJSON,
19
+ ImageTaxonomyFromJSONTyped,
20
+ ImageTaxonomyToJSON,
21
+ ImageTaxonomyToJSONTyped,
22
+ } from './ImageTaxonomy';
16
23
  import type { IngestionMode } from './IngestionMode';
17
24
  import {
18
25
  IngestionModeFromJSON,
@@ -64,6 +71,12 @@ export interface ChunkMetadataOutput {
64
71
  * @memberof ChunkMetadataOutput
65
72
  */
66
73
  extractedTextS3Uri?: string | null;
74
+ /**
75
+ *
76
+ * @type {ImageTaxonomy}
77
+ * @memberof ChunkMetadataOutput
78
+ */
79
+ secondaryTaxonomy?: ImageTaxonomy;
67
80
  /**
68
81
  * Worksheet name this chunk was extracted from (XLSX only)
69
82
  * @type {string}
@@ -144,6 +157,7 @@ export function ChunkMetadataOutputFromJSONTyped(json: any, ignoreDiscriminator:
144
157
  'summary': json['summary'] == null ? undefined : json['summary'],
145
158
  'ingestionMode': json['ingestion_mode'] == null ? undefined : IngestionModeFromJSON(json['ingestion_mode']),
146
159
  'extractedTextS3Uri': json['extracted_text_s3_uri'] == null ? undefined : json['extracted_text_s3_uri'],
160
+ 'secondaryTaxonomy': json['secondary_taxonomy'] == null ? undefined : ImageTaxonomyFromJSON(json['secondary_taxonomy']),
147
161
  'sheetName': json['sheet_name'] == null ? undefined : json['sheet_name'],
148
162
  'blockType': json['block_type'] == null ? undefined : json['block_type'],
149
163
  'sourceUri': json['source_uri'] == null ? undefined : json['source_uri'],
@@ -172,6 +186,7 @@ export function ChunkMetadataOutputToJSONTyped(value?: ChunkMetadataOutput | nul
172
186
  'summary': value['summary'],
173
187
  'ingestion_mode': IngestionModeToJSON(value['ingestionMode']),
174
188
  'extracted_text_s3_uri': value['extractedTextS3Uri'],
189
+ 'secondary_taxonomy': ImageTaxonomyToJSON(value['secondaryTaxonomy']),
175
190
  'sheet_name': value['sheetName'],
176
191
  'block_type': value['blockType'],
177
192
  'source_uri': value['sourceUri'],