mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
basic url importer working
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
"Auto_Planner": "",
|
||||
"Automate": "",
|
||||
"Automation": "",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"Auto_Planner": "Автоматичен плановик",
|
||||
"Automate": "Автоматизация",
|
||||
"Automation": "Автоматизация",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Moveu tots els ingredients al pas més adequat.",
|
||||
"Automate": "",
|
||||
"Automation": "",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Přiřadit všechny ingredience k nejlépe vyhovujícímu kroku.",
|
||||
"Automate": "Automatizovat",
|
||||
"Automation": "Automatizace",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Zpět",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Flyt alle ingredienser til mest egnede trin.",
|
||||
"Automate": "Automatiser",
|
||||
"Automation": "Automatisering",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Tilbage",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Auto_Sort_Help": "Verschiebe alle Zutaten zu dem Schritt, der am Besten passt.",
|
||||
"Automate": "Automatisieren",
|
||||
"Automation": "Automatisierung",
|
||||
"Available": "Verfügbar",
|
||||
"AvailableCategories": "Verfügbare Kategorien",
|
||||
"Back": "Zurück",
|
||||
"BaseUnit": "Basiseinheit",
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"Auto_Sort_Help": "Μετακίνηση όλων των υλικών στο καταλληλότερο βήμα.",
|
||||
"Automate": "Αυτοματοποίηση",
|
||||
"Automation": "Αυτοματισμός",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Πίσω",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Move all ingredients to the best fitting step.",
|
||||
"Automate": "Automate",
|
||||
"Automation": "Automation",
|
||||
"Available": "Available",
|
||||
"AvailableCategories": "Available Categories",
|
||||
"Back": "Back",
|
||||
"BaseUnit": "Base Unit",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Mueva todos los ingredientes al paso que mejor se adapte.",
|
||||
"Automate": "Automatizar",
|
||||
"Automation": "Automatización",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Atrás",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Auto_Planner": "Automaattinen Suunnittelija",
|
||||
"Automate": "Automatisoi",
|
||||
"Automation": "Automaatio",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Auto_Sort_Help": "Déplacer tous les ingrédients à l’étape la mieux adaptée.",
|
||||
"Automate": "Automatiser",
|
||||
"Automation": "Automatisation",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Retour",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "העברת כל המרכיבים למיקום המתאים ביותר.",
|
||||
"Automate": "אוטומט",
|
||||
"Automation": "אוטומטציה",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "חזור",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Az összes összetevőt helyezze át a legmegfelelőbb lépéshez.",
|
||||
"Automate": "Automatizálás",
|
||||
"Automation": "Automatizálás",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Vissza",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"Add_to_Shopping": "Ավելացնել գնումներին",
|
||||
"Advanced Search Settings": "Ընդլայնված փնտրման կարգավորումներ",
|
||||
"Automate": "Ավտոմատացնել",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"Auto_Planner": "",
|
||||
"Automate": "",
|
||||
"Automation": "Automatis",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "",
|
||||
"Automate": "",
|
||||
"Automation": "",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Sposta tutti gli ingredienti allo step più adatto.",
|
||||
"Automate": "Automatizza",
|
||||
"Automation": "Automazione",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "",
|
||||
"Automate": "",
|
||||
"Automation": "",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Flytt alle ingredienser til det mest passende steget.",
|
||||
"Automate": "Automatiser",
|
||||
"Automation": "Automatiser",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Auto_Sort_Help": "Verplaats alle ingrediënten naar de best passende stap.",
|
||||
"Automate": "Automatiseer",
|
||||
"Automation": "Automatisering",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Terug",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Auto_Sort_Help": "Przenieś wszystkie składniki do najlepiej dopasowanego kroku.",
|
||||
"Automate": "Automatyzacja",
|
||||
"Automation": "Automatyzacja",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Z powrotem",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"Auto_Sort_Help": "Mover todos os ingredientes para o passo mais indicado.",
|
||||
"Automate": "Automatizar",
|
||||
"Automation": "Automação",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Mover todos os ingredientes para o passo mais indicado.",
|
||||
"Automate": "Automatizar",
|
||||
"Automation": "Automação",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Voltar",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Mutați toate ingredientele la cel mai potrivit pas.",
|
||||
"Automate": "Automatizat",
|
||||
"Automation": "Automatizare",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"Auto_Planner": "Автопланировщик",
|
||||
"Automate": "Автоматизировать",
|
||||
"Automation": "Автоматизация",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"Auto_Sort_Help": "Vse sestavine prestavi v najprimernejši korak.",
|
||||
"Automate": "Avtomatiziraj",
|
||||
"Automation": "Avtomatizacija",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"Auto_Sort_Help": "Flytta alla ingredienser till det bästa passande steget.",
|
||||
"Automate": "Automatisera",
|
||||
"Automation": "Automatisering",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Tillbaka",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "Tüm malzemeleri en uygun adıma taşı.",
|
||||
"Automate": "Otomatikleştir",
|
||||
"Automation": "Otomasyon",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "Geri",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"Auto_Sort_Help": "Перемістити всі інгредієнти до більш підходящого кроку.",
|
||||
"Automate": "Автоматично",
|
||||
"Automation": "Автоматизація",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Auto_Sort_Help": "将所有食材移动到最恰当的步骤。",
|
||||
"Automate": "自动化",
|
||||
"Automation": "自动化",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "后退",
|
||||
"BaseUnit": "",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"Add_nutrition_recipe": "為食譜添加營養資訊",
|
||||
"Add_to_Plan": "加入計劃",
|
||||
"Add_to_Shopping": "加入購物清單",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
|
||||
@@ -123,6 +123,8 @@ models/Recipe.ts
|
||||
models/RecipeBook.ts
|
||||
models/RecipeBookEntry.ts
|
||||
models/RecipeFlat.ts
|
||||
models/RecipeFromSource.ts
|
||||
models/RecipeFromSourceResponse.ts
|
||||
models/RecipeImage.ts
|
||||
models/RecipeOverview.ts
|
||||
models/RecipeShoppingUpdate.ts
|
||||
@@ -132,6 +134,14 @@ models/ShareLink.ts
|
||||
models/ShoppingListEntry.ts
|
||||
models/ShoppingListEntryBulk.ts
|
||||
models/ShoppingListRecipe.ts
|
||||
models/SourceImportFood.ts
|
||||
models/SourceImportIngredient.ts
|
||||
models/SourceImportKeyword.ts
|
||||
models/SourceImportProperty.ts
|
||||
models/SourceImportPropertyType.ts
|
||||
models/SourceImportRecipe.ts
|
||||
models/SourceImportStep.ts
|
||||
models/SourceImportUnit.ts
|
||||
models/Space.ts
|
||||
models/SpaceNavTextColorEnum.ts
|
||||
models/SpaceThemeEnum.ts
|
||||
|
||||
@@ -122,6 +122,8 @@ import type {
|
||||
RecipeBook,
|
||||
RecipeBookEntry,
|
||||
RecipeFlat,
|
||||
RecipeFromSource,
|
||||
RecipeFromSourceResponse,
|
||||
RecipeImage,
|
||||
RecipeShoppingUpdate,
|
||||
RecipeSimple,
|
||||
@@ -361,6 +363,10 @@ import {
|
||||
RecipeBookEntryToJSON,
|
||||
RecipeFlatFromJSON,
|
||||
RecipeFlatToJSON,
|
||||
RecipeFromSourceFromJSON,
|
||||
RecipeFromSourceToJSON,
|
||||
RecipeFromSourceResponseFromJSON,
|
||||
RecipeFromSourceResponseToJSON,
|
||||
RecipeImageFromJSON,
|
||||
RecipeImageToJSON,
|
||||
RecipeShoppingUpdateFromJSON,
|
||||
@@ -1161,6 +1167,10 @@ export interface ApiRecipeDestroyRequest {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface ApiRecipeFromSourceCreateRequest {
|
||||
recipeFromSource?: RecipeFromSource;
|
||||
}
|
||||
|
||||
export interface ApiRecipeImageUpdateRequest {
|
||||
id: number;
|
||||
image?: string | null;
|
||||
@@ -8567,11 +8577,13 @@ export class ApiApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* function to retrieve a recipe from a given url or source string :param request: standard request with additional post parameters - url: url to use for importing recipe - data: if no url is given recipe is imported from provided source data - (optional) bookmarklet: id of bookmarklet import to use, overrides URL and data attributes :return: JsonResponse containing the parsed json and images
|
||||
*/
|
||||
async apiRecipeFromSourceCreateRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
async apiRecipeFromSourceCreateRaw(requestParameters: ApiRecipeFromSourceCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecipeFromSourceResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
@@ -8581,16 +8593,18 @@ export class ApiApi extends runtime.BaseAPI {
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: RecipeFromSourceToJSON(requestParameters['recipeFromSource']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => RecipeFromSourceResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* function to retrieve a recipe from a given url or source string :param request: standard request with additional post parameters - url: url to use for importing recipe - data: if no url is given recipe is imported from provided source data - (optional) bookmarklet: id of bookmarklet import to use, overrides URL and data attributes :return: JsonResponse containing the parsed json and images
|
||||
*/
|
||||
async apiRecipeFromSourceCreate(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
||||
await this.apiRecipeFromSourceCreateRaw(initOverrides);
|
||||
async apiRecipeFromSourceCreate(requestParameters: ApiRecipeFromSourceCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecipeFromSourceResponse> {
|
||||
const response = await this.apiRecipeFromSourceCreateRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
|
||||
export interface OpenapiRetrieveRequest {
|
||||
format?: OpenapiRetrieveFormatEnum;
|
||||
lang?: OpenapiRetrieveLangEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class OpenapiApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json
|
||||
*/
|
||||
async openapiRetrieveRaw(requestParameters: OpenapiRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: any; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.format !== undefined) {
|
||||
queryParameters['format'] = requestParameters.format;
|
||||
}
|
||||
|
||||
if (requestParameters.lang !== undefined) {
|
||||
queryParameters['lang'] = requestParameters.lang;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
|
||||
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
||||
}
|
||||
const response = await this.request({
|
||||
path: `/openapi/`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* OpenApi3 schema for this API. Format can be selected via content negotiation. - YAML: application/vnd.oai.openapi - JSON: application/vnd.oai.openapi+json
|
||||
*/
|
||||
async openapiRetrieve(requestParameters: OpenapiRetrieveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> {
|
||||
const response = await this.openapiRetrieveRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenapiRetrieveFormatEnum = {
|
||||
Json: 'json',
|
||||
Yaml: 'yaml'
|
||||
} as const;
|
||||
export type OpenapiRetrieveFormatEnum = typeof OpenapiRetrieveFormatEnum[keyof typeof OpenapiRetrieveFormatEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenapiRetrieveLangEnum = {
|
||||
Bg: 'bg',
|
||||
Ca: 'ca',
|
||||
Cs: 'cs',
|
||||
Da: 'da',
|
||||
De: 'de',
|
||||
En: 'en',
|
||||
Es: 'es',
|
||||
Fr: 'fr',
|
||||
Hu: 'hu',
|
||||
Hy: 'hy',
|
||||
It: 'it',
|
||||
Lv: 'lv',
|
||||
Nb: 'nb',
|
||||
Nl: 'nl',
|
||||
Pl: 'pl',
|
||||
Ru: 'ru',
|
||||
Sv: 'sv'
|
||||
} as const;
|
||||
export type OpenapiRetrieveLangEnum = typeof OpenapiRetrieveLangEnum[keyof typeof OpenapiRetrieveLangEnum];
|
||||
@@ -1,77 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AccessTokenRequest
|
||||
*/
|
||||
export interface AccessTokenRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
expires: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
scope?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AccessTokenRequest interface.
|
||||
*/
|
||||
export function instanceOfAccessTokenRequest(value: object): boolean {
|
||||
if (!('expires' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AccessTokenRequestFromJSON(json: any): AccessTokenRequest {
|
||||
return AccessTokenRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AccessTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessTokenRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': (new Date(json['expires'])),
|
||||
'scope': json['scope'] == null ? undefined : json['scope'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AccessTokenRequestToJSON(value?: AccessTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': ((value['expires']).toISOString()),
|
||||
'scope': value['scope'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AuthTokenRequest
|
||||
*/
|
||||
export interface AuthTokenRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthTokenRequest
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthTokenRequest
|
||||
*/
|
||||
password: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AuthTokenRequest interface.
|
||||
*/
|
||||
export function instanceOfAuthTokenRequest(value: object): boolean {
|
||||
if (!('username' in value)) return false;
|
||||
if (!('password' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AuthTokenRequestFromJSON(json: any): AuthTokenRequest {
|
||||
return AuthTokenRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AuthTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthTokenRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'username': json['username'],
|
||||
'password': json['password'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AuthTokenRequestToJSON(value?: AuthTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'username': value['username'],
|
||||
'password': value['password'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AutoMealPlanRequest
|
||||
*/
|
||||
export interface AutoMealPlanRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
startDate: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
endDate: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
mealTypeId: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<any>}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
keywordIds: Array<any>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
servings: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
addshopping: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AutoMealPlanRequest interface.
|
||||
*/
|
||||
export function instanceOfAutoMealPlanRequest(value: object): boolean {
|
||||
if (!('startDate' in value)) return false;
|
||||
if (!('endDate' in value)) return false;
|
||||
if (!('mealTypeId' in value)) return false;
|
||||
if (!('keywordIds' in value)) return false;
|
||||
if (!('servings' in value)) return false;
|
||||
if (!('addshopping' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AutoMealPlanRequestFromJSON(json: any): AutoMealPlanRequest {
|
||||
return AutoMealPlanRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AutoMealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutoMealPlanRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'startDate': (new Date(json['start_date'])),
|
||||
'endDate': (new Date(json['end_date'])),
|
||||
'mealTypeId': json['meal_type_id'],
|
||||
'keywordIds': json['keyword_ids'],
|
||||
'servings': json['servings'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'addshopping': json['addshopping'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AutoMealPlanRequestToJSON(value?: AutoMealPlanRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'start_date': ((value['startDate']).toISOString().substring(0,10)),
|
||||
'end_date': ((value['endDate']).toISOString().substring(0,10)),
|
||||
'meal_type_id': value['mealTypeId'],
|
||||
'keyword_ids': value['keywordIds'],
|
||||
'servings': value['servings'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'addshopping': value['addshopping'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { TypeEnum } from './TypeEnum';
|
||||
import {
|
||||
TypeEnumFromJSON,
|
||||
TypeEnumFromJSONTyped,
|
||||
TypeEnumToJSON,
|
||||
} from './TypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AutomationRequest
|
||||
*/
|
||||
export interface AutomationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {TypeEnum}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
type: TypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param1?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param2?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param3?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AutomationRequest interface.
|
||||
*/
|
||||
export function instanceOfAutomationRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AutomationRequestFromJSON(json: any): AutomationRequest {
|
||||
return AutomationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': TypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
'param2': json['param_2'] == null ? undefined : json['param_2'],
|
||||
'param3': json['param_3'] == null ? undefined : json['param_3'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'disabled': json['disabled'] == null ? undefined : json['disabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AutomationRequestToJSON(value?: AutomationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': TypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
'param_2': value['param2'],
|
||||
'param_3': value['param3'],
|
||||
'order': value['order'],
|
||||
'disabled': value['disabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const BlankEnum = {
|
||||
Empty: ''
|
||||
} as const;
|
||||
export type BlankEnum = typeof BlankEnum[keyof typeof BlankEnum];
|
||||
|
||||
|
||||
export function BlankEnumFromJSON(json: any): BlankEnum {
|
||||
return BlankEnumFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function BlankEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlankEnum {
|
||||
return json as BlankEnum;
|
||||
}
|
||||
|
||||
export function BlankEnumToJSON(value?: BlankEnum | null): any {
|
||||
return value as any;
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface BookmarkletImportRequest
|
||||
*/
|
||||
export interface BookmarkletImportRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
html: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the BookmarkletImportRequest interface.
|
||||
*/
|
||||
export function instanceOfBookmarkletImportRequest(value: object): boolean {
|
||||
if (!('html' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestFromJSON(json: any): BookmarkletImportRequest {
|
||||
return BookmarkletImportRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BookmarkletImportRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'html': json['html'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestToJSON(value?: BookmarkletImportRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value['url'],
|
||||
'html': value['html'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ConnectorConfigConfigRequest
|
||||
*/
|
||||
export interface ConnectorConfigConfigRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
todoEntity?: string;
|
||||
/**
|
||||
* Is Connector Enabled
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryCreatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryUpdatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryDeletedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ConnectorConfigConfigRequest interface.
|
||||
*/
|
||||
export function instanceOfConnectorConfigConfigRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestFromJSON(json: any): ConnectorConfigConfigRequest {
|
||||
return ConnectorConfigConfigRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectorConfigConfigRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'],
|
||||
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
||||
'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_enabled'],
|
||||
'onShoppingListEntryUpdatedEnabled': json['on_shopping_list_entry_updated_enabled'] == null ? undefined : json['on_shopping_list_entry_updated_enabled'],
|
||||
'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestToJSON(value?: ConnectorConfigConfigRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'url': value['url'],
|
||||
'token': value['token'],
|
||||
'todo_entity': value['todoEntity'],
|
||||
'enabled': value['enabled'],
|
||||
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
|
||||
'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'],
|
||||
'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CookLogCreatedBy
|
||||
*/
|
||||
export interface CookLogCreatedBy {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
* Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly username?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
firstName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
lastName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly displayName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CookLogCreatedBy interface.
|
||||
*/
|
||||
export function instanceOfCookLogCreatedBy(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function CookLogCreatedByFromJSON(json: any): CookLogCreatedBy {
|
||||
return CookLogCreatedByFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CookLogCreatedByFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLogCreatedBy {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'username': !exists(json, 'username') ? undefined : json['username'],
|
||||
'firstName': !exists(json, 'first_name') ? undefined : json['first_name'],
|
||||
'lastName': !exists(json, 'last_name') ? undefined : json['last_name'],
|
||||
'displayName': !exists(json, 'display_name') ? undefined : json['display_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CookLogCreatedByToJSON(value?: CookLogCreatedBy | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'first_name': value.firstName,
|
||||
'last_name': value.lastName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CookLogRequest
|
||||
*/
|
||||
export interface CookLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
recipe: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
rating?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CookLogRequest interface.
|
||||
*/
|
||||
export function instanceOfCookLogRequest(value: object): boolean {
|
||||
if (!('recipe' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function CookLogRequestFromJSON(json: any): CookLogRequest {
|
||||
return CookLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CookLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': json['recipe'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'rating': json['rating'] == null ? undefined : json['rating'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CookLogRequestToJSON(value?: CookLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value['recipe'],
|
||||
'servings': value['servings'],
|
||||
'rating': value['rating'],
|
||||
'comment': value['comment'],
|
||||
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface CustomFilterRequest
|
||||
*/
|
||||
export interface CustomFilterRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
search: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CustomFilterRequest interface.
|
||||
*/
|
||||
export function instanceOfCustomFilterRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
if (!('search' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function CustomFilterRequestFromJSON(json: any): CustomFilterRequest {
|
||||
return CustomFilterRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CustomFilterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilterRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'search': json['search'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CustomFilterRequestToJSON(value?: CustomFilterRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'search': value['search'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CustomFilterSharedInner
|
||||
*/
|
||||
export interface CustomFilterSharedInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
* Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
|
||||
* @type {string}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
readonly username?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
firstName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
lastName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
readonly displayName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CustomFilterSharedInner interface.
|
||||
*/
|
||||
export function instanceOfCustomFilterSharedInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function CustomFilterSharedInnerFromJSON(json: any): CustomFilterSharedInner {
|
||||
return CustomFilterSharedInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CustomFilterSharedInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilterSharedInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'username': !exists(json, 'username') ? undefined : json['username'],
|
||||
'firstName': !exists(json, 'first_name') ? undefined : json['first_name'],
|
||||
'lastName': !exists(json, 'last_name') ? undefined : json['last_name'],
|
||||
'displayName': !exists(json, 'display_name') ? undefined : json['display_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CustomFilterSharedInnerToJSON(value?: CustomFilterSharedInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'first_name': value.firstName,
|
||||
'last_name': value.lastName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ExportLogRequest
|
||||
*/
|
||||
export interface ExportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
exportedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
cacheDuration?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
possiblyNotExpired?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ExportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfExportLogRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ExportLogRequestFromJSON(json: any): ExportLogRequest {
|
||||
return ExportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ExportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'],
|
||||
'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'],
|
||||
'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ExportLogRequestToJSON(value?: ExportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'exported_recipes': value['exportedRecipes'],
|
||||
'cache_duration': value['cacheDuration'],
|
||||
'possibly_not_expired': value['possiblyNotExpired'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface FoodInheritFieldRequest
|
||||
*/
|
||||
export interface FoodInheritFieldRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
field?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodInheritFieldRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodInheritFieldRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestFromJSON(json: any): FoodInheritFieldRequest {
|
||||
return FoodInheritFieldRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodInheritFieldRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'field': json['field'] == null ? undefined : json['field'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestToJSON(value?: FoodInheritFieldRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'field': value['field'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodInheritFieldsInner
|
||||
*/
|
||||
export interface FoodInheritFieldsInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodInheritFieldsInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldsInner
|
||||
*/
|
||||
name?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldsInner
|
||||
*/
|
||||
field?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodInheritFieldsInner interface.
|
||||
*/
|
||||
export function instanceOfFoodInheritFieldsInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodInheritFieldsInnerFromJSON(json: any): FoodInheritFieldsInner {
|
||||
return FoodInheritFieldsInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodInheritFieldsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodInheritFieldsInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
||||
'field': !exists(json, 'field') ? undefined : json['field'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodInheritFieldsInnerToJSON(value?: FoodInheritFieldsInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'field': value.field,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodPropertiesFoodUnit
|
||||
*/
|
||||
export interface FoodPropertiesFoodUnit {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
pluralName?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
baseUnit?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
openDataSlug?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodPropertiesFoodUnit interface.
|
||||
*/
|
||||
export function instanceOfFoodPropertiesFoodUnit(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodPropertiesFoodUnitFromJSON(json: any): FoodPropertiesFoodUnit {
|
||||
return FoodPropertiesFoodUnitFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodPropertiesFoodUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesFoodUnit {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'],
|
||||
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodPropertiesFoodUnitToJSON(value?: FoodPropertiesFoodUnit | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'description': value.description,
|
||||
'base_unit': value.baseUnit,
|
||||
'open_data_slug': value.openDataSlug,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { FoodPropertiesInnerPropertyType } from './FoodPropertiesInnerPropertyType';
|
||||
import {
|
||||
FoodPropertiesInnerPropertyTypeFromJSON,
|
||||
FoodPropertiesInnerPropertyTypeFromJSONTyped,
|
||||
FoodPropertiesInnerPropertyTypeToJSON,
|
||||
} from './FoodPropertiesInnerPropertyType';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodPropertiesInner
|
||||
*/
|
||||
export interface FoodPropertiesInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInner
|
||||
*/
|
||||
propertyAmount: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {FoodPropertiesInnerPropertyType}
|
||||
* @memberof FoodPropertiesInner
|
||||
*/
|
||||
propertyType: FoodPropertiesInnerPropertyType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodPropertiesInner interface.
|
||||
*/
|
||||
export function instanceOfFoodPropertiesInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "propertyAmount" in value;
|
||||
isInstance = isInstance && "propertyType" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerFromJSON(json: any): FoodPropertiesInner {
|
||||
return FoodPropertiesInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'propertyAmount': json['property_amount'],
|
||||
'propertyType': FoodPropertiesInnerPropertyTypeFromJSON(json['property_type']),
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerToJSON(value?: FoodPropertiesInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'property_amount': value.propertyAmount,
|
||||
'property_type': FoodPropertiesInnerPropertyTypeToJSON(value.propertyType),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
export interface FoodPropertiesInnerPropertyType {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
unit?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
openDataSlug?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
fdcId?: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodPropertiesInnerPropertyType interface.
|
||||
*/
|
||||
export function instanceOfFoodPropertiesInnerPropertyType(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerPropertyTypeFromJSON(json: any): FoodPropertiesInnerPropertyType {
|
||||
return FoodPropertiesInnerPropertyTypeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerPropertyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesInnerPropertyType {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'unit': !exists(json, 'unit') ? undefined : json['unit'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
|
||||
'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerPropertyTypeToJSON(value?: FoodPropertiesInnerPropertyType | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value.id,
|
||||
'name': value.name,
|
||||
'unit': value.unit,
|
||||
'description': value.description,
|
||||
'order': value.order,
|
||||
'open_data_slug': value.openDataSlug,
|
||||
'fdc_id': value.fdcId,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodRecipe
|
||||
*/
|
||||
export interface FoodRecipe {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRecipe
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRecipe
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRecipe
|
||||
*/
|
||||
readonly url?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodRecipe interface.
|
||||
*/
|
||||
export function instanceOfFoodRecipe(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodRecipeFromJSON(json: any): FoodRecipe {
|
||||
return FoodRecipeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodRecipe {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'url': !exists(json, 'url') ? undefined : json['url'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodRecipeToJSON(value?: FoodRecipe | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,276 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { FoodInheritFieldRequest } from './FoodInheritFieldRequest';
|
||||
import {
|
||||
FoodInheritFieldRequestFromJSON,
|
||||
FoodInheritFieldRequestFromJSONTyped,
|
||||
FoodInheritFieldRequestToJSON,
|
||||
} from './FoodInheritFieldRequest';
|
||||
import type { FoodSimpleRequest } from './FoodSimpleRequest';
|
||||
import {
|
||||
FoodSimpleRequestFromJSON,
|
||||
FoodSimpleRequestFromJSONTyped,
|
||||
FoodSimpleRequestToJSON,
|
||||
} from './FoodSimpleRequest';
|
||||
import type { PropertyRequest } from './PropertyRequest';
|
||||
import {
|
||||
PropertyRequestFromJSON,
|
||||
PropertyRequestFromJSONTyped,
|
||||
PropertyRequestToJSON,
|
||||
} from './PropertyRequest';
|
||||
import type { RecipeSimpleRequest } from './RecipeSimpleRequest';
|
||||
import {
|
||||
RecipeSimpleRequestFromJSON,
|
||||
RecipeSimpleRequestFromJSONTyped,
|
||||
RecipeSimpleRequestToJSON,
|
||||
} from './RecipeSimpleRequest';
|
||||
import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest';
|
||||
import {
|
||||
SupermarketCategoryRequestFromJSON,
|
||||
SupermarketCategoryRequestFromJSONTyped,
|
||||
SupermarketCategoryRequestToJSON,
|
||||
} from './SupermarketCategoryRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface FoodRequest
|
||||
*/
|
||||
export interface FoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeSimpleRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
recipe?: RecipeSimpleRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PropertyRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
properties?: Array<PropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
foodOnhand?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {SupermarketCategoryRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
supermarketCategory?: SupermarketCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
inheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
ignoreShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodSimpleRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substitute?: Array<FoodSimpleRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substituteSiblings?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substituteChildren?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
childInheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodRequestFromJSON(json: any): FoodRequest {
|
||||
return FoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeSimpleRequestFromJSON(json['recipe']),
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(PropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : UnitRequestFromJSON(json['properties_food_unit']),
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'foodOnhand': json['food_onhand'] == null ? undefined : json['food_onhand'],
|
||||
'supermarketCategory': json['supermarket_category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['supermarket_category']),
|
||||
'inheritFields': json['inherit_fields'] == null ? undefined : ((json['inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'ignoreShopping': json['ignore_shopping'] == null ? undefined : json['ignore_shopping'],
|
||||
'substitute': json['substitute'] == null ? undefined : ((json['substitute'] as Array<any>).map(FoodSimpleRequestFromJSON)),
|
||||
'substituteSiblings': json['substitute_siblings'] == null ? undefined : json['substitute_siblings'],
|
||||
'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'],
|
||||
'childInheritFields': json['child_inherit_fields'] == null ? undefined : ((json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodRequestToJSON(value?: FoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
'recipe': RecipeSimpleRequestToJSON(value['recipe']),
|
||||
'url': value['url'],
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(PropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': UnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'fdc_id': value['fdcId'],
|
||||
'food_onhand': value['foodOnhand'],
|
||||
'supermarket_category': SupermarketCategoryRequestToJSON(value['supermarketCategory']),
|
||||
'inherit_fields': value['inheritFields'] == null ? undefined : ((value['inheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'ignore_shopping': value['ignoreShopping'],
|
||||
'substitute': value['substitute'] == null ? undefined : ((value['substitute'] as Array<any>).map(FoodSimpleRequestToJSON)),
|
||||
'substitute_siblings': value['substituteSiblings'],
|
||||
'substitute_children': value['substituteChildren'],
|
||||
'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import type { BlankEnum } from './BlankEnum';
|
||||
import {
|
||||
instanceOfBlankEnum,
|
||||
BlankEnumFromJSON,
|
||||
BlankEnumFromJSONTyped,
|
||||
BlankEnumToJSON,
|
||||
} from './BlankEnum';
|
||||
import type { DeleteEnum } from './DeleteEnum';
|
||||
import {
|
||||
instanceOfDeleteEnum,
|
||||
DeleteEnumFromJSON,
|
||||
DeleteEnumFromJSONTyped,
|
||||
DeleteEnumToJSON,
|
||||
} from './DeleteEnum';
|
||||
|
||||
/**
|
||||
* @type FoodShoppingUpdateDelete
|
||||
* When set to true will delete all food from active shopping lists.
|
||||
*
|
||||
* * `true` - true
|
||||
* @export
|
||||
*/
|
||||
export type FoodShoppingUpdateDelete = BlankEnum | DeleteEnum;
|
||||
|
||||
export function FoodShoppingUpdateDeleteFromJSON(json: any): FoodShoppingUpdateDelete {
|
||||
return FoodShoppingUpdateDeleteFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateDeleteFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdateDelete {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return { ...BlankEnumFromJSONTyped(json, true), ...DeleteEnumFromJSONTyped(json, true) };
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateDeleteToJSON(value?: FoodShoppingUpdateDelete | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (instanceOfBlankEnum(value)) {
|
||||
return BlankEnumToJSON(value as BlankEnum);
|
||||
}
|
||||
if (instanceOfDeleteEnum(value)) {
|
||||
return DeleteEnumToJSON(value as DeleteEnum);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { DeleteEnum } from './DeleteEnum';
|
||||
import {
|
||||
DeleteEnumFromJSON,
|
||||
DeleteEnumFromJSONTyped,
|
||||
DeleteEnumToJSON,
|
||||
} from './DeleteEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodShoppingUpdateRequest
|
||||
*/
|
||||
export interface FoodShoppingUpdateRequest {
|
||||
/**
|
||||
* Amount of food to add to the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
amount?: number;
|
||||
/**
|
||||
* ID of unit to use for the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
unit?: number;
|
||||
/**
|
||||
* When set to true will delete all food from active shopping lists.
|
||||
*
|
||||
* * `true` - true
|
||||
* @type {DeleteEnum}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
_delete: DeleteEnum | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodShoppingUpdateRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodShoppingUpdateRequest(value: object): boolean {
|
||||
if (!('_delete' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestFromJSON(json: any): FoodShoppingUpdateRequest {
|
||||
return FoodShoppingUpdateRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdateRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'_delete': DeleteEnumFromJSON(json['delete']),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestToJSON(value?: FoodShoppingUpdateRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': value['amount'],
|
||||
'unit': value['unit'],
|
||||
'delete': DeleteEnumToJSON(value['_delete']),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodSimpleRequest
|
||||
*/
|
||||
export interface FoodSimpleRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodSimpleRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodSimpleRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestFromJSON(json: any): FoodSimpleRequest {
|
||||
return FoodSimpleRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSimpleRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestToJSON(value?: FoodSimpleRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodSubstituteInner
|
||||
*/
|
||||
export interface FoodSubstituteInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodSubstituteInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSubstituteInner
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSubstituteInner
|
||||
*/
|
||||
pluralName?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodSubstituteInner interface.
|
||||
*/
|
||||
export function instanceOfFoodSubstituteInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodSubstituteInnerFromJSON(json: any): FoodSubstituteInner {
|
||||
return FoodSubstituteInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodSubstituteInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSubstituteInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodSubstituteInnerToJSON(value?: FoodSubstituteInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodSupermarketCategory
|
||||
*/
|
||||
export interface FoodSupermarketCategory {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodSupermarketCategory
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSupermarketCategory
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSupermarketCategory
|
||||
*/
|
||||
description?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodSupermarketCategory interface.
|
||||
*/
|
||||
export function instanceOfFoodSupermarketCategory(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodSupermarketCategoryFromJSON(json: any): FoodSupermarketCategory {
|
||||
return FoodSupermarketCategoryFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodSupermarketCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSupermarketCategory {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodSupermarketCategoryToJSON(value?: FoodSupermarketCategory | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface GroupRequest
|
||||
*/
|
||||
export interface GroupRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof GroupRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof GroupRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the GroupRequest interface.
|
||||
*/
|
||||
export function instanceOfGroupRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function GroupRequestFromJSON(json: any): GroupRequest {
|
||||
return GroupRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function GroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function GroupRequestToJSON(value?: GroupRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ImportLogKeyword
|
||||
*/
|
||||
export interface ImportLogKeyword {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly parent?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly numchild?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly updatedAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly fullName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ImportLogKeyword interface.
|
||||
*/
|
||||
export function instanceOfImportLogKeyword(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ImportLogKeywordFromJSON(json: any): ImportLogKeyword {
|
||||
return ImportLogKeywordFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ImportLogKeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLogKeyword {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'label': !exists(json, 'label') ? undefined : json['label'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'parent': !exists(json, 'parent') ? undefined : json['parent'],
|
||||
'numchild': !exists(json, 'numchild') ? undefined : json['numchild'],
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
|
||||
'fullName': !exists(json, 'full_name') ? undefined : json['full_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ImportLogKeywordToJSON(value?: ImportLogKeyword | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ImportLogRequest
|
||||
*/
|
||||
export interface ImportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
importedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ImportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfImportLogRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ImportLogRequestFromJSON(json: any): ImportLogRequest {
|
||||
return ImportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ImportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ImportLogRequestToJSON(value?: ImportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'imported_recipes': value['importedRecipes'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,281 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { FoodInheritFieldsInner } from './FoodInheritFieldsInner';
|
||||
import {
|
||||
FoodInheritFieldsInnerFromJSON,
|
||||
FoodInheritFieldsInnerFromJSONTyped,
|
||||
FoodInheritFieldsInnerToJSON,
|
||||
} from './FoodInheritFieldsInner';
|
||||
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
|
||||
import {
|
||||
FoodPropertiesFoodUnitFromJSON,
|
||||
FoodPropertiesFoodUnitFromJSONTyped,
|
||||
FoodPropertiesFoodUnitToJSON,
|
||||
} from './FoodPropertiesFoodUnit';
|
||||
import type { FoodPropertiesInner } from './FoodPropertiesInner';
|
||||
import {
|
||||
FoodPropertiesInnerFromJSON,
|
||||
FoodPropertiesInnerFromJSONTyped,
|
||||
FoodPropertiesInnerToJSON,
|
||||
} from './FoodPropertiesInner';
|
||||
import type { FoodRecipe } from './FoodRecipe';
|
||||
import {
|
||||
FoodRecipeFromJSON,
|
||||
FoodRecipeFromJSONTyped,
|
||||
FoodRecipeToJSON,
|
||||
} from './FoodRecipe';
|
||||
import type { FoodSubstituteInner } from './FoodSubstituteInner';
|
||||
import {
|
||||
FoodSubstituteInnerFromJSON,
|
||||
FoodSubstituteInnerFromJSONTyped,
|
||||
FoodSubstituteInnerToJSON,
|
||||
} from './FoodSubstituteInner';
|
||||
import type { FoodSupermarketCategory } from './FoodSupermarketCategory';
|
||||
import {
|
||||
FoodSupermarketCategoryFromJSON,
|
||||
FoodSupermarketCategoryFromJSONTyped,
|
||||
FoodSupermarketCategoryToJSON,
|
||||
} from './FoodSupermarketCategory';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface IngredientFood
|
||||
*/
|
||||
export interface IngredientFood {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
pluralName?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly shopping?: string;
|
||||
/**
|
||||
*
|
||||
* @type {FoodRecipe}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
recipe?: FoodRecipe | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
url?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodPropertiesInner>}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
properties?: Array<FoodPropertiesInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
propertiesFoodAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {FoodPropertiesFoodUnit}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
propertiesFoodUnit?: FoodPropertiesFoodUnit | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
fdcId?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
foodOnhand?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {FoodSupermarketCategory}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
supermarketCategory?: FoodSupermarketCategory | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly parent?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly numchild?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldsInner>}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
inheritFields?: Array<FoodInheritFieldsInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly fullName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
ignoreShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodSubstituteInner>}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
substitute?: Array<FoodSubstituteInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
substituteSiblings?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
substituteChildren?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly substituteOnhand?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldsInner>}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
childInheritFields?: Array<FoodInheritFieldsInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
openDataSlug?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the IngredientFood interface.
|
||||
*/
|
||||
export function instanceOfIngredientFood(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function IngredientFoodFromJSON(json: any): IngredientFood {
|
||||
return IngredientFoodFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function IngredientFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientFood {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'shopping': !exists(json, 'shopping') ? undefined : json['shopping'],
|
||||
'recipe': !exists(json, 'recipe') ? undefined : FoodRecipeFromJSON(json['recipe']),
|
||||
'url': !exists(json, 'url') ? undefined : json['url'],
|
||||
'properties': !exists(json, 'properties') ? undefined : (json['properties'] === null ? null : (json['properties'] as Array<any>).map(FoodPropertiesInnerFromJSON)),
|
||||
'propertiesFoodAmount': !exists(json, 'properties_food_amount') ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': !exists(json, 'properties_food_unit') ? undefined : FoodPropertiesFoodUnitFromJSON(json['properties_food_unit']),
|
||||
'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'],
|
||||
'foodOnhand': !exists(json, 'food_onhand') ? undefined : json['food_onhand'],
|
||||
'supermarketCategory': !exists(json, 'supermarket_category') ? undefined : FoodSupermarketCategoryFromJSON(json['supermarket_category']),
|
||||
'parent': !exists(json, 'parent') ? undefined : json['parent'],
|
||||
'numchild': !exists(json, 'numchild') ? undefined : json['numchild'],
|
||||
'inheritFields': !exists(json, 'inherit_fields') ? undefined : (json['inherit_fields'] === null ? null : (json['inherit_fields'] as Array<any>).map(FoodInheritFieldsInnerFromJSON)),
|
||||
'fullName': !exists(json, 'full_name') ? undefined : json['full_name'],
|
||||
'ignoreShopping': !exists(json, 'ignore_shopping') ? undefined : json['ignore_shopping'],
|
||||
'substitute': !exists(json, 'substitute') ? undefined : (json['substitute'] === null ? null : (json['substitute'] as Array<any>).map(FoodSubstituteInnerFromJSON)),
|
||||
'substituteSiblings': !exists(json, 'substitute_siblings') ? undefined : json['substitute_siblings'],
|
||||
'substituteChildren': !exists(json, 'substitute_children') ? undefined : json['substitute_children'],
|
||||
'substituteOnhand': !exists(json, 'substitute_onhand') ? undefined : json['substitute_onhand'],
|
||||
'childInheritFields': !exists(json, 'child_inherit_fields') ? undefined : (json['child_inherit_fields'] === null ? null : (json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldsInnerFromJSON)),
|
||||
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
|
||||
};
|
||||
}
|
||||
|
||||
export function IngredientFoodToJSON(value?: IngredientFood | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'description': value.description,
|
||||
'recipe': FoodRecipeToJSON(value.recipe),
|
||||
'url': value.url,
|
||||
'properties': value.properties === undefined ? undefined : (value.properties === null ? null : (value.properties as Array<any>).map(FoodPropertiesInnerToJSON)),
|
||||
'properties_food_amount': value.propertiesFoodAmount,
|
||||
'properties_food_unit': FoodPropertiesFoodUnitToJSON(value.propertiesFoodUnit),
|
||||
'fdc_id': value.fdcId,
|
||||
'food_onhand': value.foodOnhand,
|
||||
'supermarket_category': FoodSupermarketCategoryToJSON(value.supermarketCategory),
|
||||
'inherit_fields': value.inheritFields === undefined ? undefined : (value.inheritFields === null ? null : (value.inheritFields as Array<any>).map(FoodInheritFieldsInnerToJSON)),
|
||||
'ignore_shopping': value.ignoreShopping,
|
||||
'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array<any>).map(FoodSubstituteInnerToJSON)),
|
||||
'substitute_siblings': value.substituteSiblings,
|
||||
'substitute_children': value.substituteChildren,
|
||||
'child_inherit_fields': value.childInheritFields === undefined ? undefined : (value.childInheritFields === null ? null : (value.childInheritFields as Array<any>).map(FoodInheritFieldsInnerToJSON)),
|
||||
'open_data_slug': value.openDataSlug,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { FoodRequest } from './FoodRequest';
|
||||
import {
|
||||
FoodRequestFromJSON,
|
||||
FoodRequestFromJSONTyped,
|
||||
FoodRequestToJSON,
|
||||
} from './FoodRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface IngredientRequest
|
||||
*/
|
||||
export interface IngredientRequest {
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
food: FoodRequest | null;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
unit: UnitRequest | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
isHeader?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
noAmount?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
originalText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
alwaysUsePluralUnit?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
alwaysUsePluralFood?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the IngredientRequest interface.
|
||||
*/
|
||||
export function instanceOfIngredientRequest(value: object): boolean {
|
||||
if (!('food' in value)) return false;
|
||||
if (!('unit' in value)) return false;
|
||||
if (!('amount' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function IngredientRequestFromJSON(json: any): IngredientRequest {
|
||||
return IngredientRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function IngredientRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodRequestFromJSON(json['food']),
|
||||
'unit': UnitRequestFromJSON(json['unit']),
|
||||
'amount': json['amount'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'isHeader': json['is_header'] == null ? undefined : json['is_header'],
|
||||
'noAmount': json['no_amount'] == null ? undefined : json['no_amount'],
|
||||
'originalText': json['original_text'] == null ? undefined : json['original_text'],
|
||||
'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'],
|
||||
'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function IngredientRequestToJSON(value?: IngredientRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'unit': UnitRequestToJSON(value['unit']),
|
||||
'amount': value['amount'],
|
||||
'note': value['note'],
|
||||
'order': value['order'],
|
||||
'is_header': value['isHeader'],
|
||||
'no_amount': value['noAmount'],
|
||||
'original_text': value['originalText'],
|
||||
'always_use_plural_unit': value['alwaysUsePluralUnit'],
|
||||
'always_use_plural_food': value['alwaysUsePluralFood'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface IngredientStringRequest
|
||||
*/
|
||||
export interface IngredientStringRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientStringRequest
|
||||
*/
|
||||
text: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the IngredientStringRequest interface.
|
||||
*/
|
||||
export function instanceOfIngredientStringRequest(value: object): boolean {
|
||||
if (!('text' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function IngredientStringRequestFromJSON(json: any): IngredientStringRequest {
|
||||
return IngredientStringRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function IngredientStringRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientStringRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'text': json['text'],
|
||||
};
|
||||
}
|
||||
|
||||
export function IngredientStringRequestToJSON(value?: IngredientStringRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'text': value['text'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface InviteLinkGroup
|
||||
*/
|
||||
export interface InviteLinkGroup {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLinkGroup
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLinkGroup
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the InviteLinkGroup interface.
|
||||
*/
|
||||
export function instanceOfInviteLinkGroup(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function InviteLinkGroupFromJSON(json: any): InviteLinkGroup {
|
||||
return InviteLinkGroupFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function InviteLinkGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLinkGroup {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function InviteLinkGroupToJSON(value?: InviteLinkGroup | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { GroupRequest } from './GroupRequest';
|
||||
import {
|
||||
GroupRequestFromJSON,
|
||||
GroupRequestFromJSONTyped,
|
||||
GroupRequestToJSON,
|
||||
} from './GroupRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface InviteLinkRequest
|
||||
*/
|
||||
export interface InviteLinkRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {GroupRequest}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
group: GroupRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
validUntil?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
usedBy?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
reusable?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
internalNote?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the InviteLinkRequest interface.
|
||||
*/
|
||||
export function instanceOfInviteLinkRequest(value: object): boolean {
|
||||
if (!('group' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function InviteLinkRequestFromJSON(json: any): InviteLinkRequest {
|
||||
return InviteLinkRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function InviteLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLinkRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': json['email'] == null ? undefined : json['email'],
|
||||
'group': GroupRequestFromJSON(json['group']),
|
||||
'validUntil': json['valid_until'] == null ? undefined : (new Date(json['valid_until'])),
|
||||
'usedBy': json['used_by'] == null ? undefined : json['used_by'],
|
||||
'reusable': json['reusable'] == null ? undefined : json['reusable'],
|
||||
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function InviteLinkRequestToJSON(value?: InviteLinkRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': value['email'],
|
||||
'group': GroupRequestToJSON(value['group']),
|
||||
'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)),
|
||||
'used_by': value['usedBy'],
|
||||
'reusable': value['reusable'],
|
||||
'internal_note': value['internalNote'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface KeywordRequest
|
||||
*/
|
||||
export interface KeywordRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the KeywordRequest interface.
|
||||
*/
|
||||
export function instanceOfKeywordRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function KeywordRequestFromJSON(json: any): KeywordRequest {
|
||||
return KeywordRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function KeywordRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeywordRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function KeywordRequestToJSON(value?: KeywordRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Automation } from './Automation';
|
||||
import {
|
||||
AutomationFromJSON,
|
||||
AutomationFromJSONTyped,
|
||||
AutomationToJSON,
|
||||
} from './Automation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListAutomations200Response
|
||||
*/
|
||||
export interface ListAutomations200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListAutomations200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListAutomations200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListAutomations200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Automation>}
|
||||
* @memberof ListAutomations200Response
|
||||
*/
|
||||
results?: Array<Automation>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListAutomations200Response interface.
|
||||
*/
|
||||
export function instanceOfListAutomations200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListAutomations200ResponseFromJSON(json: any): ListAutomations200Response {
|
||||
return ListAutomations200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListAutomations200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAutomations200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(AutomationFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListAutomations200ResponseToJSON(value?: ListAutomations200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(AutomationToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CookLog } from './CookLog';
|
||||
import {
|
||||
CookLogFromJSON,
|
||||
CookLogFromJSONTyped,
|
||||
CookLogToJSON,
|
||||
} from './CookLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListCookLogs200Response
|
||||
*/
|
||||
export interface ListCookLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListCookLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListCookLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListCookLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<CookLog>}
|
||||
* @memberof ListCookLogs200Response
|
||||
*/
|
||||
results?: Array<CookLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListCookLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListCookLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListCookLogs200ResponseFromJSON(json: any): ListCookLogs200Response {
|
||||
return ListCookLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListCookLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListCookLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(CookLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListCookLogs200ResponseToJSON(value?: ListCookLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(CookLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CustomFilter } from './CustomFilter';
|
||||
import {
|
||||
CustomFilterFromJSON,
|
||||
CustomFilterFromJSONTyped,
|
||||
CustomFilterToJSON,
|
||||
} from './CustomFilter';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListCustomFilters200Response
|
||||
*/
|
||||
export interface ListCustomFilters200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListCustomFilters200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListCustomFilters200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListCustomFilters200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<CustomFilter>}
|
||||
* @memberof ListCustomFilters200Response
|
||||
*/
|
||||
results?: Array<CustomFilter>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListCustomFilters200Response interface.
|
||||
*/
|
||||
export function instanceOfListCustomFilters200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListCustomFilters200ResponseFromJSON(json: any): ListCustomFilters200Response {
|
||||
return ListCustomFilters200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListCustomFilters200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListCustomFilters200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(CustomFilterFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListCustomFilters200ResponseToJSON(value?: ListCustomFilters200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(CustomFilterToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { ExportLog } from './ExportLog';
|
||||
import {
|
||||
ExportLogFromJSON,
|
||||
ExportLogFromJSONTyped,
|
||||
ExportLogToJSON,
|
||||
} from './ExportLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListExportLogs200Response
|
||||
*/
|
||||
export interface ListExportLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListExportLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListExportLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListExportLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ExportLog>}
|
||||
* @memberof ListExportLogs200Response
|
||||
*/
|
||||
results?: Array<ExportLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListExportLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListExportLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListExportLogs200ResponseFromJSON(json: any): ListExportLogs200Response {
|
||||
return ListExportLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListExportLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListExportLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(ExportLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListExportLogs200ResponseToJSON(value?: ListExportLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(ExportLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Food } from './Food';
|
||||
import {
|
||||
FoodFromJSON,
|
||||
FoodFromJSONTyped,
|
||||
FoodToJSON,
|
||||
} from './Food';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListFoods200Response
|
||||
*/
|
||||
export interface ListFoods200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListFoods200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListFoods200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListFoods200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Food>}
|
||||
* @memberof ListFoods200Response
|
||||
*/
|
||||
results?: Array<Food>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListFoods200Response interface.
|
||||
*/
|
||||
export function instanceOfListFoods200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListFoods200ResponseFromJSON(json: any): ListFoods200Response {
|
||||
return ListFoods200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListFoods200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFoods200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(FoodFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListFoods200ResponseToJSON(value?: ListFoods200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(FoodToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { ImportLog } from './ImportLog';
|
||||
import {
|
||||
ImportLogFromJSON,
|
||||
ImportLogFromJSONTyped,
|
||||
ImportLogToJSON,
|
||||
} from './ImportLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListImportLogs200Response
|
||||
*/
|
||||
export interface ListImportLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListImportLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListImportLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListImportLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ImportLog>}
|
||||
* @memberof ListImportLogs200Response
|
||||
*/
|
||||
results?: Array<ImportLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListImportLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListImportLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListImportLogs200ResponseFromJSON(json: any): ListImportLogs200Response {
|
||||
return ListImportLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListImportLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListImportLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(ImportLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListImportLogs200ResponseToJSON(value?: ListImportLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(ImportLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Ingredient } from './Ingredient';
|
||||
import {
|
||||
IngredientFromJSON,
|
||||
IngredientFromJSONTyped,
|
||||
IngredientToJSON,
|
||||
} from './Ingredient';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListIngredients200Response
|
||||
*/
|
||||
export interface ListIngredients200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListIngredients200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListIngredients200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListIngredients200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Ingredient>}
|
||||
* @memberof ListIngredients200Response
|
||||
*/
|
||||
results?: Array<Ingredient>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListIngredients200Response interface.
|
||||
*/
|
||||
export function instanceOfListIngredients200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListIngredients200ResponseFromJSON(json: any): ListIngredients200Response {
|
||||
return ListIngredients200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListIngredients200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListIngredients200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(IngredientFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListIngredients200ResponseToJSON(value?: ListIngredients200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(IngredientToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Keyword } from './Keyword';
|
||||
import {
|
||||
KeywordFromJSON,
|
||||
KeywordFromJSONTyped,
|
||||
KeywordToJSON,
|
||||
} from './Keyword';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListKeywords200Response
|
||||
*/
|
||||
export interface ListKeywords200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListKeywords200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListKeywords200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListKeywords200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Keyword>}
|
||||
* @memberof ListKeywords200Response
|
||||
*/
|
||||
results?: Array<Keyword>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListKeywords200Response interface.
|
||||
*/
|
||||
export function instanceOfListKeywords200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListKeywords200ResponseFromJSON(json: any): ListKeywords200Response {
|
||||
return ListKeywords200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListKeywords200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListKeywords200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(KeywordFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListKeywords200ResponseToJSON(value?: ListKeywords200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(KeywordToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { RecipeOverview } from './RecipeOverview';
|
||||
import {
|
||||
RecipeOverviewFromJSON,
|
||||
RecipeOverviewFromJSONTyped,
|
||||
RecipeOverviewToJSON,
|
||||
} from './RecipeOverview';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListRecipes200Response
|
||||
*/
|
||||
export interface ListRecipes200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListRecipes200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListRecipes200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListRecipes200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<RecipeOverview>}
|
||||
* @memberof ListRecipes200Response
|
||||
*/
|
||||
results?: Array<RecipeOverview>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListRecipes200Response interface.
|
||||
*/
|
||||
export function instanceOfListRecipes200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListRecipes200ResponseFromJSON(json: any): ListRecipes200Response {
|
||||
return ListRecipes200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListRecipes200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListRecipes200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(RecipeOverviewFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListRecipes200ResponseToJSON(value?: ListRecipes200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(RecipeOverviewToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Step } from './Step';
|
||||
import {
|
||||
StepFromJSON,
|
||||
StepFromJSONTyped,
|
||||
StepToJSON,
|
||||
} from './Step';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListSteps200Response
|
||||
*/
|
||||
export interface ListSteps200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListSteps200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSteps200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSteps200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Step>}
|
||||
* @memberof ListSteps200Response
|
||||
*/
|
||||
results?: Array<Step>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListSteps200Response interface.
|
||||
*/
|
||||
export function instanceOfListSteps200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListSteps200ResponseFromJSON(json: any): ListSteps200Response {
|
||||
return ListSteps200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListSteps200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSteps200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(StepFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListSteps200ResponseToJSON(value?: ListSteps200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(StepToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { SupermarketCategoryRelation } from './SupermarketCategoryRelation';
|
||||
import {
|
||||
SupermarketCategoryRelationFromJSON,
|
||||
SupermarketCategoryRelationFromJSONTyped,
|
||||
SupermarketCategoryRelationToJSON,
|
||||
} from './SupermarketCategoryRelation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
export interface ListSupermarketCategoryRelations200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<SupermarketCategoryRelation>}
|
||||
* @memberof ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
results?: Array<SupermarketCategoryRelation>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListSupermarketCategoryRelations200Response interface.
|
||||
*/
|
||||
export function instanceOfListSupermarketCategoryRelations200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListSupermarketCategoryRelations200ResponseFromJSON(json: any): ListSupermarketCategoryRelations200Response {
|
||||
return ListSupermarketCategoryRelations200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListSupermarketCategoryRelations200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSupermarketCategoryRelations200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(SupermarketCategoryRelationFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListSupermarketCategoryRelations200ResponseToJSON(value?: ListSupermarketCategoryRelations200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(SupermarketCategoryRelationToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { SyncLog } from './SyncLog';
|
||||
import {
|
||||
SyncLogFromJSON,
|
||||
SyncLogFromJSONTyped,
|
||||
SyncLogToJSON,
|
||||
} from './SyncLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListSyncLogs200Response
|
||||
*/
|
||||
export interface ListSyncLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListSyncLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSyncLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSyncLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<SyncLog>}
|
||||
* @memberof ListSyncLogs200Response
|
||||
*/
|
||||
results?: Array<SyncLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListSyncLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListSyncLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListSyncLogs200ResponseFromJSON(json: any): ListSyncLogs200Response {
|
||||
return ListSyncLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListSyncLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSyncLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(SyncLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListSyncLogs200ResponseToJSON(value?: ListSyncLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(SyncLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Unit } from './Unit';
|
||||
import {
|
||||
UnitFromJSON,
|
||||
UnitFromJSONTyped,
|
||||
UnitToJSON,
|
||||
} from './Unit';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListUnits200Response
|
||||
*/
|
||||
export interface ListUnits200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListUnits200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListUnits200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListUnits200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Unit>}
|
||||
* @memberof ListUnits200Response
|
||||
*/
|
||||
results?: Array<Unit>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListUnits200Response interface.
|
||||
*/
|
||||
export function instanceOfListUnits200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListUnits200ResponseFromJSON(json: any): ListUnits200Response {
|
||||
return ListUnits200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListUnits200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListUnits200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(UnitFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListUnits200ResponseToJSON(value?: ListUnits200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(UnitToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { UserSpace } from './UserSpace';
|
||||
import {
|
||||
UserSpaceFromJSON,
|
||||
UserSpaceFromJSONTyped,
|
||||
UserSpaceToJSON,
|
||||
} from './UserSpace';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListUserSpaces200Response
|
||||
*/
|
||||
export interface ListUserSpaces200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListUserSpaces200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListUserSpaces200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListUserSpaces200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserSpace>}
|
||||
* @memberof ListUserSpaces200Response
|
||||
*/
|
||||
results?: Array<UserSpace>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListUserSpaces200Response interface.
|
||||
*/
|
||||
export function instanceOfListUserSpaces200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListUserSpaces200ResponseFromJSON(json: any): ListUserSpaces200Response {
|
||||
return ListUserSpaces200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListUserSpaces200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListUserSpaces200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(UserSpaceFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListUserSpaces200ResponseToJSON(value?: ListUserSpaces200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(UserSpaceToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { ViewLog } from './ViewLog';
|
||||
import {
|
||||
ViewLogFromJSON,
|
||||
ViewLogFromJSONTyped,
|
||||
ViewLogToJSON,
|
||||
} from './ViewLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListViewLogs200Response
|
||||
*/
|
||||
export interface ListViewLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListViewLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListViewLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListViewLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ViewLog>}
|
||||
* @memberof ListViewLogs200Response
|
||||
*/
|
||||
results?: Array<ViewLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListViewLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListViewLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListViewLogs200ResponseFromJSON(json: any): ListViewLogs200Response {
|
||||
return ListViewLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListViewLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListViewLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(ViewLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListViewLogs200ResponseToJSON(value?: ListViewLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(ViewLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MealPlanMealType
|
||||
*/
|
||||
export interface MealPlanMealType {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
color?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
_default?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanMealType interface.
|
||||
*/
|
||||
export function instanceOfMealPlanMealType(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function MealPlanMealTypeFromJSON(json: any): MealPlanMealType {
|
||||
return MealPlanMealTypeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanMealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanMealType {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
'color': !exists(json, 'color') ? undefined : json['color'],
|
||||
'_default': !exists(json, 'default') ? undefined : json['default'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanMealTypeToJSON(value?: MealPlanMealType | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'order': value.order,
|
||||
'color': value.color,
|
||||
'default': value._default,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { MealPlanRecipeKeywordsInner } from './MealPlanRecipeKeywordsInner';
|
||||
import {
|
||||
MealPlanRecipeKeywordsInnerFromJSON,
|
||||
MealPlanRecipeKeywordsInnerFromJSONTyped,
|
||||
MealPlanRecipeKeywordsInnerToJSON,
|
||||
} from './MealPlanRecipeKeywordsInner';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MealPlanRecipe
|
||||
*/
|
||||
export interface MealPlanRecipe {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Blob}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly image?: Blob | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<MealPlanRecipeKeywordsInner>}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
keywords: Array<MealPlanRecipeKeywordsInner>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
workingTime?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
waitingTime?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly updatedAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
internal?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
servingsText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
rating?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
lastCooked?: Date | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly _new?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly recent?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanRecipe interface.
|
||||
*/
|
||||
export function instanceOfMealPlanRecipe(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "keywords" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function MealPlanRecipeFromJSON(json: any): MealPlanRecipe {
|
||||
return MealPlanRecipeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRecipe {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'image': !exists(json, 'image') ? undefined : json['image'],
|
||||
'keywords': ((json['keywords'] as Array<any>).map(MealPlanRecipeKeywordsInnerFromJSON)),
|
||||
'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'])),
|
||||
'internal': !exists(json, 'internal') ? undefined : json['internal'],
|
||||
'servings': !exists(json, 'servings') ? undefined : json['servings'],
|
||||
'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'])),
|
||||
'_new': !exists(json, 'new') ? undefined : json['new'],
|
||||
'recent': !exists(json, 'recent') ? undefined : json['recent'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanRecipeToJSON(value?: MealPlanRecipe | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
'keywords': ((value.keywords as Array<any>).map(MealPlanRecipeKeywordsInnerToJSON)),
|
||||
'working_time': value.workingTime,
|
||||
'waiting_time': value.waitingTime,
|
||||
'internal': value.internal,
|
||||
'servings': value.servings,
|
||||
'servings_text': value.servingsText,
|
||||
'rating': value.rating,
|
||||
'last_cooked': value.lastCooked === undefined ? undefined : (value.lastCooked === null ? null : value.lastCooked.toISOString()),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MealPlanRecipeKeywordsInner
|
||||
*/
|
||||
export interface MealPlanRecipeKeywordsInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipeKeywordsInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipeKeywordsInner
|
||||
*/
|
||||
readonly label?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanRecipeKeywordsInner interface.
|
||||
*/
|
||||
export function instanceOfMealPlanRecipeKeywordsInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function MealPlanRecipeKeywordsInnerFromJSON(json: any): MealPlanRecipeKeywordsInner {
|
||||
return MealPlanRecipeKeywordsInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanRecipeKeywordsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRecipeKeywordsInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'label': !exists(json, 'label') ? undefined : json['label'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanRecipeKeywordsInnerToJSON(value?: MealPlanRecipeKeywordsInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { MealTypeRequest } from './MealTypeRequest';
|
||||
import {
|
||||
MealTypeRequestFromJSON,
|
||||
MealTypeRequestFromJSONTyped,
|
||||
MealTypeRequestToJSON,
|
||||
} from './MealTypeRequest';
|
||||
import type { RecipeOverviewRequest } from './RecipeOverviewRequest';
|
||||
import {
|
||||
RecipeOverviewRequestFromJSON,
|
||||
RecipeOverviewRequestFromJSONTyped,
|
||||
RecipeOverviewRequestToJSON,
|
||||
} from './RecipeOverviewRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface MealPlanRequest
|
||||
*/
|
||||
export interface MealPlanRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeOverviewRequest}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
recipe?: RecipeOverviewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
servings: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
fromDate: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
toDate?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {MealTypeRequest}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
mealType: MealTypeRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanRequest interface.
|
||||
*/
|
||||
export function instanceOfMealPlanRequest(value: object): boolean {
|
||||
if (!('servings' in value)) return false;
|
||||
if (!('fromDate' in value)) return false;
|
||||
if (!('mealType' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function MealPlanRequestFromJSON(json: any): MealPlanRequest {
|
||||
return MealPlanRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': json['title'] == null ? undefined : json['title'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeOverviewRequestFromJSON(json['recipe']),
|
||||
'servings': json['servings'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'fromDate': (new Date(json['from_date'])),
|
||||
'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])),
|
||||
'mealType': MealTypeRequestFromJSON(json['meal_type']),
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanRequestToJSON(value?: MealPlanRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': value['title'],
|
||||
'recipe': RecipeOverviewRequestToJSON(value['recipe']),
|
||||
'servings': value['servings'],
|
||||
'note': value['note'],
|
||||
'from_date': ((value['fromDate']).toISOString().substring(0,10)),
|
||||
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)),
|
||||
'meal_type': MealTypeRequestToJSON(value['mealType']),
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface MealTypeRequest
|
||||
*/
|
||||
export interface MealTypeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
_default?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealTypeRequest interface.
|
||||
*/
|
||||
export function instanceOfMealTypeRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function MealTypeRequestFromJSON(json: any): MealTypeRequest {
|
||||
return MealTypeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealTypeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'color': json['color'] == null ? undefined : json['color'],
|
||||
'_default': json['default'] == null ? undefined : json['default'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealTypeRequestToJSON(value?: MealTypeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'order': value['order'],
|
||||
'color': value['color'],
|
||||
'default': value['_default'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const NullEnum = {
|
||||
Null: 'null'
|
||||
} as const;
|
||||
export type NullEnum = typeof NullEnum[keyof typeof NullEnum];
|
||||
|
||||
|
||||
export function NullEnumFromJSON(json: any): NullEnum {
|
||||
return NullEnumFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function NullEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): NullEnum {
|
||||
return json as NullEnum;
|
||||
}
|
||||
|
||||
export function NullEnumToJSON(value?: NullEnum | null): any {
|
||||
return value as any;
|
||||
}
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NutritionInformationRequest
|
||||
*/
|
||||
export interface NutritionInformationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
carbohydrates: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
fats: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
proteins: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
calories: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the NutritionInformationRequest interface.
|
||||
*/
|
||||
export function instanceOfNutritionInformationRequest(value: object): boolean {
|
||||
if (!('carbohydrates' in value)) return false;
|
||||
if (!('fats' in value)) return false;
|
||||
if (!('proteins' in value)) return false;
|
||||
if (!('calories' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestFromJSON(json: any): NutritionInformationRequest {
|
||||
return NutritionInformationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NutritionInformationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'carbohydrates': json['carbohydrates'],
|
||||
'fats': json['fats'],
|
||||
'proteins': json['proteins'],
|
||||
'calories': json['calories'],
|
||||
'source': json['source'] == null ? undefined : json['source'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestToJSON(value?: NutritionInformationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'carbohydrates': value['carbohydrates'],
|
||||
'fats': value['fats'],
|
||||
'proteins': value['proteins'],
|
||||
'calories': value['calories'],
|
||||
'source': value['source'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataCategoryRequest
|
||||
*/
|
||||
export interface OpenDataCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataCategoryRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestFromJSON(json: any): OpenDataCategoryRequest {
|
||||
return OpenDataCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestToJSON(value?: OpenDataCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,230 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataConversionFoodPreferredUnitMetric } from './OpenDataConversionFoodPreferredUnitMetric';
|
||||
import {
|
||||
OpenDataConversionFoodPreferredUnitMetricFromJSON,
|
||||
OpenDataConversionFoodPreferredUnitMetricFromJSONTyped,
|
||||
OpenDataConversionFoodPreferredUnitMetricToJSON,
|
||||
} from './OpenDataConversionFoodPreferredUnitMetric';
|
||||
import type { OpenDataConversionFoodPropertiesFoodUnit } from './OpenDataConversionFoodPropertiesFoodUnit';
|
||||
import {
|
||||
OpenDataConversionFoodPropertiesFoodUnitFromJSON,
|
||||
OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped,
|
||||
OpenDataConversionFoodPropertiesFoodUnitToJSON,
|
||||
} from './OpenDataConversionFoodPropertiesFoodUnit';
|
||||
import type { OpenDataConversionFoodPropertiesInner } from './OpenDataConversionFoodPropertiesInner';
|
||||
import {
|
||||
OpenDataConversionFoodPropertiesInnerFromJSON,
|
||||
OpenDataConversionFoodPropertiesInnerFromJSONTyped,
|
||||
OpenDataConversionFoodPropertiesInnerToJSON,
|
||||
} from './OpenDataConversionFoodPropertiesInner';
|
||||
import type { OpenDataStoreCategoryToStoreInnerCategory } from './OpenDataStoreCategoryToStoreInnerCategory';
|
||||
import {
|
||||
OpenDataStoreCategoryToStoreInnerCategoryFromJSON,
|
||||
OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped,
|
||||
OpenDataStoreCategoryToStoreInnerCategoryToJSON,
|
||||
} from './OpenDataStoreCategoryToStoreInnerCategory';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFood
|
||||
*/
|
||||
export interface OpenDataConversionFood {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
pluralName: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataStoreCategoryToStoreInnerCategory}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
storeCategory: OpenDataStoreCategoryToStoreInnerCategory;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPreferredUnitMetric}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
preferredUnitMetric?: OpenDataConversionFoodPreferredUnitMetric | null;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPreferredUnitMetric}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
preferredShoppingUnitMetric?: OpenDataConversionFoodPreferredUnitMetric | null;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPreferredUnitMetric}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
preferredUnitImperial?: OpenDataConversionFoodPreferredUnitMetric | null;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPreferredUnitMetric}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
preferredShoppingUnitImperial?: OpenDataConversionFoodPreferredUnitMetric | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataConversionFoodPropertiesInner>}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
properties: Array<OpenDataConversionFoodPropertiesInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPropertiesFoodUnit}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
propertiesFoodUnit: OpenDataConversionFoodPropertiesFoodUnit;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
propertiesSource?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
fdcId: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFood interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFood(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "pluralName" in value;
|
||||
isInstance = isInstance && "storeCategory" in value;
|
||||
isInstance = isInstance && "properties" in value;
|
||||
isInstance = isInstance && "propertiesFoodUnit" in value;
|
||||
isInstance = isInstance && "fdcId" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodFromJSON(json: any): OpenDataConversionFood {
|
||||
return OpenDataConversionFoodFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFood {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'],
|
||||
'storeCategory': OpenDataStoreCategoryToStoreInnerCategoryFromJSON(json['store_category']),
|
||||
'preferredUnitMetric': !exists(json, 'preferred_unit_metric') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_unit_metric']),
|
||||
'preferredShoppingUnitMetric': !exists(json, 'preferred_shopping_unit_metric') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_shopping_unit_metric']),
|
||||
'preferredUnitImperial': !exists(json, 'preferred_unit_imperial') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_unit_imperial']),
|
||||
'preferredShoppingUnitImperial': !exists(json, 'preferred_shopping_unit_imperial') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_shopping_unit_imperial']),
|
||||
'properties': (json['properties'] === null ? null : (json['properties'] as Array<any>).map(OpenDataConversionFoodPropertiesInnerFromJSON)),
|
||||
'propertiesFoodAmount': !exists(json, 'properties_food_amount') ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': OpenDataConversionFoodPropertiesFoodUnitFromJSON(json['properties_food_unit']),
|
||||
'propertiesSource': !exists(json, 'properties_source') ? undefined : json['properties_source'],
|
||||
'fdcId': json['fdc_id'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodToJSON(value?: OpenDataConversionFood | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'store_category': OpenDataStoreCategoryToStoreInnerCategoryToJSON(value.storeCategory),
|
||||
'preferred_unit_metric': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredUnitMetric),
|
||||
'preferred_shopping_unit_metric': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredShoppingUnitMetric),
|
||||
'preferred_unit_imperial': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredUnitImperial),
|
||||
'preferred_shopping_unit_imperial': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredShoppingUnitImperial),
|
||||
'properties': (value.properties === null ? null : (value.properties as Array<any>).map(OpenDataConversionFoodPropertiesInnerToJSON)),
|
||||
'properties_food_amount': value.propertiesFoodAmount,
|
||||
'properties_food_unit': OpenDataConversionFoodPropertiesFoodUnitToJSON(value.propertiesFoodUnit),
|
||||
'properties_source': value.propertiesSource,
|
||||
'fdc_id': value.fdcId,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
export interface OpenDataConversionFoodPreferredUnitMetric {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
baseUnit?: OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
type: OpenDataConversionFoodPreferredUnitMetricTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum = {
|
||||
G: 'G',
|
||||
Kg: 'KG',
|
||||
Ml: 'ML',
|
||||
L: 'L',
|
||||
Ounce: 'OUNCE',
|
||||
Pound: 'POUND',
|
||||
FluidOunce: 'FLUID_OUNCE',
|
||||
Tsp: 'TSP',
|
||||
Tbsp: 'TBSP',
|
||||
Cup: 'CUP',
|
||||
Pint: 'PINT',
|
||||
Quart: 'QUART',
|
||||
Gallon: 'GALLON',
|
||||
ImperialFluidOunce: 'IMPERIAL_FLUID_OUNCE',
|
||||
ImperialPint: 'IMPERIAL_PINT',
|
||||
ImperialQuart: 'IMPERIAL_QUART',
|
||||
ImperialGallon: 'IMPERIAL_GALLON'
|
||||
} as const;
|
||||
export type OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum = typeof OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum[keyof typeof OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenDataConversionFoodPreferredUnitMetricTypeEnum = {
|
||||
Weight: 'WEIGHT',
|
||||
Volume: 'VOLUME',
|
||||
Other: 'OTHER'
|
||||
} as const;
|
||||
export type OpenDataConversionFoodPreferredUnitMetricTypeEnum = typeof OpenDataConversionFoodPreferredUnitMetricTypeEnum[keyof typeof OpenDataConversionFoodPreferredUnitMetricTypeEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFoodPreferredUnitMetric interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFoodPreferredUnitMetric(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPreferredUnitMetricFromJSON(json: any): OpenDataConversionFoodPreferredUnitMetric {
|
||||
return OpenDataConversionFoodPreferredUnitMetricFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPreferredUnitMetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPreferredUnitMetric {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'],
|
||||
'type': json['type'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPreferredUnitMetricToJSON(value?: OpenDataConversionFoodPreferredUnitMetric | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'base_unit': value.baseUnit,
|
||||
'type': value.type,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
export interface OpenDataConversionFoodPropertiesFoodUnit {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
baseUnit?: OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
type: OpenDataConversionFoodPropertiesFoodUnitTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum = {
|
||||
G: 'G',
|
||||
Kg: 'KG',
|
||||
Ml: 'ML',
|
||||
L: 'L',
|
||||
Ounce: 'OUNCE',
|
||||
Pound: 'POUND',
|
||||
FluidOunce: 'FLUID_OUNCE',
|
||||
Tsp: 'TSP',
|
||||
Tbsp: 'TBSP',
|
||||
Cup: 'CUP',
|
||||
Pint: 'PINT',
|
||||
Quart: 'QUART',
|
||||
Gallon: 'GALLON',
|
||||
ImperialFluidOunce: 'IMPERIAL_FLUID_OUNCE',
|
||||
ImperialPint: 'IMPERIAL_PINT',
|
||||
ImperialQuart: 'IMPERIAL_QUART',
|
||||
ImperialGallon: 'IMPERIAL_GALLON'
|
||||
} as const;
|
||||
export type OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum = typeof OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum[keyof typeof OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenDataConversionFoodPropertiesFoodUnitTypeEnum = {
|
||||
Weight: 'WEIGHT',
|
||||
Volume: 'VOLUME',
|
||||
Other: 'OTHER'
|
||||
} as const;
|
||||
export type OpenDataConversionFoodPropertiesFoodUnitTypeEnum = typeof OpenDataConversionFoodPropertiesFoodUnitTypeEnum[keyof typeof OpenDataConversionFoodPropertiesFoodUnitTypeEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFoodPropertiesFoodUnit interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFoodPropertiesFoodUnit(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesFoodUnitFromJSON(json: any): OpenDataConversionFoodPropertiesFoodUnit {
|
||||
return OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesFoodUnit {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'],
|
||||
'type': json['type'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesFoodUnitToJSON(value?: OpenDataConversionFoodPropertiesFoodUnit | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'base_unit': value.baseUnit,
|
||||
'type': value.type,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataConversionFoodPropertiesInnerProperty } from './OpenDataConversionFoodPropertiesInnerProperty';
|
||||
import {
|
||||
OpenDataConversionFoodPropertiesInnerPropertyFromJSON,
|
||||
OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped,
|
||||
OpenDataConversionFoodPropertiesInnerPropertyToJSON,
|
||||
} from './OpenDataConversionFoodPropertiesInnerProperty';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFoodPropertiesInner
|
||||
*/
|
||||
export interface OpenDataConversionFoodPropertiesInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPropertiesInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPropertiesInnerProperty}
|
||||
* @memberof OpenDataConversionFoodPropertiesInner
|
||||
*/
|
||||
property: OpenDataConversionFoodPropertiesInnerProperty;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInner
|
||||
*/
|
||||
propertyAmount: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFoodPropertiesInner interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFoodPropertiesInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "property" in value;
|
||||
isInstance = isInstance && "propertyAmount" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerFromJSON(json: any): OpenDataConversionFoodPropertiesInner {
|
||||
return OpenDataConversionFoodPropertiesInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'property': OpenDataConversionFoodPropertiesInnerPropertyFromJSON(json['property']),
|
||||
'propertyAmount': json['property_amount'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerToJSON(value?: OpenDataConversionFoodPropertiesInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataConversionFoodPropertiesInnerPropertyToJSON(value.property),
|
||||
'property_amount': value.propertyAmount,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
/* 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:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
export interface OpenDataConversionFoodPropertiesInnerProperty {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
fdcId?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFoodPropertiesInnerProperty interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFoodPropertiesInnerProperty(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerPropertyFromJSON(json: any): OpenDataConversionFoodPropertiesInnerProperty {
|
||||
return OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesInnerProperty {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'unit': !exists(json, 'unit') ? undefined : json['unit'],
|
||||
'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerPropertyToJSON(value?: OpenDataConversionFoodPropertiesInnerProperty | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'unit': value.unit,
|
||||
'fdc_id': value.fdcId,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataFoodRequest } from './OpenDataFoodRequest';
|
||||
import {
|
||||
OpenDataFoodRequestFromJSON,
|
||||
OpenDataFoodRequestFromJSONTyped,
|
||||
OpenDataFoodRequestToJSON,
|
||||
} from './OpenDataFoodRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataConversionRequest
|
||||
*/
|
||||
export interface OpenDataConversionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataFoodRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
food: OpenDataFoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
baseAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
baseUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
convertedAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
convertedUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
source: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('food' in value)) return false;
|
||||
if (!('baseAmount' in value)) return false;
|
||||
if (!('baseUnit' in value)) return false;
|
||||
if (!('convertedAmount' in value)) return false;
|
||||
if (!('convertedUnit' in value)) return false;
|
||||
if (!('source' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestFromJSON(json: any): OpenDataConversionRequest {
|
||||
return OpenDataConversionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'food': OpenDataFoodRequestFromJSON(json['food']),
|
||||
'baseAmount': json['base_amount'],
|
||||
'baseUnit': OpenDataUnitRequestFromJSON(json['base_unit']),
|
||||
'convertedAmount': json['converted_amount'],
|
||||
'convertedUnit': OpenDataUnitRequestFromJSON(json['converted_unit']),
|
||||
'source': json['source'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestToJSON(value?: OpenDataConversionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'food': OpenDataFoodRequestToJSON(value['food']),
|
||||
'base_amount': value['baseAmount'],
|
||||
'base_unit': OpenDataUnitRequestToJSON(value['baseUnit']),
|
||||
'converted_amount': value['convertedAmount'],
|
||||
'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']),
|
||||
'source': value['source'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataPropertyRequest } from './OpenDataPropertyRequest';
|
||||
import {
|
||||
OpenDataPropertyRequestFromJSON,
|
||||
OpenDataPropertyRequestFromJSONTyped,
|
||||
OpenDataPropertyRequestToJSON,
|
||||
} from './OpenDataPropertyRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataFoodPropertyRequest
|
||||
*/
|
||||
export interface OpenDataFoodPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataPropertyRequest}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
property: OpenDataPropertyRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
propertyAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataFoodPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataFoodPropertyRequest(value: object): boolean {
|
||||
if (!('property' in value)) return false;
|
||||
if (!('propertyAmount' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestFromJSON(json: any): OpenDataFoodPropertyRequest {
|
||||
return OpenDataFoodPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataFoodPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataPropertyRequestFromJSON(json['property']),
|
||||
'propertyAmount': json['property_amount'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestToJSON(value?: OpenDataFoodPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataPropertyRequestToJSON(value['property']),
|
||||
'property_amount': value['propertyAmount'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,247 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataCategoryRequest } from './OpenDataCategoryRequest';
|
||||
import {
|
||||
OpenDataCategoryRequestFromJSON,
|
||||
OpenDataCategoryRequestFromJSONTyped,
|
||||
OpenDataCategoryRequestToJSON,
|
||||
} from './OpenDataCategoryRequest';
|
||||
import type { OpenDataFoodPropertyRequest } from './OpenDataFoodPropertyRequest';
|
||||
import {
|
||||
OpenDataFoodPropertyRequestFromJSON,
|
||||
OpenDataFoodPropertyRequestFromJSONTyped,
|
||||
OpenDataFoodPropertyRequestToJSON,
|
||||
} from './OpenDataFoodPropertyRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataFoodRequest
|
||||
*/
|
||||
export interface OpenDataFoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
pluralName: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategoryRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
storeCategory: OpenDataCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataFoodPropertyRequest>}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
properties: Array<OpenDataFoodPropertyRequest> | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesSource?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
fdcId: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataFoodRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataFoodRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('pluralName' in value)) return false;
|
||||
if (!('storeCategory' in value)) return false;
|
||||
if (!('properties' in value)) return false;
|
||||
if (!('propertiesFoodUnit' in value)) return false;
|
||||
if (!('fdcId' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestFromJSON(json: any): OpenDataFoodRequest {
|
||||
return OpenDataFoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataFoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'],
|
||||
'storeCategory': OpenDataCategoryRequestFromJSON(json['store_category']),
|
||||
'preferredUnitMetric': json['preferred_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_metric']),
|
||||
'preferredShoppingUnitMetric': json['preferred_shopping_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_metric']),
|
||||
'preferredUnitImperial': json['preferred_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_imperial']),
|
||||
'preferredShoppingUnitImperial': json['preferred_shopping_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_imperial']),
|
||||
'properties': (json['properties'] == null ? null : (json['properties'] as Array<any>).map(OpenDataFoodPropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': OpenDataUnitRequestFromJSON(json['properties_food_unit']),
|
||||
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
|
||||
'fdcId': json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestToJSON(value?: OpenDataFoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'store_category': OpenDataCategoryRequestToJSON(value['storeCategory']),
|
||||
'preferred_unit_metric': OpenDataUnitRequestToJSON(value['preferredUnitMetric']),
|
||||
'preferred_shopping_unit_metric': OpenDataUnitRequestToJSON(value['preferredShoppingUnitMetric']),
|
||||
'preferred_unit_imperial': OpenDataUnitRequestToJSON(value['preferredUnitImperial']),
|
||||
'preferred_shopping_unit_imperial': OpenDataUnitRequestToJSON(value['preferredShoppingUnitImperial']),
|
||||
'properties': (value['properties'] == null ? null : (value['properties'] as Array<any>).map(OpenDataFoodPropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': OpenDataUnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'properties_source': value['propertiesSource'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataPropertyRequest
|
||||
*/
|
||||
export interface OpenDataPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataPropertyRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestFromJSON(json: any): OpenDataPropertyRequest {
|
||||
return OpenDataPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestToJSON(value?: OpenDataPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'unit': value['unit'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataCategoryRequest } from './OpenDataCategoryRequest';
|
||||
import {
|
||||
OpenDataCategoryRequestFromJSON,
|
||||
OpenDataCategoryRequestFromJSONTyped,
|
||||
OpenDataCategoryRequestToJSON,
|
||||
} from './OpenDataCategoryRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataStoreCategoryRequest
|
||||
*/
|
||||
export interface OpenDataStoreCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategoryRequest}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
category: OpenDataCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
store: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataStoreCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStoreCategoryRequest(value: object): boolean {
|
||||
if (!('category' in value)) return false;
|
||||
if (!('store' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestFromJSON(json: any): OpenDataStoreCategoryRequest {
|
||||
return OpenDataStoreCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': OpenDataCategoryRequestFromJSON(json['category']),
|
||||
'store': json['store'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestToJSON(value?: OpenDataStoreCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': OpenDataCategoryRequestToJSON(value['category']),
|
||||
'store': value['store'],
|
||||
'order': value['order'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user