working search with flat endpoint

This commit is contained in:
vabene1111
2024-02-29 20:08:37 +01:00
committed by smilerz
parent 4a8ad3db1e
commit 17f875863c
143 changed files with 18624 additions and 9992 deletions

View File

@@ -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,39 +13,39 @@
*/
import { exists, mapValues } from '../runtime';
import type { CustomFilterSharedInner } from './CustomFilterSharedInner';
import type { Keyword } from './Keyword';
import {
CustomFilterSharedInnerFromJSON,
CustomFilterSharedInnerFromJSONTyped,
CustomFilterSharedInnerToJSON,
} from './CustomFilterSharedInner';
import type { FoodPropertiesInner } from './FoodPropertiesInner';
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
} from './Keyword';
import type { NutritionInformation } from './NutritionInformation';
import {
FoodPropertiesInnerFromJSON,
FoodPropertiesInnerFromJSONTyped,
FoodPropertiesInnerToJSON,
} from './FoodPropertiesInner';
import type { RecipeKeywordsInner } from './RecipeKeywordsInner';
NutritionInformationFromJSON,
NutritionInformationFromJSONTyped,
NutritionInformationToJSON,
} from './NutritionInformation';
import type { Property } from './Property';
import {
RecipeKeywordsInnerFromJSON,
RecipeKeywordsInnerFromJSONTyped,
RecipeKeywordsInnerToJSON,
} from './RecipeKeywordsInner';
import type { RecipeNutrition } from './RecipeNutrition';
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
} from './Property';
import type { Step } from './Step';
import {
RecipeNutritionFromJSON,
RecipeNutritionFromJSONTyped,
RecipeNutritionToJSON,
} from './RecipeNutrition';
import type { RecipeStepsInner } from './RecipeStepsInner';
StepFromJSON,
StepFromJSONTyped,
StepToJSON,
} from './Step';
import type { User } from './User';
import {
RecipeStepsInnerFromJSON,
RecipeStepsInnerFromJSONTyped,
RecipeStepsInnerToJSON,
} from './RecipeStepsInner';
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
*
* Adds nested create feature
* @export
* @interface Recipe
*/
@@ -55,7 +55,7 @@ export interface Recipe {
* @type {number}
* @memberof Recipe
*/
readonly id?: number;
readonly id: number;
/**
*
* @type {string}
@@ -70,22 +70,22 @@ export interface Recipe {
description?: string | null;
/**
*
* @type {Blob}
* @type {string}
* @memberof Recipe
*/
readonly image?: Blob | null;
readonly image: string | null;
/**
*
* @type {Array<RecipeKeywordsInner>}
* @type {Array<Keyword>}
* @memberof Recipe
*/
keywords?: Array<RecipeKeywordsInner>;
keywords?: Array<Keyword>;
/**
*
* @type {Array<RecipeStepsInner>}
* @type {Array<Step>}
* @memberof Recipe
*/
steps: Array<RecipeStepsInner>;
steps: Array<Step>;
/**
*
* @type {number}
@@ -100,22 +100,22 @@ export interface Recipe {
waitingTime?: number;
/**
*
* @type {string}
* @type {number}
* @memberof Recipe
*/
readonly createdBy?: string;
readonly createdBy: number;
/**
*
* @type {Date}
* @memberof Recipe
*/
readonly createdAt?: Date;
readonly createdAt: Date;
/**
*
* @type {Date}
* @memberof Recipe
*/
readonly updatedAt?: Date;
readonly updatedAt: Date;
/**
*
* @type {string}
@@ -136,22 +136,22 @@ export interface Recipe {
showIngredientOverview?: boolean;
/**
*
* @type {RecipeNutrition}
* @type {NutritionInformation}
* @memberof Recipe
*/
nutrition?: RecipeNutrition | null;
nutrition?: NutritionInformation | null;
/**
*
* @type {Array<FoodPropertiesInner>}
* @type {Array<Property>}
* @memberof Recipe
*/
properties?: Array<FoodPropertiesInner>;
properties?: Array<Property>;
/**
*
* @type {string}
* @memberof Recipe
*/
readonly foodProperties?: string;
readonly foodProperties: string;
/**
*
* @type {number}
@@ -175,13 +175,13 @@ export interface Recipe {
* @type {string}
* @memberof Recipe
*/
readonly rating?: string | null;
readonly rating: string | null;
/**
*
* @type {Date}
* @memberof Recipe
*/
readonly lastCooked?: Date | null;
readonly lastCooked: Date | null;
/**
*
* @type {boolean}
@@ -190,10 +190,10 @@ export interface Recipe {
_private?: boolean;
/**
*
* @type {Array<CustomFilterSharedInner>}
* @type {Array<User>}
* @memberof Recipe
*/
shared?: Array<CustomFilterSharedInner>;
shared?: Array<User>;
}
/**
@@ -201,8 +201,16 @@ export interface Recipe {
*/
export function instanceOfRecipe(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "image" in value;
isInstance = isInstance && "steps" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "createdAt" in value;
isInstance = isInstance && "updatedAt" in value;
isInstance = isInstance && "foodProperties" in value;
isInstance = isInstance && "rating" in value;
isInstance = isInstance && "lastCooked" in value;
return isInstance;
}
@@ -217,30 +225,30 @@ export function RecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Re
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'id': json['id'],
'name': json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'image': !exists(json, 'image') ? undefined : json['image'],
'keywords': !exists(json, 'keywords') ? undefined : ((json['keywords'] as Array<any>).map(RecipeKeywordsInnerFromJSON)),
'steps': ((json['steps'] as Array<any>).map(RecipeStepsInnerFromJSON)),
'image': json['image'],
'keywords': !exists(json, 'keywords') ? undefined : ((json['keywords'] as Array<any>).map(KeywordFromJSON)),
'steps': ((json['steps'] as Array<any>).map(StepFromJSON)),
'workingTime': !exists(json, 'working_time') ? undefined : json['working_time'],
'waitingTime': !exists(json, 'waiting_time') ? undefined : json['waiting_time'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])),
'updatedAt': (new Date(json['updated_at'])),
'sourceUrl': !exists(json, 'source_url') ? undefined : json['source_url'],
'internal': !exists(json, 'internal') ? undefined : json['internal'],
'showIngredientOverview': !exists(json, 'show_ingredient_overview') ? undefined : json['show_ingredient_overview'],
'nutrition': !exists(json, 'nutrition') ? undefined : RecipeNutritionFromJSON(json['nutrition']),
'properties': !exists(json, 'properties') ? undefined : ((json['properties'] as Array<any>).map(FoodPropertiesInnerFromJSON)),
'foodProperties': !exists(json, 'food_properties') ? undefined : json['food_properties'],
'nutrition': !exists(json, 'nutrition') ? undefined : NutritionInformationFromJSON(json['nutrition']),
'properties': !exists(json, 'properties') ? undefined : ((json['properties'] as Array<any>).map(PropertyFromJSON)),
'foodProperties': json['food_properties'],
'servings': !exists(json, 'servings') ? undefined : json['servings'],
'filePath': !exists(json, 'file_path') ? undefined : json['file_path'],
'servingsText': !exists(json, 'servings_text') ? undefined : json['servings_text'],
'rating': !exists(json, 'rating') ? undefined : json['rating'],
'lastCooked': !exists(json, 'last_cooked') ? undefined : (json['last_cooked'] === null ? null : new Date(json['last_cooked'])),
'rating': json['rating'],
'lastCooked': (json['last_cooked'] === null ? null : new Date(json['last_cooked'])),
'_private': !exists(json, 'private') ? undefined : json['private'],
'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array<any>).map(CustomFilterSharedInnerFromJSON)),
'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
};
}
@@ -255,20 +263,20 @@ export function RecipeToJSON(value?: Recipe | null): any {
'name': value.name,
'description': value.description,
'keywords': value.keywords === undefined ? undefined : ((value.keywords as Array<any>).map(RecipeKeywordsInnerToJSON)),
'steps': ((value.steps as Array<any>).map(RecipeStepsInnerToJSON)),
'keywords': value.keywords === undefined ? undefined : ((value.keywords as Array<any>).map(KeywordToJSON)),
'steps': ((value.steps as Array<any>).map(StepToJSON)),
'working_time': value.workingTime,
'waiting_time': value.waitingTime,
'source_url': value.sourceUrl,
'internal': value.internal,
'show_ingredient_overview': value.showIngredientOverview,
'nutrition': RecipeNutritionToJSON(value.nutrition),
'properties': value.properties === undefined ? undefined : ((value.properties as Array<any>).map(FoodPropertiesInnerToJSON)),
'nutrition': NutritionInformationToJSON(value.nutrition),
'properties': value.properties === undefined ? undefined : ((value.properties as Array<any>).map(PropertyToJSON)),
'servings': value.servings,
'file_path': value.filePath,
'servings_text': value.servingsText,
'private': value._private,
'shared': value.shared === undefined ? undefined : ((value.shared as Array<any>).map(CustomFilterSharedInnerToJSON)),
'shared': value.shared === undefined ? undefined : ((value.shared as Array<any>).map(UserToJSON)),
};
}