mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-07 07:08:03 -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,27 +13,27 @@
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CustomFilterSharedInner } from './CustomFilterSharedInner';
|
||||
import type { MealType } from './MealType';
|
||||
import {
|
||||
CustomFilterSharedInnerFromJSON,
|
||||
CustomFilterSharedInnerFromJSONTyped,
|
||||
CustomFilterSharedInnerToJSON,
|
||||
} from './CustomFilterSharedInner';
|
||||
import type { MealPlanMealType } from './MealPlanMealType';
|
||||
MealTypeFromJSON,
|
||||
MealTypeFromJSONTyped,
|
||||
MealTypeToJSON,
|
||||
} from './MealType';
|
||||
import type { RecipeOverview } from './RecipeOverview';
|
||||
import {
|
||||
MealPlanMealTypeFromJSON,
|
||||
MealPlanMealTypeFromJSONTyped,
|
||||
MealPlanMealTypeToJSON,
|
||||
} from './MealPlanMealType';
|
||||
import type { MealPlanRecipe } from './MealPlanRecipe';
|
||||
RecipeOverviewFromJSON,
|
||||
RecipeOverviewFromJSONTyped,
|
||||
RecipeOverviewToJSON,
|
||||
} from './RecipeOverview';
|
||||
import type { User } from './User';
|
||||
import {
|
||||
MealPlanRecipeFromJSON,
|
||||
MealPlanRecipeFromJSONTyped,
|
||||
MealPlanRecipeToJSON,
|
||||
} from './MealPlanRecipe';
|
||||
UserFromJSON,
|
||||
UserFromJSONTyped,
|
||||
UserToJSON,
|
||||
} from './User';
|
||||
|
||||
/**
|
||||
*
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface MealPlan
|
||||
*/
|
||||
@@ -43,7 +43,7 @@ export interface MealPlan {
|
||||
* @type {number}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
readonly id?: number;
|
||||
readonly id: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -52,10 +52,10 @@ export interface MealPlan {
|
||||
title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {MealPlanRecipe}
|
||||
* @type {RecipeOverview}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
recipe?: MealPlanRecipe | null;
|
||||
recipe?: RecipeOverview | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -73,7 +73,7 @@ export interface MealPlan {
|
||||
* @type {string}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
readonly noteMarkdown?: string;
|
||||
readonly noteMarkdown: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
@@ -88,40 +88,40 @@ export interface MealPlan {
|
||||
toDate?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {MealPlanMealType}
|
||||
* @type {MealType}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
mealType: MealPlanMealType;
|
||||
mealType: MealType;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
readonly createdBy: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<User>}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
shared?: Array<User> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<CustomFilterSharedInner>}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
shared?: Array<CustomFilterSharedInner> | null;
|
||||
readonly recipeName: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
readonly recipeName?: string;
|
||||
readonly mealTypeName: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
readonly mealTypeName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
readonly shopping?: string;
|
||||
readonly shopping: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,9 +129,15 @@ export interface MealPlan {
|
||||
*/
|
||||
export function instanceOfMealPlan(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "id" in value;
|
||||
isInstance = isInstance && "servings" in value;
|
||||
isInstance = isInstance && "noteMarkdown" in value;
|
||||
isInstance = isInstance && "fromDate" in value;
|
||||
isInstance = isInstance && "mealType" in value;
|
||||
isInstance = isInstance && "createdBy" in value;
|
||||
isInstance = isInstance && "recipeName" in value;
|
||||
isInstance = isInstance && "mealTypeName" in value;
|
||||
isInstance = isInstance && "shopping" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
@@ -146,20 +152,20 @@ export function MealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'id': json['id'],
|
||||
'title': !exists(json, 'title') ? undefined : json['title'],
|
||||
'recipe': !exists(json, 'recipe') ? undefined : MealPlanRecipeFromJSON(json['recipe']),
|
||||
'recipe': !exists(json, 'recipe') ? undefined : RecipeOverviewFromJSON(json['recipe']),
|
||||
'servings': json['servings'],
|
||||
'note': !exists(json, 'note') ? undefined : json['note'],
|
||||
'noteMarkdown': !exists(json, 'note_markdown') ? undefined : json['note_markdown'],
|
||||
'noteMarkdown': json['note_markdown'],
|
||||
'fromDate': (new Date(json['from_date'])),
|
||||
'toDate': !exists(json, 'to_date') ? undefined : (new Date(json['to_date'])),
|
||||
'mealType': MealPlanMealTypeFromJSON(json['meal_type']),
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
'shared': !exists(json, 'shared') ? undefined : (json['shared'] === null ? null : (json['shared'] as Array<any>).map(CustomFilterSharedInnerFromJSON)),
|
||||
'recipeName': !exists(json, 'recipe_name') ? undefined : json['recipe_name'],
|
||||
'mealTypeName': !exists(json, 'meal_type_name') ? undefined : json['meal_type_name'],
|
||||
'shopping': !exists(json, 'shopping') ? undefined : json['shopping'],
|
||||
'mealType': MealTypeFromJSON(json['meal_type']),
|
||||
'createdBy': json['created_by'],
|
||||
'shared': !exists(json, 'shared') ? undefined : (json['shared'] === null ? null : (json['shared'] as Array<any>).map(UserFromJSON)),
|
||||
'recipeName': json['recipe_name'],
|
||||
'mealTypeName': json['meal_type_name'],
|
||||
'shopping': json['shopping'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -173,13 +179,13 @@ export function MealPlanToJSON(value?: MealPlan | null): any {
|
||||
return {
|
||||
|
||||
'title': value.title,
|
||||
'recipe': MealPlanRecipeToJSON(value.recipe),
|
||||
'recipe': RecipeOverviewToJSON(value.recipe),
|
||||
'servings': value.servings,
|
||||
'note': value.note,
|
||||
'from_date': (value.fromDate.toISOString().substring(0,10)),
|
||||
'to_date': value.toDate === undefined ? undefined : (value.toDate.toISOString().substring(0,10)),
|
||||
'meal_type': MealPlanMealTypeToJSON(value.mealType),
|
||||
'shared': value.shared === undefined ? undefined : (value.shared === null ? null : (value.shared as Array<any>).map(CustomFilterSharedInnerToJSON)),
|
||||
'meal_type': MealTypeToJSON(value.mealType),
|
||||
'shared': value.shared === undefined ? undefined : (value.shared === null ? null : (value.shared as Array<any>).map(UserToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user