mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 20:59:28 -05:00
working search with flat endpoint
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -13,21 +13,39 @@
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CustomFilterSharedInner } from './CustomFilterSharedInner';
|
||||
import type { DefaultPageEnum } from './DefaultPageEnum';
|
||||
import {
|
||||
CustomFilterSharedInnerFromJSON,
|
||||
CustomFilterSharedInnerFromJSONTyped,
|
||||
CustomFilterSharedInnerToJSON,
|
||||
} from './CustomFilterSharedInner';
|
||||
import type { RecipeStepsInnerFile } from './RecipeStepsInnerFile';
|
||||
DefaultPageEnumFromJSON,
|
||||
DefaultPageEnumFromJSONTyped,
|
||||
DefaultPageEnumToJSON,
|
||||
} from './DefaultPageEnum';
|
||||
import type { ThemeEnum } from './ThemeEnum';
|
||||
import {
|
||||
RecipeStepsInnerFileFromJSON,
|
||||
RecipeStepsInnerFileFromJSONTyped,
|
||||
RecipeStepsInnerFileToJSON,
|
||||
} from './RecipeStepsInnerFile';
|
||||
ThemeEnumFromJSON,
|
||||
ThemeEnumFromJSONTyped,
|
||||
ThemeEnumToJSON,
|
||||
} from './ThemeEnum';
|
||||
import type { User } from './User';
|
||||
import {
|
||||
UserFromJSON,
|
||||
UserFromJSONTyped,
|
||||
UserToJSON,
|
||||
} from './User';
|
||||
import type { UserFileView } from './UserFileView';
|
||||
import {
|
||||
UserFileViewFromJSON,
|
||||
UserFileViewFromJSONTyped,
|
||||
UserFileViewToJSON,
|
||||
} from './UserFileView';
|
||||
import type { UserPreferenceNavTextColorEnum } from './UserPreferenceNavTextColorEnum';
|
||||
import {
|
||||
UserPreferenceNavTextColorEnumFromJSON,
|
||||
UserPreferenceNavTextColorEnumFromJSONTyped,
|
||||
UserPreferenceNavTextColorEnumToJSON,
|
||||
} from './UserPreferenceNavTextColorEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface UserPreference
|
||||
*/
|
||||
@@ -40,16 +58,16 @@ export interface UserPreference {
|
||||
user: number;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeStepsInnerFile}
|
||||
* @type {UserFileView}
|
||||
* @memberof UserPreference
|
||||
*/
|
||||
image?: RecipeStepsInnerFile | null;
|
||||
image?: UserFileView | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @type {ThemeEnum}
|
||||
* @memberof UserPreference
|
||||
*/
|
||||
theme?: UserPreferenceThemeEnum;
|
||||
theme?: ThemeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -58,7 +76,7 @@ export interface UserPreference {
|
||||
navBgColor?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @type {UserPreferenceNavTextColorEnum}
|
||||
* @memberof UserPreference
|
||||
*/
|
||||
navTextColor?: UserPreferenceNavTextColorEnum;
|
||||
@@ -76,10 +94,10 @@ export interface UserPreference {
|
||||
defaultUnit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @type {DefaultPageEnum}
|
||||
* @memberof UserPreference
|
||||
*/
|
||||
defaultPage?: UserPreferenceDefaultPageEnum;
|
||||
defaultPage?: DefaultPageEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
@@ -94,10 +112,10 @@ export interface UserPreference {
|
||||
useKj?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<CustomFilterSharedInner>}
|
||||
* @type {Array<User>}
|
||||
* @memberof UserPreference
|
||||
*/
|
||||
planShare?: Array<CustomFilterSharedInner> | null;
|
||||
planShare?: Array<User> | null;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
@@ -133,7 +151,7 @@ export interface UserPreference {
|
||||
* @type {string}
|
||||
* @memberof UserPreference
|
||||
*/
|
||||
readonly foodInheritDefault?: string;
|
||||
readonly foodInheritDefault: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -154,10 +172,10 @@ export interface UserPreference {
|
||||
mealplanAutoexcludeOnhand?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<CustomFilterSharedInner>}
|
||||
* @type {Array<User>}
|
||||
* @memberof UserPreference
|
||||
*/
|
||||
shoppingShare?: Array<CustomFilterSharedInner> | null;
|
||||
shoppingShare?: Array<User> | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
@@ -205,49 +223,17 @@ export interface UserPreference {
|
||||
* @type {string}
|
||||
* @memberof UserPreference
|
||||
*/
|
||||
readonly foodChildrenExist?: string;
|
||||
readonly foodChildrenExist: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const UserPreferenceThemeEnum = {
|
||||
Tandoor: 'TANDOOR',
|
||||
Bootstrap: 'BOOTSTRAP',
|
||||
Darkly: 'DARKLY',
|
||||
Flatly: 'FLATLY',
|
||||
Superhero: 'SUPERHERO',
|
||||
TandoorDark: 'TANDOOR_DARK'
|
||||
} as const;
|
||||
export type UserPreferenceThemeEnum = typeof UserPreferenceThemeEnum[keyof typeof UserPreferenceThemeEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const UserPreferenceNavTextColorEnum = {
|
||||
Light: 'LIGHT',
|
||||
Dark: 'DARK'
|
||||
} as const;
|
||||
export type UserPreferenceNavTextColorEnum = typeof UserPreferenceNavTextColorEnum[keyof typeof UserPreferenceNavTextColorEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const UserPreferenceDefaultPageEnum = {
|
||||
Search: 'SEARCH',
|
||||
Plan: 'PLAN',
|
||||
Books: 'BOOKS'
|
||||
} as const;
|
||||
export type UserPreferenceDefaultPageEnum = typeof UserPreferenceDefaultPageEnum[keyof typeof UserPreferenceDefaultPageEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the UserPreference interface.
|
||||
*/
|
||||
export function instanceOfUserPreference(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "user" in value;
|
||||
isInstance = isInstance && "foodInheritDefault" in value;
|
||||
isInstance = isInstance && "foodChildrenExist" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
@@ -263,26 +249,26 @@ export function UserPreferenceFromJSONTyped(json: any, ignoreDiscriminator: bool
|
||||
return {
|
||||
|
||||
'user': json['user'],
|
||||
'image': !exists(json, 'image') ? undefined : RecipeStepsInnerFileFromJSON(json['image']),
|
||||
'theme': !exists(json, 'theme') ? undefined : json['theme'],
|
||||
'image': !exists(json, 'image') ? undefined : UserFileViewFromJSON(json['image']),
|
||||
'theme': !exists(json, 'theme') ? undefined : ThemeEnumFromJSON(json['theme']),
|
||||
'navBgColor': !exists(json, 'nav_bg_color') ? undefined : json['nav_bg_color'],
|
||||
'navTextColor': !exists(json, 'nav_text_color') ? undefined : json['nav_text_color'],
|
||||
'navTextColor': !exists(json, 'nav_text_color') ? undefined : UserPreferenceNavTextColorEnumFromJSON(json['nav_text_color']),
|
||||
'navShowLogo': !exists(json, 'nav_show_logo') ? undefined : json['nav_show_logo'],
|
||||
'defaultUnit': !exists(json, 'default_unit') ? undefined : json['default_unit'],
|
||||
'defaultPage': !exists(json, 'default_page') ? undefined : json['default_page'],
|
||||
'defaultPage': !exists(json, 'default_page') ? undefined : DefaultPageEnumFromJSON(json['default_page']),
|
||||
'useFractions': !exists(json, 'use_fractions') ? undefined : json['use_fractions'],
|
||||
'useKj': !exists(json, 'use_kj') ? undefined : json['use_kj'],
|
||||
'planShare': !exists(json, 'plan_share') ? undefined : (json['plan_share'] === null ? null : (json['plan_share'] as Array<any>).map(CustomFilterSharedInnerFromJSON)),
|
||||
'planShare': !exists(json, 'plan_share') ? undefined : (json['plan_share'] === null ? null : (json['plan_share'] as Array<any>).map(UserFromJSON)),
|
||||
'navSticky': !exists(json, 'nav_sticky') ? undefined : json['nav_sticky'],
|
||||
'ingredientDecimals': !exists(json, 'ingredient_decimals') ? undefined : json['ingredient_decimals'],
|
||||
'comments': !exists(json, 'comments') ? undefined : json['comments'],
|
||||
'shoppingAutoSync': !exists(json, 'shopping_auto_sync') ? undefined : json['shopping_auto_sync'],
|
||||
'mealplanAutoaddShopping': !exists(json, 'mealplan_autoadd_shopping') ? undefined : json['mealplan_autoadd_shopping'],
|
||||
'foodInheritDefault': !exists(json, 'food_inherit_default') ? undefined : json['food_inherit_default'],
|
||||
'foodInheritDefault': json['food_inherit_default'],
|
||||
'defaultDelay': !exists(json, 'default_delay') ? undefined : json['default_delay'],
|
||||
'mealplanAutoincludeRelated': !exists(json, 'mealplan_autoinclude_related') ? undefined : json['mealplan_autoinclude_related'],
|
||||
'mealplanAutoexcludeOnhand': !exists(json, 'mealplan_autoexclude_onhand') ? undefined : json['mealplan_autoexclude_onhand'],
|
||||
'shoppingShare': !exists(json, 'shopping_share') ? undefined : (json['shopping_share'] === null ? null : (json['shopping_share'] as Array<any>).map(CustomFilterSharedInnerFromJSON)),
|
||||
'shoppingShare': !exists(json, 'shopping_share') ? undefined : (json['shopping_share'] === null ? null : (json['shopping_share'] as Array<any>).map(UserFromJSON)),
|
||||
'shoppingRecentDays': !exists(json, 'shopping_recent_days') ? undefined : json['shopping_recent_days'],
|
||||
'csvDelim': !exists(json, 'csv_delim') ? undefined : json['csv_delim'],
|
||||
'csvPrefix': !exists(json, 'csv_prefix') ? undefined : json['csv_prefix'],
|
||||
@@ -290,7 +276,7 @@ export function UserPreferenceFromJSONTyped(json: any, ignoreDiscriminator: bool
|
||||
'shoppingAddOnhand': !exists(json, 'shopping_add_onhand') ? undefined : json['shopping_add_onhand'],
|
||||
'leftHanded': !exists(json, 'left_handed') ? undefined : json['left_handed'],
|
||||
'showStepIngredients': !exists(json, 'show_step_ingredients') ? undefined : json['show_step_ingredients'],
|
||||
'foodChildrenExist': !exists(json, 'food_children_exist') ? undefined : json['food_children_exist'],
|
||||
'foodChildrenExist': json['food_children_exist'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -304,16 +290,16 @@ export function UserPreferenceToJSON(value?: UserPreference | null): any {
|
||||
return {
|
||||
|
||||
'user': value.user,
|
||||
'image': RecipeStepsInnerFileToJSON(value.image),
|
||||
'theme': value.theme,
|
||||
'image': UserFileViewToJSON(value.image),
|
||||
'theme': ThemeEnumToJSON(value.theme),
|
||||
'nav_bg_color': value.navBgColor,
|
||||
'nav_text_color': value.navTextColor,
|
||||
'nav_text_color': UserPreferenceNavTextColorEnumToJSON(value.navTextColor),
|
||||
'nav_show_logo': value.navShowLogo,
|
||||
'default_unit': value.defaultUnit,
|
||||
'default_page': value.defaultPage,
|
||||
'default_page': DefaultPageEnumToJSON(value.defaultPage),
|
||||
'use_fractions': value.useFractions,
|
||||
'use_kj': value.useKj,
|
||||
'plan_share': value.planShare === undefined ? undefined : (value.planShare === null ? null : (value.planShare as Array<any>).map(CustomFilterSharedInnerToJSON)),
|
||||
'plan_share': value.planShare === undefined ? undefined : (value.planShare === null ? null : (value.planShare as Array<any>).map(UserToJSON)),
|
||||
'nav_sticky': value.navSticky,
|
||||
'ingredient_decimals': value.ingredientDecimals,
|
||||
'comments': value.comments,
|
||||
@@ -322,7 +308,7 @@ export function UserPreferenceToJSON(value?: UserPreference | null): any {
|
||||
'default_delay': value.defaultDelay,
|
||||
'mealplan_autoinclude_related': value.mealplanAutoincludeRelated,
|
||||
'mealplan_autoexclude_onhand': value.mealplanAutoexcludeOnhand,
|
||||
'shopping_share': value.shoppingShare === undefined ? undefined : (value.shoppingShare === null ? null : (value.shoppingShare as Array<any>).map(CustomFilterSharedInnerToJSON)),
|
||||
'shopping_share': value.shoppingShare === undefined ? undefined : (value.shoppingShare === null ? null : (value.shoppingShare as Array<any>).map(UserToJSON)),
|
||||
'shopping_recent_days': value.shoppingRecentDays,
|
||||
'csv_delim': value.csvDelim,
|
||||
'csv_prefix': value.csvPrefix,
|
||||
|
||||
Reference in New Issue
Block a user