applied custom openapi generator fix for omit generation

This commit is contained in:
vabene1111
2025-03-16 15:38:37 +01:00
parent e9f87bb475
commit 8eb2ba9512
166 changed files with 1125 additions and 1519 deletions

View File

@@ -87,15 +87,10 @@ export function AccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean
};
}
export function AccessTokenToJSON(json: any): AccessToken {
return AccessTokenToJSONTyped(json, false);
}
export function AccessTokenToJSONTyped(value?: Omit<AccessToken, 'token'|'created'|'updated'> | null, ignoreDiscriminator: boolean = false): any {
export function AccessTokenToJSON(value?: Omit<AccessToken, 'token'|'created'|'updated'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -65,15 +65,10 @@ export function AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
export function AuthTokenToJSON(json: any): AuthToken {
return AuthTokenToJSONTyped(json, false);
}
export function AuthTokenToJSONTyped(value?: Omit<AuthToken, 'token'> | null, ignoreDiscriminator: boolean = false): any {
export function AuthTokenToJSON(value?: Omit<AuthToken, 'token'> | null): any {
if (value == null) {
return value;
}
return {
'username': value['username'],

View File

@@ -18,7 +18,6 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -62,7 +61,7 @@ export interface AutoMealPlan {
* @type {Array<User>}
* @memberof AutoMealPlan
*/
shared?: Array<User> | null;
shared?: Array<User>;
/**
*
* @type {boolean}
@@ -104,15 +103,10 @@ export function AutoMealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function AutoMealPlanToJSON(json: any): AutoMealPlan {
return AutoMealPlanToJSONTyped(json, false);
}
export function AutoMealPlanToJSONTyped(value?: AutoMealPlan | null, ignoreDiscriminator: boolean = false): any {
export function AutoMealPlanToJSON(value?: AutoMealPlan | null): any {
if (value == null) {
return value;
}
return {
'start_date': ((value['startDate']).toISOString().substring(0,10)),

View File

@@ -18,7 +18,6 @@ import {
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
AutomationTypeEnumToJSONTyped,
} from './AutomationTypeEnum';
/**
@@ -50,25 +49,25 @@ export interface Automation {
* @type {string}
* @memberof Automation
*/
description?: string | null;
description?: string;
/**
*
* @type {string}
* @memberof Automation
*/
param1?: string | null;
param1?: string;
/**
*
* @type {string}
* @memberof Automation
*/
param2?: string | null;
param2?: string;
/**
*
* @type {string}
* @memberof Automation
*/
param3?: string | null;
param3?: string;
/**
*
* @type {number}
@@ -89,8 +88,6 @@ export interface Automation {
readonly createdBy: number;
}
/**
* Check if a given object implements the Automation interface.
*/
@@ -123,15 +120,10 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}
export function AutomationToJSON(json: any): Automation {
return AutomationToJSONTyped(json, false);
}
export function AutomationToJSONTyped(value?: Omit<Automation, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function AutomationToJSON(value?: Omit<Automation, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -44,7 +44,7 @@ export type AutomationTypeEnum = typeof AutomationTypeEnum[keyof typeof Automati
export function instanceOfAutomationTypeEnum(value: any): boolean {
for (const key in AutomationTypeEnum) {
if (Object.prototype.hasOwnProperty.call(AutomationTypeEnum, key)) {
if (AutomationTypeEnum[key as keyof typeof AutomationTypeEnum] === value) {
if (AutomationTypeEnum[key] === value) {
return true;
}
}
@@ -64,7 +64,3 @@ export function AutomationTypeEnumToJSON(value?: AutomationTypeEnum | null): any
return value as any;
}
export function AutomationTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AutomationTypeEnum {
return value as AutomationTypeEnum;
}

View File

@@ -58,7 +58,7 @@ export type BaseUnitEnum = typeof BaseUnitEnum[keyof typeof BaseUnitEnum];
export function instanceOfBaseUnitEnum(value: any): boolean {
for (const key in BaseUnitEnum) {
if (Object.prototype.hasOwnProperty.call(BaseUnitEnum, key)) {
if (BaseUnitEnum[key as keyof typeof BaseUnitEnum] === value) {
if (BaseUnitEnum[key] === value) {
return true;
}
}
@@ -78,7 +78,3 @@ export function BaseUnitEnumToJSON(value?: BaseUnitEnum | null): any {
return value as any;
}
export function BaseUnitEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): BaseUnitEnum {
return value as BaseUnitEnum;
}

View File

@@ -30,7 +30,7 @@ export interface BookmarkletImport {
* @type {string}
* @memberof BookmarkletImport
*/
url?: string | null;
url?: string;
/**
*
* @type {string}
@@ -79,15 +79,10 @@ export function BookmarkletImportFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
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 {
export function BookmarkletImportToJSON(value?: Omit<BookmarkletImport, 'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -30,7 +30,7 @@ export interface BookmarkletImportList {
* @type {string}
* @memberof BookmarkletImportList
*/
url?: string | null;
url?: string;
/**
*
* @type {number}
@@ -71,15 +71,10 @@ export function BookmarkletImportListFromJSONTyped(json: any, ignoreDiscriminato
};
}
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 {
export function BookmarkletImportListToJSON(value?: Omit<BookmarkletImportList, 'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -36,19 +36,19 @@ export interface ConnectorConfigConfig {
* @type {string}
* @memberof ConnectorConfigConfig
*/
url?: string | null;
url?: string;
/**
*
* @type {string}
* @memberof ConnectorConfigConfig
*/
token?: string | null;
token?: string;
/**
*
* @type {string}
* @memberof ConnectorConfigConfig
*/
todoEntity?: string | null;
todoEntity?: string;
/**
* Is Connector Enabled
* @type {boolean}
@@ -120,15 +120,10 @@ export function ConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function ConnectorConfigConfigToJSON(json: any): ConnectorConfigConfig {
return ConnectorConfigConfigToJSONTyped(json, false);
}
export function ConnectorConfigConfigToJSONTyped(value?: Omit<ConnectorConfigConfig, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function ConnectorConfigConfigToJSON(value?: Omit<ConnectorConfigConfig, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -44,19 +43,19 @@ export interface CookLog {
* @type {number}
* @memberof CookLog
*/
servings?: number | null;
servings?: number;
/**
*
* @type {number}
* @memberof CookLog
*/
rating?: number | null;
rating?: number;
/**
*
* @type {string}
* @memberof CookLog
*/
comment?: string | null;
comment?: string;
/**
*
* @type {User}
@@ -108,15 +107,10 @@ export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
};
}
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 {
export function CookLogToJSON(value?: Omit<CookLog, 'createdBy'|'updatedAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -87,15 +86,10 @@ export function CustomFilterFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function CustomFilterToJSON(json: any): CustomFilter {
return CustomFilterToJSONTyped(json, false);
}
export function CustomFilterToJSONTyped(value?: Omit<CustomFilter, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function CustomFilterToJSON(value?: Omit<CustomFilter, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -32,7 +32,7 @@ export type DefaultPageEnum = typeof DefaultPageEnum[keyof typeof DefaultPageEnu
export function instanceOfDefaultPageEnum(value: any): boolean {
for (const key in DefaultPageEnum) {
if (Object.prototype.hasOwnProperty.call(DefaultPageEnum, key)) {
if (DefaultPageEnum[key as keyof typeof DefaultPageEnum] === value) {
if (DefaultPageEnum[key] === value) {
return true;
}
}
@@ -52,7 +52,3 @@ export function DefaultPageEnumToJSON(value?: DefaultPageEnum | null): any {
return value as any;
}
export function DefaultPageEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DefaultPageEnum {
return value as DefaultPageEnum;
}

View File

@@ -26,7 +26,7 @@ export type DeleteEnum = typeof DeleteEnum[keyof typeof DeleteEnum];
export function instanceOfDeleteEnum(value: any): boolean {
for (const key in DeleteEnum) {
if (Object.prototype.hasOwnProperty.call(DeleteEnum, key)) {
if (DeleteEnum[key as keyof typeof DeleteEnum] === value) {
if (DeleteEnum[key] === value) {
return true;
}
}
@@ -46,7 +46,3 @@ export function DeleteEnumToJSON(value?: DeleteEnum | null): any {
return value as any;
}
export function DeleteEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): DeleteEnum {
return value as DeleteEnum;
}

View File

@@ -114,15 +114,10 @@ export function ExportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
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 {
export function ExportLogToJSON(value?: Omit<ExportLog, 'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,42 +18,36 @@ 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';
/**
@@ -113,7 +107,7 @@ export interface Food {
* @type {string}
* @memberof Food
*/
pluralName?: string | null;
pluralName?: string;
/**
*
* @type {string}
@@ -131,19 +125,19 @@ export interface Food {
* @type {RecipeSimple}
* @memberof Food
*/
recipe?: RecipeSimple | null;
recipe?: RecipeSimple;
/**
*
* @type {string}
* @memberof Food
*/
url?: string | null;
url?: string;
/**
*
* @type {Array<Property>}
* @memberof Food
*/
properties?: Array<Property> | null;
properties?: Array<Property>;
/**
*
* @type {number}
@@ -155,25 +149,25 @@ export interface Food {
* @type {Unit}
* @memberof Food
*/
propertiesFoodUnit?: Unit | null;
propertiesFoodUnit?: Unit;
/**
*
* @type {number}
* @memberof Food
*/
fdcId?: number | null;
fdcId?: number;
/**
*
* @type {boolean}
* @memberof Food
*/
foodOnhand?: boolean | null;
foodOnhand?: boolean;
/**
*
* @type {SupermarketCategory}
* @memberof Food
*/
supermarketCategory?: SupermarketCategory | null;
supermarketCategory?: SupermarketCategory;
/**
*
* @type {number}
@@ -191,7 +185,7 @@ export interface Food {
* @type {Array<FoodInheritField>}
* @memberof Food
*/
inheritFields?: Array<FoodInheritField> | null;
inheritFields?: Array<FoodInheritField>;
/**
* Returns a string representation of a tree node and it's ancestors,
* e.g. 'Cuisine > Asian > Chinese > Catonese'.
@@ -210,7 +204,7 @@ export interface Food {
* @type {Array<FoodSimple>}
* @memberof Food
*/
substitute?: Array<FoodSimple> | null;
substitute?: Array<FoodSimple>;
/**
*
* @type {boolean}
@@ -234,13 +228,13 @@ export interface Food {
* @type {Array<FoodInheritField>}
* @memberof Food
*/
childInheritFields?: Array<FoodInheritField> | null;
childInheritFields?: Array<FoodInheritField>;
/**
*
* @type {string}
* @memberof Food
*/
openDataSlug?: string | null;
openDataSlug?: string;
}
/**
@@ -293,15 +287,10 @@ export function FoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): Food
};
}
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 {
export function FoodToJSON(value?: Omit<Food, 'shopping'|'parent'|'numchild'|'fullName'|'substituteOnhand'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -64,13 +64,13 @@ export interface FoodInheritField {
* @type {string}
* @memberof FoodInheritField
*/
name?: string | null;
name?: string;
/**
*
* @type {string}
* @memberof FoodInheritField
*/
field?: string | null;
field?: string;
}
/**
@@ -96,15 +96,10 @@ export function FoodInheritFieldFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function FoodInheritFieldToJSON(json: any): FoodInheritField {
return FoodInheritFieldToJSONTyped(json, false);
}
export function FoodInheritFieldToJSONTyped(value?: FoodInheritField | null, ignoreDiscriminator: boolean = false): any {
export function FoodInheritFieldToJSON(value?: FoodInheritField | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
DeleteEnumFromJSON,
DeleteEnumFromJSONTyped,
DeleteEnumToJSON,
DeleteEnumToJSONTyped,
} from './DeleteEnum';
/**
@@ -38,13 +37,13 @@ export interface FoodShoppingUpdate {
* @type {number}
* @memberof FoodShoppingUpdate
*/
amount?: number | null;
amount?: number;
/**
* ID of unit to use for the shopping list
* @type {number}
* @memberof FoodShoppingUpdate
*/
unit?: number | null;
unit?: number;
/**
* When set to true will delete all food from active shopping lists.
*
@@ -55,8 +54,6 @@ export interface FoodShoppingUpdate {
_delete: DeleteEnum | null;
}
/**
* Check if a given object implements the FoodShoppingUpdate interface.
*/
@@ -82,15 +79,10 @@ export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function FoodShoppingUpdateToJSON(json: any): FoodShoppingUpdate {
return FoodShoppingUpdateToJSONTyped(json, false);
}
export function FoodShoppingUpdateToJSONTyped(value?: FoodShoppingUpdate | null, ignoreDiscriminator: boolean = false): any {
export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -36,7 +36,7 @@ export interface FoodSimple {
* @type {string}
* @memberof FoodSimple
*/
pluralName?: string | null;
pluralName?: string;
}
/**
@@ -63,15 +63,10 @@ export function FoodSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}
export function FoodSimpleToJSON(json: any): FoodSimple {
return FoodSimpleToJSONTyped(json, false);
}
export function FoodSimpleToJSONTyped(value?: FoodSimple | null, ignoreDiscriminator: boolean = false): any {
export function FoodSimpleToJSON(value?: FoodSimple | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -90,15 +90,10 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro
};
}
export function GroupToJSON(json: any): Group {
return GroupToJSONTyped(json, false);
}
export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: boolean = false): any {
export function GroupToJSON(value?: Group | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
/**
@@ -116,15 +115,10 @@ export function ImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
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 {
export function ImportLogToJSON(value?: Omit<ImportLog, 'keyword'|'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,14 +18,12 @@ import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
import type { Food } from './Food';
import {
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
FoodToJSONTyped,
} from './Food';
/**
@@ -69,7 +67,7 @@ export interface Ingredient {
* @type {string}
* @memberof Ingredient
*/
note?: string | null;
note?: string;
/**
*
* @type {number}
@@ -93,7 +91,7 @@ export interface Ingredient {
* @type {string}
* @memberof Ingredient
*/
originalText?: string | null;
originalText?: string;
/**
*
* @type {Array<any>}
@@ -152,15 +150,10 @@ export function IngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}
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 {
export function IngredientToJSON(value?: Omit<Ingredient, 'conversions'|'usedInRecipes'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -49,15 +49,10 @@ export function IngredientStringFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function IngredientStringToJSON(json: any): IngredientString {
return IngredientStringToJSONTyped(json, false);
}
export function IngredientStringToJSONTyped(value?: IngredientString | null, ignoreDiscriminator: boolean = false): any {
export function IngredientStringToJSON(value?: IngredientString | null): any {
if (value == null) {
return value;
}
return {
'text': value['text'],

View File

@@ -18,7 +18,6 @@ import {
GroupFromJSON,
GroupFromJSONTyped,
GroupToJSON,
GroupToJSONTyped,
} from './Group';
/**
@@ -62,7 +61,7 @@ export interface InviteLink {
* @type {number}
* @memberof InviteLink
*/
usedBy?: number | null;
usedBy?: number;
/**
*
* @type {boolean}
@@ -74,7 +73,7 @@ export interface InviteLink {
* @type {string}
* @memberof InviteLink
*/
internalNote?: string | null;
internalNote?: string;
/**
*
* @type {number}
@@ -123,15 +122,10 @@ export function InviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}
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 {
export function InviteLinkToJSON(value?: Omit<InviteLink, 'uuid'|'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -146,15 +146,10 @@ export function KeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): K
};
}
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 {
export function KeywordToJSON(value?: Omit<Keyword, 'label'|'parent'|'numchild'|'createdAt'|'updatedAt'|'fullName'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -56,15 +56,10 @@ export function KeywordLabelFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function KeywordLabelToJSON(json: any): KeywordLabel {
return KeywordLabelToJSONTyped(json, false);
}
export function KeywordLabelToJSONTyped(value?: Omit<KeywordLabel, 'label'> | null, ignoreDiscriminator: boolean = false): any {
export function KeywordLabelToJSON(value?: Omit<KeywordLabel, 'label'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -57,15 +57,10 @@ export function LocalizationFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function LocalizationToJSON(json: any): Localization {
return LocalizationToJSONTyped(json, false);
}
export function LocalizationToJSONTyped(value?: Omit<Localization, 'code'|'language'> | null, ignoreDiscriminator: boolean = false): any {
export function LocalizationToJSON(value?: Omit<Localization, 'code'|'language'> | null): any {
if (value == null) {
return value;
}
return {
};

View File

@@ -18,21 +18,18 @@ 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';
/**
@@ -58,7 +55,7 @@ export interface MealPlan {
* @type {RecipeOverview}
* @memberof MealPlan
*/
recipe?: RecipeOverview | null;
recipe?: RecipeOverview;
/**
*
* @type {number}
@@ -106,7 +103,7 @@ export interface MealPlan {
* @type {Array<User>}
* @memberof MealPlan
*/
shared?: Array<User> | null;
shared?: Array<User>;
/**
*
* @type {string}
@@ -176,15 +173,10 @@ export function MealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
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 {
export function MealPlanToJSON(value?: Omit<MealPlan, 'noteMarkdown'|'createdBy'|'recipeName'|'mealTypeName'|'shopping'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -42,13 +42,13 @@ export interface MealType {
* @type {string}
* @memberof MealType
*/
time?: string | null;
time?: string;
/**
*
* @type {string}
* @memberof MealType
*/
color?: string | null;
color?: string;
/**
*
* @type {boolean}
@@ -92,15 +92,10 @@ export function MealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}
export function MealTypeToJSON(json: any): MealType {
return MealTypeToJSONTyped(json, false);
}
export function MealTypeToJSONTyped(value?: Omit<MealType, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function MealTypeToJSON(value?: Omit<MealType, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -30,7 +30,7 @@ export type MethodEnum = typeof MethodEnum[keyof typeof MethodEnum];
export function instanceOfMethodEnum(value: any): boolean {
for (const key in MethodEnum) {
if (Object.prototype.hasOwnProperty.call(MethodEnum, key)) {
if (MethodEnum[key as keyof typeof MethodEnum] === value) {
if (MethodEnum[key] === value) {
return true;
}
}
@@ -50,7 +50,3 @@ export function MethodEnumToJSON(value?: MethodEnum | null): any {
return value as any;
}
export function MethodEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): MethodEnum {
return value as MethodEnum;
}

View File

@@ -54,7 +54,7 @@ export interface NutritionInformation {
* @type {string}
* @memberof NutritionInformation
*/
source?: string | null;
source?: string;
}
/**
@@ -87,15 +87,10 @@ export function NutritionInformationFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function NutritionInformationToJSON(json: any): NutritionInformation {
return NutritionInformationToJSONTyped(json, false);
}
export function NutritionInformationToJSONTyped(value?: NutritionInformation | null, ignoreDiscriminator: boolean = false): any {
export function NutritionInformationToJSON(value?: NutritionInformation | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -136,15 +135,10 @@ export function OpenDataCategoryFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function OpenDataCategoryToJSON(json: any): OpenDataCategory {
return OpenDataCategoryToJSONTyped(json, false);
}
export function OpenDataCategoryToJSONTyped(value?: Omit<OpenDataCategory, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataCategoryToJSON(value?: Omit<OpenDataCategory, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,21 +18,18 @@ 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';
/**
@@ -149,15 +146,10 @@ export function OpenDataConversionFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function OpenDataConversionToJSON(json: any): OpenDataConversion {
return OpenDataConversionToJSONTyped(json, false);
}
export function OpenDataConversionToJSONTyped(value?: Omit<OpenDataConversion, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataConversionToJSON(value?: Omit<OpenDataConversion, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,28 +18,24 @@ 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';
/**
@@ -123,25 +119,25 @@ export interface OpenDataFood {
* @type {OpenDataUnit}
* @memberof OpenDataFood
*/
preferredUnitMetric?: OpenDataUnit | null;
preferredUnitMetric?: OpenDataUnit;
/**
*
* @type {OpenDataUnit}
* @memberof OpenDataFood
*/
preferredShoppingUnitMetric?: OpenDataUnit | null;
preferredShoppingUnitMetric?: OpenDataUnit;
/**
*
* @type {OpenDataUnit}
* @memberof OpenDataFood
*/
preferredUnitImperial?: OpenDataUnit | null;
preferredUnitImperial?: OpenDataUnit;
/**
*
* @type {OpenDataUnit}
* @memberof OpenDataFood
*/
preferredShoppingUnitImperial?: OpenDataUnit | null;
preferredShoppingUnitImperial?: OpenDataUnit;
/**
*
* @type {Array<OpenDataFoodProperty>}
@@ -232,15 +228,10 @@ export function OpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function OpenDataFoodToJSON(json: any): OpenDataFood {
return OpenDataFoodToJSONTyped(json, false);
}
export function OpenDataFoodToJSONTyped(value?: Omit<OpenDataFood, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataFoodToJSON(value?: Omit<OpenDataFood, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
OpenDataPropertyFromJSON,
OpenDataPropertyFromJSONTyped,
OpenDataPropertyToJSON,
OpenDataPropertyToJSONTyped,
} from './OpenDataProperty';
/**
@@ -72,15 +71,10 @@ export function OpenDataFoodPropertyFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function OpenDataFoodPropertyToJSON(json: any): OpenDataFoodProperty {
return OpenDataFoodPropertyToJSONTyped(json, false);
}
export function OpenDataFoodPropertyToJSONTyped(value?: OpenDataFoodProperty | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataFoodPropertyToJSON(value?: OpenDataFoodProperty | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -96,7 +95,7 @@ export interface OpenDataProperty {
* @type {number}
* @memberof OpenDataProperty
*/
fdcId?: number | null;
fdcId?: number;
/**
*
* @type {string}
@@ -143,15 +142,10 @@ export function OpenDataPropertyFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function OpenDataPropertyToJSON(json: any): OpenDataProperty {
return OpenDataPropertyToJSONTyped(json, false);
}
export function OpenDataPropertyToJSONTyped(value?: Omit<OpenDataProperty, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataPropertyToJSON(value?: Omit<OpenDataProperty, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,14 +18,12 @@ import {
OpenDataStoreCategoryFromJSON,
OpenDataStoreCategoryFromJSONTyped,
OpenDataStoreCategoryToJSON,
OpenDataStoreCategoryToJSONTyped,
} from './OpenDataStoreCategory';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -110,15 +108,10 @@ export function OpenDataStoreFromJSONTyped(json: any, ignoreDiscriminator: boole
};
}
export function OpenDataStoreToJSON(json: any): OpenDataStore {
return OpenDataStoreToJSONTyped(json, false);
}
export function OpenDataStoreToJSONTyped(value?: Omit<OpenDataStore, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataStoreToJSON(value?: Omit<OpenDataStore, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
OpenDataCategoryFromJSON,
OpenDataCategoryFromJSONTyped,
OpenDataCategoryToJSON,
OpenDataCategoryToJSONTyped,
} from './OpenDataCategory';
/**
@@ -79,15 +78,10 @@ export function OpenDataStoreCategoryFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function OpenDataStoreCategoryToJSON(json: any): OpenDataStoreCategory {
return OpenDataStoreCategoryToJSONTyped(json, false);
}
export function OpenDataStoreCategoryToJSONTyped(value?: OpenDataStoreCategory | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataStoreCategoryToJSON(value?: OpenDataStoreCategory | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,21 +18,18 @@ 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';
/**
@@ -131,8 +128,6 @@ export interface OpenDataUnit {
readonly createdBy: string;
}
/**
* Check if a given object implements the OpenDataUnit interface.
*/
@@ -167,15 +162,10 @@ export function OpenDataUnitFromJSONTyped(json: any, ignoreDiscriminator: boolea
};
}
export function OpenDataUnitToJSON(json: any): OpenDataUnit {
return OpenDataUnitToJSONTyped(json, false);
}
export function OpenDataUnitToJSONTyped(value?: Omit<OpenDataUnit, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataUnitToJSON(value?: Omit<OpenDataUnit, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -30,7 +30,7 @@ export type OpenDataUnitTypeEnum = typeof OpenDataUnitTypeEnum[keyof typeof Open
export function instanceOfOpenDataUnitTypeEnum(value: any): boolean {
for (const key in OpenDataUnitTypeEnum) {
if (Object.prototype.hasOwnProperty.call(OpenDataUnitTypeEnum, key)) {
if (OpenDataUnitTypeEnum[key as keyof typeof OpenDataUnitTypeEnum] === value) {
if (OpenDataUnitTypeEnum[key] === value) {
return true;
}
}
@@ -50,7 +50,3 @@ export function OpenDataUnitTypeEnumToJSON(value?: OpenDataUnitTypeEnum | null):
return value as any;
}
export function OpenDataUnitTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): OpenDataUnitTypeEnum {
return value as OpenDataUnitTypeEnum;
}

View File

@@ -105,15 +105,10 @@ export function OpenDataVersionFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}
export function OpenDataVersionToJSON(json: any): OpenDataVersion {
return OpenDataVersionToJSONTyped(json, false);
}
export function OpenDataVersionToJSONTyped(value?: OpenDataVersion | null, ignoreDiscriminator: boolean = false): any {
export function OpenDataVersionToJSON(value?: OpenDataVersion | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
AutomationFromJSON,
AutomationFromJSONTyped,
AutomationToJSON,
AutomationToJSONTyped,
} from './Automation';
/**
@@ -38,13 +37,13 @@ export interface PaginatedAutomationList {
* @type {string}
* @memberof PaginatedAutomationList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedAutomationList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Automation>}
@@ -86,15 +85,10 @@ export function PaginatedAutomationListFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PaginatedAutomationListToJSON(json: any): PaginatedAutomationList {
return PaginatedAutomationListToJSONTyped(json, false);
}
export function PaginatedAutomationListToJSONTyped(value?: PaginatedAutomationList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedAutomationListToJSON(value?: PaginatedAutomationList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
BookmarkletImportListFromJSON,
BookmarkletImportListFromJSONTyped,
BookmarkletImportListToJSON,
BookmarkletImportListToJSONTyped,
} from './BookmarkletImportList';
/**
@@ -38,13 +37,13 @@ export interface PaginatedBookmarkletImportListList {
* @type {string}
* @memberof PaginatedBookmarkletImportListList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedBookmarkletImportListList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<BookmarkletImportList>}
@@ -86,15 +85,10 @@ export function PaginatedBookmarkletImportListListFromJSONTyped(json: any, ignor
};
}
export function PaginatedBookmarkletImportListListToJSON(json: any): PaginatedBookmarkletImportListList {
return PaginatedBookmarkletImportListListToJSONTyped(json, false);
}
export function PaginatedBookmarkletImportListListToJSONTyped(value?: PaginatedBookmarkletImportListList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedBookmarkletImportListListToJSON(value?: PaginatedBookmarkletImportListList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
CookLogFromJSON,
CookLogFromJSONTyped,
CookLogToJSON,
CookLogToJSONTyped,
} from './CookLog';
/**
@@ -38,13 +37,13 @@ export interface PaginatedCookLogList {
* @type {string}
* @memberof PaginatedCookLogList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedCookLogList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<CookLog>}
@@ -86,15 +85,10 @@ export function PaginatedCookLogListFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PaginatedCookLogListToJSON(json: any): PaginatedCookLogList {
return PaginatedCookLogListToJSONTyped(json, false);
}
export function PaginatedCookLogListToJSONTyped(value?: PaginatedCookLogList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedCookLogListToJSON(value?: PaginatedCookLogList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
CustomFilterFromJSON,
CustomFilterFromJSONTyped,
CustomFilterToJSON,
CustomFilterToJSONTyped,
} from './CustomFilter';
/**
@@ -38,13 +37,13 @@ export interface PaginatedCustomFilterList {
* @type {string}
* @memberof PaginatedCustomFilterList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedCustomFilterList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<CustomFilter>}
@@ -86,15 +85,10 @@ export function PaginatedCustomFilterListFromJSONTyped(json: any, ignoreDiscrimi
};
}
export function PaginatedCustomFilterListToJSON(json: any): PaginatedCustomFilterList {
return PaginatedCustomFilterListToJSONTyped(json, false);
}
export function PaginatedCustomFilterListToJSONTyped(value?: PaginatedCustomFilterList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedCustomFilterListToJSON(value?: PaginatedCustomFilterList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
ExportLogFromJSON,
ExportLogFromJSONTyped,
ExportLogToJSON,
ExportLogToJSONTyped,
} from './ExportLog';
/**
@@ -38,13 +37,13 @@ export interface PaginatedExportLogList {
* @type {string}
* @memberof PaginatedExportLogList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedExportLogList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<ExportLog>}
@@ -86,15 +85,10 @@ export function PaginatedExportLogListFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PaginatedExportLogListToJSON(json: any): PaginatedExportLogList {
return PaginatedExportLogListToJSONTyped(json, false);
}
export function PaginatedExportLogListToJSONTyped(value?: PaginatedExportLogList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedExportLogListToJSON(value?: PaginatedExportLogList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
FoodToJSONTyped,
} from './Food';
/**
@@ -38,13 +37,13 @@ export interface PaginatedFoodList {
* @type {string}
* @memberof PaginatedFoodList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedFoodList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Food>}
@@ -86,15 +85,10 @@ export function PaginatedFoodListFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PaginatedFoodListToJSON(json: any): PaginatedFoodList {
return PaginatedFoodListToJSONTyped(json, false);
}
export function PaginatedFoodListToJSONTyped(value?: PaginatedFoodList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedFoodListToJSON(value?: PaginatedFoodList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
ImportLogFromJSON,
ImportLogFromJSONTyped,
ImportLogToJSON,
ImportLogToJSONTyped,
} from './ImportLog';
/**
@@ -38,13 +37,13 @@ export interface PaginatedImportLogList {
* @type {string}
* @memberof PaginatedImportLogList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedImportLogList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<ImportLog>}
@@ -86,15 +85,10 @@ export function PaginatedImportLogListFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PaginatedImportLogListToJSON(json: any): PaginatedImportLogList {
return PaginatedImportLogListToJSONTyped(json, false);
}
export function PaginatedImportLogListToJSONTyped(value?: PaginatedImportLogList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedImportLogListToJSON(value?: PaginatedImportLogList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
IngredientFromJSON,
IngredientFromJSONTyped,
IngredientToJSON,
IngredientToJSONTyped,
} from './Ingredient';
/**
@@ -38,13 +37,13 @@ export interface PaginatedIngredientList {
* @type {string}
* @memberof PaginatedIngredientList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedIngredientList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Ingredient>}
@@ -86,15 +85,10 @@ export function PaginatedIngredientListFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PaginatedIngredientListToJSON(json: any): PaginatedIngredientList {
return PaginatedIngredientListToJSONTyped(json, false);
}
export function PaginatedIngredientListToJSONTyped(value?: PaginatedIngredientList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedIngredientListToJSON(value?: PaginatedIngredientList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
InviteLinkFromJSON,
InviteLinkFromJSONTyped,
InviteLinkToJSON,
InviteLinkToJSONTyped,
} from './InviteLink';
/**
@@ -38,13 +37,13 @@ export interface PaginatedInviteLinkList {
* @type {string}
* @memberof PaginatedInviteLinkList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedInviteLinkList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<InviteLink>}
@@ -86,15 +85,10 @@ export function PaginatedInviteLinkListFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PaginatedInviteLinkListToJSON(json: any): PaginatedInviteLinkList {
return PaginatedInviteLinkListToJSONTyped(json, false);
}
export function PaginatedInviteLinkListToJSONTyped(value?: PaginatedInviteLinkList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedInviteLinkListToJSON(value?: PaginatedInviteLinkList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
/**
@@ -38,13 +37,13 @@ export interface PaginatedKeywordList {
* @type {string}
* @memberof PaginatedKeywordList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedKeywordList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Keyword>}
@@ -86,15 +85,10 @@ export function PaginatedKeywordListFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PaginatedKeywordListToJSON(json: any): PaginatedKeywordList {
return PaginatedKeywordListToJSONTyped(json, false);
}
export function PaginatedKeywordListToJSONTyped(value?: PaginatedKeywordList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedKeywordListToJSON(value?: PaginatedKeywordList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
MealPlanFromJSON,
MealPlanFromJSONTyped,
MealPlanToJSON,
MealPlanToJSONTyped,
} from './MealPlan';
/**
@@ -38,13 +37,13 @@ export interface PaginatedMealPlanList {
* @type {string}
* @memberof PaginatedMealPlanList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedMealPlanList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<MealPlan>}
@@ -86,15 +85,10 @@ export function PaginatedMealPlanListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function PaginatedMealPlanListToJSON(json: any): PaginatedMealPlanList {
return PaginatedMealPlanListToJSONTyped(json, false);
}
export function PaginatedMealPlanListToJSONTyped(value?: PaginatedMealPlanList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedMealPlanListToJSON(value?: PaginatedMealPlanList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
MealTypeFromJSON,
MealTypeFromJSONTyped,
MealTypeToJSON,
MealTypeToJSONTyped,
} from './MealType';
/**
@@ -38,13 +37,13 @@ export interface PaginatedMealTypeList {
* @type {string}
* @memberof PaginatedMealTypeList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedMealTypeList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<MealType>}
@@ -86,15 +85,10 @@ export function PaginatedMealTypeListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function PaginatedMealTypeListToJSON(json: any): PaginatedMealTypeList {
return PaginatedMealTypeListToJSONTyped(json, false);
}
export function PaginatedMealTypeListToJSONTyped(value?: PaginatedMealTypeList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedMealTypeListToJSON(value?: PaginatedMealTypeList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
PropertyToJSONTyped,
} from './Property';
/**
@@ -38,13 +37,13 @@ export interface PaginatedPropertyList {
* @type {string}
* @memberof PaginatedPropertyList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedPropertyList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Property>}
@@ -86,15 +85,10 @@ export function PaginatedPropertyListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function PaginatedPropertyListToJSON(json: any): PaginatedPropertyList {
return PaginatedPropertyListToJSONTyped(json, false);
}
export function PaginatedPropertyListToJSONTyped(value?: PaginatedPropertyList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedPropertyListToJSON(value?: PaginatedPropertyList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
PropertyTypeFromJSON,
PropertyTypeFromJSONTyped,
PropertyTypeToJSON,
PropertyTypeToJSONTyped,
} from './PropertyType';
/**
@@ -38,13 +37,13 @@ export interface PaginatedPropertyTypeList {
* @type {string}
* @memberof PaginatedPropertyTypeList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedPropertyTypeList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<PropertyType>}
@@ -86,15 +85,10 @@ export function PaginatedPropertyTypeListFromJSONTyped(json: any, ignoreDiscrimi
};
}
export function PaginatedPropertyTypeListToJSON(json: any): PaginatedPropertyTypeList {
return PaginatedPropertyTypeListToJSONTyped(json, false);
}
export function PaginatedPropertyTypeListToJSONTyped(value?: PaginatedPropertyTypeList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedPropertyTypeListToJSON(value?: PaginatedPropertyTypeList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
RecipeBookEntryFromJSON,
RecipeBookEntryFromJSONTyped,
RecipeBookEntryToJSON,
RecipeBookEntryToJSONTyped,
} from './RecipeBookEntry';
/**
@@ -38,13 +37,13 @@ export interface PaginatedRecipeBookEntryList {
* @type {string}
* @memberof PaginatedRecipeBookEntryList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedRecipeBookEntryList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<RecipeBookEntry>}
@@ -86,15 +85,10 @@ export function PaginatedRecipeBookEntryListFromJSONTyped(json: any, ignoreDiscr
};
}
export function PaginatedRecipeBookEntryListToJSON(json: any): PaginatedRecipeBookEntryList {
return PaginatedRecipeBookEntryListToJSONTyped(json, false);
}
export function PaginatedRecipeBookEntryListToJSONTyped(value?: PaginatedRecipeBookEntryList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedRecipeBookEntryListToJSON(value?: PaginatedRecipeBookEntryList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
RecipeBookFromJSON,
RecipeBookFromJSONTyped,
RecipeBookToJSON,
RecipeBookToJSONTyped,
} from './RecipeBook';
/**
@@ -38,13 +37,13 @@ export interface PaginatedRecipeBookList {
* @type {string}
* @memberof PaginatedRecipeBookList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedRecipeBookList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<RecipeBook>}
@@ -86,15 +85,10 @@ export function PaginatedRecipeBookListFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PaginatedRecipeBookListToJSON(json: any): PaginatedRecipeBookList {
return PaginatedRecipeBookListToJSONTyped(json, false);
}
export function PaginatedRecipeBookListToJSONTyped(value?: PaginatedRecipeBookList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedRecipeBookListToJSON(value?: PaginatedRecipeBookList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
RecipeOverviewToJSONTyped,
} from './RecipeOverview';
/**
@@ -38,13 +37,13 @@ export interface PaginatedRecipeOverviewList {
* @type {string}
* @memberof PaginatedRecipeOverviewList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedRecipeOverviewList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<RecipeOverview>}
@@ -79,15 +78,10 @@ export function PaginatedRecipeOverviewListFromJSONTyped(json: any, ignoreDiscri
};
}
export function PaginatedRecipeOverviewListToJSON(json: any): PaginatedRecipeOverviewList {
return PaginatedRecipeOverviewListToJSONTyped(json, false);
}
export function PaginatedRecipeOverviewListToJSONTyped(value?: PaginatedRecipeOverviewList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedRecipeOverviewListToJSON(value?: PaginatedRecipeOverviewList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
ShoppingListEntryFromJSON,
ShoppingListEntryFromJSONTyped,
ShoppingListEntryToJSON,
ShoppingListEntryToJSONTyped,
} from './ShoppingListEntry';
/**
@@ -38,13 +37,13 @@ export interface PaginatedShoppingListEntryList {
* @type {string}
* @memberof PaginatedShoppingListEntryList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedShoppingListEntryList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<ShoppingListEntry>}
@@ -86,15 +85,10 @@ export function PaginatedShoppingListEntryListFromJSONTyped(json: any, ignoreDis
};
}
export function PaginatedShoppingListEntryListToJSON(json: any): PaginatedShoppingListEntryList {
return PaginatedShoppingListEntryListToJSONTyped(json, false);
}
export function PaginatedShoppingListEntryListToJSONTyped(value?: PaginatedShoppingListEntryList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedShoppingListEntryListToJSON(value?: PaginatedShoppingListEntryList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
ShoppingListRecipeFromJSON,
ShoppingListRecipeFromJSONTyped,
ShoppingListRecipeToJSON,
ShoppingListRecipeToJSONTyped,
} from './ShoppingListRecipe';
/**
@@ -38,13 +37,13 @@ export interface PaginatedShoppingListRecipeList {
* @type {string}
* @memberof PaginatedShoppingListRecipeList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedShoppingListRecipeList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<ShoppingListRecipe>}
@@ -86,15 +85,10 @@ export function PaginatedShoppingListRecipeListFromJSONTyped(json: any, ignoreDi
};
}
export function PaginatedShoppingListRecipeListToJSON(json: any): PaginatedShoppingListRecipeList {
return PaginatedShoppingListRecipeListToJSONTyped(json, false);
}
export function PaginatedShoppingListRecipeListToJSONTyped(value?: PaginatedShoppingListRecipeList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedShoppingListRecipeListToJSON(value?: PaginatedShoppingListRecipeList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
SpaceFromJSON,
SpaceFromJSONTyped,
SpaceToJSON,
SpaceToJSONTyped,
} from './Space';
/**
@@ -38,13 +37,13 @@ export interface PaginatedSpaceList {
* @type {string}
* @memberof PaginatedSpaceList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedSpaceList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Space>}
@@ -86,15 +85,10 @@ export function PaginatedSpaceListFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PaginatedSpaceListToJSON(json: any): PaginatedSpaceList {
return PaginatedSpaceListToJSONTyped(json, false);
}
export function PaginatedSpaceListToJSONTyped(value?: PaginatedSpaceList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedSpaceListToJSON(value?: PaginatedSpaceList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
StepFromJSON,
StepFromJSONTyped,
StepToJSON,
StepToJSONTyped,
} from './Step';
/**
@@ -38,13 +37,13 @@ export interface PaginatedStepList {
* @type {string}
* @memberof PaginatedStepList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedStepList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Step>}
@@ -86,15 +85,10 @@ export function PaginatedStepListFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PaginatedStepListToJSON(json: any): PaginatedStepList {
return PaginatedStepListToJSONTyped(json, false);
}
export function PaginatedStepListToJSONTyped(value?: PaginatedStepList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedStepListToJSON(value?: PaginatedStepList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
SupermarketCategoryFromJSON,
SupermarketCategoryFromJSONTyped,
SupermarketCategoryToJSON,
SupermarketCategoryToJSONTyped,
} from './SupermarketCategory';
/**
@@ -38,13 +37,13 @@ export interface PaginatedSupermarketCategoryList {
* @type {string}
* @memberof PaginatedSupermarketCategoryList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedSupermarketCategoryList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<SupermarketCategory>}
@@ -86,15 +85,10 @@ export function PaginatedSupermarketCategoryListFromJSONTyped(json: any, ignoreD
};
}
export function PaginatedSupermarketCategoryListToJSON(json: any): PaginatedSupermarketCategoryList {
return PaginatedSupermarketCategoryListToJSONTyped(json, false);
}
export function PaginatedSupermarketCategoryListToJSONTyped(value?: PaginatedSupermarketCategoryList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedSupermarketCategoryListToJSON(value?: PaginatedSupermarketCategoryList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
SupermarketCategoryRelationFromJSON,
SupermarketCategoryRelationFromJSONTyped,
SupermarketCategoryRelationToJSON,
SupermarketCategoryRelationToJSONTyped,
} from './SupermarketCategoryRelation';
/**
@@ -38,13 +37,13 @@ export interface PaginatedSupermarketCategoryRelationList {
* @type {string}
* @memberof PaginatedSupermarketCategoryRelationList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedSupermarketCategoryRelationList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<SupermarketCategoryRelation>}
@@ -86,15 +85,10 @@ export function PaginatedSupermarketCategoryRelationListFromJSONTyped(json: any,
};
}
export function PaginatedSupermarketCategoryRelationListToJSON(json: any): PaginatedSupermarketCategoryRelationList {
return PaginatedSupermarketCategoryRelationListToJSONTyped(json, false);
}
export function PaginatedSupermarketCategoryRelationListToJSONTyped(value?: PaginatedSupermarketCategoryRelationList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedSupermarketCategoryRelationListToJSON(value?: PaginatedSupermarketCategoryRelationList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
SupermarketFromJSON,
SupermarketFromJSONTyped,
SupermarketToJSON,
SupermarketToJSONTyped,
} from './Supermarket';
/**
@@ -38,13 +37,13 @@ export interface PaginatedSupermarketList {
* @type {string}
* @memberof PaginatedSupermarketList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedSupermarketList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Supermarket>}
@@ -86,15 +85,10 @@ export function PaginatedSupermarketListFromJSONTyped(json: any, ignoreDiscrimin
};
}
export function PaginatedSupermarketListToJSON(json: any): PaginatedSupermarketList {
return PaginatedSupermarketListToJSONTyped(json, false);
}
export function PaginatedSupermarketListToJSONTyped(value?: PaginatedSupermarketList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedSupermarketListToJSON(value?: PaginatedSupermarketList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
SyncFromJSON,
SyncFromJSONTyped,
SyncToJSON,
SyncToJSONTyped,
} from './Sync';
/**
@@ -38,13 +37,13 @@ export interface PaginatedSyncList {
* @type {string}
* @memberof PaginatedSyncList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedSyncList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Sync>}
@@ -86,15 +85,10 @@ export function PaginatedSyncListFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PaginatedSyncListToJSON(json: any): PaginatedSyncList {
return PaginatedSyncListToJSONTyped(json, false);
}
export function PaginatedSyncListToJSONTyped(value?: PaginatedSyncList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedSyncListToJSON(value?: PaginatedSyncList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
SyncLogFromJSON,
SyncLogFromJSONTyped,
SyncLogToJSON,
SyncLogToJSONTyped,
} from './SyncLog';
/**
@@ -38,13 +37,13 @@ export interface PaginatedSyncLogList {
* @type {string}
* @memberof PaginatedSyncLogList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedSyncLogList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<SyncLog>}
@@ -86,15 +85,10 @@ export function PaginatedSyncLogListFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PaginatedSyncLogListToJSON(json: any): PaginatedSyncLogList {
return PaginatedSyncLogListToJSONTyped(json, false);
}
export function PaginatedSyncLogListToJSONTyped(value?: PaginatedSyncLogList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedSyncLogListToJSON(value?: PaginatedSyncLogList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
UnitConversionFromJSON,
UnitConversionFromJSONTyped,
UnitConversionToJSON,
UnitConversionToJSONTyped,
} from './UnitConversion';
/**
@@ -38,13 +37,13 @@ export interface PaginatedUnitConversionList {
* @type {string}
* @memberof PaginatedUnitConversionList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedUnitConversionList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<UnitConversion>}
@@ -86,15 +85,10 @@ export function PaginatedUnitConversionListFromJSONTyped(json: any, ignoreDiscri
};
}
export function PaginatedUnitConversionListToJSON(json: any): PaginatedUnitConversionList {
return PaginatedUnitConversionListToJSONTyped(json, false);
}
export function PaginatedUnitConversionListToJSONTyped(value?: PaginatedUnitConversionList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedUnitConversionListToJSON(value?: PaginatedUnitConversionList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
/**
@@ -38,13 +37,13 @@ export interface PaginatedUnitList {
* @type {string}
* @memberof PaginatedUnitList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedUnitList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<Unit>}
@@ -86,15 +85,10 @@ export function PaginatedUnitListFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PaginatedUnitListToJSON(json: any): PaginatedUnitList {
return PaginatedUnitListToJSONTyped(json, false);
}
export function PaginatedUnitListToJSONTyped(value?: PaginatedUnitList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedUnitListToJSON(value?: PaginatedUnitList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
UserFileFromJSON,
UserFileFromJSONTyped,
UserFileToJSON,
UserFileToJSONTyped,
} from './UserFile';
/**
@@ -38,13 +37,13 @@ export interface PaginatedUserFileList {
* @type {string}
* @memberof PaginatedUserFileList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedUserFileList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<UserFile>}
@@ -86,15 +85,10 @@ export function PaginatedUserFileListFromJSONTyped(json: any, ignoreDiscriminato
};
}
export function PaginatedUserFileListToJSON(json: any): PaginatedUserFileList {
return PaginatedUserFileListToJSONTyped(json, false);
}
export function PaginatedUserFileListToJSONTyped(value?: PaginatedUserFileList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedUserFileListToJSON(value?: PaginatedUserFileList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
UserSpaceFromJSON,
UserSpaceFromJSONTyped,
UserSpaceToJSON,
UserSpaceToJSONTyped,
} from './UserSpace';
/**
@@ -38,13 +37,13 @@ export interface PaginatedUserSpaceList {
* @type {string}
* @memberof PaginatedUserSpaceList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedUserSpaceList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<UserSpace>}
@@ -86,15 +85,10 @@ export function PaginatedUserSpaceListFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PaginatedUserSpaceListToJSON(json: any): PaginatedUserSpaceList {
return PaginatedUserSpaceListToJSONTyped(json, false);
}
export function PaginatedUserSpaceListToJSONTyped(value?: PaginatedUserSpaceList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedUserSpaceListToJSON(value?: PaginatedUserSpaceList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -18,7 +18,6 @@ import {
ViewLogFromJSON,
ViewLogFromJSONTyped,
ViewLogToJSON,
ViewLogToJSONTyped,
} from './ViewLog';
/**
@@ -38,13 +37,13 @@ export interface PaginatedViewLogList {
* @type {string}
* @memberof PaginatedViewLogList
*/
next?: string | null;
next?: string;
/**
*
* @type {string}
* @memberof PaginatedViewLogList
*/
previous?: string | null;
previous?: string;
/**
*
* @type {Array<ViewLog>}
@@ -86,15 +85,10 @@ export function PaginatedViewLogListFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PaginatedViewLogListToJSON(json: any): PaginatedViewLogList {
return PaginatedViewLogListToJSONTyped(json, false);
}
export function PaginatedViewLogListToJSONTyped(value?: PaginatedViewLogList | null, ignoreDiscriminator: boolean = false): any {
export function PaginatedViewLogListToJSON(value?: PaginatedViewLogList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],

View File

@@ -73,15 +73,10 @@ export function ParsedIngredientFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
export function ParsedIngredientToJSON(json: any): ParsedIngredient {
return ParsedIngredientToJSONTyped(json, false);
}
export function ParsedIngredientToJSONTyped(value?: ParsedIngredient | null, ignoreDiscriminator: boolean = false): any {
export function ParsedIngredientToJSON(value?: ParsedIngredient | null): any {
if (value == null) {
return value;
}
return {
'amount': value['amount'],

View File

@@ -83,15 +83,10 @@ export function PatchedAccessTokenFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedAccessTokenToJSON(json: any): PatchedAccessToken {
return PatchedAccessTokenToJSONTyped(json, false);
}
export function PatchedAccessTokenToJSONTyped(value?: Omit<PatchedAccessToken, 'token'|'created'|'updated'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedAccessTokenToJSON(value?: Omit<PatchedAccessToken, 'token'|'created'|'updated'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
AutomationTypeEnumToJSONTyped,
} from './AutomationTypeEnum';
/**
@@ -50,25 +49,25 @@ export interface PatchedAutomation {
* @type {string}
* @memberof PatchedAutomation
*/
description?: string | null;
description?: string;
/**
*
* @type {string}
* @memberof PatchedAutomation
*/
param1?: string | null;
param1?: string;
/**
*
* @type {string}
* @memberof PatchedAutomation
*/
param2?: string | null;
param2?: string;
/**
*
* @type {string}
* @memberof PatchedAutomation
*/
param3?: string | null;
param3?: string;
/**
*
* @type {number}
@@ -89,8 +88,6 @@ export interface PatchedAutomation {
readonly createdBy?: number;
}
/**
* Check if a given object implements the PatchedAutomation interface.
*/
@@ -121,15 +118,10 @@ export function PatchedAutomationFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PatchedAutomationToJSON(json: any): PatchedAutomation {
return PatchedAutomationToJSONTyped(json, false);
}
export function PatchedAutomationToJSONTyped(value?: Omit<PatchedAutomation, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedAutomationToJSON(value?: Omit<PatchedAutomation, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -30,7 +30,7 @@ export interface PatchedBookmarkletImport {
* @type {string}
* @memberof PatchedBookmarkletImport
*/
url?: string | null;
url?: string;
/**
*
* @type {string}
@@ -76,15 +76,10 @@ export function PatchedBookmarkletImportFromJSONTyped(json: any, ignoreDiscrimin
};
}
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 {
export function PatchedBookmarkletImportToJSON(value?: Omit<PatchedBookmarkletImport, 'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -36,19 +36,19 @@ export interface PatchedConnectorConfigConfig {
* @type {string}
* @memberof PatchedConnectorConfigConfig
*/
url?: string | null;
url?: string;
/**
*
* @type {string}
* @memberof PatchedConnectorConfigConfig
*/
token?: string | null;
token?: string;
/**
*
* @type {string}
* @memberof PatchedConnectorConfigConfig
*/
todoEntity?: string | null;
todoEntity?: string;
/**
* Is Connector Enabled
* @type {boolean}
@@ -118,15 +118,10 @@ export function PatchedConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscr
};
}
export function PatchedConnectorConfigConfigToJSON(json: any): PatchedConnectorConfigConfig {
return PatchedConnectorConfigConfigToJSONTyped(json, false);
}
export function PatchedConnectorConfigConfigToJSONTyped(value?: Omit<PatchedConnectorConfigConfig, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedConnectorConfigConfigToJSON(value?: Omit<PatchedConnectorConfigConfig, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -44,19 +43,19 @@ export interface PatchedCookLog {
* @type {number}
* @memberof PatchedCookLog
*/
servings?: number | null;
servings?: number;
/**
*
* @type {number}
* @memberof PatchedCookLog
*/
rating?: number | null;
rating?: number;
/**
*
* @type {string}
* @memberof PatchedCookLog
*/
comment?: string | null;
comment?: string;
/**
*
* @type {User}
@@ -105,15 +104,10 @@ export function PatchedCookLogFromJSONTyped(json: any, ignoreDiscriminator: bool
};
}
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 {
export function PatchedCookLogToJSON(value?: Omit<PatchedCookLog, 'createdBy'|'updatedAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -84,15 +83,10 @@ export function PatchedCustomFilterFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedCustomFilterToJSON(json: any): PatchedCustomFilter {
return PatchedCustomFilterToJSONTyped(json, false);
}
export function PatchedCustomFilterToJSONTyped(value?: Omit<PatchedCustomFilter, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedCustomFilterToJSON(value?: Omit<PatchedCustomFilter, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -111,15 +111,10 @@ export function PatchedExportLogFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
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 {
export function PatchedExportLogToJSON(value?: Omit<PatchedExportLog, 'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,42 +18,36 @@ 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';
/**
@@ -113,7 +107,7 @@ export interface PatchedFood {
* @type {string}
* @memberof PatchedFood
*/
pluralName?: string | null;
pluralName?: string;
/**
*
* @type {string}
@@ -131,19 +125,19 @@ export interface PatchedFood {
* @type {RecipeSimple}
* @memberof PatchedFood
*/
recipe?: RecipeSimple | null;
recipe?: RecipeSimple;
/**
*
* @type {string}
* @memberof PatchedFood
*/
url?: string | null;
url?: string;
/**
*
* @type {Array<Property>}
* @memberof PatchedFood
*/
properties?: Array<Property> | null;
properties?: Array<Property>;
/**
*
* @type {number}
@@ -155,25 +149,25 @@ export interface PatchedFood {
* @type {Unit}
* @memberof PatchedFood
*/
propertiesFoodUnit?: Unit | null;
propertiesFoodUnit?: Unit;
/**
*
* @type {number}
* @memberof PatchedFood
*/
fdcId?: number | null;
fdcId?: number;
/**
*
* @type {boolean}
* @memberof PatchedFood
*/
foodOnhand?: boolean | null;
foodOnhand?: boolean;
/**
*
* @type {SupermarketCategory}
* @memberof PatchedFood
*/
supermarketCategory?: SupermarketCategory | null;
supermarketCategory?: SupermarketCategory;
/**
*
* @type {number}
@@ -191,7 +185,7 @@ export interface PatchedFood {
* @type {Array<FoodInheritField>}
* @memberof PatchedFood
*/
inheritFields?: Array<FoodInheritField> | null;
inheritFields?: Array<FoodInheritField>;
/**
* Returns a string representation of a tree node and it's ancestors,
* e.g. 'Cuisine > Asian > Chinese > Catonese'.
@@ -210,7 +204,7 @@ export interface PatchedFood {
* @type {Array<FoodSimple>}
* @memberof PatchedFood
*/
substitute?: Array<FoodSimple> | null;
substitute?: Array<FoodSimple>;
/**
*
* @type {boolean}
@@ -234,13 +228,13 @@ export interface PatchedFood {
* @type {Array<FoodInheritField>}
* @memberof PatchedFood
*/
childInheritFields?: Array<FoodInheritField> | null;
childInheritFields?: Array<FoodInheritField>;
/**
*
* @type {string}
* @memberof PatchedFood
*/
openDataSlug?: string | null;
openDataSlug?: string;
}
/**
@@ -287,15 +281,10 @@ export function PatchedFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean
};
}
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 {
export function PatchedFoodToJSON(value?: Omit<PatchedFood, 'shopping'|'parent'|'numchild'|'fullName'|'substituteOnhand'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
/**
@@ -112,15 +111,10 @@ export function PatchedImportLogFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}
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 {
export function PatchedImportLogToJSON(value?: Omit<PatchedImportLog, 'keyword'|'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,14 +18,12 @@ import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
UnitToJSONTyped,
} from './Unit';
import type { Food } from './Food';
import {
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
FoodToJSONTyped,
} from './Food';
/**
@@ -45,13 +43,13 @@ export interface PatchedIngredient {
* @type {Food}
* @memberof PatchedIngredient
*/
food?: Food | null;
food?: Food;
/**
*
* @type {Unit}
* @memberof PatchedIngredient
*/
unit?: Unit | null;
unit?: Unit;
/**
*
* @type {number}
@@ -69,7 +67,7 @@ export interface PatchedIngredient {
* @type {string}
* @memberof PatchedIngredient
*/
note?: string | null;
note?: string;
/**
*
* @type {number}
@@ -93,7 +91,7 @@ export interface PatchedIngredient {
* @type {string}
* @memberof PatchedIngredient
*/
originalText?: string | null;
originalText?: string;
/**
*
* @type {Array<any>}
@@ -147,15 +145,10 @@ export function PatchedIngredientFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
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 {
export function PatchedIngredientToJSON(value?: Omit<PatchedIngredient, 'conversions'|'usedInRecipes'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
GroupFromJSON,
GroupFromJSONTyped,
GroupToJSON,
GroupToJSONTyped,
} from './Group';
/**
@@ -62,7 +61,7 @@ export interface PatchedInviteLink {
* @type {number}
* @memberof PatchedInviteLink
*/
usedBy?: number | null;
usedBy?: number;
/**
*
* @type {boolean}
@@ -74,7 +73,7 @@ export interface PatchedInviteLink {
* @type {string}
* @memberof PatchedInviteLink
*/
internalNote?: string | null;
internalNote?: string;
/**
*
* @type {number}
@@ -119,15 +118,10 @@ export function PatchedInviteLinkFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
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 {
export function PatchedInviteLinkToJSON(value?: Omit<PatchedInviteLink, 'uuid'|'createdBy'|'createdAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -139,15 +139,10 @@ export function PatchedKeywordFromJSONTyped(json: any, ignoreDiscriminator: bool
};
}
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 {
export function PatchedKeywordToJSON(value?: Omit<PatchedKeyword, 'label'|'parent'|'numchild'|'createdAt'|'updatedAt'|'fullName'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,21 +18,18 @@ 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';
/**
@@ -58,7 +55,7 @@ export interface PatchedMealPlan {
* @type {RecipeOverview}
* @memberof PatchedMealPlan
*/
recipe?: RecipeOverview | null;
recipe?: RecipeOverview;
/**
*
* @type {number}
@@ -106,7 +103,7 @@ export interface PatchedMealPlan {
* @type {Array<User>}
* @memberof PatchedMealPlan
*/
shared?: Array<User> | null;
shared?: Array<User>;
/**
*
* @type {string}
@@ -168,15 +165,10 @@ export function PatchedMealPlanFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}
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 {
export function PatchedMealPlanToJSON(value?: Omit<PatchedMealPlan, 'noteMarkdown'|'createdBy'|'recipeName'|'mealTypeName'|'shopping'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -42,13 +42,13 @@ export interface PatchedMealType {
* @type {string}
* @memberof PatchedMealType
*/
time?: string | null;
time?: string;
/**
*
* @type {string}
* @memberof PatchedMealType
*/
color?: string | null;
color?: string;
/**
*
* @type {boolean}
@@ -90,15 +90,10 @@ export function PatchedMealTypeFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}
export function PatchedMealTypeToJSON(json: any): PatchedMealType {
return PatchedMealTypeToJSONTyped(json, false);
}
export function PatchedMealTypeToJSONTyped(value?: Omit<PatchedMealType, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedMealTypeToJSON(value?: Omit<PatchedMealType, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -132,15 +131,10 @@ export function PatchedOpenDataCategoryFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PatchedOpenDataCategoryToJSON(json: any): PatchedOpenDataCategory {
return PatchedOpenDataCategoryToJSONTyped(json, false);
}
export function PatchedOpenDataCategoryToJSONTyped(value?: Omit<PatchedOpenDataCategory, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedOpenDataCategoryToJSON(value?: Omit<PatchedOpenDataCategory, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,21 +18,18 @@ 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';
/**
@@ -140,15 +137,10 @@ export function PatchedOpenDataConversionFromJSONTyped(json: any, ignoreDiscrimi
};
}
export function PatchedOpenDataConversionToJSON(json: any): PatchedOpenDataConversion {
return PatchedOpenDataConversionToJSONTyped(json, false);
}
export function PatchedOpenDataConversionToJSONTyped(value?: Omit<PatchedOpenDataConversion, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedOpenDataConversionToJSON(value?: Omit<PatchedOpenDataConversion, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,28 +18,24 @@ 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';
/**
@@ -123,31 +119,31 @@ export interface PatchedOpenDataFood {
* @type {OpenDataUnit}
* @memberof PatchedOpenDataFood
*/
preferredUnitMetric?: OpenDataUnit | null;
preferredUnitMetric?: OpenDataUnit;
/**
*
* @type {OpenDataUnit}
* @memberof PatchedOpenDataFood
*/
preferredShoppingUnitMetric?: OpenDataUnit | null;
preferredShoppingUnitMetric?: OpenDataUnit;
/**
*
* @type {OpenDataUnit}
* @memberof PatchedOpenDataFood
*/
preferredUnitImperial?: OpenDataUnit | null;
preferredUnitImperial?: OpenDataUnit;
/**
*
* @type {OpenDataUnit}
* @memberof PatchedOpenDataFood
*/
preferredShoppingUnitImperial?: OpenDataUnit | null;
preferredShoppingUnitImperial?: OpenDataUnit;
/**
*
* @type {Array<OpenDataFoodProperty>}
* @memberof PatchedOpenDataFood
*/
properties?: Array<OpenDataFoodProperty> | null;
properties?: Array<OpenDataFoodProperty>;
/**
*
* @type {number}
@@ -223,15 +219,10 @@ export function PatchedOpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedOpenDataFoodToJSON(json: any): PatchedOpenDataFood {
return PatchedOpenDataFoodToJSONTyped(json, false);
}
export function PatchedOpenDataFoodToJSONTyped(value?: Omit<PatchedOpenDataFood, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedOpenDataFoodToJSON(value?: Omit<PatchedOpenDataFood, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -96,7 +95,7 @@ export interface PatchedOpenDataProperty {
* @type {number}
* @memberof PatchedOpenDataProperty
*/
fdcId?: number | null;
fdcId?: number;
/**
*
* @type {string}
@@ -139,15 +138,10 @@ export function PatchedOpenDataPropertyFromJSONTyped(json: any, ignoreDiscrimina
};
}
export function PatchedOpenDataPropertyToJSON(json: any): PatchedOpenDataProperty {
return PatchedOpenDataPropertyToJSONTyped(json, false);
}
export function PatchedOpenDataPropertyToJSONTyped(value?: Omit<PatchedOpenDataProperty, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedOpenDataPropertyToJSON(value?: Omit<PatchedOpenDataProperty, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,14 +18,12 @@ import {
OpenDataStoreCategoryFromJSON,
OpenDataStoreCategoryFromJSONTyped,
OpenDataStoreCategoryToJSON,
OpenDataStoreCategoryToJSONTyped,
} from './OpenDataStoreCategory';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
OpenDataVersionToJSONTyped,
} from './OpenDataVersion';
/**
@@ -63,7 +61,7 @@ export interface PatchedOpenDataStore {
* @type {Array<OpenDataStoreCategory>}
* @memberof PatchedOpenDataStore
*/
categoryToStore?: Array<OpenDataStoreCategory> | null;
categoryToStore?: Array<OpenDataStoreCategory>;
/**
*
* @type {string}
@@ -105,15 +103,10 @@ export function PatchedOpenDataStoreFromJSONTyped(json: any, ignoreDiscriminator
};
}
export function PatchedOpenDataStoreToJSON(json: any): PatchedOpenDataStore {
return PatchedOpenDataStoreToJSONTyped(json, false);
}
export function PatchedOpenDataStoreToJSONTyped(value?: Omit<PatchedOpenDataStore, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedOpenDataStoreToJSON(value?: Omit<PatchedOpenDataStore, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,21 +18,18 @@ 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';
/**
@@ -131,8 +128,6 @@ export interface PatchedOpenDataUnit {
readonly createdBy?: string;
}
/**
* Check if a given object implements the PatchedOpenDataUnit interface.
*/
@@ -162,15 +157,10 @@ export function PatchedOpenDataUnitFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedOpenDataUnitToJSON(json: any): PatchedOpenDataUnit {
return PatchedOpenDataUnitToJSONTyped(json, false);
}
export function PatchedOpenDataUnitToJSONTyped(value?: Omit<PatchedOpenDataUnit, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedOpenDataUnitToJSON(value?: Omit<PatchedOpenDataUnit, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -103,15 +103,10 @@ export function PatchedOpenDataVersionFromJSONTyped(json: any, ignoreDiscriminat
};
}
export function PatchedOpenDataVersionToJSON(json: any): PatchedOpenDataVersion {
return PatchedOpenDataVersionToJSONTyped(json, false);
}
export function PatchedOpenDataVersionToJSONTyped(value?: PatchedOpenDataVersion | null, ignoreDiscriminator: boolean = false): any {
export function PatchedOpenDataVersionToJSON(value?: PatchedOpenDataVersion | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,7 +18,6 @@ import {
PropertyTypeFromJSON,
PropertyTypeFromJSONTyped,
PropertyTypeToJSON,
PropertyTypeToJSONTyped,
} from './PropertyType';
/**
@@ -72,7 +71,7 @@ export interface PatchedProperty {
* @type {number}
* @memberof PatchedProperty
*/
propertyAmount?: number | null;
propertyAmount?: number;
/**
*
* @type {PropertyType}
@@ -104,15 +103,10 @@ export function PatchedPropertyFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}
export function PatchedPropertyToJSON(json: any): PatchedProperty {
return PatchedPropertyToJSONTyped(json, false);
}
export function PatchedPropertyToJSONTyped(value?: PatchedProperty | null, ignoreDiscriminator: boolean = false): any {
export function PatchedPropertyToJSON(value?: PatchedProperty | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -36,13 +36,13 @@ export interface PatchedPropertyType {
* @type {string}
* @memberof PatchedPropertyType
*/
unit?: string | null;
unit?: string;
/**
*
* @type {string}
* @memberof PatchedPropertyType
*/
description?: string | null;
description?: string;
/**
*
* @type {number}
@@ -54,13 +54,13 @@ export interface PatchedPropertyType {
* @type {string}
* @memberof PatchedPropertyType
*/
openDataSlug?: string | null;
openDataSlug?: string;
/**
*
* @type {number}
* @memberof PatchedPropertyType
*/
fdcId?: number | null;
fdcId?: number;
}
/**
@@ -90,15 +90,10 @@ export function PatchedPropertyTypeFromJSONTyped(json: any, ignoreDiscriminator:
};
}
export function PatchedPropertyTypeToJSON(json: any): PatchedPropertyType {
return PatchedPropertyTypeToJSONTyped(json, false);
}
export function PatchedPropertyTypeToJSONTyped(value?: PatchedPropertyType | null, ignoreDiscriminator: boolean = false): any {
export function PatchedPropertyTypeToJSON(value?: PatchedPropertyType | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,35 +18,30 @@ 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';
/**
@@ -72,13 +67,13 @@ export interface PatchedRecipe {
* @type {string}
* @memberof PatchedRecipe
*/
description?: string | null;
description?: string;
/**
*
* @type {string}
* @memberof PatchedRecipe
*/
readonly image?: string | null;
readonly image?: string;
/**
*
* @type {Array<Keyword>}
@@ -126,7 +121,7 @@ export interface PatchedRecipe {
* @type {string}
* @memberof PatchedRecipe
*/
sourceUrl?: string | null;
sourceUrl?: string;
/**
*
* @type {boolean}
@@ -144,7 +139,7 @@ export interface PatchedRecipe {
* @type {NutritionInformation}
* @memberof PatchedRecipe
*/
nutrition?: NutritionInformation | null;
nutrition?: NutritionInformation;
/**
*
* @type {Array<Property>}
@@ -156,7 +151,7 @@ export interface PatchedRecipe {
* @type {any}
* @memberof PatchedRecipe
*/
readonly foodProperties?: any | null;
readonly foodProperties?: any;
/**
*
* @type {number}
@@ -180,13 +175,13 @@ export interface PatchedRecipe {
* @type {number}
* @memberof PatchedRecipe
*/
readonly rating?: number | null;
readonly rating?: number;
/**
*
* @type {Date}
* @memberof PatchedRecipe
*/
readonly lastCooked?: Date | null;
readonly lastCooked?: Date;
/**
*
* @type {boolean}
@@ -245,15 +240,10 @@ export function PatchedRecipeFromJSONTyped(json: any, ignoreDiscriminator: boole
};
}
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 {
export function PatchedRecipeToJSON(value?: Omit<PatchedRecipe, 'image'|'createdBy'|'createdAt'|'updatedAt'|'foodProperties'|'rating'|'lastCooked'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,14 +18,12 @@ import {
CustomFilterFromJSON,
CustomFilterFromJSONTyped,
CustomFilterToJSON,
CustomFilterToJSONTyped,
} from './CustomFilter';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
/**
@@ -69,7 +67,7 @@ export interface PatchedRecipeBook {
* @type {CustomFilter}
* @memberof PatchedRecipeBook
*/
filter?: CustomFilter | null;
filter?: CustomFilter;
/**
*
* @type {number}
@@ -105,15 +103,10 @@ export function PatchedRecipeBookFromJSONTyped(json: any, ignoreDiscriminator: b
};
}
export function PatchedRecipeBookToJSON(json: any): PatchedRecipeBook {
return PatchedRecipeBookToJSONTyped(json, false);
}
export function PatchedRecipeBookToJSONTyped(value?: Omit<PatchedRecipeBook, 'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedRecipeBookToJSON(value?: Omit<PatchedRecipeBook, 'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,14 +18,12 @@ import {
RecipeBookFromJSON,
RecipeBookFromJSONTyped,
RecipeBookToJSON,
RecipeBookToJSONTyped,
} from './RecipeBook';
import type { RecipeOverview } from './RecipeOverview';
import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
RecipeOverviewToJSONTyped,
} from './RecipeOverview';
/**
@@ -91,15 +89,10 @@ export function PatchedRecipeBookEntryFromJSONTyped(json: any, ignoreDiscriminat
};
}
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 {
export function PatchedRecipeBookEntryToJSON(value?: Omit<PatchedRecipeBookEntry, 'bookContent'|'recipeContent'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,28 +18,24 @@ 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';
/**
@@ -59,19 +55,19 @@ export interface PatchedShoppingListEntry {
* @type {number}
* @memberof PatchedShoppingListEntry
*/
listRecipe?: number | null;
listRecipe?: number;
/**
*
* @type {Food}
* @memberof PatchedShoppingListEntry
*/
food?: Food | null;
food?: Food;
/**
*
* @type {Unit}
* @memberof PatchedShoppingListEntry
*/
unit?: Unit | null;
unit?: Unit;
/**
*
* @type {number}
@@ -95,7 +91,7 @@ export interface PatchedShoppingListEntry {
* @type {number}
* @memberof PatchedShoppingListEntry
*/
ingredient?: number | null;
ingredient?: number;
/**
*
* @type {ShoppingListRecipe}
@@ -125,13 +121,13 @@ export interface PatchedShoppingListEntry {
* @type {Date}
* @memberof PatchedShoppingListEntry
*/
completedAt?: Date | null;
completedAt?: Date;
/**
*
* @type {Date}
* @memberof PatchedShoppingListEntry
*/
delayUntil?: Date | null;
delayUntil?: Date;
/**
* If a mealplan id is given try to find existing or create new ShoppingListRecipe with that meal plan and link entry to it
* @type {number}
@@ -175,15 +171,10 @@ export function PatchedShoppingListEntryFromJSONTyped(json: any, ignoreDiscrimin
};
}
export function PatchedShoppingListEntryToJSON(json: any): PatchedShoppingListEntry {
return PatchedShoppingListEntryToJSONTyped(json, false);
}
export function PatchedShoppingListEntryToJSONTyped(value?: Omit<PatchedShoppingListEntry, 'list_recipe_data'|'created_by'|'created_at'|'updated_at'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedShoppingListEntryToJSON(value?: Omit<PatchedShoppingListEntry, 'listRecipeData'|'createdBy'|'createdAt'|'updatedAt'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

View File

@@ -18,21 +18,18 @@ import {
MealPlanFromJSON,
MealPlanFromJSONTyped,
MealPlanToJSON,
MealPlanToJSONTyped,
} from './MealPlan';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
UserToJSONTyped,
} from './User';
import type { RecipeOverview } from './RecipeOverview';
import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
RecipeOverviewToJSONTyped,
} from './RecipeOverview';
/**
@@ -58,7 +55,7 @@ export interface PatchedShoppingListRecipe {
* @type {number}
* @memberof PatchedShoppingListRecipe
*/
recipe?: number | null;
recipe?: number;
/**
*
* @type {RecipeOverview}
@@ -70,7 +67,7 @@ export interface PatchedShoppingListRecipe {
* @type {number}
* @memberof PatchedShoppingListRecipe
*/
mealplan?: number | null;
mealplan?: number;
/**
*
* @type {MealPlan}
@@ -119,15 +116,10 @@ export function PatchedShoppingListRecipeFromJSONTyped(json: any, ignoreDiscrimi
};
}
export function PatchedShoppingListRecipeToJSON(json: any): PatchedShoppingListRecipe {
return PatchedShoppingListRecipeToJSONTyped(json, false);
}
export function PatchedShoppingListRecipeToJSONTyped(value?: Omit<PatchedShoppingListRecipe, 'recipe_data'|'meal_plan_data'|'created_by'> | null, ignoreDiscriminator: boolean = false): any {
export function PatchedShoppingListRecipeToJSON(value?: Omit<PatchedShoppingListRecipe, 'recipeData'|'mealPlanData'|'createdBy'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],

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