lots of shopping tweaks

This commit is contained in:
vabene1111
2024-12-01 12:32:16 +01:00
parent 557954a259
commit 423dc7a6bf
150 changed files with 2918 additions and 2207 deletions

View File

@@ -2,8 +2,10 @@
<v-tabs v-model="currentTab">
<v-tab value="shopping"><i class="fas fa-fw"
:class="{'fa-circle-notch fa-spin':useShoppingStore().currentlyUpdating, 'fa-shopping-cart ': !useShoppingStore().currentlyUpdating}"></i> <span
class="d-none d-md-block ms-1">{{ $t('Shopping_list') }} ({{useShoppingStore().stats.countUnchecked}})</span></v-tab>
<v-tab value="recipes"><i class="fas fa-book fa-fw"></i> <span class="d-none d-md-block ms-1">{{ $t('Recipes') }} ({{useShoppingStore().getAssociatedRecipes().length}})</span></v-tab>
class="d-none d-md-block ms-1">{{ $t('Shopping_list') }} ({{ useShoppingStore().stats.countUnchecked }})</span></v-tab>
<v-tab value="recipes"><i class="fas fa-book fa-fw"></i> <span class="d-none d-md-block ms-1">{{
$t('Recipes')
}} ({{ useShoppingStore().getAssociatedRecipes().length }})</span></v-tab>
<v-menu :close-on-content-click="false">
<template v-slot:activator="{ props }">
@@ -40,7 +42,7 @@
<v-switch color="primary" hide-details :label="$t('ShowRecentlyCompleted')"
v-model="useUserPreferenceStore().deviceSettings.shopping_show_checked_entries"></v-switch>
</v-list-item>
<v-list-subheader>{{$t('Information')}}</v-list-subheader>
<v-list-subheader>{{ $t('Information') }}</v-list-subheader>
<v-list-item>
<v-switch color="primary" hide-details :label="$t('Recipe')" v-model="useUserPreferenceStore().deviceSettings.shopping_item_info_recipe"></v-switch>
</v-list-item>
@@ -50,6 +52,9 @@
<v-list-item>
<v-switch color="primary" hide-details :label="$t('CreatedBy')" v-model="useUserPreferenceStore().deviceSettings.shopping_item_info_created_by"></v-switch>
</v-list-item>
<v-list-item v-if="useUserPreferenceStore().serverSettings.debug">
<v-switch color="primary" hide-details label="Show Debug Info" v-model="useUserPreferenceStore().deviceSettings.shopping_show_debug"></v-switch>
</v-list-item>
</v-list>
</v-menu>
@@ -60,6 +65,16 @@
<v-container>
<v-row>
<v-col>
<v-alert v-if="useShoppingStore().hasFailedItems()" color="warning" class="mb-2">
<template #prepend>
<v-icon icon="fa-solid fa-link-slash"></v-icon>
</template>
{{ $t('ShoppingBackgroundSyncWarning') }}
<template #append>
{{ useShoppingStore().itemCheckSyncQueue.length }}
</template>
</v-alert>
<v-text-field :label="$t('Shopping_input_placeholder')" density="compact" @keyup.enter="addIngredient()" v-model="ingredientInput" hide-details>
<template #append>
<v-btn
@@ -92,10 +107,11 @@
</v-col>
</v-row>
<v-row>
<v-row v-if="useUserPreferenceStore().deviceSettings.shopping_show_debug">
<v-col cols="12" md="4">
<v-card>
<v-card-title>Auto Sync Debug</v-card-title>
<v-btn @click="useShoppingStore().autoSync()">Run Sync</v-btn>
<v-card-text>
<v-list>
<v-list-item>currentlyUpdating: {{ useShoppingStore().currentlyUpdating }}</v-list-item>
@@ -148,7 +164,7 @@
{{ r.recipeName }}
<template #append>
<v-btn icon="$delete" color="delete"></v-btn>
<number-scaler-dialog ></number-scaler-dialog>
<number-scaler-dialog></number-scaler-dialog>
</template>
</v-list-item>
</v-list>
@@ -208,6 +224,13 @@ onMounted(() => {
useShoppingStore().refreshFromAPI()
autoSyncLoop()
// refresh selected supermarket since category ordering might have changed
if (Object.keys(useUserPreferenceStore().deviceSettings.shopping_selected_supermarket).length > 0) {
new ApiApi().apiSupermarketRetrieve({id: useUserPreferenceStore().deviceSettings.shopping_selected_supermarket.id!}).then(r => {
useUserPreferenceStore().deviceSettings.shopping_selected_supermarket = r
})
}
})
/**
@@ -221,7 +244,7 @@ function addIngredient() {
amount: Math.max(r.amount, 1),
unit: (r.unit != null) ? {name: r.unit} as Unit : null,
food: {name: r.food} as Food,
} as ShoppingListEntry)
} as ShoppingListEntry, true)
ingredientInput.value = ''
ingredientInputIcon.value = 'fa-solid fa-check'

View File

@@ -7,6 +7,8 @@ models/AccessToken.ts
models/AuthToken.ts
models/AutoMealPlan.ts
models/Automation.ts
models/AutomationTypeEnum.ts
models/BaseUnitEnum.ts
models/BookmarkletImport.ts
models/BookmarkletImportList.ts
models/ConnectorConfigConfig.ts
@@ -32,6 +34,16 @@ models/MealPlan.ts
models/MealType.ts
models/MethodEnum.ts
models/NutritionInformation.ts
models/OpenDataCategory.ts
models/OpenDataConversion.ts
models/OpenDataFood.ts
models/OpenDataFoodProperty.ts
models/OpenDataProperty.ts
models/OpenDataStore.ts
models/OpenDataStoreCategory.ts
models/OpenDataUnit.ts
models/OpenDataUnitTypeEnum.ts
models/OpenDataVersion.ts
models/PaginatedAutomationList.ts
models/PaginatedBookmarkletImportListList.ts
models/PaginatedCookLogList.ts
@@ -78,6 +90,13 @@ models/PatchedInviteLink.ts
models/PatchedKeyword.ts
models/PatchedMealPlan.ts
models/PatchedMealType.ts
models/PatchedOpenDataCategory.ts
models/PatchedOpenDataConversion.ts
models/PatchedOpenDataFood.ts
models/PatchedOpenDataProperty.ts
models/PatchedOpenDataStore.ts
models/PatchedOpenDataUnit.ts
models/PatchedOpenDataVersion.ts
models/PatchedProperty.ts
models/PatchedPropertyType.ts
models/PatchedRecipe.ts
@@ -124,7 +143,6 @@ models/SupermarketCategoryRelation.ts
models/Sync.ts
models/SyncLog.ts
models/ThemeEnum.ts
models/TypeEnum.ts
models/Unit.ts
models/UnitConversion.ts
models/User.ts

File diff suppressed because it is too large Load Diff

View File

@@ -87,10 +87,15 @@ export function AccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean
};
}
export function AccessTokenToJSON(value?: Omit<AccessToken, 'token'|'created'|'updated'> | null): any {
export function AccessTokenToJSON(json: any): AccessToken {
return AccessTokenToJSONTyped(json, false);
}
export function AccessTokenToJSONTyped(value?: Omit<AccessToken, 'token'|'created'|'updated'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -98,15 +103,4 @@ export function AccessTokenToJSON(value?: Omit<AccessToken, 'token'|'created'|'u
'scope': value['scope'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiAccessTokenListRequest, PaginatedAccessTokenList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiAccessTokenListRequest = {}): Promise<PaginatedAccessTokenList> {
const api = new ApiApi()
return api.apiAccessTokenList(requestParameters)
}

View File

@@ -65,25 +65,19 @@ export function AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
export function AuthTokenToJSON(value?: Omit<AuthToken, 'token'> | null): any {
export function AuthTokenToJSON(json: any): AuthToken {
return AuthTokenToJSONTyped(json, false);
}
export function AuthTokenToJSONTyped(value?: Omit<AuthToken, 'token'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'username': value['username'],
'password': value['password'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiAuthTokenListRequest, PaginatedAuthTokenList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiAuthTokenListRequest = {}): Promise<PaginatedAuthTokenList> {
const api = new ApiApi()
return api.apiAuthTokenList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -103,10 +104,15 @@ export function AutoMealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function AutoMealPlanToJSON(value?: AutoMealPlan | null): any {
export function AutoMealPlanToJSON(json: any): AutoMealPlan {
return AutoMealPlanToJSONTyped(json, false);
}
export function AutoMealPlanToJSONTyped(value?: AutoMealPlan | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'start_date': ((value['startDate']).toISOString().substring(0,10)),
@@ -118,15 +124,4 @@ export function AutoMealPlanToJSON(value?: AutoMealPlan | null): any {
'addshopping': value['addshopping'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiAutoMealPlanListRequest, PaginatedAutoMealPlanList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiAutoMealPlanListRequest = {}): Promise<PaginatedAutoMealPlanList> {
const api = new ApiApi()
return api.apiAutoMealPlanList(requestParameters)
}

View File

@@ -13,12 +13,13 @@
*/
import { mapValues } from '../runtime';
import type { TypeEnum } from './TypeEnum';
import type { AutomationTypeEnum } from './AutomationTypeEnum';
import {
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
} from './TypeEnum';
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
AutomationTypeEnumToJSONTyped,
} from './AutomationTypeEnum';
/**
*
@@ -34,10 +35,10 @@ export interface Automation {
id?: number;
/**
*
* @type {TypeEnum}
* @type {AutomationTypeEnum}
* @memberof Automation
*/
type: TypeEnum;
type: AutomationTypeEnum;
/**
*
* @type {string}
@@ -110,7 +111,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'],
@@ -122,14 +123,19 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}
export function AutomationToJSON(value?: Omit<Automation, 'created_by'> | null): any {
export function AutomationToJSON(json: any): Automation {
return AutomationToJSONTyped(json, false);
}
export function AutomationToJSONTyped(value?: Omit<Automation, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'type': TypeEnumToJSON(value['type']),
'type': AutomationTypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],
@@ -139,15 +145,4 @@ export function AutomationToJSON(value?: Omit<Automation, 'created_by'> | null):
'disabled': value['disabled'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiAutomationListRequest, PaginatedAutomationList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiAutomationListRequest = {}): Promise<PaginatedAutomationList> {
const api = new ApiApi()
return api.apiAutomationList(requestParameters)
}

View File

@@ -79,10 +79,15 @@ export function BookmarkletImportFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function BookmarkletImportToJSON(value?: Omit<BookmarkletImport, 'created_by'|'created_at'> | null): any {
export function BookmarkletImportToJSON(json: any): BookmarkletImport {
return BookmarkletImportToJSONTyped(json, false);
}
export function BookmarkletImportToJSONTyped(value?: Omit<BookmarkletImport, 'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -90,15 +95,4 @@ export function BookmarkletImportToJSON(value?: Omit<BookmarkletImport, 'created
'html': value['html'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiBookmarkletImportListRequest, PaginatedBookmarkletImportList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiBookmarkletImportListRequest = {}): Promise<PaginatedBookmarkletImportList> {
const api = new ApiApi()
return api.apiBookmarkletImportList(requestParameters)
}

View File

@@ -71,25 +71,19 @@ export function BookmarkletImportListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function BookmarkletImportListToJSON(value?: Omit<BookmarkletImportList, 'created_by'|'created_at'> | null): any {
export function BookmarkletImportListToJSON(json: any): BookmarkletImportList {
return BookmarkletImportListToJSONTyped(json, false);
}
export function BookmarkletImportListToJSONTyped(value?: Omit<BookmarkletImportList, 'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'url': value['url'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiBookmarkletImportListListRequest, PaginatedBookmarkletImportListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiBookmarkletImportListListRequest = {}): Promise<PaginatedBookmarkletImportListList> {
const api = new ApiApi()
return api.apiBookmarkletImportListList(requestParameters)
}

View File

@@ -120,10 +120,15 @@ export function ConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function ConnectorConfigConfigToJSON(value?: Omit<ConnectorConfigConfig, 'created_by'> | null): any {
export function ConnectorConfigConfigToJSON(json: any): ConnectorConfigConfig {
return ConnectorConfigConfigToJSONTyped(json, false);
}
export function ConnectorConfigConfigToJSONTyped(value?: Omit<ConnectorConfigConfig, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -138,15 +143,4 @@ export function ConnectorConfigConfigToJSON(value?: Omit<ConnectorConfigConfig,
'supports_description_field': value['supportsDescriptionField'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiConnectorConfigConfigListRequest, PaginatedConnectorConfigConfigList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiConnectorConfigConfigListRequest = {}): Promise<PaginatedConnectorConfigConfigList> {
const api = new ApiApi()
return api.apiConnectorConfigConfigList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -107,10 +108,15 @@ export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
};
}
export function CookLogToJSON(value?: Omit<CookLog, 'created_by'|'updated_at'> | null): any {
export function CookLogToJSON(json: any): CookLog {
return CookLogToJSONTyped(json, false);
}
export function CookLogToJSONTyped(value?: Omit<CookLog, 'created_by'|'updated_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -121,15 +127,4 @@ export function CookLogToJSON(value?: Omit<CookLog, 'created_by'|'updated_at'> |
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiCookLogListRequest, PaginatedCookLogList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiCookLogListRequest = {}): Promise<PaginatedCookLogList> {
const api = new ApiApi()
return api.apiCookLogList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -86,10 +87,15 @@ export function CustomFilterFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function CustomFilterToJSON(value?: Omit<CustomFilter, 'created_by'> | null): any {
export function CustomFilterToJSON(json: any): CustomFilter {
return CustomFilterToJSONTyped(json, false);
}
export function CustomFilterToJSONTyped(value?: Omit<CustomFilter, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -98,15 +104,4 @@ export function CustomFilterToJSON(value?: Omit<CustomFilter, 'created_by'> | nu
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiCustomFilterListRequest, PaginatedCustomFilterList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiCustomFilterListRequest = {}): Promise<PaginatedCustomFilterList> {
const api = new ApiApi()
return api.apiCustomFilterList(requestParameters)
}

View File

@@ -114,10 +114,15 @@ export function ExportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
export function ExportLogToJSON(value?: Omit<ExportLog, 'created_by'|'created_at'> | null): any {
export function ExportLogToJSON(json: any): ExportLog {
return ExportLogToJSONTyped(json, false);
}
export function ExportLogToJSONTyped(value?: Omit<ExportLog, 'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -130,15 +135,4 @@ export function ExportLogToJSON(value?: Omit<ExportLog, 'created_by'|'created_at
'possibly_not_expired': value['possiblyNotExpired'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiExportLogListRequest, PaginatedExportLogList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiExportLogListRequest = {}): Promise<PaginatedExportLogList> {
const api = new ApiApi()
return api.apiExportLogList(requestParameters)
}

View File

@@ -18,36 +18,42 @@ import {
SupermarketCategoryFromJSON,
SupermarketCategoryFromJSONTyped,
SupermarketCategoryToJSON,
SupermarketCategoryToJSONTyped,
} from './SupermarketCategory';
import type { Unit } from './Unit';
import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
import type { Property } from './Property';
import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
PropertyToJSONTyped,
} from './Property';
import type { FoodInheritField } from './FoodInheritField';
import {
FoodInheritFieldFromJSON,
FoodInheritFieldFromJSONTyped,
FoodInheritFieldToJSON,
FoodInheritFieldToJSONTyped,
} from './FoodInheritField';
import type { FoodSimple } from './FoodSimple';
import {
FoodSimpleFromJSON,
FoodSimpleFromJSONTyped,
FoodSimpleToJSON,
FoodSimpleToJSONTyped,
} from './FoodSimple';
import type { RecipeSimple } from './RecipeSimple';
import {
RecipeSimpleFromJSON,
RecipeSimpleFromJSONTyped,
RecipeSimpleToJSON,
RecipeSimpleToJSONTyped,
} from './RecipeSimple';
/**
@@ -287,10 +293,15 @@ export function FoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): Food
};
}
export function FoodToJSON(value?: Omit<Food, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'> | null): any {
export function FoodToJSON(json: any): Food {
return FoodToJSONTyped(json, false);
}
export function FoodToJSONTyped(value?: Omit<Food, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -314,15 +325,4 @@ export function FoodToJSON(value?: Omit<Food, 'shopping'|'parent'|'numchild'|'fu
'open_data_slug': value['openDataSlug'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiFoodListRequest, PaginatedFoodList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiFoodListRequest = {}): Promise<PaginatedFoodList> {
const api = new ApiApi()
return api.apiFoodList(requestParameters)
}

View File

@@ -96,10 +96,15 @@ export function FoodInheritFieldFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function FoodInheritFieldToJSON(value?: FoodInheritField | null): any {
export function FoodInheritFieldToJSON(json: any): FoodInheritField {
return FoodInheritFieldToJSONTyped(json, false);
}
export function FoodInheritFieldToJSONTyped(value?: FoodInheritField | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -107,15 +112,4 @@ export function FoodInheritFieldToJSON(value?: FoodInheritField | null): any {
'field': value['field'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiFoodInheritFieldListRequest, PaginatedFoodInheritFieldList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiFoodInheritFieldListRequest = {}): Promise<PaginatedFoodInheritFieldList> {
const api = new ApiApi()
return api.apiFoodInheritFieldList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
DeleteEnumFromJSON,
DeleteEnumFromJSONTyped,
DeleteEnumToJSON,
DeleteEnumToJSONTyped,
} from './DeleteEnum';
/**
@@ -81,10 +82,15 @@ export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any {
export function FoodShoppingUpdateToJSON(json: any): FoodShoppingUpdate {
return FoodShoppingUpdateToJSONTyped(json, false);
}
export function FoodShoppingUpdateToJSONTyped(value?: FoodShoppingUpdate | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -93,15 +99,4 @@ export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any
'delete': DeleteEnumToJSON(value['_delete']),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiFoodShoppingUpdateListRequest, PaginatedFoodShoppingUpdateList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiFoodShoppingUpdateListRequest = {}): Promise<PaginatedFoodShoppingUpdateList> {
const api = new ApiApi()
return api.apiFoodShoppingUpdateList(requestParameters)
}

View File

@@ -63,10 +63,15 @@ export function FoodSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}
export function FoodSimpleToJSON(value?: FoodSimple | null): any {
export function FoodSimpleToJSON(json: any): FoodSimple {
return FoodSimpleToJSONTyped(json, false);
}
export function FoodSimpleToJSONTyped(value?: FoodSimple | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -74,15 +79,4 @@ export function FoodSimpleToJSON(value?: FoodSimple | null): any {
'plural_name': value['pluralName'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiFoodSimpleListRequest, PaginatedFoodSimpleList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiFoodSimpleListRequest = {}): Promise<PaginatedFoodSimpleList> {
const api = new ApiApi()
return api.apiFoodSimpleList(requestParameters)
}

View File

@@ -90,25 +90,19 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro
};
}
export function GroupToJSON(value?: Group | null): any {
export function GroupToJSON(json: any): Group {
return GroupToJSONTyped(json, false);
}
export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiGroupListRequest, PaginatedGroupList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiGroupListRequest = {}): Promise<PaginatedGroupList> {
const api = new ApiApi()
return api.apiGroupList(requestParameters)
}

View File

@@ -49,24 +49,18 @@ export function ImportImageFromJSONTyped(json: any, ignoreDiscriminator: boolean
};
}
export function ImportImageToJSON(value?: ImportImage | null): any {
export function ImportImageToJSON(json: any): ImportImage {
return ImportImageToJSONTyped(json, false);
}
export function ImportImageToJSONTyped(value?: ImportImage | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'image': value['image'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiImportImageListRequest, PaginatedImportImageList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiImportImageListRequest = {}): Promise<PaginatedImportImageList> {
const api = new ApiApi()
return api.apiImportImageList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
/**
@@ -115,10 +116,15 @@ export function ImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
export function ImportLogToJSON(value?: Omit<ImportLog, 'keyword'|'created_by'|'created_at'> | null): any {
export function ImportLogToJSON(json: any): ImportLog {
return ImportLogToJSONTyped(json, false);
}
export function ImportLogToJSONTyped(value?: Omit<ImportLog, 'keyword'|'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -129,15 +135,4 @@ export function ImportLogToJSON(value?: Omit<ImportLog, 'keyword'|'created_by'|'
'imported_recipes': value['importedRecipes'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiImportLogListRequest, PaginatedImportLogList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiImportLogListRequest = {}): Promise<PaginatedImportLogList> {
const api = new ApiApi()
return api.apiImportLogList(requestParameters)
}

View File

@@ -18,12 +18,14 @@ import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
import type { Food } from './Food';
import {
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
FoodToJSONTyped,
} from './Food';
/**
@@ -150,10 +152,15 @@ export function IngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}
export function IngredientToJSON(value?: Omit<Ingredient, 'conversions'|'used_in_recipes'> | null): any {
export function IngredientToJSON(json: any): Ingredient {
return IngredientToJSONTyped(json, false);
}
export function IngredientToJSONTyped(value?: Omit<Ingredient, 'conversions'|'used_in_recipes'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -169,15 +176,4 @@ export function IngredientToJSON(value?: Omit<Ingredient, 'conversions'|'used_in
'always_use_plural_food': value['alwaysUsePluralFood'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiIngredientListRequest, PaginatedIngredientList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiIngredientListRequest = {}): Promise<PaginatedIngredientList> {
const api = new ApiApi()
return api.apiIngredientList(requestParameters)
}

View File

@@ -49,24 +49,18 @@ export function IngredientStringFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function IngredientStringToJSON(value?: IngredientString | null): any {
export function IngredientStringToJSON(json: any): IngredientString {
return IngredientStringToJSONTyped(json, false);
}
export function IngredientStringToJSONTyped(value?: IngredientString | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'text': value['text'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiIngredientStringListRequest, PaginatedIngredientStringList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiIngredientStringListRequest = {}): Promise<PaginatedIngredientStringList> {
const api = new ApiApi()
return api.apiIngredientStringList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
GroupFromJSON,
GroupFromJSONTyped,
GroupToJSON,
GroupToJSONTyped,
} from './Group';
/**
@@ -122,10 +123,15 @@ export function InviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}
export function InviteLinkToJSON(value?: Omit<InviteLink, 'uuid'|'created_by'|'created_at'> | null): any {
export function InviteLinkToJSON(json: any): InviteLink {
return InviteLinkToJSONTyped(json, false);
}
export function InviteLinkToJSONTyped(value?: Omit<InviteLink, 'uuid'|'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -137,15 +143,4 @@ export function InviteLinkToJSON(value?: Omit<InviteLink, 'uuid'|'created_by'|'c
'internal_note': value['internalNote'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiInviteLinkListRequest, PaginatedInviteLinkList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiInviteLinkListRequest = {}): Promise<PaginatedInviteLinkList> {
const api = new ApiApi()
return api.apiInviteLinkList(requestParameters)
}

View File

@@ -146,10 +146,15 @@ export function KeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): K
};
}
export function KeywordToJSON(value?: Omit<Keyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'> | null): any {
export function KeywordToJSON(json: any): Keyword {
return KeywordToJSONTyped(json, false);
}
export function KeywordToJSONTyped(value?: Omit<Keyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -157,15 +162,4 @@ export function KeywordToJSON(value?: Omit<Keyword, 'label'|'parent'|'numchild'|
'description': value['description'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiKeywordListRequest, PaginatedKeywordList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiKeywordListRequest = {}): Promise<PaginatedKeywordList> {
const api = new ApiApi()
return api.apiKeywordList(requestParameters)
}

View File

@@ -56,24 +56,18 @@ export function KeywordLabelFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function KeywordLabelToJSON(value?: Omit<KeywordLabel, 'label'> | null): any {
export function KeywordLabelToJSON(json: any): KeywordLabel {
return KeywordLabelToJSONTyped(json, false);
}
export function KeywordLabelToJSONTyped(value?: Omit<KeywordLabel, 'label'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiKeywordLabelListRequest, PaginatedKeywordLabelList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiKeywordLabelListRequest = {}): Promise<PaginatedKeywordLabelList> {
const api = new ApiApi()
return api.apiKeywordLabelList(requestParameters)
}

View File

@@ -57,23 +57,17 @@ export function LocalizationFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function LocalizationToJSON(value?: Omit<Localization, 'code'|'language'> | null): any {
export function LocalizationToJSON(json: any): Localization {
return LocalizationToJSONTyped(json, false);
}
export function LocalizationToJSONTyped(value?: Omit<Localization, 'code'|'language'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiLocalizationListRequest, PaginatedLocalizationList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiLocalizationListRequest = {}): Promise<PaginatedLocalizationList> {
const api = new ApiApi()
return api.apiLocalizationList(requestParameters)
}

View File

@@ -18,18 +18,21 @@ import {
MealTypeFromJSON,
MealTypeFromJSONTyped,
MealTypeToJSON,
MealTypeToJSONTyped,
} from './MealType';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
import type { RecipeOverview } from './RecipeOverview';
import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
RecipeOverviewToJSONTyped,
} from './RecipeOverview';
/**
@@ -166,10 +169,15 @@ export function MealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
export function MealPlanToJSON(value?: Omit<MealPlan, 'note_markdown'|'created_by'|'recipe_name'|'meal_type_name'|'shopping'> | null): any {
export function MealPlanToJSON(json: any): MealPlan {
return MealPlanToJSONTyped(json, false);
}
export function MealPlanToJSONTyped(value?: Omit<MealPlan, 'note_markdown'|'created_by'|'recipe_name'|'meal_type_name'|'shopping'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -183,15 +191,4 @@ export function MealPlanToJSON(value?: Omit<MealPlan, 'note_markdown'|'created_b
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiMealPlanListRequest, PaginatedMealPlanList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiMealPlanListRequest = {}): Promise<PaginatedMealPlanList> {
const api = new ApiApi()
return api.apiMealPlanList(requestParameters)
}

View File

@@ -92,10 +92,15 @@ export function MealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
export function MealTypeToJSON(value?: Omit<MealType, 'created_by'> | null): any {
export function MealTypeToJSON(json: any): MealType {
return MealTypeToJSONTyped(json, false);
}
export function MealTypeToJSONTyped(value?: Omit<MealType, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -106,15 +111,4 @@ export function MealTypeToJSON(value?: Omit<MealType, 'created_by'> | null): any
'default': value['_default'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiMealTypeListRequest, PaginatedMealTypeList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiMealTypeListRequest = {}): Promise<PaginatedMealTypeList> {
const api = new ApiApi()
return api.apiMealTypeList(requestParameters)
}

View File

@@ -87,10 +87,15 @@ export function NutritionInformationFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function NutritionInformationToJSON(value?: NutritionInformation | null): any {
export function NutritionInformationToJSON(json: any): NutritionInformation {
return NutritionInformationToJSONTyped(json, false);
}
export function NutritionInformationToJSONTyped(value?: NutritionInformation | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -101,15 +106,4 @@ export function NutritionInformationToJSON(value?: NutritionInformation | null):
'source': value['source'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiNutritionInformationListRequest, PaginatedNutritionInformationList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiNutritionInformationListRequest = {}): Promise<PaginatedNutritionInformationList> {
const api = new ApiApi()
return api.apiNutritionInformationList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -135,10 +136,15 @@ export function OpenDataCategoryFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function OpenDataCategoryToJSON(value?: Omit<OpenDataCategory, 'created_by'> | null): any {
export function OpenDataCategoryToJSON(json: any): OpenDataCategory {
return OpenDataCategoryToJSONTyped(json, false);
}
export function OpenDataCategoryToJSONTyped(value?: Omit<OpenDataCategory, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -149,15 +155,4 @@ export function OpenDataCategoryToJSON(value?: Omit<OpenDataCategory, 'created_b
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataCategoryListRequest, PaginatedOpenDataCategoryList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataCategoryListRequest = {}): Promise<PaginatedOpenDataCategoryList> {
const api = new ApiApi()
return api.apiOpenDataCategoryList(requestParameters)
}

View File

@@ -18,18 +18,21 @@ import {
OpenDataUnitFromJSON,
OpenDataUnitFromJSONTyped,
OpenDataUnitToJSON,
OpenDataUnitToJSONTyped,
} from './OpenDataUnit';
import type { OpenDataFood } from './OpenDataFood';
import {
OpenDataFoodFromJSON,
OpenDataFoodFromJSONTyped,
OpenDataFoodToJSON,
OpenDataFoodToJSONTyped,
} from './OpenDataFood';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -146,10 +149,15 @@ export function OpenDataConversionFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function OpenDataConversionToJSON(value?: Omit<OpenDataConversion, 'created_by'> | null): any {
export function OpenDataConversionToJSON(json: any): OpenDataConversion {
return OpenDataConversionToJSONTyped(json, false);
}
export function OpenDataConversionToJSONTyped(value?: Omit<OpenDataConversion, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -164,15 +172,4 @@ export function OpenDataConversionToJSON(value?: Omit<OpenDataConversion, 'creat
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataConversionListRequest, PaginatedOpenDataConversionList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataConversionListRequest = {}): Promise<PaginatedOpenDataConversionList> {
const api = new ApiApi()
return api.apiOpenDataConversionList(requestParameters)
}

View File

@@ -18,24 +18,28 @@ import {
OpenDataFoodPropertyFromJSON,
OpenDataFoodPropertyFromJSONTyped,
OpenDataFoodPropertyToJSON,
OpenDataFoodPropertyToJSONTyped,
} from './OpenDataFoodProperty';
import type { OpenDataUnit } from './OpenDataUnit';
import {
OpenDataUnitFromJSON,
OpenDataUnitFromJSONTyped,
OpenDataUnitToJSON,
OpenDataUnitToJSONTyped,
} from './OpenDataUnit';
import type { OpenDataCategory } from './OpenDataCategory';
import {
OpenDataCategoryFromJSON,
OpenDataCategoryFromJSONTyped,
OpenDataCategoryToJSON,
OpenDataCategoryToJSONTyped,
} from './OpenDataCategory';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -228,10 +232,15 @@ export function OpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function OpenDataFoodToJSON(value?: Omit<OpenDataFood, 'created_by'> | null): any {
export function OpenDataFoodToJSON(json: any): OpenDataFood {
return OpenDataFoodToJSONTyped(json, false);
}
export function OpenDataFoodToJSONTyped(value?: Omit<OpenDataFood, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -252,15 +261,4 @@ export function OpenDataFoodToJSON(value?: Omit<OpenDataFood, 'created_by'> | nu
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataFoodListRequest, PaginatedOpenDataFoodList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataFoodListRequest = {}): Promise<PaginatedOpenDataFoodList> {
const api = new ApiApi()
return api.apiOpenDataFoodList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
OpenDataPropertyFromJSON,
OpenDataPropertyFromJSONTyped,
OpenDataPropertyToJSON,
OpenDataPropertyToJSONTyped,
} from './OpenDataProperty';
/**
@@ -71,10 +72,15 @@ export function OpenDataFoodPropertyFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function OpenDataFoodPropertyToJSON(value?: OpenDataFoodProperty | null): any {
export function OpenDataFoodPropertyToJSON(json: any): OpenDataFoodProperty {
return OpenDataFoodPropertyToJSONTyped(json, false);
}
export function OpenDataFoodPropertyToJSONTyped(value?: OpenDataFoodProperty | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -82,15 +88,4 @@ export function OpenDataFoodPropertyToJSON(value?: OpenDataFoodProperty | null):
'property_amount': value['propertyAmount'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataFoodPropertyListRequest, PaginatedOpenDataFoodPropertyList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataFoodPropertyListRequest = {}): Promise<PaginatedOpenDataFoodPropertyList> {
const api = new ApiApi()
return api.apiOpenDataFoodPropertyList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -142,10 +143,15 @@ export function OpenDataPropertyFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function OpenDataPropertyToJSON(value?: Omit<OpenDataProperty, 'created_by'> | null): any {
export function OpenDataPropertyToJSON(json: any): OpenDataProperty {
return OpenDataPropertyToJSONTyped(json, false);
}
export function OpenDataPropertyToJSONTyped(value?: Omit<OpenDataProperty, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -157,15 +163,4 @@ export function OpenDataPropertyToJSON(value?: Omit<OpenDataProperty, 'created_b
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataPropertyListRequest, PaginatedOpenDataPropertyList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataPropertyListRequest = {}): Promise<PaginatedOpenDataPropertyList> {
const api = new ApiApi()
return api.apiOpenDataPropertyList(requestParameters)
}

View File

@@ -18,12 +18,14 @@ import {
OpenDataStoreCategoryFromJSON,
OpenDataStoreCategoryFromJSONTyped,
OpenDataStoreCategoryToJSON,
OpenDataStoreCategoryToJSONTyped,
} from './OpenDataStoreCategory';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -108,10 +110,15 @@ export function OpenDataStoreFromJSONTyped(json: any, ignoreDiscriminator: boole
};
}
export function OpenDataStoreToJSON(value?: Omit<OpenDataStore, 'created_by'> | null): any {
export function OpenDataStoreToJSON(json: any): OpenDataStore {
return OpenDataStoreToJSONTyped(json, false);
}
export function OpenDataStoreToJSONTyped(value?: Omit<OpenDataStore, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -122,15 +129,4 @@ export function OpenDataStoreToJSON(value?: Omit<OpenDataStore, 'created_by'> |
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataStoreListRequest, PaginatedOpenDataStoreList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataStoreListRequest = {}): Promise<PaginatedOpenDataStoreList> {
const api = new ApiApi()
return api.apiOpenDataStoreList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
OpenDataCategoryFromJSON,
OpenDataCategoryFromJSONTyped,
OpenDataCategoryToJSON,
OpenDataCategoryToJSONTyped,
} from './OpenDataCategory';
/**
@@ -78,10 +79,15 @@ export function OpenDataStoreCategoryFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function OpenDataStoreCategoryToJSON(value?: OpenDataStoreCategory | null): any {
export function OpenDataStoreCategoryToJSON(json: any): OpenDataStoreCategory {
return OpenDataStoreCategoryToJSONTyped(json, false);
}
export function OpenDataStoreCategoryToJSONTyped(value?: OpenDataStoreCategory | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -90,15 +96,4 @@ export function OpenDataStoreCategoryToJSON(value?: OpenDataStoreCategory | null
'order': value['order'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataStoreCategoryListRequest, PaginatedOpenDataStoreCategoryList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataStoreCategoryListRequest = {}): Promise<PaginatedOpenDataStoreCategoryList> {
const api = new ApiApi()
return api.apiOpenDataStoreCategoryList(requestParameters)
}

View File

@@ -18,18 +18,21 @@ import {
BaseUnitEnumFromJSON,
BaseUnitEnumFromJSONTyped,
BaseUnitEnumToJSON,
BaseUnitEnumToJSONTyped,
} from './BaseUnitEnum';
import type { OpenDataUnitTypeEnum } from './OpenDataUnitTypeEnum';
import {
OpenDataUnitTypeEnumFromJSON,
OpenDataUnitTypeEnumFromJSONTyped,
OpenDataUnitTypeEnumToJSON,
OpenDataUnitTypeEnumToJSONTyped,
} from './OpenDataUnitTypeEnum';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -164,10 +167,15 @@ export function OpenDataUnitFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function OpenDataUnitToJSON(value?: Omit<OpenDataUnit, 'created_by'> | null): any {
export function OpenDataUnitToJSON(json: any): OpenDataUnit {
return OpenDataUnitToJSONTyped(json, false);
}
export function OpenDataUnitToJSONTyped(value?: Omit<OpenDataUnit, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -180,15 +188,4 @@ export function OpenDataUnitToJSON(value?: Omit<OpenDataUnit, 'created_by'> | nu
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataUnitListRequest, PaginatedOpenDataUnitList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataUnitListRequest = {}): Promise<PaginatedOpenDataUnitList> {
const api = new ApiApi()
return api.apiOpenDataUnitList(requestParameters)
}

View File

@@ -105,10 +105,15 @@ export function OpenDataVersionFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}
export function OpenDataVersionToJSON(value?: OpenDataVersion | null): any {
export function OpenDataVersionToJSON(json: any): OpenDataVersion {
return OpenDataVersionToJSONTyped(json, false);
}
export function OpenDataVersionToJSONTyped(value?: OpenDataVersion | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -117,15 +122,4 @@ export function OpenDataVersionToJSON(value?: OpenDataVersion | null): any {
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiOpenDataVersionListRequest, PaginatedOpenDataVersionList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiOpenDataVersionListRequest = {}): Promise<PaginatedOpenDataVersionList> {
const api = new ApiApi()
return api.apiOpenDataVersionList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
AutomationFromJSON,
AutomationFromJSONTyped,
AutomationToJSON,
AutomationToJSONTyped,
} from './Automation';
/**
@@ -85,10 +86,15 @@ export function PaginatedAutomationListFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PaginatedAutomationListToJSON(value?: PaginatedAutomationList | null): any {
export function PaginatedAutomationListToJSON(json: any): PaginatedAutomationList {
return PaginatedAutomationListToJSONTyped(json, false);
}
export function PaginatedAutomationListToJSONTyped(value?: PaginatedAutomationList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedAutomationListToJSON(value?: PaginatedAutomationList |
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedAutomationListListRequest, PaginatedPaginatedAutomationListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedAutomationListListRequest = {}): Promise<PaginatedPaginatedAutomationListList> {
const api = new ApiApi()
return api.apiPaginatedAutomationListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
BookmarkletImportListFromJSON,
BookmarkletImportListFromJSONTyped,
BookmarkletImportListToJSON,
BookmarkletImportListToJSONTyped,
} from './BookmarkletImportList';
/**
@@ -85,10 +86,15 @@ export function PaginatedBookmarkletImportListListFromJSONTyped(json: any, ignor
};
}
export function PaginatedBookmarkletImportListListToJSON(value?: PaginatedBookmarkletImportListList | null): any {
export function PaginatedBookmarkletImportListListToJSON(json: any): PaginatedBookmarkletImportListList {
return PaginatedBookmarkletImportListListToJSONTyped(json, false);
}
export function PaginatedBookmarkletImportListListToJSONTyped(value?: PaginatedBookmarkletImportListList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedBookmarkletImportListListToJSON(value?: PaginatedBookma
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedBookmarkletImportListListListRequest, PaginatedPaginatedBookmarkletImportListListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedBookmarkletImportListListListRequest = {}): Promise<PaginatedPaginatedBookmarkletImportListListList> {
const api = new ApiApi()
return api.apiPaginatedBookmarkletImportListListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
CookLogFromJSON,
CookLogFromJSONTyped,
CookLogToJSON,
CookLogToJSONTyped,
} from './CookLog';
/**
@@ -85,10 +86,15 @@ export function PaginatedCookLogListFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PaginatedCookLogListToJSON(value?: PaginatedCookLogList | null): any {
export function PaginatedCookLogListToJSON(json: any): PaginatedCookLogList {
return PaginatedCookLogListToJSONTyped(json, false);
}
export function PaginatedCookLogListToJSONTyped(value?: PaginatedCookLogList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedCookLogListToJSON(value?: PaginatedCookLogList | null):
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedCookLogListListRequest, PaginatedPaginatedCookLogListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedCookLogListListRequest = {}): Promise<PaginatedPaginatedCookLogListList> {
const api = new ApiApi()
return api.apiPaginatedCookLogListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
CustomFilterFromJSON,
CustomFilterFromJSONTyped,
CustomFilterToJSON,
CustomFilterToJSONTyped,
} from './CustomFilter';
/**
@@ -85,10 +86,15 @@ export function PaginatedCustomFilterListFromJSONTyped(json: any, ignoreDiscrimi
};
}
export function PaginatedCustomFilterListToJSON(value?: PaginatedCustomFilterList | null): any {
export function PaginatedCustomFilterListToJSON(json: any): PaginatedCustomFilterList {
return PaginatedCustomFilterListToJSONTyped(json, false);
}
export function PaginatedCustomFilterListToJSONTyped(value?: PaginatedCustomFilterList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedCustomFilterListToJSON(value?: PaginatedCustomFilterLis
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedCustomFilterListListRequest, PaginatedPaginatedCustomFilterListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedCustomFilterListListRequest = {}): Promise<PaginatedPaginatedCustomFilterListList> {
const api = new ApiApi()
return api.apiPaginatedCustomFilterListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
ExportLogFromJSON,
ExportLogFromJSONTyped,
ExportLogToJSON,
ExportLogToJSONTyped,
} from './ExportLog';
/**
@@ -85,10 +86,15 @@ export function PaginatedExportLogListFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PaginatedExportLogListToJSON(value?: PaginatedExportLogList | null): any {
export function PaginatedExportLogListToJSON(json: any): PaginatedExportLogList {
return PaginatedExportLogListToJSONTyped(json, false);
}
export function PaginatedExportLogListToJSONTyped(value?: PaginatedExportLogList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedExportLogListToJSON(value?: PaginatedExportLogList | nu
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedExportLogListListRequest, PaginatedPaginatedExportLogListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedExportLogListListRequest = {}): Promise<PaginatedPaginatedExportLogListList> {
const api = new ApiApi()
return api.apiPaginatedExportLogListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
FoodToJSONTyped,
} from './Food';
/**
@@ -85,10 +86,15 @@ export function PaginatedFoodListFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PaginatedFoodListToJSON(value?: PaginatedFoodList | null): any {
export function PaginatedFoodListToJSON(json: any): PaginatedFoodList {
return PaginatedFoodListToJSONTyped(json, false);
}
export function PaginatedFoodListToJSONTyped(value?: PaginatedFoodList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedFoodListToJSON(value?: PaginatedFoodList | null): any {
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedFoodListListRequest, PaginatedPaginatedFoodListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedFoodListListRequest = {}): Promise<PaginatedPaginatedFoodListList> {
const api = new ApiApi()
return api.apiPaginatedFoodListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
ImportLogFromJSON,
ImportLogFromJSONTyped,
ImportLogToJSON,
ImportLogToJSONTyped,
} from './ImportLog';
/**
@@ -85,10 +86,15 @@ export function PaginatedImportLogListFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PaginatedImportLogListToJSON(value?: PaginatedImportLogList | null): any {
export function PaginatedImportLogListToJSON(json: any): PaginatedImportLogList {
return PaginatedImportLogListToJSONTyped(json, false);
}
export function PaginatedImportLogListToJSONTyped(value?: PaginatedImportLogList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedImportLogListToJSON(value?: PaginatedImportLogList | nu
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedImportLogListListRequest, PaginatedPaginatedImportLogListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedImportLogListListRequest = {}): Promise<PaginatedPaginatedImportLogListList> {
const api = new ApiApi()
return api.apiPaginatedImportLogListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
IngredientFromJSON,
IngredientFromJSONTyped,
IngredientToJSON,
IngredientToJSONTyped,
} from './Ingredient';
/**
@@ -85,10 +86,15 @@ export function PaginatedIngredientListFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PaginatedIngredientListToJSON(value?: PaginatedIngredientList | null): any {
export function PaginatedIngredientListToJSON(json: any): PaginatedIngredientList {
return PaginatedIngredientListToJSONTyped(json, false);
}
export function PaginatedIngredientListToJSONTyped(value?: PaginatedIngredientList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedIngredientListToJSON(value?: PaginatedIngredientList |
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedIngredientListListRequest, PaginatedPaginatedIngredientListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedIngredientListListRequest = {}): Promise<PaginatedPaginatedIngredientListList> {
const api = new ApiApi()
return api.apiPaginatedIngredientListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
InviteLinkFromJSON,
InviteLinkFromJSONTyped,
InviteLinkToJSON,
InviteLinkToJSONTyped,
} from './InviteLink';
/**
@@ -85,10 +86,15 @@ export function PaginatedInviteLinkListFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PaginatedInviteLinkListToJSON(value?: PaginatedInviteLinkList | null): any {
export function PaginatedInviteLinkListToJSON(json: any): PaginatedInviteLinkList {
return PaginatedInviteLinkListToJSONTyped(json, false);
}
export function PaginatedInviteLinkListToJSONTyped(value?: PaginatedInviteLinkList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedInviteLinkListToJSON(value?: PaginatedInviteLinkList |
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedInviteLinkListListRequest, PaginatedPaginatedInviteLinkListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedInviteLinkListListRequest = {}): Promise<PaginatedPaginatedInviteLinkListList> {
const api = new ApiApi()
return api.apiPaginatedInviteLinkListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
/**
@@ -85,10 +86,15 @@ export function PaginatedKeywordListFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PaginatedKeywordListToJSON(value?: PaginatedKeywordList | null): any {
export function PaginatedKeywordListToJSON(json: any): PaginatedKeywordList {
return PaginatedKeywordListToJSONTyped(json, false);
}
export function PaginatedKeywordListToJSONTyped(value?: PaginatedKeywordList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedKeywordListToJSON(value?: PaginatedKeywordList | null):
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedKeywordListListRequest, PaginatedPaginatedKeywordListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedKeywordListListRequest = {}): Promise<PaginatedPaginatedKeywordListList> {
const api = new ApiApi()
return api.apiPaginatedKeywordListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
MealPlanFromJSON,
MealPlanFromJSONTyped,
MealPlanToJSON,
MealPlanToJSONTyped,
} from './MealPlan';
/**
@@ -85,10 +86,15 @@ export function PaginatedMealPlanListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function PaginatedMealPlanListToJSON(value?: PaginatedMealPlanList | null): any {
export function PaginatedMealPlanListToJSON(json: any): PaginatedMealPlanList {
return PaginatedMealPlanListToJSONTyped(json, false);
}
export function PaginatedMealPlanListToJSONTyped(value?: PaginatedMealPlanList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedMealPlanListToJSON(value?: PaginatedMealPlanList | null
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedMealPlanListListRequest, PaginatedPaginatedMealPlanListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedMealPlanListListRequest = {}): Promise<PaginatedPaginatedMealPlanListList> {
const api = new ApiApi()
return api.apiPaginatedMealPlanListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
MealTypeFromJSON,
MealTypeFromJSONTyped,
MealTypeToJSON,
MealTypeToJSONTyped,
} from './MealType';
/**
@@ -85,10 +86,15 @@ export function PaginatedMealTypeListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function PaginatedMealTypeListToJSON(value?: PaginatedMealTypeList | null): any {
export function PaginatedMealTypeListToJSON(json: any): PaginatedMealTypeList {
return PaginatedMealTypeListToJSONTyped(json, false);
}
export function PaginatedMealTypeListToJSONTyped(value?: PaginatedMealTypeList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedMealTypeListToJSON(value?: PaginatedMealTypeList | null
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedMealTypeListListRequest, PaginatedPaginatedMealTypeListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedMealTypeListListRequest = {}): Promise<PaginatedPaginatedMealTypeListList> {
const api = new ApiApi()
return api.apiPaginatedMealTypeListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
PropertyToJSONTyped,
} from './Property';
/**
@@ -85,10 +86,15 @@ export function PaginatedPropertyListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function PaginatedPropertyListToJSON(value?: PaginatedPropertyList | null): any {
export function PaginatedPropertyListToJSON(json: any): PaginatedPropertyList {
return PaginatedPropertyListToJSONTyped(json, false);
}
export function PaginatedPropertyListToJSONTyped(value?: PaginatedPropertyList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedPropertyListToJSON(value?: PaginatedPropertyList | null
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedPropertyListListRequest, PaginatedPaginatedPropertyListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedPropertyListListRequest = {}): Promise<PaginatedPaginatedPropertyListList> {
const api = new ApiApi()
return api.apiPaginatedPropertyListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
PropertyTypeFromJSON,
PropertyTypeFromJSONTyped,
PropertyTypeToJSON,
PropertyTypeToJSONTyped,
} from './PropertyType';
/**
@@ -85,10 +86,15 @@ export function PaginatedPropertyTypeListFromJSONTyped(json: any, ignoreDiscrimi
};
}
export function PaginatedPropertyTypeListToJSON(value?: PaginatedPropertyTypeList | null): any {
export function PaginatedPropertyTypeListToJSON(json: any): PaginatedPropertyTypeList {
return PaginatedPropertyTypeListToJSONTyped(json, false);
}
export function PaginatedPropertyTypeListToJSONTyped(value?: PaginatedPropertyTypeList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedPropertyTypeListToJSON(value?: PaginatedPropertyTypeLis
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedPropertyTypeListListRequest, PaginatedPaginatedPropertyTypeListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedPropertyTypeListListRequest = {}): Promise<PaginatedPaginatedPropertyTypeListList> {
const api = new ApiApi()
return api.apiPaginatedPropertyTypeListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
RecipeBookEntryFromJSON,
RecipeBookEntryFromJSONTyped,
RecipeBookEntryToJSON,
RecipeBookEntryToJSONTyped,
} from './RecipeBookEntry';
/**
@@ -85,10 +86,15 @@ export function PaginatedRecipeBookEntryListFromJSONTyped(json: any, ignoreDiscr
};
}
export function PaginatedRecipeBookEntryListToJSON(value?: PaginatedRecipeBookEntryList | null): any {
export function PaginatedRecipeBookEntryListToJSON(json: any): PaginatedRecipeBookEntryList {
return PaginatedRecipeBookEntryListToJSONTyped(json, false);
}
export function PaginatedRecipeBookEntryListToJSONTyped(value?: PaginatedRecipeBookEntryList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedRecipeBookEntryListToJSON(value?: PaginatedRecipeBookEn
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedRecipeBookEntryListListRequest, PaginatedPaginatedRecipeBookEntryListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedRecipeBookEntryListListRequest = {}): Promise<PaginatedPaginatedRecipeBookEntryListList> {
const api = new ApiApi()
return api.apiPaginatedRecipeBookEntryListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
RecipeBookFromJSON,
RecipeBookFromJSONTyped,
RecipeBookToJSON,
RecipeBookToJSONTyped,
} from './RecipeBook';
/**
@@ -85,10 +86,15 @@ export function PaginatedRecipeBookListFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PaginatedRecipeBookListToJSON(value?: PaginatedRecipeBookList | null): any {
export function PaginatedRecipeBookListToJSON(json: any): PaginatedRecipeBookList {
return PaginatedRecipeBookListToJSONTyped(json, false);
}
export function PaginatedRecipeBookListToJSONTyped(value?: PaginatedRecipeBookList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedRecipeBookListToJSON(value?: PaginatedRecipeBookList |
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedRecipeBookListListRequest, PaginatedPaginatedRecipeBookListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedRecipeBookListListRequest = {}): Promise<PaginatedPaginatedRecipeBookListList> {
const api = new ApiApi()
return api.apiPaginatedRecipeBookListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
RecipeOverviewToJSONTyped,
} from './RecipeOverview';
/**
@@ -78,10 +79,15 @@ export function PaginatedRecipeOverviewListFromJSONTyped(json: any, ignoreDiscri
};
}
export function PaginatedRecipeOverviewListToJSON(value?: PaginatedRecipeOverviewList | null): any {
export function PaginatedRecipeOverviewListToJSON(json: any): PaginatedRecipeOverviewList {
return PaginatedRecipeOverviewListToJSONTyped(json, false);
}
export function PaginatedRecipeOverviewListToJSONTyped(value?: PaginatedRecipeOverviewList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -90,15 +96,4 @@ export function PaginatedRecipeOverviewListToJSON(value?: PaginatedRecipeOvervie
'results': ((value['results'] as Array<any>).map(RecipeOverviewToJSON)),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedRecipeOverviewListListRequest, PaginatedPaginatedRecipeOverviewListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedRecipeOverviewListListRequest = {}): Promise<PaginatedPaginatedRecipeOverviewListList> {
const api = new ApiApi()
return api.apiPaginatedRecipeOverviewListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
ShoppingListEntryFromJSON,
ShoppingListEntryFromJSONTyped,
ShoppingListEntryToJSON,
ShoppingListEntryToJSONTyped,
} from './ShoppingListEntry';
/**
@@ -85,10 +86,15 @@ export function PaginatedShoppingListEntryListFromJSONTyped(json: any, ignoreDis
};
}
export function PaginatedShoppingListEntryListToJSON(value?: PaginatedShoppingListEntryList | null): any {
export function PaginatedShoppingListEntryListToJSON(json: any): PaginatedShoppingListEntryList {
return PaginatedShoppingListEntryListToJSONTyped(json, false);
}
export function PaginatedShoppingListEntryListToJSONTyped(value?: PaginatedShoppingListEntryList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedShoppingListEntryListToJSON(value?: PaginatedShoppingLi
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedShoppingListEntryListListRequest, PaginatedPaginatedShoppingListEntryListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedShoppingListEntryListListRequest = {}): Promise<PaginatedPaginatedShoppingListEntryListList> {
const api = new ApiApi()
return api.apiPaginatedShoppingListEntryListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
ShoppingListRecipeFromJSON,
ShoppingListRecipeFromJSONTyped,
ShoppingListRecipeToJSON,
ShoppingListRecipeToJSONTyped,
} from './ShoppingListRecipe';
/**
@@ -85,10 +86,15 @@ export function PaginatedShoppingListRecipeListFromJSONTyped(json: any, ignoreDi
};
}
export function PaginatedShoppingListRecipeListToJSON(value?: PaginatedShoppingListRecipeList | null): any {
export function PaginatedShoppingListRecipeListToJSON(json: any): PaginatedShoppingListRecipeList {
return PaginatedShoppingListRecipeListToJSONTyped(json, false);
}
export function PaginatedShoppingListRecipeListToJSONTyped(value?: PaginatedShoppingListRecipeList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedShoppingListRecipeListToJSON(value?: PaginatedShoppingL
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedShoppingListRecipeListListRequest, PaginatedPaginatedShoppingListRecipeListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedShoppingListRecipeListListRequest = {}): Promise<PaginatedPaginatedShoppingListRecipeListList> {
const api = new ApiApi()
return api.apiPaginatedShoppingListRecipeListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
SpaceFromJSON,
SpaceFromJSONTyped,
SpaceToJSON,
SpaceToJSONTyped,
} from './Space';
/**
@@ -85,10 +86,15 @@ export function PaginatedSpaceListFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PaginatedSpaceListToJSON(value?: PaginatedSpaceList | null): any {
export function PaginatedSpaceListToJSON(json: any): PaginatedSpaceList {
return PaginatedSpaceListToJSONTyped(json, false);
}
export function PaginatedSpaceListToJSONTyped(value?: PaginatedSpaceList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedSpaceListToJSON(value?: PaginatedSpaceList | null): any
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedSpaceListListRequest, PaginatedPaginatedSpaceListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedSpaceListListRequest = {}): Promise<PaginatedPaginatedSpaceListList> {
const api = new ApiApi()
return api.apiPaginatedSpaceListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
StepFromJSON,
StepFromJSONTyped,
StepToJSON,
StepToJSONTyped,
} from './Step';
/**
@@ -85,10 +86,15 @@ export function PaginatedStepListFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PaginatedStepListToJSON(value?: PaginatedStepList | null): any {
export function PaginatedStepListToJSON(json: any): PaginatedStepList {
return PaginatedStepListToJSONTyped(json, false);
}
export function PaginatedStepListToJSONTyped(value?: PaginatedStepList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedStepListToJSON(value?: PaginatedStepList | null): any {
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedStepListListRequest, PaginatedPaginatedStepListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedStepListListRequest = {}): Promise<PaginatedPaginatedStepListList> {
const api = new ApiApi()
return api.apiPaginatedStepListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
SupermarketCategoryFromJSON,
SupermarketCategoryFromJSONTyped,
SupermarketCategoryToJSON,
SupermarketCategoryToJSONTyped,
} from './SupermarketCategory';
/**
@@ -85,10 +86,15 @@ export function PaginatedSupermarketCategoryListFromJSONTyped(json: any, ignoreD
};
}
export function PaginatedSupermarketCategoryListToJSON(value?: PaginatedSupermarketCategoryList | null): any {
export function PaginatedSupermarketCategoryListToJSON(json: any): PaginatedSupermarketCategoryList {
return PaginatedSupermarketCategoryListToJSONTyped(json, false);
}
export function PaginatedSupermarketCategoryListToJSONTyped(value?: PaginatedSupermarketCategoryList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedSupermarketCategoryListToJSON(value?: PaginatedSupermar
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedSupermarketCategoryListListRequest, PaginatedPaginatedSupermarketCategoryListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedSupermarketCategoryListListRequest = {}): Promise<PaginatedPaginatedSupermarketCategoryListList> {
const api = new ApiApi()
return api.apiPaginatedSupermarketCategoryListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
SupermarketCategoryRelationFromJSON,
SupermarketCategoryRelationFromJSONTyped,
SupermarketCategoryRelationToJSON,
SupermarketCategoryRelationToJSONTyped,
} from './SupermarketCategoryRelation';
/**
@@ -85,10 +86,15 @@ export function PaginatedSupermarketCategoryRelationListFromJSONTyped(json: any,
};
}
export function PaginatedSupermarketCategoryRelationListToJSON(value?: PaginatedSupermarketCategoryRelationList | null): any {
export function PaginatedSupermarketCategoryRelationListToJSON(json: any): PaginatedSupermarketCategoryRelationList {
return PaginatedSupermarketCategoryRelationListToJSONTyped(json, false);
}
export function PaginatedSupermarketCategoryRelationListToJSONTyped(value?: PaginatedSupermarketCategoryRelationList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedSupermarketCategoryRelationListToJSON(value?: Paginated
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedSupermarketCategoryRelationListListRequest, PaginatedPaginatedSupermarketCategoryRelationListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedSupermarketCategoryRelationListListRequest = {}): Promise<PaginatedPaginatedSupermarketCategoryRelationListList> {
const api = new ApiApi()
return api.apiPaginatedSupermarketCategoryRelationListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
SupermarketFromJSON,
SupermarketFromJSONTyped,
SupermarketToJSON,
SupermarketToJSONTyped,
} from './Supermarket';
/**
@@ -85,10 +86,15 @@ export function PaginatedSupermarketListFromJSONTyped(json: any, ignoreDiscrimin
};
}
export function PaginatedSupermarketListToJSON(value?: PaginatedSupermarketList | null): any {
export function PaginatedSupermarketListToJSON(json: any): PaginatedSupermarketList {
return PaginatedSupermarketListToJSONTyped(json, false);
}
export function PaginatedSupermarketListToJSONTyped(value?: PaginatedSupermarketList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedSupermarketListToJSON(value?: PaginatedSupermarketList
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedSupermarketListListRequest, PaginatedPaginatedSupermarketListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedSupermarketListListRequest = {}): Promise<PaginatedPaginatedSupermarketListList> {
const api = new ApiApi()
return api.apiPaginatedSupermarketListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
SyncFromJSON,
SyncFromJSONTyped,
SyncToJSON,
SyncToJSONTyped,
} from './Sync';
/**
@@ -85,10 +86,15 @@ export function PaginatedSyncListFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PaginatedSyncListToJSON(value?: PaginatedSyncList | null): any {
export function PaginatedSyncListToJSON(json: any): PaginatedSyncList {
return PaginatedSyncListToJSONTyped(json, false);
}
export function PaginatedSyncListToJSONTyped(value?: PaginatedSyncList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedSyncListToJSON(value?: PaginatedSyncList | null): any {
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedSyncListListRequest, PaginatedPaginatedSyncListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedSyncListListRequest = {}): Promise<PaginatedPaginatedSyncListList> {
const api = new ApiApi()
return api.apiPaginatedSyncListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
SyncLogFromJSON,
SyncLogFromJSONTyped,
SyncLogToJSON,
SyncLogToJSONTyped,
} from './SyncLog';
/**
@@ -85,10 +86,15 @@ export function PaginatedSyncLogListFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PaginatedSyncLogListToJSON(value?: PaginatedSyncLogList | null): any {
export function PaginatedSyncLogListToJSON(json: any): PaginatedSyncLogList {
return PaginatedSyncLogListToJSONTyped(json, false);
}
export function PaginatedSyncLogListToJSONTyped(value?: PaginatedSyncLogList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedSyncLogListToJSON(value?: PaginatedSyncLogList | null):
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedSyncLogListListRequest, PaginatedPaginatedSyncLogListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedSyncLogListListRequest = {}): Promise<PaginatedPaginatedSyncLogListList> {
const api = new ApiApi()
return api.apiPaginatedSyncLogListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UnitConversionFromJSON,
UnitConversionFromJSONTyped,
UnitConversionToJSON,
UnitConversionToJSONTyped,
} from './UnitConversion';
/**
@@ -85,10 +86,15 @@ export function PaginatedUnitConversionListFromJSONTyped(json: any, ignoreDiscri
};
}
export function PaginatedUnitConversionListToJSON(value?: PaginatedUnitConversionList | null): any {
export function PaginatedUnitConversionListToJSON(json: any): PaginatedUnitConversionList {
return PaginatedUnitConversionListToJSONTyped(json, false);
}
export function PaginatedUnitConversionListToJSONTyped(value?: PaginatedUnitConversionList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedUnitConversionListToJSON(value?: PaginatedUnitConversio
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedUnitConversionListListRequest, PaginatedPaginatedUnitConversionListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedUnitConversionListListRequest = {}): Promise<PaginatedPaginatedUnitConversionListList> {
const api = new ApiApi()
return api.apiPaginatedUnitConversionListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
/**
@@ -85,10 +86,15 @@ export function PaginatedUnitListFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PaginatedUnitListToJSON(value?: PaginatedUnitList | null): any {
export function PaginatedUnitListToJSON(json: any): PaginatedUnitList {
return PaginatedUnitListToJSONTyped(json, false);
}
export function PaginatedUnitListToJSONTyped(value?: PaginatedUnitList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedUnitListToJSON(value?: PaginatedUnitList | null): any {
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedUnitListListRequest, PaginatedPaginatedUnitListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedUnitListListRequest = {}): Promise<PaginatedPaginatedUnitListList> {
const api = new ApiApi()
return api.apiPaginatedUnitListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UserFileFromJSON,
UserFileFromJSONTyped,
UserFileToJSON,
UserFileToJSONTyped,
} from './UserFile';
/**
@@ -85,10 +86,15 @@ export function PaginatedUserFileListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function PaginatedUserFileListToJSON(value?: PaginatedUserFileList | null): any {
export function PaginatedUserFileListToJSON(json: any): PaginatedUserFileList {
return PaginatedUserFileListToJSONTyped(json, false);
}
export function PaginatedUserFileListToJSONTyped(value?: PaginatedUserFileList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedUserFileListToJSON(value?: PaginatedUserFileList | null
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedUserFileListListRequest, PaginatedPaginatedUserFileListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedUserFileListListRequest = {}): Promise<PaginatedPaginatedUserFileListList> {
const api = new ApiApi()
return api.apiPaginatedUserFileListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UserSpaceFromJSON,
UserSpaceFromJSONTyped,
UserSpaceToJSON,
UserSpaceToJSONTyped,
} from './UserSpace';
/**
@@ -85,10 +86,15 @@ export function PaginatedUserSpaceListFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PaginatedUserSpaceListToJSON(value?: PaginatedUserSpaceList | null): any {
export function PaginatedUserSpaceListToJSON(json: any): PaginatedUserSpaceList {
return PaginatedUserSpaceListToJSONTyped(json, false);
}
export function PaginatedUserSpaceListToJSONTyped(value?: PaginatedUserSpaceList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedUserSpaceListToJSON(value?: PaginatedUserSpaceList | nu
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedUserSpaceListListRequest, PaginatedPaginatedUserSpaceListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedUserSpaceListListRequest = {}): Promise<PaginatedPaginatedUserSpaceListList> {
const api = new ApiApi()
return api.apiPaginatedUserSpaceListList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
ViewLogFromJSON,
ViewLogFromJSONTyped,
ViewLogToJSON,
ViewLogToJSONTyped,
} from './ViewLog';
/**
@@ -85,10 +86,15 @@ export function PaginatedViewLogListFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PaginatedViewLogListToJSON(value?: PaginatedViewLogList | null): any {
export function PaginatedViewLogListToJSON(json: any): PaginatedViewLogList {
return PaginatedViewLogListToJSONTyped(json, false);
}
export function PaginatedViewLogListToJSONTyped(value?: PaginatedViewLogList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
@@ -98,15 +104,4 @@ export function PaginatedViewLogListToJSON(value?: PaginatedViewLogList | null):
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPaginatedViewLogListListRequest, PaginatedPaginatedViewLogListList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPaginatedViewLogListListRequest = {}): Promise<PaginatedPaginatedViewLogListList> {
const api = new ApiApi()
return api.apiPaginatedViewLogListList(requestParameters)
}

View File

@@ -73,10 +73,15 @@ export function ParsedIngredientFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function ParsedIngredientToJSON(value?: ParsedIngredient | null): any {
export function ParsedIngredientToJSON(json: any): ParsedIngredient {
return ParsedIngredientToJSONTyped(json, false);
}
export function ParsedIngredientToJSONTyped(value?: ParsedIngredient | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'amount': value['amount'],
@@ -85,15 +90,4 @@ export function ParsedIngredientToJSON(value?: ParsedIngredient | null): any {
'note': value['note'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiParsedIngredientListRequest, PaginatedParsedIngredientList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiParsedIngredientListRequest = {}): Promise<PaginatedParsedIngredientList> {
const api = new ApiApi()
return api.apiParsedIngredientList(requestParameters)
}

View File

@@ -83,10 +83,15 @@ export function PatchedAccessTokenFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedAccessTokenToJSON(value?: Omit<PatchedAccessToken, 'token'|'created'|'updated'> | null): any {
export function PatchedAccessTokenToJSON(json: any): PatchedAccessToken {
return PatchedAccessTokenToJSONTyped(json, false);
}
export function PatchedAccessTokenToJSONTyped(value?: Omit<PatchedAccessToken, 'token'|'created'|'updated'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -94,15 +99,4 @@ export function PatchedAccessTokenToJSON(value?: Omit<PatchedAccessToken, 'token
'scope': value['scope'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedAccessTokenListRequest, PaginatedPatchedAccessTokenList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedAccessTokenListRequest = {}): Promise<PaginatedPatchedAccessTokenList> {
const api = new ApiApi()
return api.apiPatchedAccessTokenList(requestParameters)
}

View File

@@ -13,12 +13,13 @@
*/
import { mapValues } from '../runtime';
import type { TypeEnum } from './TypeEnum';
import type { AutomationTypeEnum } from './AutomationTypeEnum';
import {
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
} from './TypeEnum';
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
AutomationTypeEnumToJSONTyped,
} from './AutomationTypeEnum';
/**
*
@@ -34,10 +35,10 @@ export interface PatchedAutomation {
id?: number;
/**
*
* @type {TypeEnum}
* @type {AutomationTypeEnum}
* @memberof PatchedAutomation
*/
type?: TypeEnum;
type?: AutomationTypeEnum;
/**
*
* @type {string}
@@ -108,7 +109,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'],
@@ -120,14 +121,19 @@ export function PatchedAutomationFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PatchedAutomationToJSON(value?: Omit<PatchedAutomation, 'created_by'> | null): any {
export function PatchedAutomationToJSON(json: any): PatchedAutomation {
return PatchedAutomationToJSONTyped(json, false);
}
export function PatchedAutomationToJSONTyped(value?: Omit<PatchedAutomation, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'type': TypeEnumToJSON(value['type']),
'type': AutomationTypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],
@@ -137,15 +143,4 @@ export function PatchedAutomationToJSON(value?: Omit<PatchedAutomation, 'created
'disabled': value['disabled'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedAutomationListRequest, PaginatedPatchedAutomationList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedAutomationListRequest = {}): Promise<PaginatedPatchedAutomationList> {
const api = new ApiApi()
return api.apiPatchedAutomationList(requestParameters)
}

View File

@@ -76,10 +76,15 @@ export function PatchedBookmarkletImportFromJSONTyped(json: any, ignoreDiscrimin
};
}
export function PatchedBookmarkletImportToJSON(value?: Omit<PatchedBookmarkletImport, 'created_by'|'created_at'> | null): any {
export function PatchedBookmarkletImportToJSON(json: any): PatchedBookmarkletImport {
return PatchedBookmarkletImportToJSONTyped(json, false);
}
export function PatchedBookmarkletImportToJSONTyped(value?: Omit<PatchedBookmarkletImport, 'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -87,15 +92,4 @@ export function PatchedBookmarkletImportToJSON(value?: Omit<PatchedBookmarkletIm
'html': value['html'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedBookmarkletImportListRequest, PaginatedPatchedBookmarkletImportList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedBookmarkletImportListRequest = {}): Promise<PaginatedPatchedBookmarkletImportList> {
const api = new ApiApi()
return api.apiPatchedBookmarkletImportList(requestParameters)
}

View File

@@ -118,10 +118,15 @@ export function PatchedConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscr
};
}
export function PatchedConnectorConfigConfigToJSON(value?: Omit<PatchedConnectorConfigConfig, 'created_by'> | null): any {
export function PatchedConnectorConfigConfigToJSON(json: any): PatchedConnectorConfigConfig {
return PatchedConnectorConfigConfigToJSONTyped(json, false);
}
export function PatchedConnectorConfigConfigToJSONTyped(value?: Omit<PatchedConnectorConfigConfig, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -136,15 +141,4 @@ export function PatchedConnectorConfigConfigToJSON(value?: Omit<PatchedConnector
'supports_description_field': value['supportsDescriptionField'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedConnectorConfigConfigListRequest, PaginatedPatchedConnectorConfigConfigList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedConnectorConfigConfigListRequest = {}): Promise<PaginatedPatchedConnectorConfigConfigList> {
const api = new ApiApi()
return api.apiPatchedConnectorConfigConfigList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -104,10 +105,15 @@ export function PatchedCookLogFromJSONTyped(json: any, ignoreDiscriminator: bool
};
}
export function PatchedCookLogToJSON(value?: Omit<PatchedCookLog, 'created_by'|'updated_at'> | null): any {
export function PatchedCookLogToJSON(json: any): PatchedCookLog {
return PatchedCookLogToJSONTyped(json, false);
}
export function PatchedCookLogToJSONTyped(value?: Omit<PatchedCookLog, 'created_by'|'updated_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -118,15 +124,4 @@ export function PatchedCookLogToJSON(value?: Omit<PatchedCookLog, 'created_by'|'
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedCookLogListRequest, PaginatedPatchedCookLogList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedCookLogListRequest = {}): Promise<PaginatedPatchedCookLogList> {
const api = new ApiApi()
return api.apiPatchedCookLogList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -83,10 +84,15 @@ export function PatchedCustomFilterFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedCustomFilterToJSON(value?: Omit<PatchedCustomFilter, 'created_by'> | null): any {
export function PatchedCustomFilterToJSON(json: any): PatchedCustomFilter {
return PatchedCustomFilterToJSONTyped(json, false);
}
export function PatchedCustomFilterToJSONTyped(value?: Omit<PatchedCustomFilter, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -95,15 +101,4 @@ export function PatchedCustomFilterToJSON(value?: Omit<PatchedCustomFilter, 'cre
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedCustomFilterListRequest, PaginatedPatchedCustomFilterList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedCustomFilterListRequest = {}): Promise<PaginatedPatchedCustomFilterList> {
const api = new ApiApi()
return api.apiPatchedCustomFilterList(requestParameters)
}

View File

@@ -111,10 +111,15 @@ export function PatchedExportLogFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function PatchedExportLogToJSON(value?: Omit<PatchedExportLog, 'created_by'|'created_at'> | null): any {
export function PatchedExportLogToJSON(json: any): PatchedExportLog {
return PatchedExportLogToJSONTyped(json, false);
}
export function PatchedExportLogToJSONTyped(value?: Omit<PatchedExportLog, 'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -127,15 +132,4 @@ export function PatchedExportLogToJSON(value?: Omit<PatchedExportLog, 'created_b
'possibly_not_expired': value['possiblyNotExpired'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedExportLogListRequest, PaginatedPatchedExportLogList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedExportLogListRequest = {}): Promise<PaginatedPatchedExportLogList> {
const api = new ApiApi()
return api.apiPatchedExportLogList(requestParameters)
}

View File

@@ -18,36 +18,42 @@ import {
SupermarketCategoryFromJSON,
SupermarketCategoryFromJSONTyped,
SupermarketCategoryToJSON,
SupermarketCategoryToJSONTyped,
} from './SupermarketCategory';
import type { Unit } from './Unit';
import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
import type { Property } from './Property';
import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
PropertyToJSONTyped,
} from './Property';
import type { FoodInheritField } from './FoodInheritField';
import {
FoodInheritFieldFromJSON,
FoodInheritFieldFromJSONTyped,
FoodInheritFieldToJSON,
FoodInheritFieldToJSONTyped,
} from './FoodInheritField';
import type { FoodSimple } from './FoodSimple';
import {
FoodSimpleFromJSON,
FoodSimpleFromJSONTyped,
FoodSimpleToJSON,
FoodSimpleToJSONTyped,
} from './FoodSimple';
import type { RecipeSimple } from './RecipeSimple';
import {
RecipeSimpleFromJSON,
RecipeSimpleFromJSONTyped,
RecipeSimpleToJSON,
RecipeSimpleToJSONTyped,
} from './RecipeSimple';
/**
@@ -281,10 +287,15 @@ export function PatchedFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean
};
}
export function PatchedFoodToJSON(value?: Omit<PatchedFood, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'> | null): any {
export function PatchedFoodToJSON(json: any): PatchedFood {
return PatchedFoodToJSONTyped(json, false);
}
export function PatchedFoodToJSONTyped(value?: Omit<PatchedFood, 'shopping'|'parent'|'numchild'|'full_name'|'substitute_onhand'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -308,15 +319,4 @@ export function PatchedFoodToJSON(value?: Omit<PatchedFood, 'shopping'|'parent'|
'open_data_slug': value['openDataSlug'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedFoodListRequest, PaginatedPatchedFoodList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedFoodListRequest = {}): Promise<PaginatedPatchedFoodList> {
const api = new ApiApi()
return api.apiPatchedFoodList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
/**
@@ -111,10 +112,15 @@ export function PatchedImportLogFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function PatchedImportLogToJSON(value?: Omit<PatchedImportLog, 'keyword'|'created_by'|'created_at'> | null): any {
export function PatchedImportLogToJSON(json: any): PatchedImportLog {
return PatchedImportLogToJSONTyped(json, false);
}
export function PatchedImportLogToJSONTyped(value?: Omit<PatchedImportLog, 'keyword'|'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -125,15 +131,4 @@ export function PatchedImportLogToJSON(value?: Omit<PatchedImportLog, 'keyword'|
'imported_recipes': value['importedRecipes'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedImportLogListRequest, PaginatedPatchedImportLogList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedImportLogListRequest = {}): Promise<PaginatedPatchedImportLogList> {
const api = new ApiApi()
return api.apiPatchedImportLogList(requestParameters)
}

View File

@@ -18,12 +18,14 @@ import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
import type { Food } from './Food';
import {
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
FoodToJSONTyped,
} from './Food';
/**
@@ -145,10 +147,15 @@ export function PatchedIngredientFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PatchedIngredientToJSON(value?: Omit<PatchedIngredient, 'conversions'|'used_in_recipes'> | null): any {
export function PatchedIngredientToJSON(json: any): PatchedIngredient {
return PatchedIngredientToJSONTyped(json, false);
}
export function PatchedIngredientToJSONTyped(value?: Omit<PatchedIngredient, 'conversions'|'used_in_recipes'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -164,15 +171,4 @@ export function PatchedIngredientToJSON(value?: Omit<PatchedIngredient, 'convers
'always_use_plural_food': value['alwaysUsePluralFood'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedIngredientListRequest, PaginatedPatchedIngredientList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedIngredientListRequest = {}): Promise<PaginatedPatchedIngredientList> {
const api = new ApiApi()
return api.apiPatchedIngredientList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
GroupFromJSON,
GroupFromJSONTyped,
GroupToJSON,
GroupToJSONTyped,
} from './Group';
/**
@@ -118,10 +119,15 @@ export function PatchedInviteLinkFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PatchedInviteLinkToJSON(value?: Omit<PatchedInviteLink, 'uuid'|'created_by'|'created_at'> | null): any {
export function PatchedInviteLinkToJSON(json: any): PatchedInviteLink {
return PatchedInviteLinkToJSONTyped(json, false);
}
export function PatchedInviteLinkToJSONTyped(value?: Omit<PatchedInviteLink, 'uuid'|'created_by'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -133,15 +139,4 @@ export function PatchedInviteLinkToJSON(value?: Omit<PatchedInviteLink, 'uuid'|'
'internal_note': value['internalNote'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedInviteLinkListRequest, PaginatedPatchedInviteLinkList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedInviteLinkListRequest = {}): Promise<PaginatedPatchedInviteLinkList> {
const api = new ApiApi()
return api.apiPatchedInviteLinkList(requestParameters)
}

View File

@@ -139,10 +139,15 @@ export function PatchedKeywordFromJSONTyped(json: any, ignoreDiscriminator: bool
};
}
export function PatchedKeywordToJSON(value?: Omit<PatchedKeyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'> | null): any {
export function PatchedKeywordToJSON(json: any): PatchedKeyword {
return PatchedKeywordToJSONTyped(json, false);
}
export function PatchedKeywordToJSONTyped(value?: Omit<PatchedKeyword, 'label'|'parent'|'numchild'|'created_at'|'updated_at'|'full_name'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -150,15 +155,4 @@ export function PatchedKeywordToJSON(value?: Omit<PatchedKeyword, 'label'|'paren
'description': value['description'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedKeywordListRequest, PaginatedPatchedKeywordList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedKeywordListRequest = {}): Promise<PaginatedPatchedKeywordList> {
const api = new ApiApi()
return api.apiPatchedKeywordList(requestParameters)
}

View File

@@ -18,18 +18,21 @@ import {
MealTypeFromJSON,
MealTypeFromJSONTyped,
MealTypeToJSON,
MealTypeToJSONTyped,
} from './MealType';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
import type { RecipeOverview } from './RecipeOverview';
import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
RecipeOverviewToJSONTyped,
} from './RecipeOverview';
/**
@@ -158,10 +161,15 @@ export function PatchedMealPlanFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}
export function PatchedMealPlanToJSON(value?: Omit<PatchedMealPlan, 'note_markdown'|'created_by'|'recipe_name'|'meal_type_name'|'shopping'> | null): any {
export function PatchedMealPlanToJSON(json: any): PatchedMealPlan {
return PatchedMealPlanToJSONTyped(json, false);
}
export function PatchedMealPlanToJSONTyped(value?: Omit<PatchedMealPlan, 'note_markdown'|'created_by'|'recipe_name'|'meal_type_name'|'shopping'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -175,15 +183,4 @@ export function PatchedMealPlanToJSON(value?: Omit<PatchedMealPlan, 'note_markdo
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedMealPlanListRequest, PaginatedPatchedMealPlanList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedMealPlanListRequest = {}): Promise<PaginatedPatchedMealPlanList> {
const api = new ApiApi()
return api.apiPatchedMealPlanList(requestParameters)
}

View File

@@ -90,10 +90,15 @@ export function PatchedMealTypeFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}
export function PatchedMealTypeToJSON(value?: Omit<PatchedMealType, 'created_by'> | null): any {
export function PatchedMealTypeToJSON(json: any): PatchedMealType {
return PatchedMealTypeToJSONTyped(json, false);
}
export function PatchedMealTypeToJSONTyped(value?: Omit<PatchedMealType, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -104,15 +109,4 @@ export function PatchedMealTypeToJSON(value?: Omit<PatchedMealType, 'created_by'
'default': value['_default'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedMealTypeListRequest, PaginatedPatchedMealTypeList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedMealTypeListRequest = {}): Promise<PaginatedPatchedMealTypeList> {
const api = new ApiApi()
return api.apiPatchedMealTypeList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -131,10 +132,15 @@ export function PatchedOpenDataCategoryFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PatchedOpenDataCategoryToJSON(value?: Omit<PatchedOpenDataCategory, 'created_by'> | null): any {
export function PatchedOpenDataCategoryToJSON(json: any): PatchedOpenDataCategory {
return PatchedOpenDataCategoryToJSONTyped(json, false);
}
export function PatchedOpenDataCategoryToJSONTyped(value?: Omit<PatchedOpenDataCategory, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -145,15 +151,4 @@ export function PatchedOpenDataCategoryToJSON(value?: Omit<PatchedOpenDataCatego
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedOpenDataCategoryListRequest, PaginatedPatchedOpenDataCategoryList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedOpenDataCategoryListRequest = {}): Promise<PaginatedPatchedOpenDataCategoryList> {
const api = new ApiApi()
return api.apiPatchedOpenDataCategoryList(requestParameters)
}

View File

@@ -18,18 +18,21 @@ import {
OpenDataUnitFromJSON,
OpenDataUnitFromJSONTyped,
OpenDataUnitToJSON,
OpenDataUnitToJSONTyped,
} from './OpenDataUnit';
import type { OpenDataFood } from './OpenDataFood';
import {
OpenDataFoodFromJSON,
OpenDataFoodFromJSONTyped,
OpenDataFoodToJSON,
OpenDataFoodToJSONTyped,
} from './OpenDataFood';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -137,10 +140,15 @@ export function PatchedOpenDataConversionFromJSONTyped(json: any, ignoreDiscrimi
};
}
export function PatchedOpenDataConversionToJSON(value?: Omit<PatchedOpenDataConversion, 'created_by'> | null): any {
export function PatchedOpenDataConversionToJSON(json: any): PatchedOpenDataConversion {
return PatchedOpenDataConversionToJSONTyped(json, false);
}
export function PatchedOpenDataConversionToJSONTyped(value?: Omit<PatchedOpenDataConversion, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -155,15 +163,4 @@ export function PatchedOpenDataConversionToJSON(value?: Omit<PatchedOpenDataConv
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedOpenDataConversionListRequest, PaginatedPatchedOpenDataConversionList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedOpenDataConversionListRequest = {}): Promise<PaginatedPatchedOpenDataConversionList> {
const api = new ApiApi()
return api.apiPatchedOpenDataConversionList(requestParameters)
}

View File

@@ -18,24 +18,28 @@ import {
OpenDataFoodPropertyFromJSON,
OpenDataFoodPropertyFromJSONTyped,
OpenDataFoodPropertyToJSON,
OpenDataFoodPropertyToJSONTyped,
} from './OpenDataFoodProperty';
import type { OpenDataUnit } from './OpenDataUnit';
import {
OpenDataUnitFromJSON,
OpenDataUnitFromJSONTyped,
OpenDataUnitToJSON,
OpenDataUnitToJSONTyped,
} from './OpenDataUnit';
import type { OpenDataCategory } from './OpenDataCategory';
import {
OpenDataCategoryFromJSON,
OpenDataCategoryFromJSONTyped,
OpenDataCategoryToJSON,
OpenDataCategoryToJSONTyped,
} from './OpenDataCategory';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -219,10 +223,15 @@ export function PatchedOpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedOpenDataFoodToJSON(value?: Omit<PatchedOpenDataFood, 'created_by'> | null): any {
export function PatchedOpenDataFoodToJSON(json: any): PatchedOpenDataFood {
return PatchedOpenDataFoodToJSONTyped(json, false);
}
export function PatchedOpenDataFoodToJSONTyped(value?: Omit<PatchedOpenDataFood, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -243,15 +252,4 @@ export function PatchedOpenDataFoodToJSON(value?: Omit<PatchedOpenDataFood, 'cre
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedOpenDataFoodListRequest, PaginatedPatchedOpenDataFoodList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedOpenDataFoodListRequest = {}): Promise<PaginatedPatchedOpenDataFoodList> {
const api = new ApiApi()
return api.apiPatchedOpenDataFoodList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -138,10 +139,15 @@ export function PatchedOpenDataPropertyFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PatchedOpenDataPropertyToJSON(value?: Omit<PatchedOpenDataProperty, 'created_by'> | null): any {
export function PatchedOpenDataPropertyToJSON(json: any): PatchedOpenDataProperty {
return PatchedOpenDataPropertyToJSONTyped(json, false);
}
export function PatchedOpenDataPropertyToJSONTyped(value?: Omit<PatchedOpenDataProperty, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -153,15 +159,4 @@ export function PatchedOpenDataPropertyToJSON(value?: Omit<PatchedOpenDataProper
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedOpenDataPropertyListRequest, PaginatedPatchedOpenDataPropertyList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedOpenDataPropertyListRequest = {}): Promise<PaginatedPatchedOpenDataPropertyList> {
const api = new ApiApi()
return api.apiPatchedOpenDataPropertyList(requestParameters)
}

View File

@@ -18,12 +18,14 @@ import {
OpenDataStoreCategoryFromJSON,
OpenDataStoreCategoryFromJSONTyped,
OpenDataStoreCategoryToJSON,
OpenDataStoreCategoryToJSONTyped,
} from './OpenDataStoreCategory';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -103,10 +105,15 @@ export function PatchedOpenDataStoreFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PatchedOpenDataStoreToJSON(value?: Omit<PatchedOpenDataStore, 'created_by'> | null): any {
export function PatchedOpenDataStoreToJSON(json: any): PatchedOpenDataStore {
return PatchedOpenDataStoreToJSONTyped(json, false);
}
export function PatchedOpenDataStoreToJSONTyped(value?: Omit<PatchedOpenDataStore, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -117,15 +124,4 @@ export function PatchedOpenDataStoreToJSON(value?: Omit<PatchedOpenDataStore, 'c
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedOpenDataStoreListRequest, PaginatedPatchedOpenDataStoreList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedOpenDataStoreListRequest = {}): Promise<PaginatedPatchedOpenDataStoreList> {
const api = new ApiApi()
return api.apiPatchedOpenDataStoreList(requestParameters)
}

View File

@@ -18,18 +18,21 @@ import {
BaseUnitEnumFromJSON,
BaseUnitEnumFromJSONTyped,
BaseUnitEnumToJSON,
BaseUnitEnumToJSONTyped,
} from './BaseUnitEnum';
import type { OpenDataUnitTypeEnum } from './OpenDataUnitTypeEnum';
import {
OpenDataUnitTypeEnumFromJSON,
OpenDataUnitTypeEnumFromJSONTyped,
OpenDataUnitTypeEnumToJSON,
OpenDataUnitTypeEnumToJSONTyped,
} from './OpenDataUnitTypeEnum';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -159,10 +162,15 @@ export function PatchedOpenDataUnitFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedOpenDataUnitToJSON(value?: Omit<PatchedOpenDataUnit, 'created_by'> | null): any {
export function PatchedOpenDataUnitToJSON(json: any): PatchedOpenDataUnit {
return PatchedOpenDataUnitToJSONTyped(json, false);
}
export function PatchedOpenDataUnitToJSONTyped(value?: Omit<PatchedOpenDataUnit, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -175,15 +183,4 @@ export function PatchedOpenDataUnitToJSON(value?: Omit<PatchedOpenDataUnit, 'cre
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedOpenDataUnitListRequest, PaginatedPatchedOpenDataUnitList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedOpenDataUnitListRequest = {}): Promise<PaginatedPatchedOpenDataUnitList> {
const api = new ApiApi()
return api.apiPatchedOpenDataUnitList(requestParameters)
}

View File

@@ -103,10 +103,15 @@ export function PatchedOpenDataVersionFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PatchedOpenDataVersionToJSON(value?: PatchedOpenDataVersion | null): any {
export function PatchedOpenDataVersionToJSON(json: any): PatchedOpenDataVersion {
return PatchedOpenDataVersionToJSONTyped(json, false);
}
export function PatchedOpenDataVersionToJSONTyped(value?: PatchedOpenDataVersion | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -115,15 +120,4 @@ export function PatchedOpenDataVersionToJSON(value?: PatchedOpenDataVersion | nu
'comment': value['comment'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedOpenDataVersionListRequest, PaginatedPatchedOpenDataVersionList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedOpenDataVersionListRequest = {}): Promise<PaginatedPatchedOpenDataVersionList> {
const api = new ApiApi()
return api.apiPatchedOpenDataVersionList(requestParameters)
}

View File

@@ -18,6 +18,7 @@ import {
PropertyTypeFromJSON,
PropertyTypeFromJSONTyped,
PropertyTypeToJSON,
PropertyTypeToJSONTyped,
} from './PropertyType';
/**
@@ -103,10 +104,15 @@ export function PatchedPropertyFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}
export function PatchedPropertyToJSON(value?: PatchedProperty | null): any {
export function PatchedPropertyToJSON(json: any): PatchedProperty {
return PatchedPropertyToJSONTyped(json, false);
}
export function PatchedPropertyToJSONTyped(value?: PatchedProperty | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -114,15 +120,4 @@ export function PatchedPropertyToJSON(value?: PatchedProperty | null): any {
'property_type': PropertyTypeToJSON(value['propertyType']),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedPropertyListRequest, PaginatedPatchedPropertyList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedPropertyListRequest = {}): Promise<PaginatedPatchedPropertyList> {
const api = new ApiApi()
return api.apiPatchedPropertyList(requestParameters)
}

View File

@@ -90,10 +90,15 @@ export function PatchedPropertyTypeFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedPropertyTypeToJSON(value?: PatchedPropertyType | null): any {
export function PatchedPropertyTypeToJSON(json: any): PatchedPropertyType {
return PatchedPropertyTypeToJSONTyped(json, false);
}
export function PatchedPropertyTypeToJSONTyped(value?: PatchedPropertyType | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -105,15 +110,4 @@ export function PatchedPropertyTypeToJSON(value?: PatchedPropertyType | null): a
'fdc_id': value['fdcId'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedPropertyTypeListRequest, PaginatedPatchedPropertyTypeList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedPropertyTypeListRequest = {}): Promise<PaginatedPatchedPropertyTypeList> {
const api = new ApiApi()
return api.apiPatchedPropertyTypeList(requestParameters)
}

View File

@@ -18,30 +18,35 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
import type { Step } from './Step';
import {
StepFromJSON,
StepFromJSONTyped,
StepToJSON,
StepToJSONTyped,
} from './Step';
import type { Property } from './Property';
import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
PropertyToJSONTyped,
} from './Property';
import type { NutritionInformation } from './NutritionInformation';
import {
NutritionInformationFromJSON,
NutritionInformationFromJSONTyped,
NutritionInformationToJSON,
NutritionInformationToJSONTyped,
} from './NutritionInformation';
/**
@@ -240,10 +245,15 @@ export function PatchedRecipeFromJSONTyped(json: any, ignoreDiscriminator: boole
};
}
export function PatchedRecipeToJSON(value?: Omit<PatchedRecipe, 'image'|'created_by'|'created_at'|'updated_at'|'food_properties'|'rating'|'last_cooked'> | null): any {
export function PatchedRecipeToJSON(json: any): PatchedRecipe {
return PatchedRecipeToJSONTyped(json, false);
}
export function PatchedRecipeToJSONTyped(value?: Omit<PatchedRecipe, 'image'|'created_by'|'created_at'|'updated_at'|'food_properties'|'rating'|'last_cooked'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -265,15 +275,4 @@ export function PatchedRecipeToJSON(value?: Omit<PatchedRecipe, 'image'|'created
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedRecipeListRequest, PaginatedPatchedRecipeList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedRecipeListRequest = {}): Promise<PaginatedPatchedRecipeList> {
const api = new ApiApi()
return api.apiPatchedRecipeList(requestParameters)
}

View File

@@ -18,12 +18,14 @@ import {
CustomFilterFromJSON,
CustomFilterFromJSONTyped,
CustomFilterToJSON,
CustomFilterToJSONTyped,
} from './CustomFilter';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -103,10 +105,15 @@ export function PatchedRecipeBookFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PatchedRecipeBookToJSON(value?: Omit<PatchedRecipeBook, 'created_by'> | null): any {
export function PatchedRecipeBookToJSON(json: any): PatchedRecipeBook {
return PatchedRecipeBookToJSONTyped(json, false);
}
export function PatchedRecipeBookToJSONTyped(value?: Omit<PatchedRecipeBook, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -117,15 +124,4 @@ export function PatchedRecipeBookToJSON(value?: Omit<PatchedRecipeBook, 'created
'order': value['order'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedRecipeBookListRequest, PaginatedPatchedRecipeBookList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedRecipeBookListRequest = {}): Promise<PaginatedPatchedRecipeBookList> {
const api = new ApiApi()
return api.apiPatchedRecipeBookList(requestParameters)
}

View File

@@ -18,12 +18,14 @@ import {
RecipeBookFromJSON,
RecipeBookFromJSONTyped,
RecipeBookToJSON,
RecipeBookToJSONTyped,
} from './RecipeBook';
import type { RecipeOverview } from './RecipeOverview';
import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
RecipeOverviewToJSONTyped,
} from './RecipeOverview';
/**
@@ -89,10 +91,15 @@ export function PatchedRecipeBookEntryFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PatchedRecipeBookEntryToJSON(value?: Omit<PatchedRecipeBookEntry, 'book_content'|'recipe_content'> | null): any {
export function PatchedRecipeBookEntryToJSON(json: any): PatchedRecipeBookEntry {
return PatchedRecipeBookEntryToJSONTyped(json, false);
}
export function PatchedRecipeBookEntryToJSONTyped(value?: Omit<PatchedRecipeBookEntry, 'book_content'|'recipe_content'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -100,15 +107,4 @@ export function PatchedRecipeBookEntryToJSON(value?: Omit<PatchedRecipeBookEntry
'recipe': value['recipe'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedRecipeBookEntryListRequest, PaginatedPatchedRecipeBookEntryList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedRecipeBookEntryListRequest = {}): Promise<PaginatedPatchedRecipeBookEntryList> {
const api = new ApiApi()
return api.apiPatchedRecipeBookEntryList(requestParameters)
}

View File

@@ -18,24 +18,28 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
import type { ShoppingListRecipe } from './ShoppingListRecipe';
import {
ShoppingListRecipeFromJSON,
ShoppingListRecipeFromJSONTyped,
ShoppingListRecipeToJSON,
ShoppingListRecipeToJSONTyped,
} from './ShoppingListRecipe';
import type { Unit } from './Unit';
import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
import type { Food } from './Food';
import {
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
FoodToJSONTyped,
} from './Food';
/**
@@ -157,10 +161,15 @@ export function PatchedShoppingListEntryFromJSONTyped(json: any, ignoreDiscrimin
};
}
export function PatchedShoppingListEntryToJSON(value?: Omit<PatchedShoppingListEntry, 'recipe_mealplan'|'created_by'|'created_at'|'updated_at'> | null): any {
export function PatchedShoppingListEntryToJSON(json: any): PatchedShoppingListEntry {
return PatchedShoppingListEntryToJSONTyped(json, false);
}
export function PatchedShoppingListEntryToJSONTyped(value?: Omit<PatchedShoppingListEntry, 'recipe_mealplan'|'created_by'|'created_at'|'updated_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -174,15 +183,4 @@ export function PatchedShoppingListEntryToJSON(value?: Omit<PatchedShoppingListE
'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedShoppingListEntryListRequest, PaginatedPatchedShoppingListEntryList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedShoppingListEntryListRequest = {}): Promise<PaginatedPatchedShoppingListEntryList> {
const api = new ApiApi()
return api.apiPatchedShoppingListEntryList(requestParameters)
}

View File

@@ -104,10 +104,15 @@ export function PatchedShoppingListRecipeFromJSONTyped(json: any, ignoreDiscrimi
};
}
export function PatchedShoppingListRecipeToJSON(value?: Omit<PatchedShoppingListRecipe, 'recipe_name'|'name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'> | null): any {
export function PatchedShoppingListRecipeToJSON(json: any): PatchedShoppingListRecipe {
return PatchedShoppingListRecipeToJSONTyped(json, false);
}
export function PatchedShoppingListRecipeToJSONTyped(value?: Omit<PatchedShoppingListRecipe, 'recipe_name'|'name'|'mealplan_note'|'mealplan_from_date'|'mealplan_type'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -116,15 +121,4 @@ export function PatchedShoppingListRecipeToJSON(value?: Omit<PatchedShoppingList
'servings': value['servings'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedShoppingListRecipeListRequest, PaginatedPatchedShoppingListRecipeList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedShoppingListRecipeListRequest = {}): Promise<PaginatedPatchedShoppingListRecipeList> {
const api = new ApiApi()
return api.apiPatchedShoppingListRecipeList(requestParameters)
}

View File

@@ -18,30 +18,35 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
import type { UserFileView } from './UserFileView';
import {
UserFileViewFromJSON,
UserFileViewFromJSONTyped,
UserFileViewToJSON,
UserFileViewToJSONTyped,
} from './UserFileView';
import type { SpaceNavTextColorEnum } from './SpaceNavTextColorEnum';
import {
SpaceNavTextColorEnumFromJSON,
SpaceNavTextColorEnumFromJSONTyped,
SpaceNavTextColorEnumToJSON,
SpaceNavTextColorEnumToJSONTyped,
} from './SpaceNavTextColorEnum';
import type { FoodInheritField } from './FoodInheritField';
import {
FoodInheritFieldFromJSON,
FoodInheritFieldFromJSONTyped,
FoodInheritFieldToJSON,
FoodInheritFieldToJSONTyped,
} from './FoodInheritField';
import type { SpaceThemeEnum } from './SpaceThemeEnum';
import {
SpaceThemeEnumFromJSON,
SpaceThemeEnumFromJSONTyped,
SpaceThemeEnumToJSON,
SpaceThemeEnumToJSONTyped,
} from './SpaceThemeEnum';
/**
@@ -263,10 +268,15 @@ export function PatchedSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function PatchedSpaceToJSON(value?: Omit<PatchedSpace, 'created_by'|'created_at'|'max_recipes'|'max_file_storage_mb'|'max_users'|'allow_sharing'|'demo'|'user_count'|'recipe_count'|'file_size_mb'> | null): any {
export function PatchedSpaceToJSON(json: any): PatchedSpace {
return PatchedSpaceToJSONTyped(json, false);
}
export function PatchedSpaceToJSONTyped(value?: Omit<PatchedSpace, 'created_by'|'created_at'|'max_recipes'|'max_file_storage_mb'|'max_users'|'allow_sharing'|'demo'|'user_count'|'recipe_count'|'file_size_mb'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -288,15 +298,4 @@ export function PatchedSpaceToJSON(value?: Omit<PatchedSpace, 'created_by'|'crea
'logo_color_svg': UserFileViewToJSON(value['logoColorSvg']),
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedSpaceListRequest, PaginatedPatchedSpaceList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedSpaceListRequest = {}): Promise<PaginatedPatchedSpaceList> {
const api = new ApiApi()
return api.apiPatchedSpaceList(requestParameters)
}

View File

@@ -18,12 +18,14 @@ import {
UserFileViewFromJSON,
UserFileViewFromJSONTyped,
UserFileViewToJSON,
UserFileViewToJSONTyped,
} from './UserFileView';
import type { Ingredient } from './Ingredient';
import {
IngredientFromJSON,
IngredientFromJSONTyped,
IngredientToJSON,
IngredientToJSONTyped,
} from './Ingredient';
/**
@@ -145,10 +147,15 @@ export function PatchedStepFromJSONTyped(json: any, ignoreDiscriminator: boolean
};
}
export function PatchedStepToJSON(value?: Omit<PatchedStep, 'instructions_markdown'|'step_recipe_data'|'numrecipe'> | null): any {
export function PatchedStepToJSON(json: any): PatchedStep {
return PatchedStepToJSONTyped(json, false);
}
export function PatchedStepToJSONTyped(value?: Omit<PatchedStep, 'instructions_markdown'|'step_recipe_data'|'numrecipe'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
@@ -163,15 +170,4 @@ export function PatchedStepToJSON(value?: Omit<PatchedStep, 'instructions_markdo
'show_ingredients_table': value['showIngredientsTable'],
};
}
// ----------------------------------------------------------------------
// Custom model functions added by custom openapi-generator template
// ----------------------------------------------------------------------
import {ApiApi, ApiPatchedStepListRequest, PaginatedPatchedStepList} from "@/openapi";
/**
* query list endpoint using the provided request parameters
*/
export function list(requestParameters: ApiPatchedStepListRequest = {}): Promise<PaginatedPatchedStepList> {
const api = new ApiApi()
return api.apiPatchedStepList(requestParameters)
}

Some files were not shown because too many files have changed in this diff Show More