disable ai import if no key is set

This commit is contained in:
vabene1111
2025-04-18 13:23:47 +02:00
parent d7f37e8293
commit e18b0ad049
9 changed files with 1861 additions and 22 deletions

View File

@@ -13,12 +13,12 @@
*/
import { mapValues } from '../runtime';
import type { TypeEnum } from './TypeEnum';
import type { AutomationTypeEnum } from './AutomationTypeEnum';
import {
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
} from './TypeEnum';
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
} from './AutomationTypeEnum';
/**
*
@@ -34,10 +34,10 @@ export interface Automation {
id?: number;
/**
*
* @type {TypeEnum}
* @type {AutomationTypeEnum}
* @memberof Automation
*/
type: TypeEnum;
type: AutomationTypeEnum;
/**
*
* @type {string}
@@ -108,7 +108,7 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
return {
'id': json['id'] == null ? undefined : json['id'],
'type': TypeEnumFromJSON(json['type']),
'type': AutomationTypeEnumFromJSON(json['type']),
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'param1': json['param_1'] == null ? undefined : json['param_1'],
@@ -127,7 +127,7 @@ export function AutomationToJSON(value?: Omit<Automation, 'createdBy'> | null):
return {
'id': value['id'],
'type': TypeEnumToJSON(value['type']),
'type': AutomationTypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],

View File

@@ -13,12 +13,12 @@
*/
import { mapValues } from '../runtime';
import type { TypeEnum } from './TypeEnum';
import type { AutomationTypeEnum } from './AutomationTypeEnum';
import {
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
} from './TypeEnum';
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
} from './AutomationTypeEnum';
/**
*
@@ -34,10 +34,10 @@ export interface PatchedAutomation {
id?: number;
/**
*
* @type {TypeEnum}
* @type {AutomationTypeEnum}
* @memberof PatchedAutomation
*/
type?: TypeEnum;
type?: AutomationTypeEnum;
/**
*
* @type {string}
@@ -106,7 +106,7 @@ export function PatchedAutomationFromJSONTyped(json: any, ignoreDiscriminator: b
return {
'id': json['id'] == null ? undefined : json['id'],
'type': json['type'] == null ? undefined : TypeEnumFromJSON(json['type']),
'type': json['type'] == null ? undefined : AutomationTypeEnumFromJSON(json['type']),
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'param1': json['param_1'] == null ? undefined : json['param_1'],
@@ -125,7 +125,7 @@ export function PatchedAutomationToJSON(value?: Omit<PatchedAutomation, 'created
return {
'id': value['id'],
'type': TypeEnumToJSON(value['type']),
'type': AutomationTypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],

View File

@@ -31,6 +31,12 @@ export interface ServerSettings {
* @memberof ServerSettings
*/
enablePdfExport: boolean;
/**
*
* @type {boolean}
* @memberof ServerSettings
*/
enableAiImport: boolean;
/**
*
* @type {boolean}
@@ -81,6 +87,7 @@ export interface ServerSettings {
export function instanceOfServerSettings(value: object): value is ServerSettings {
if (!('shoppingMinAutosyncInterval' in value) || value['shoppingMinAutosyncInterval'] === undefined) return false;
if (!('enablePdfExport' in value) || value['enablePdfExport'] === undefined) return false;
if (!('enableAiImport' in value) || value['enableAiImport'] === undefined) return false;
if (!('disableExternalConnectors' in value) || value['disableExternalConnectors'] === undefined) return false;
if (!('termsUrl' in value) || value['termsUrl'] === undefined) return false;
if (!('privacyUrl' in value) || value['privacyUrl'] === undefined) return false;
@@ -103,6 +110,7 @@ export function ServerSettingsFromJSONTyped(json: any, ignoreDiscriminator: bool
'shoppingMinAutosyncInterval': json['shopping_min_autosync_interval'],
'enablePdfExport': json['enable_pdf_export'],
'enableAiImport': json['enable_ai_import'],
'disableExternalConnectors': json['disable_external_connectors'],
'termsUrl': json['terms_url'],
'privacyUrl': json['privacy_url'],
@@ -121,6 +129,7 @@ export function ServerSettingsToJSON(value?: ServerSettings | null): any {
'shopping_min_autosync_interval': value['shoppingMinAutosyncInterval'],
'enable_pdf_export': value['enablePdfExport'],
'enable_ai_import': value['enableAiImport'],
'disable_external_connectors': value['disableExternalConnectors'],
'terms_url': value['termsUrl'],
'privacy_url': value['privacyUrl'],

View File

@@ -4,6 +4,8 @@ export * from './AccessToken';
export * from './AuthToken';
export * from './AutoMealPlan';
export * from './Automation';
export * from './AutomationTypeEnum';
export * from './BaseUnitEnum';
export * from './BookmarkletImport';
export * from './BookmarkletImportList';
export * from './ConnectorConfigConfig';
@@ -30,6 +32,16 @@ export * from './MealPlan';
export * from './MealType';
export * from './MethodEnum';
export * from './NutritionInformation';
export * from './OpenDataCategory';
export * from './OpenDataConversion';
export * from './OpenDataFood';
export * from './OpenDataFoodProperty';
export * from './OpenDataProperty';
export * from './OpenDataStore';
export * from './OpenDataStoreCategory';
export * from './OpenDataUnit';
export * from './OpenDataUnitTypeEnum';
export * from './OpenDataVersion';
export * from './PaginatedAutomationList';
export * from './PaginatedBookmarkletImportListList';
export * from './PaginatedCookLogList';
@@ -76,6 +88,13 @@ export * from './PatchedInviteLink';
export * from './PatchedKeyword';
export * from './PatchedMealPlan';
export * from './PatchedMealType';
export * from './PatchedOpenDataCategory';
export * from './PatchedOpenDataConversion';
export * from './PatchedOpenDataFood';
export * from './PatchedOpenDataProperty';
export * from './PatchedOpenDataStore';
export * from './PatchedOpenDataUnit';
export * from './PatchedOpenDataVersion';
export * from './PatchedProperty';
export * from './PatchedPropertyType';
export * from './PatchedRecipe';
@@ -135,7 +154,6 @@ export * from './SupermarketCategoryRelation';
export * from './Sync';
export * from './SyncLog';
export * from './ThemeEnum';
export * from './TypeEnum';
export * from './Unit';
export * from './UnitConversion';
export * from './User';