deleted openapi models at root of project

This commit is contained in:
smilerz
2024-04-25 07:28:02 -05:00
parent 931865b61f
commit 9e49652f80
134 changed files with 129 additions and 16475 deletions

202
.vscode/tasks.json vendored
View File

@@ -1,75 +1,131 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Migrations",
"type": "shell",
"command": "python3 manage.py migrate",
},
{
"label": "Collect Static Files",
"type": "shell",
"command": "python3 manage.py collectstatic",
"dependsOn": ["Yarn Build"],
},
{
"label": "Setup Dev Server",
"dependsOn": ["Run Migrations", "Yarn Build"],
},
{
"label": "Run Dev Server",
"type": "shell",
"dependsOn": ["Setup Dev Server"],
"command": "python3 manage.py runserver",
},
{
"label": "Yarn Install",
"type": "shell",
"command": "yarn install",
"options": {
"cwd": "${workspaceFolder}/vue"
}
},
{
"label": "Yarn Serve",
"type": "shell",
"command": "yarn serve",
"dependsOn": ["Yarn Install"],
"options": {
"cwd": "${workspaceFolder}/vue"
}
},
{
"label": "Yarn Build",
"type": "shell",
"command": "yarn build",
"dependsOn": ["Yarn Install"],
"options": {
"cwd": "${workspaceFolder}/vue"
},
"group": "build",
},
{
"label": "Setup Tests",
"dependsOn": ["Run Migrations", "Collect Static Files"],
},
{
"label": "Run all pytests",
"type": "shell",
"command": "python3 -m pytest cookbook/tests",
"dependsOn": ["Setup Tests"],
"group": "test",
},
{
"label": "Setup Documentation Dependencies",
"type": "shell",
"command": "pip install mkdocs-material mkdocs-include-markdown-plugin",
},
{
"label": "Serve Documentation",
"type": "shell",
"command": "mkdocs serve",
"dependsOn": ["Setup Documentation Dependencies"],
"version": "2.0.0",
"tasks": [
{
"label": "Run Migrations",
"type": "shell",
"command": "python3 manage.py migrate"
},
{
"label": "Collect Static Files",
"type": "shell",
"command": "python3 manage.py collectstatic",
"dependsOn": ["Yarn Build"]
},
{
"label": "Setup Dev Server",
"dependsOn": ["Run Migrations", "Yarn Build"]
},
{
"label": "Run Dev Server",
"type": "shell",
"dependsOn": ["Setup Dev Server"],
"command": "python3 manage.py runserver"
},
{
"label": "Yarn Install",
"dependsOn": ["Yarn Install - Vue", "Yarn Install - Vue3"]
},
{
"label": "Yarn Install - Vue",
"type": "shell",
"command": "yarn install --force",
"options": {
"cwd": "${workspaceFolder}/vue"
}
]
}
},
{
"label": "Yarn Install - Vue3",
"type": "shell",
"command": "yarn install --force",
"options": {
"cwd": "${workspaceFolder}/vue3"
}
},
{
"label": "Generate API",
"dependsOn": ["Generate API - Vue", "Generate API - Vue3"]
},
{
"label": "Generate API - Vue",
"type": "shell",
"command": "openapi-generator-cli generate -g typescript-axios -i http://127.0.0.1:8000/openapi/",
"options": {
"cwd": "${workspaceFolder}/vue/src/utils/openapi"
}
},
{
"label": "Generate API - Vue3",
"type": "shell",
"command": "openapi-generator-cli generate -g typescript-fetch -i http://127.0.0.1:8000/openapi/",
"options": {
"cwd": "${workspaceFolder}/vue3/src/openapi"
}
},
{
"label": "Yarn Serve",
"type": "shell",
"command": "yarn serve",
"dependsOn": ["Yarn Install - Vue"],
"options": {
"cwd": "${workspaceFolder}/vue"
}
},
{
"label": "Vite Serve",
"type": "shell",
"command": "vite",
"dependsOn": ["Yarn Install - Vue3"],
"options": {
"cwd": "${workspaceFolder}/vue3"
}
},
{
"label": "Yarn Build",
"dependsOn": ["Yarn Build - Vue", "Vite Build - Vue3"],
"group": "build"
},
{
"label": "Yarn Build - Vue",
"type": "shell",
"command": "yarn build",
"dependsOn": ["Yarn Install - Vue"],
"options": {
"cwd": "${workspaceFolder}/vue"
},
"group": "build"
},
{
"label": "Vite Build - Vue3",
"type": "shell",
"command": "vite build",
"dependsOn": ["Yarn Install - Vue3"],
"options": {
"cwd": "${workspaceFolder}/vue3"
},
"group": "build"
},
{
"label": "Setup Tests",
"dependsOn": ["Run Migrations", "Collect Static Files"]
},
{
"label": "Run all pytests",
"type": "shell",
"command": "python3 -m pytest cookbook/tests",
"dependsOn": ["Setup Tests"],
"group": "test"
},
{
"label": "Setup Documentation Dependencies",
"type": "shell",
"command": "pip install mkdocs-material mkdocs-include-markdown-plugin"
},
{
"label": "Serve Documentation",
"type": "shell",
"command": "mkdocs serve",
"dependsOn": ["Setup Documentation Dependencies"]
}
]
}

View File

@@ -1,106 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface AccessToken
*/
export interface AccessToken {
/**
*
* @type {number}
* @memberof AccessToken
*/
readonly id: number;
/**
*
* @type {string}
* @memberof AccessToken
*/
readonly token: string;
/**
*
* @type {Date}
* @memberof AccessToken
*/
expires: Date;
/**
*
* @type {string}
* @memberof AccessToken
*/
scope?: string;
/**
*
* @type {Date}
* @memberof AccessToken
*/
readonly created: Date;
/**
*
* @type {Date}
* @memberof AccessToken
*/
readonly updated: Date;
}
/**
* Check if a given object implements the AccessToken interface.
*/
export function instanceOfAccessToken(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "token" in value;
isInstance = isInstance && "expires" in value;
isInstance = isInstance && "created" in value;
isInstance = isInstance && "updated" in value;
return isInstance;
}
export function AccessTokenFromJSON(json: any): AccessToken {
return AccessTokenFromJSONTyped(json, false);
}
export function AccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessToken {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'token': json['token'],
'expires': (new Date(json['expires'])),
'scope': !exists(json, 'scope') ? undefined : json['scope'],
'created': (new Date(json['created'])),
'updated': (new Date(json['updated'])),
};
}
export function AccessTokenToJSON(value?: AccessToken | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'expires': (value.expires.toISOString()),
'scope': value.scope,
};
}

View File

@@ -1,83 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface AuthToken
*/
export interface AuthToken {
/**
*
* @type {string}
* @memberof AuthToken
*/
username: string;
/**
*
* @type {string}
* @memberof AuthToken
*/
password: string;
/**
*
* @type {string}
* @memberof AuthToken
*/
readonly token: string;
}
/**
* Check if a given object implements the AuthToken interface.
*/
export function instanceOfAuthToken(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "username" in value;
isInstance = isInstance && "password" in value;
isInstance = isInstance && "token" in value;
return isInstance;
}
export function AuthTokenFromJSON(json: any): AuthToken {
return AuthTokenFromJSONTyped(json, false);
}
export function AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthToken {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'username': json['username'],
'password': json['password'],
'token': json['token'],
};
}
export function AuthTokenToJSON(value?: AuthToken | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'username': value.username,
'password': value.password,
};
}

View File

@@ -1,126 +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 { exists, mapValues } from '../runtime';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
*
* @export
* @interface AutoMealPlan
*/
export interface AutoMealPlan {
/**
*
* @type {Date}
* @memberof AutoMealPlan
*/
startDate: Date;
/**
*
* @type {Date}
* @memberof AutoMealPlan
*/
endDate: Date;
/**
*
* @type {number}
* @memberof AutoMealPlan
*/
mealTypeId: number;
/**
*
* @type {Array<any>}
* @memberof AutoMealPlan
*/
keywordIds: Array<any>;
/**
*
* @type {number}
* @memberof AutoMealPlan
*/
servings: number;
/**
*
* @type {Array<User>}
* @memberof AutoMealPlan
*/
shared?: Array<User> | null;
/**
*
* @type {boolean}
* @memberof AutoMealPlan
*/
addshopping: boolean;
}
/**
* Check if a given object implements the AutoMealPlan interface.
*/
export function instanceOfAutoMealPlan(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "startDate" in value;
isInstance = isInstance && "endDate" in value;
isInstance = isInstance && "mealTypeId" in value;
isInstance = isInstance && "keywordIds" in value;
isInstance = isInstance && "servings" in value;
isInstance = isInstance && "addshopping" in value;
return isInstance;
}
export function AutoMealPlanFromJSON(json: any): AutoMealPlan {
return AutoMealPlanFromJSONTyped(json, false);
}
export function AutoMealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutoMealPlan {
if ((json === undefined) || (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': !exists(json, 'shared') ? undefined : (json['shared'] === null ? null : (json['shared'] as Array<any>).map(UserFromJSON)),
'addshopping': json['addshopping'],
};
}
export function AutoMealPlanToJSON(value?: AutoMealPlan | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'start_date': (value.startDate.toISOString().substr(0,10)),
'end_date': (value.endDate.toISOString().substr(0,10)),
'meal_type_id': value.mealTypeId,
'keyword_ids': value.keywordIds,
'servings': value.servings,
'shared': value.shared === undefined ? undefined : (value.shared === null ? null : (value.shared as Array<any>).map(UserToJSON)),
'addshopping': value.addshopping,
};
}

View File

@@ -1,145 +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 { exists, mapValues } from '../runtime';
import type { TypeEnum } from './TypeEnum';
import {
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
} from './TypeEnum';
/**
*
* @export
* @interface Automation
*/
export interface Automation {
/**
*
* @type {number}
* @memberof Automation
*/
readonly id: number;
/**
*
* @type {TypeEnum}
* @memberof Automation
*/
type: TypeEnum;
/**
*
* @type {string}
* @memberof Automation
*/
name?: string;
/**
*
* @type {string}
* @memberof Automation
*/
description?: string | null;
/**
*
* @type {string}
* @memberof Automation
*/
param1?: string | null;
/**
*
* @type {string}
* @memberof Automation
*/
param2?: string | null;
/**
*
* @type {string}
* @memberof Automation
*/
param3?: string | null;
/**
*
* @type {number}
* @memberof Automation
*/
order?: number;
/**
*
* @type {boolean}
* @memberof Automation
*/
disabled?: boolean;
/**
*
* @type {number}
* @memberof Automation
*/
readonly createdBy: number;
}
/**
* Check if a given object implements the Automation interface.
*/
export function instanceOfAutomation(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "createdBy" in value;
return isInstance;
}
export function AutomationFromJSON(json: any): Automation {
return AutomationFromJSONTyped(json, false);
}
export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Automation {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'type': TypeEnumFromJSON(json['type']),
'name': !exists(json, 'name') ? undefined : json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'param1': !exists(json, 'param_1') ? undefined : json['param_1'],
'param2': !exists(json, 'param_2') ? undefined : json['param_2'],
'param3': !exists(json, 'param_3') ? undefined : json['param_3'],
'order': !exists(json, 'order') ? undefined : json['order'],
'disabled': !exists(json, 'disabled') ? undefined : json['disabled'],
'createdBy': json['created_by'],
};
}
export function AutomationToJSON(value?: Automation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
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,
};
}

View File

@@ -1,98 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface BookmarkletImport
*/
export interface BookmarkletImport {
/**
*
* @type {number}
* @memberof BookmarkletImport
*/
readonly id: number;
/**
*
* @type {string}
* @memberof BookmarkletImport
*/
url?: string | null;
/**
*
* @type {string}
* @memberof BookmarkletImport
*/
html: string;
/**
*
* @type {number}
* @memberof BookmarkletImport
*/
readonly createdBy: number;
/**
*
* @type {Date}
* @memberof BookmarkletImport
*/
readonly createdAt: Date;
}
/**
* Check if a given object implements the BookmarkletImport interface.
*/
export function instanceOfBookmarkletImport(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "html" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "createdAt" in value;
return isInstance;
}
export function BookmarkletImportFromJSON(json: any): BookmarkletImport {
return BookmarkletImportFromJSONTyped(json, false);
}
export function BookmarkletImportFromJSONTyped(json: any, ignoreDiscriminator: boolean): BookmarkletImport {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'url': !exists(json, 'url') ? undefined : json['url'],
'html': json['html'],
'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])),
};
}
export function BookmarkletImportToJSON(value?: BookmarkletImport | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'url': value.url,
'html': value.html,
};
}

View File

@@ -1,89 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface BookmarkletImportList
*/
export interface BookmarkletImportList {
/**
*
* @type {number}
* @memberof BookmarkletImportList
*/
readonly id: number;
/**
*
* @type {string}
* @memberof BookmarkletImportList
*/
url?: string | null;
/**
*
* @type {number}
* @memberof BookmarkletImportList
*/
readonly createdBy: number;
/**
*
* @type {Date}
* @memberof BookmarkletImportList
*/
readonly createdAt: Date;
}
/**
* Check if a given object implements the BookmarkletImportList interface.
*/
export function instanceOfBookmarkletImportList(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "createdAt" in value;
return isInstance;
}
export function BookmarkletImportListFromJSON(json: any): BookmarkletImportList {
return BookmarkletImportListFromJSONTyped(json, false);
}
export function BookmarkletImportListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BookmarkletImportList {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'url': !exists(json, 'url') ? undefined : json['url'],
'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])),
};
}
export function BookmarkletImportListToJSON(value?: BookmarkletImportList | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'url': value.url,
};
}

View File

@@ -1,138 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface ConnectorConfigConfig
*/
export interface ConnectorConfigConfig {
/**
*
* @type {number}
* @memberof ConnectorConfigConfig
*/
readonly id: number;
/**
*
* @type {string}
* @memberof ConnectorConfigConfig
*/
name: string;
/**
*
* @type {string}
* @memberof ConnectorConfigConfig
*/
url?: string | null;
/**
*
* @type {string}
* @memberof ConnectorConfigConfig
*/
token?: string | null;
/**
*
* @type {string}
* @memberof ConnectorConfigConfig
*/
todoEntity?: string | null;
/**
* Is Connector Enabled
* @type {boolean}
* @memberof ConnectorConfigConfig
*/
enabled?: boolean;
/**
*
* @type {boolean}
* @memberof ConnectorConfigConfig
*/
onShoppingListEntryCreatedEnabled?: boolean;
/**
*
* @type {boolean}
* @memberof ConnectorConfigConfig
*/
onShoppingListEntryUpdatedEnabled?: boolean;
/**
*
* @type {boolean}
* @memberof ConnectorConfigConfig
*/
onShoppingListEntryDeletedEnabled?: boolean;
/**
*
* @type {number}
* @memberof ConnectorConfigConfig
*/
readonly createdBy: number;
}
/**
* Check if a given object implements the ConnectorConfigConfig interface.
*/
export function instanceOfConnectorConfigConfig(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "createdBy" in value;
return isInstance;
}
export function ConnectorConfigConfigFromJSON(json: any): ConnectorConfigConfig {
return ConnectorConfigConfigFromJSONTyped(json, false);
}
export function ConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectorConfigConfig {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'url': !exists(json, 'url') ? undefined : json['url'],
'token': !exists(json, 'token') ? undefined : json['token'],
'todoEntity': !exists(json, 'todo_entity') ? undefined : json['todo_entity'],
'enabled': !exists(json, 'enabled') ? undefined : json['enabled'],
'onShoppingListEntryCreatedEnabled': !exists(json, 'on_shopping_list_entry_created_enabled') ? undefined : json['on_shopping_list_entry_created_enabled'],
'onShoppingListEntryUpdatedEnabled': !exists(json, 'on_shopping_list_entry_updated_enabled') ? undefined : json['on_shopping_list_entry_updated_enabled'],
'onShoppingListEntryDeletedEnabled': !exists(json, 'on_shopping_list_entry_deleted_enabled') ? undefined : json['on_shopping_list_entry_deleted_enabled'],
'createdBy': json['created_by'],
};
}
export function ConnectorConfigConfigToJSON(value?: ConnectorConfigConfig | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
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,
};
}

View File

@@ -1,129 +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 { exists, mapValues } from '../runtime';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
*
* @export
* @interface CookLog
*/
export interface CookLog {
/**
*
* @type {number}
* @memberof CookLog
*/
readonly id: number;
/**
*
* @type {number}
* @memberof CookLog
*/
recipe: number;
/**
*
* @type {number}
* @memberof CookLog
*/
servings?: number | null;
/**
*
* @type {number}
* @memberof CookLog
*/
rating?: number | null;
/**
*
* @type {string}
* @memberof CookLog
*/
comment?: string | null;
/**
*
* @type {User}
* @memberof CookLog
*/
readonly createdBy: User;
/**
*
* @type {Date}
* @memberof CookLog
*/
createdAt?: Date;
/**
*
* @type {Date}
* @memberof CookLog
*/
readonly updatedAt: Date;
}
/**
* Check if a given object implements the CookLog interface.
*/
export function instanceOfCookLog(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "recipe" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "updatedAt" in value;
return isInstance;
}
export function CookLogFromJSON(json: any): CookLog {
return CookLogFromJSONTyped(json, false);
}
export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'recipe': json['recipe'],
'servings': !exists(json, 'servings') ? undefined : json['servings'],
'rating': !exists(json, 'rating') ? undefined : json['rating'],
'comment': !exists(json, 'comment') ? undefined : json['comment'],
'createdBy': UserFromJSON(json['created_by']),
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': (new Date(json['updated_at'])),
};
}
export function CookLogToJSON(value?: CookLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'recipe': value.recipe,
'servings': value.servings,
'rating': value.rating,
'comment': value.comment,
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
};
}

View File

@@ -1,106 +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 { exists, mapValues } from '../runtime';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
* Adds nested create feature
* @export
* @interface CustomFilter
*/
export interface CustomFilter {
/**
*
* @type {number}
* @memberof CustomFilter
*/
readonly id: number;
/**
*
* @type {string}
* @memberof CustomFilter
*/
name: string;
/**
*
* @type {string}
* @memberof CustomFilter
*/
search: string;
/**
*
* @type {Array<User>}
* @memberof CustomFilter
*/
shared?: Array<User>;
/**
*
* @type {number}
* @memberof CustomFilter
*/
readonly createdBy: number;
}
/**
* Check if a given object implements the CustomFilter interface.
*/
export function instanceOfCustomFilter(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "search" in value;
isInstance = isInstance && "createdBy" in value;
return isInstance;
}
export function CustomFilterFromJSON(json: any): CustomFilter {
return CustomFilterFromJSONTyped(json, false);
}
export function CustomFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilter {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'search': json['search'],
'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
'createdBy': json['created_by'],
};
}
export function CustomFilterToJSON(value?: CustomFilter | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'search': value.search,
'shared': value.shared === undefined ? undefined : ((value.shared as Array<any>).map(UserToJSON)),
};
}

View File

@@ -1,43 +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.
*/
/**
* * `SEARCH` - Search
* * `PLAN` - Meal-Plan
* * `BOOKS` - Books
* * `SHOPPING` - Shopping
* @export
*/
export const DefaultPageEnum = {
Search: 'SEARCH',
Plan: 'PLAN',
Books: 'BOOKS',
Shopping: 'SHOPPING'
} as const;
export type DefaultPageEnum = typeof DefaultPageEnum[keyof typeof DefaultPageEnum];
export function DefaultPageEnumFromJSON(json: any): DefaultPageEnum {
return DefaultPageEnumFromJSONTyped(json, false);
}
export function DefaultPageEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DefaultPageEnum {
return json as DefaultPageEnum;
}
export function DefaultPageEnumToJSON(value?: DefaultPageEnum | null): any {
return value as any;
}

View File

@@ -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.
*/
/**
* * `true` - true
* @export
*/
export const DeleteEnum = {
True: 'true'
} as const;
export type DeleteEnum = typeof DeleteEnum[keyof typeof DeleteEnum];
export function DeleteEnumFromJSON(json: any): DeleteEnum {
return DeleteEnumFromJSONTyped(json, false);
}
export function DeleteEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteEnum {
return json as DeleteEnum;
}
export function DeleteEnumToJSON(value?: DeleteEnum | null): any {
return value as any;
}

View File

@@ -1,138 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface ExportLog
*/
export interface ExportLog {
/**
*
* @type {number}
* @memberof ExportLog
*/
readonly id: number;
/**
*
* @type {string}
* @memberof ExportLog
*/
type: string;
/**
*
* @type {string}
* @memberof ExportLog
*/
msg?: string;
/**
*
* @type {boolean}
* @memberof ExportLog
*/
running?: boolean;
/**
*
* @type {number}
* @memberof ExportLog
*/
totalRecipes?: number;
/**
*
* @type {number}
* @memberof ExportLog
*/
exportedRecipes?: number;
/**
*
* @type {number}
* @memberof ExportLog
*/
cacheDuration?: number;
/**
*
* @type {boolean}
* @memberof ExportLog
*/
possiblyNotExpired?: boolean;
/**
*
* @type {number}
* @memberof ExportLog
*/
readonly createdBy: number;
/**
*
* @type {Date}
* @memberof ExportLog
*/
readonly createdAt: Date;
}
/**
* Check if a given object implements the ExportLog interface.
*/
export function instanceOfExportLog(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "createdAt" in value;
return isInstance;
}
export function ExportLogFromJSON(json: any): ExportLog {
return ExportLogFromJSONTyped(json, false);
}
export function ExportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'type': json['type'],
'msg': !exists(json, 'msg') ? undefined : json['msg'],
'running': !exists(json, 'running') ? undefined : json['running'],
'totalRecipes': !exists(json, 'total_recipes') ? undefined : json['total_recipes'],
'exportedRecipes': !exists(json, 'exported_recipes') ? undefined : json['exported_recipes'],
'cacheDuration': !exists(json, 'cache_duration') ? undefined : json['cache_duration'],
'possiblyNotExpired': !exists(json, 'possibly_not_expired') ? undefined : json['possibly_not_expired'],
'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])),
};
}
export function ExportLogToJSON(value?: ExportLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
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,
};
}

View File

@@ -1,322 +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 { exists, mapValues } from '../runtime';
import type { FoodInheritField } from './FoodInheritField';
import {
FoodInheritFieldFromJSON,
FoodInheritFieldFromJSONTyped,
FoodInheritFieldToJSON,
} from './FoodInheritField';
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
import {
FoodPropertiesFoodUnitFromJSON,
FoodPropertiesFoodUnitFromJSONTyped,
FoodPropertiesFoodUnitToJSON,
} from './FoodPropertiesFoodUnit';
import type { FoodRecipe } from './FoodRecipe';
import {
FoodRecipeFromJSON,
FoodRecipeFromJSONTyped,
FoodRecipeToJSON,
} from './FoodRecipe';
import type { FoodSimple } from './FoodSimple';
import {
FoodSimpleFromJSON,
FoodSimpleFromJSONTyped,
FoodSimpleToJSON,
} from './FoodSimple';
import type { FoodSupermarketCategory } from './FoodSupermarketCategory';
import {
FoodSupermarketCategoryFromJSON,
FoodSupermarketCategoryFromJSONTyped,
FoodSupermarketCategoryToJSON,
} from './FoodSupermarketCategory';
import type { Property } from './Property';
import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
} from './Property';
/**
* 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 Food
*/
export interface Food {
/**
*
* @type {number}
* @memberof Food
*/
readonly id: number;
/**
*
* @type {string}
* @memberof Food
*/
name: string;
/**
*
* @type {string}
* @memberof Food
*/
pluralName?: string | null;
/**
*
* @type {string}
* @memberof Food
*/
description?: string;
/**
*
* @type {string}
* @memberof Food
*/
readonly shopping: string;
/**
*
* @type {FoodRecipe}
* @memberof Food
*/
recipe?: FoodRecipe | null;
/**
*
* @type {string}
* @memberof Food
*/
url?: string | null;
/**
*
* @type {Array<Property>}
* @memberof Food
*/
properties?: Array<Property> | null;
/**
*
* @type {number}
* @memberof Food
*/
propertiesFoodAmount?: number;
/**
*
* @type {FoodPropertiesFoodUnit}
* @memberof Food
*/
propertiesFoodUnit?: FoodPropertiesFoodUnit | null;
/**
*
* @type {number}
* @memberof Food
*/
fdcId?: number | null;
/**
*
* @type {boolean}
* @memberof Food
*/
foodOnhand?: boolean | null;
/**
*
* @type {FoodSupermarketCategory}
* @memberof Food
*/
supermarketCategory?: FoodSupermarketCategory | null;
/**
*
* @type {number}
* @memberof Food
*/
readonly parent: number;
/**
*
* @type {number}
* @memberof Food
*/
readonly numchild: number;
/**
*
* @type {Array<FoodInheritField>}
* @memberof Food
*/
inheritFields?: Array<FoodInheritField> | null;
/**
* Returns a string representation of a tree node and it's ancestors,
* e.g. 'Cuisine > Asian > Chinese > Catonese'.
* @type {string}
* @memberof Food
*/
readonly fullName: string;
/**
*
* @type {boolean}
* @memberof Food
*/
ignoreShopping?: boolean;
/**
*
* @type {Array<FoodSimple>}
* @memberof Food
*/
substitute?: Array<FoodSimple> | null;
/**
*
* @type {boolean}
* @memberof Food
*/
substituteSiblings?: boolean;
/**
*
* @type {boolean}
* @memberof Food
*/
substituteChildren?: boolean;
/**
*
* @type {boolean}
* @memberof Food
*/
readonly substituteOnhand: boolean;
/**
*
* @type {Array<FoodInheritField>}
* @memberof Food
*/
childInheritFields?: Array<FoodInheritField> | null;
/**
*
* @type {string}
* @memberof Food
*/
openDataSlug?: string | null;
}
/**
* Check if a given object implements the Food interface.
*/
export function instanceOfFood(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "shopping" in value;
isInstance = isInstance && "parent" in value;
isInstance = isInstance && "numchild" in value;
isInstance = isInstance && "fullName" in value;
isInstance = isInstance && "substituteOnhand" in value;
return isInstance;
}
export function FoodFromJSON(json: any): Food {
return FoodFromJSONTyped(json, false);
}
export function FoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): Food {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'shopping': 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(PropertyFromJSON)),
'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': json['parent'],
'numchild': json['numchild'],
'inheritFields': !exists(json, 'inherit_fields') ? undefined : (json['inherit_fields'] === null ? null : (json['inherit_fields'] as Array<any>).map(FoodInheritFieldFromJSON)),
'fullName': 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(FoodSimpleFromJSON)),
'substituteSiblings': !exists(json, 'substitute_siblings') ? undefined : json['substitute_siblings'],
'substituteChildren': !exists(json, 'substitute_children') ? undefined : json['substitute_children'],
'substituteOnhand': json['substitute_onhand'],
'childInheritFields': !exists(json, 'child_inherit_fields') ? undefined : (json['child_inherit_fields'] === null ? null : (json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldFromJSON)),
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
};
}
export function FoodToJSON(value?: Food | 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(PropertyToJSON)),
'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(FoodInheritFieldToJSON)),
'ignore_shopping': value.ignoreShopping,
'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array<any>).map(FoodSimpleToJSON)),
'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(FoodInheritFieldToJSON)),
'open_data_slug': value.openDataSlug,
};
}

View File

@@ -1,115 +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 { exists, 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 FoodInheritField
*/
export interface FoodInheritField {
/**
*
* @type {number}
* @memberof FoodInheritField
*/
readonly id: number;
/**
*
* @type {string}
* @memberof FoodInheritField
*/
name?: string | null;
/**
*
* @type {string}
* @memberof FoodInheritField
*/
field?: string | null;
}
/**
* Check if a given object implements the FoodInheritField interface.
*/
export function instanceOfFoodInheritField(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
return isInstance;
}
export function FoodInheritFieldFromJSON(json: any): FoodInheritField {
return FoodInheritFieldFromJSONTyped(json, false);
}
export function FoodInheritFieldFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodInheritField {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'field': !exists(json, 'field') ? undefined : json['field'],
};
}
export function FoodInheritFieldToJSON(value?: FoodInheritField | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'field': value.field,
};
}

View File

@@ -1,106 +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 { 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 && "id" in value;
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': 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,
};
}

View File

@@ -1,82 +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 { 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 && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "url" 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': json['id'],
'name': json['name'],
'url': json['url'],
};
}
export function FoodRecipeToJSON(value?: FoodRecipe | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
};
}

View File

@@ -1,99 +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 { exists, mapValues } from '../runtime';
import type { DeleteEnum } from './DeleteEnum';
import {
DeleteEnumFromJSON,
DeleteEnumFromJSONTyped,
DeleteEnumToJSON,
} from './DeleteEnum';
/**
*
* @export
* @interface FoodShoppingUpdate
*/
export interface FoodShoppingUpdate {
/**
*
* @type {number}
* @memberof FoodShoppingUpdate
*/
readonly id: number;
/**
* Amount of food to add to the shopping list
* @type {number}
* @memberof FoodShoppingUpdate
*/
amount?: number | null;
/**
* ID of unit to use for the shopping list
* @type {number}
* @memberof FoodShoppingUpdate
*/
unit?: number | null;
/**
* When set to true will delete all food from active shopping lists.
*
* * `true` - true
* @type {DeleteEnum}
* @memberof FoodShoppingUpdate
*/
_delete: DeleteEnum | null;
}
/**
* Check if a given object implements the FoodShoppingUpdate interface.
*/
export function instanceOfFoodShoppingUpdate(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "_delete" in value;
return isInstance;
}
export function FoodShoppingUpdateFromJSON(json: any): FoodShoppingUpdate {
return FoodShoppingUpdateFromJSONTyped(json, false);
}
export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdate {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'amount': !exists(json, 'amount') ? undefined : json['amount'],
'unit': !exists(json, 'unit') ? undefined : json['unit'],
'_delete': DeleteEnumFromJSON(json['delete']),
};
}
export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'amount': value.amount,
'unit': value.unit,
'delete': DeleteEnumToJSON(value._delete),
};
}

View File

@@ -1,82 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface FoodSimple
*/
export interface FoodSimple {
/**
*
* @type {number}
* @memberof FoodSimple
*/
readonly id: number;
/**
*
* @type {string}
* @memberof FoodSimple
*/
name: string;
/**
*
* @type {string}
* @memberof FoodSimple
*/
pluralName?: string | null;
}
/**
* Check if a given object implements the FoodSimple interface.
*/
export function instanceOfFoodSimple(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
return isInstance;
}
export function FoodSimpleFromJSON(json: any): FoodSimple {
return FoodSimpleFromJSONTyped(json, false);
}
export function FoodSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSimple {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
};
}
export function FoodSimpleToJSON(value?: FoodSimple | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'plural_name': value.pluralName,
};
}

View File

@@ -1,82 +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 { 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 && "id" in value;
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': 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,
};
}

View File

@@ -1,108 +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 { exists, 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 Group
*/
export interface Group {
/**
*
* @type {number}
* @memberof Group
*/
readonly id: number;
/**
*
* @type {string}
* @memberof Group
*/
name: string;
}
/**
* Check if a given object implements the Group interface.
*/
export function instanceOfGroup(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
return isInstance;
}
export function GroupFromJSON(json: any): Group {
return GroupFromJSONTyped(json, false);
}
export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Group {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
};
}
export function GroupToJSON(value?: Group | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
};
}

View File

@@ -1,137 +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 { exists, mapValues } from '../runtime';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
} from './Keyword';
/**
*
* @export
* @interface ImportLog
*/
export interface ImportLog {
/**
*
* @type {number}
* @memberof ImportLog
*/
readonly id: number;
/**
*
* @type {string}
* @memberof ImportLog
*/
type: string;
/**
*
* @type {string}
* @memberof ImportLog
*/
msg?: string;
/**
*
* @type {boolean}
* @memberof ImportLog
*/
running?: boolean;
/**
*
* @type {Keyword}
* @memberof ImportLog
*/
readonly keyword: Keyword;
/**
*
* @type {number}
* @memberof ImportLog
*/
totalRecipes?: number;
/**
*
* @type {number}
* @memberof ImportLog
*/
importedRecipes?: number;
/**
*
* @type {number}
* @memberof ImportLog
*/
readonly createdBy: number;
/**
*
* @type {Date}
* @memberof ImportLog
*/
readonly createdAt: Date;
}
/**
* Check if a given object implements the ImportLog interface.
*/
export function instanceOfImportLog(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "keyword" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "createdAt" in value;
return isInstance;
}
export function ImportLogFromJSON(json: any): ImportLog {
return ImportLogFromJSONTyped(json, false);
}
export function ImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'type': json['type'],
'msg': !exists(json, 'msg') ? undefined : json['msg'],
'running': !exists(json, 'running') ? undefined : json['running'],
'keyword': KeywordFromJSON(json['keyword']),
'totalRecipes': !exists(json, 'total_recipes') ? undefined : json['total_recipes'],
'importedRecipes': !exists(json, 'imported_recipes') ? undefined : json['imported_recipes'],
'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])),
};
}
export function ImportLogToJSON(value?: ImportLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'type': value.type,
'msg': value.msg,
'running': value.running,
'total_recipes': value.totalRecipes,
'imported_recipes': value.importedRecipes,
};
}

View File

@@ -1,177 +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 { exists, mapValues } from '../runtime';
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
import {
FoodPropertiesFoodUnitFromJSON,
FoodPropertiesFoodUnitFromJSONTyped,
FoodPropertiesFoodUnitToJSON,
} from './FoodPropertiesFoodUnit';
import type { IngredientFood } from './IngredientFood';
import {
IngredientFoodFromJSON,
IngredientFoodFromJSONTyped,
IngredientFoodToJSON,
} from './IngredientFood';
/**
* Adds nested create feature
* @export
* @interface Ingredient
*/
export interface Ingredient {
/**
*
* @type {number}
* @memberof Ingredient
*/
readonly id: number;
/**
*
* @type {IngredientFood}
* @memberof Ingredient
*/
food: IngredientFood | null;
/**
*
* @type {FoodPropertiesFoodUnit}
* @memberof Ingredient
*/
unit: FoodPropertiesFoodUnit | null;
/**
*
* @type {number}
* @memberof Ingredient
*/
amount: number;
/**
*
* @type {Array<any>}
* @memberof Ingredient
*/
readonly conversions: Array<any>;
/**
*
* @type {string}
* @memberof Ingredient
*/
note?: string | null;
/**
*
* @type {number}
* @memberof Ingredient
*/
order?: number;
/**
*
* @type {boolean}
* @memberof Ingredient
*/
isHeader?: boolean;
/**
*
* @type {boolean}
* @memberof Ingredient
*/
noAmount?: boolean;
/**
*
* @type {string}
* @memberof Ingredient
*/
originalText?: string | null;
/**
*
* @type {Array<any>}
* @memberof Ingredient
*/
readonly usedInRecipes: Array<any>;
/**
*
* @type {boolean}
* @memberof Ingredient
*/
alwaysUsePluralUnit?: boolean;
/**
*
* @type {boolean}
* @memberof Ingredient
*/
alwaysUsePluralFood?: boolean;
}
/**
* Check if a given object implements the Ingredient interface.
*/
export function instanceOfIngredient(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "food" in value;
isInstance = isInstance && "unit" in value;
isInstance = isInstance && "amount" in value;
isInstance = isInstance && "conversions" in value;
isInstance = isInstance && "usedInRecipes" in value;
return isInstance;
}
export function IngredientFromJSON(json: any): Ingredient {
return IngredientFromJSONTyped(json, false);
}
export function IngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ingredient {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'food': IngredientFoodFromJSON(json['food']),
'unit': FoodPropertiesFoodUnitFromJSON(json['unit']),
'amount': json['amount'],
'conversions': json['conversions'],
'note': !exists(json, 'note') ? undefined : json['note'],
'order': !exists(json, 'order') ? undefined : json['order'],
'isHeader': !exists(json, 'is_header') ? undefined : json['is_header'],
'noAmount': !exists(json, 'no_amount') ? undefined : json['no_amount'],
'originalText': !exists(json, 'original_text') ? undefined : json['original_text'],
'usedInRecipes': json['used_in_recipes'],
'alwaysUsePluralUnit': !exists(json, 'always_use_plural_unit') ? undefined : json['always_use_plural_unit'],
'alwaysUsePluralFood': !exists(json, 'always_use_plural_food') ? undefined : json['always_use_plural_food'],
};
}
export function IngredientToJSON(value?: Ingredient | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'food': IngredientFoodToJSON(value.food),
'unit': FoodPropertiesFoodUnitToJSON(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,
};
}

View File

@@ -1,288 +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 { exists, mapValues } from '../runtime';
import type { FoodInheritField } from './FoodInheritField';
import {
FoodInheritFieldFromJSON,
FoodInheritFieldFromJSONTyped,
FoodInheritFieldToJSON,
} from './FoodInheritField';
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
import {
FoodPropertiesFoodUnitFromJSON,
FoodPropertiesFoodUnitFromJSONTyped,
FoodPropertiesFoodUnitToJSON,
} from './FoodPropertiesFoodUnit';
import type { FoodRecipe } from './FoodRecipe';
import {
FoodRecipeFromJSON,
FoodRecipeFromJSONTyped,
FoodRecipeToJSON,
} from './FoodRecipe';
import type { FoodSimple } from './FoodSimple';
import {
FoodSimpleFromJSON,
FoodSimpleFromJSONTyped,
FoodSimpleToJSON,
} from './FoodSimple';
import type { FoodSupermarketCategory } from './FoodSupermarketCategory';
import {
FoodSupermarketCategoryFromJSON,
FoodSupermarketCategoryFromJSONTyped,
FoodSupermarketCategoryToJSON,
} from './FoodSupermarketCategory';
import type { Property } from './Property';
import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
} from './Property';
/**
*
* @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<Property>}
* @memberof IngredientFood
*/
properties?: Array<Property> | null;
/**
*
* @type {number}
* @memberof IngredientFood
*/
propertiesFoodAmount?: number;
/**
*
* @type {FoodPropertiesFoodUnit}
* @memberof IngredientFood
*/
propertiesFoodUnit?: FoodPropertiesFoodUnit | null;
/**
*
* @type {number}
* @memberof IngredientFood
*/
fdcId?: number | null;
/**
*
* @type {boolean}
* @memberof IngredientFood
*/
foodOnhand?: boolean | null;
/**
*
* @type {FoodSupermarketCategory}
* @memberof IngredientFood
*/
supermarketCategory?: FoodSupermarketCategory | null;
/**
*
* @type {number}
* @memberof IngredientFood
*/
readonly parent: number;
/**
*
* @type {number}
* @memberof IngredientFood
*/
readonly numchild: number;
/**
*
* @type {Array<FoodInheritField>}
* @memberof IngredientFood
*/
inheritFields?: Array<FoodInheritField> | null;
/**
* Returns a string representation of a tree node and it's ancestors,
* e.g. 'Cuisine > Asian > Chinese > Catonese'.
* @type {string}
* @memberof IngredientFood
*/
readonly fullName: string;
/**
*
* @type {boolean}
* @memberof IngredientFood
*/
ignoreShopping?: boolean;
/**
*
* @type {Array<FoodSimple>}
* @memberof IngredientFood
*/
substitute?: Array<FoodSimple> | null;
/**
*
* @type {boolean}
* @memberof IngredientFood
*/
substituteSiblings?: boolean;
/**
*
* @type {boolean}
* @memberof IngredientFood
*/
substituteChildren?: boolean;
/**
*
* @type {boolean}
* @memberof IngredientFood
*/
readonly substituteOnhand: boolean;
/**
*
* @type {Array<FoodInheritField>}
* @memberof IngredientFood
*/
childInheritFields?: Array<FoodInheritField> | 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 && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "shopping" in value;
isInstance = isInstance && "parent" in value;
isInstance = isInstance && "numchild" in value;
isInstance = isInstance && "fullName" in value;
isInstance = isInstance && "substituteOnhand" 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': json['id'],
'name': json['name'],
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'shopping': 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(PropertyFromJSON)),
'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': json['parent'],
'numchild': json['numchild'],
'inheritFields': !exists(json, 'inherit_fields') ? undefined : (json['inherit_fields'] === null ? null : (json['inherit_fields'] as Array<any>).map(FoodInheritFieldFromJSON)),
'fullName': 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(FoodSimpleFromJSON)),
'substituteSiblings': !exists(json, 'substitute_siblings') ? undefined : json['substitute_siblings'],
'substituteChildren': !exists(json, 'substitute_children') ? undefined : json['substitute_children'],
'substituteOnhand': json['substitute_onhand'],
'childInheritFields': !exists(json, 'child_inherit_fields') ? undefined : (json['child_inherit_fields'] === null ? null : (json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldFromJSON)),
'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(PropertyToJSON)),
'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(FoodInheritFieldToJSON)),
'ignore_shopping': value.ignoreShopping,
'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array<any>).map(FoodSimpleToJSON)),
'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(FoodInheritFieldToJSON)),
'open_data_slug': value.openDataSlug,
};
}

View File

@@ -1,145 +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 { exists, mapValues } from '../runtime';
import type { Group } from './Group';
import {
GroupFromJSON,
GroupFromJSONTyped,
GroupToJSON,
} from './Group';
/**
* Adds nested create feature
* @export
* @interface InviteLink
*/
export interface InviteLink {
/**
*
* @type {number}
* @memberof InviteLink
*/
readonly id: number;
/**
*
* @type {string}
* @memberof InviteLink
*/
readonly uuid: string;
/**
*
* @type {string}
* @memberof InviteLink
*/
email?: string;
/**
*
* @type {Group}
* @memberof InviteLink
*/
group: Group;
/**
*
* @type {Date}
* @memberof InviteLink
*/
validUntil?: Date;
/**
*
* @type {number}
* @memberof InviteLink
*/
usedBy?: number | null;
/**
*
* @type {boolean}
* @memberof InviteLink
*/
reusable?: boolean;
/**
*
* @type {string}
* @memberof InviteLink
*/
internalNote?: string | null;
/**
*
* @type {number}
* @memberof InviteLink
*/
readonly createdBy: number;
/**
*
* @type {Date}
* @memberof InviteLink
*/
readonly createdAt: Date;
}
/**
* Check if a given object implements the InviteLink interface.
*/
export function instanceOfInviteLink(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "uuid" in value;
isInstance = isInstance && "group" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "createdAt" in value;
return isInstance;
}
export function InviteLinkFromJSON(json: any): InviteLink {
return InviteLinkFromJSONTyped(json, false);
}
export function InviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLink {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'uuid': json['uuid'],
'email': !exists(json, 'email') ? undefined : json['email'],
'group': GroupFromJSON(json['group']),
'validUntil': !exists(json, 'valid_until') ? undefined : (new Date(json['valid_until'])),
'usedBy': !exists(json, 'used_by') ? undefined : json['used_by'],
'reusable': !exists(json, 'reusable') ? undefined : json['reusable'],
'internalNote': !exists(json, 'internal_note') ? undefined : json['internal_note'],
'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])),
};
}
export function InviteLinkToJSON(value?: InviteLink | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'email': value.email,
'group': GroupToJSON(value.group),
'valid_until': value.validUntil === undefined ? undefined : (value.validUntil.toISOString().substr(0,10)),
'used_by': value.usedBy,
'reusable': value.reusable,
'internal_note': value.internalNote,
};
}

View File

@@ -1,165 +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 { exists, 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 Keyword
*/
export interface Keyword {
/**
*
* @type {number}
* @memberof Keyword
*/
readonly id: number;
/**
*
* @type {string}
* @memberof Keyword
*/
name: string;
/**
*
* @type {string}
* @memberof Keyword
*/
readonly label: string;
/**
*
* @type {string}
* @memberof Keyword
*/
description?: string;
/**
*
* @type {number}
* @memberof Keyword
*/
readonly parent: number;
/**
*
* @type {number}
* @memberof Keyword
*/
readonly numchild: number;
/**
*
* @type {Date}
* @memberof Keyword
*/
readonly createdAt: Date;
/**
*
* @type {Date}
* @memberof Keyword
*/
readonly updatedAt: Date;
/**
* Returns a string representation of a tree node and it's ancestors,
* e.g. 'Cuisine > Asian > Chinese > Catonese'.
* @type {string}
* @memberof Keyword
*/
readonly fullName: string;
}
/**
* Check if a given object implements the Keyword interface.
*/
export function instanceOfKeyword(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "label" in value;
isInstance = isInstance && "parent" in value;
isInstance = isInstance && "numchild" in value;
isInstance = isInstance && "createdAt" in value;
isInstance = isInstance && "updatedAt" in value;
isInstance = isInstance && "fullName" in value;
return isInstance;
}
export function KeywordFromJSON(json: any): Keyword {
return KeywordFromJSONTyped(json, false);
}
export function KeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): Keyword {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'label': json['label'],
'description': !exists(json, 'description') ? undefined : json['description'],
'parent': json['parent'],
'numchild': json['numchild'],
'createdAt': (new Date(json['created_at'])),
'updatedAt': (new Date(json['updated_at'])),
'fullName': json['full_name'],
};
}
export function KeywordToJSON(value?: Keyword | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'description': value.description,
};
}

View File

@@ -1,73 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface KeywordLabel
*/
export interface KeywordLabel {
/**
*
* @type {number}
* @memberof KeywordLabel
*/
readonly id: number;
/**
*
* @type {string}
* @memberof KeywordLabel
*/
readonly label: string;
}
/**
* Check if a given object implements the KeywordLabel interface.
*/
export function instanceOfKeywordLabel(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "label" in value;
return isInstance;
}
export function KeywordLabelFromJSON(json: any): KeywordLabel {
return KeywordLabelFromJSONTyped(json, false);
}
export function KeywordLabelFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeywordLabel {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'label': json['label'],
};
}
export function KeywordLabelToJSON(value?: KeywordLabel | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
};
}

View File

@@ -1,191 +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 { exists, mapValues } from '../runtime';
import type { MealPlanRecipe } from './MealPlanRecipe';
import {
MealPlanRecipeFromJSON,
MealPlanRecipeFromJSONTyped,
MealPlanRecipeToJSON,
} from './MealPlanRecipe';
import type { MealType } from './MealType';
import {
MealTypeFromJSON,
MealTypeFromJSONTyped,
MealTypeToJSON,
} from './MealType';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
* Adds nested create feature
* @export
* @interface MealPlan
*/
export interface MealPlan {
/**
*
* @type {number}
* @memberof MealPlan
*/
readonly id: number;
/**
*
* @type {string}
* @memberof MealPlan
*/
title?: string;
/**
*
* @type {MealPlanRecipe}
* @memberof MealPlan
*/
recipe?: MealPlanRecipe | null;
/**
*
* @type {number}
* @memberof MealPlan
*/
servings: number;
/**
*
* @type {string}
* @memberof MealPlan
*/
note?: string;
/**
*
* @type {string}
* @memberof MealPlan
*/
readonly noteMarkdown: string;
/**
*
* @type {Date}
* @memberof MealPlan
*/
fromDate: Date;
/**
*
* @type {Date}
* @memberof MealPlan
*/
toDate?: Date;
/**
*
* @type {MealType}
* @memberof MealPlan
*/
mealType: MealType;
/**
*
* @type {number}
* @memberof MealPlan
*/
readonly createdBy: number;
/**
*
* @type {Array<User>}
* @memberof MealPlan
*/
shared?: Array<User> | null;
/**
*
* @type {string}
* @memberof MealPlan
*/
readonly recipeName: string;
/**
*
* @type {string}
* @memberof MealPlan
*/
readonly mealTypeName: string;
/**
*
* @type {boolean}
* @memberof MealPlan
*/
readonly shopping: boolean;
}
/**
* Check if a given object implements the MealPlan interface.
*/
export function instanceOfMealPlan(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "servings" in value;
isInstance = isInstance && "noteMarkdown" in value;
isInstance = isInstance && "fromDate" in value;
isInstance = isInstance && "mealType" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "recipeName" in value;
isInstance = isInstance && "mealTypeName" in value;
isInstance = isInstance && "shopping" in value;
return isInstance;
}
export function MealPlanFromJSON(json: any): MealPlan {
return MealPlanFromJSONTyped(json, false);
}
export function MealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlan {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'title': !exists(json, 'title') ? undefined : json['title'],
'recipe': !exists(json, 'recipe') ? undefined : MealPlanRecipeFromJSON(json['recipe']),
'servings': json['servings'],
'note': !exists(json, 'note') ? undefined : json['note'],
'noteMarkdown': json['note_markdown'],
'fromDate': (new Date(json['from_date'])),
'toDate': !exists(json, 'to_date') ? undefined : (new Date(json['to_date'])),
'mealType': MealTypeFromJSON(json['meal_type']),
'createdBy': json['created_by'],
'shared': !exists(json, 'shared') ? undefined : (json['shared'] === null ? null : (json['shared'] as Array<any>).map(UserFromJSON)),
'recipeName': json['recipe_name'],
'mealTypeName': json['meal_type_name'],
'shopping': json['shopping'],
};
}
export function MealPlanToJSON(value?: MealPlan | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'title': value.title,
'recipe': MealPlanRecipeToJSON(value.recipe),
'servings': value.servings,
'note': value.note,
'from_date': (value.fromDate.toISOString().substr(0,10)),
'to_date': value.toDate === undefined ? undefined : (value.toDate.toISOString().substr(0,10)),
'meal_type': MealTypeToJSON(value.mealType),
'shared': value.shared === undefined ? undefined : (value.shared === null ? null : (value.shared as Array<any>).map(UserToJSON)),
};
}

View File

@@ -1,200 +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 { exists, mapValues } from '../runtime';
import type { KeywordLabel } from './KeywordLabel';
import {
KeywordLabelFromJSON,
KeywordLabelFromJSONTyped,
KeywordLabelToJSON,
} from './KeywordLabel';
/**
*
* @export
* @interface MealPlanRecipe
*/
export interface MealPlanRecipe {
/**
*
* @type {number}
* @memberof MealPlanRecipe
*/
readonly id: number;
/**
*
* @type {string}
* @memberof MealPlanRecipe
*/
readonly name: string;
/**
*
* @type {string}
* @memberof MealPlanRecipe
*/
readonly description: string | null;
/**
*
* @type {string}
* @memberof MealPlanRecipe
*/
readonly image: string | null;
/**
*
* @type {Array<KeywordLabel>}
* @memberof MealPlanRecipe
*/
readonly keywords: Array<KeywordLabel>;
/**
*
* @type {number}
* @memberof MealPlanRecipe
*/
readonly workingTime: number;
/**
*
* @type {number}
* @memberof MealPlanRecipe
*/
readonly waitingTime: number;
/**
*
* @type {number}
* @memberof MealPlanRecipe
*/
readonly createdBy: number;
/**
*
* @type {Date}
* @memberof MealPlanRecipe
*/
readonly createdAt: Date;
/**
*
* @type {Date}
* @memberof MealPlanRecipe
*/
readonly updatedAt: Date;
/**
*
* @type {boolean}
* @memberof MealPlanRecipe
*/
readonly internal: boolean;
/**
*
* @type {number}
* @memberof MealPlanRecipe
*/
readonly servings: number;
/**
*
* @type {string}
* @memberof MealPlanRecipe
*/
readonly servingsText: string;
/**
*
* @type {number}
* @memberof MealPlanRecipe
*/
readonly rating: number | null;
/**
*
* @type {Date}
* @memberof MealPlanRecipe
*/
readonly lastCooked: Date | null;
/**
*
* @type {boolean}
* @memberof MealPlanRecipe
*/
readonly _new: boolean;
/**
*
* @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 && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "description" in value;
isInstance = isInstance && "image" in value;
isInstance = isInstance && "keywords" in value;
isInstance = isInstance && "workingTime" in value;
isInstance = isInstance && "waitingTime" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "createdAt" in value;
isInstance = isInstance && "updatedAt" in value;
isInstance = isInstance && "internal" in value;
isInstance = isInstance && "servings" in value;
isInstance = isInstance && "servingsText" in value;
isInstance = isInstance && "rating" in value;
isInstance = isInstance && "lastCooked" in value;
isInstance = isInstance && "_new" in value;
isInstance = isInstance && "recent" 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': json['id'],
'name': json['name'],
'description': json['description'],
'image': json['image'],
'keywords': ((json['keywords'] as Array<any>).map(KeywordLabelFromJSON)),
'workingTime': json['working_time'],
'waitingTime': json['waiting_time'],
'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])),
'updatedAt': (new Date(json['updated_at'])),
'internal': json['internal'],
'servings': json['servings'],
'servingsText': json['servings_text'],
'rating': json['rating'],
'lastCooked': (json['last_cooked'] === null ? null : new Date(json['last_cooked'])),
'_new': json['new'],
'recent': json['recent'],
};
}
export function MealPlanRecipeToJSON(value?: MealPlanRecipe | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
};
}

View File

@@ -1,106 +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 { exists, mapValues } from '../runtime';
/**
* Adds nested create feature
* @export
* @interface MealType
*/
export interface MealType {
/**
*
* @type {number}
* @memberof MealType
*/
readonly id: number;
/**
*
* @type {string}
* @memberof MealType
*/
name: string;
/**
*
* @type {number}
* @memberof MealType
*/
order?: number;
/**
*
* @type {string}
* @memberof MealType
*/
color?: string | null;
/**
*
* @type {boolean}
* @memberof MealType
*/
_default?: boolean;
/**
*
* @type {number}
* @memberof MealType
*/
readonly createdBy: number;
}
/**
* Check if a given object implements the MealType interface.
*/
export function instanceOfMealType(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "createdBy" in value;
return isInstance;
}
export function MealTypeFromJSON(json: any): MealType {
return MealTypeFromJSONTyped(json, false);
}
export function MealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealType {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': 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': json['created_by'],
};
}
export function MealTypeToJSON(value?: MealType | 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,
};
}

View File

@@ -1,41 +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.
*/
/**
* * `DB` - Dropbox
* * `NEXTCLOUD` - Nextcloud
* * `LOCAL` - Local
* @export
*/
export const MethodEnum = {
Db: 'DB',
Nextcloud: 'NEXTCLOUD',
Local: 'LOCAL'
} as const;
export type MethodEnum = typeof MethodEnum[keyof typeof MethodEnum];
export function MethodEnumFromJSON(json: any): MethodEnum {
return MethodEnumFromJSONTyped(json, false);
}
export function MethodEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): MethodEnum {
return json as MethodEnum;
}
export function MethodEnumToJSON(value?: MethodEnum | null): any {
return value as any;
}

View File

@@ -1,109 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface NutritionInformation
*/
export interface NutritionInformation {
/**
*
* @type {number}
* @memberof NutritionInformation
*/
readonly id: number;
/**
*
* @type {number}
* @memberof NutritionInformation
*/
carbohydrates: number;
/**
*
* @type {number}
* @memberof NutritionInformation
*/
fats: number;
/**
*
* @type {number}
* @memberof NutritionInformation
*/
proteins: number;
/**
*
* @type {number}
* @memberof NutritionInformation
*/
calories: number;
/**
*
* @type {string}
* @memberof NutritionInformation
*/
source?: string | null;
}
/**
* Check if a given object implements the NutritionInformation interface.
*/
export function instanceOfNutritionInformation(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "carbohydrates" in value;
isInstance = isInstance && "fats" in value;
isInstance = isInstance && "proteins" in value;
isInstance = isInstance && "calories" in value;
return isInstance;
}
export function NutritionInformationFromJSON(json: any): NutritionInformation {
return NutritionInformationFromJSONTyped(json, false);
}
export function NutritionInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): NutritionInformation {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'carbohydrates': json['carbohydrates'],
'fats': json['fats'],
'proteins': json['proteins'],
'calories': json['calories'],
'source': !exists(json, 'source') ? undefined : json['source'],
};
}
export function NutritionInformationToJSON(value?: NutritionInformation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'carbohydrates': value.carbohydrates,
'fats': value.fats,
'proteins': value.proteins,
'calories': value.calories,
'source': value.source,
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Automation } from './Automation';
import {
AutomationFromJSON,
AutomationFromJSONTyped,
AutomationToJSON,
} from './Automation';
/**
*
* @export
* @interface PaginatedAutomationList
*/
export interface PaginatedAutomationList {
/**
*
* @type {number}
* @memberof PaginatedAutomationList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedAutomationList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedAutomationList
*/
previous?: string | null;
/**
*
* @type {Array<Automation>}
* @memberof PaginatedAutomationList
*/
results?: Array<Automation>;
}
/**
* Check if a given object implements the PaginatedAutomationList interface.
*/
export function instanceOfPaginatedAutomationList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedAutomationListFromJSON(json: any): PaginatedAutomationList {
return PaginatedAutomationListFromJSONTyped(json, false);
}
export function PaginatedAutomationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedAutomationList {
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 PaginatedAutomationListToJSON(value?: PaginatedAutomationList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { BookmarkletImportList } from './BookmarkletImportList';
import {
BookmarkletImportListFromJSON,
BookmarkletImportListFromJSONTyped,
BookmarkletImportListToJSON,
} from './BookmarkletImportList';
/**
*
* @export
* @interface PaginatedBookmarkletImportListList
*/
export interface PaginatedBookmarkletImportListList {
/**
*
* @type {number}
* @memberof PaginatedBookmarkletImportListList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedBookmarkletImportListList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedBookmarkletImportListList
*/
previous?: string | null;
/**
*
* @type {Array<BookmarkletImportList>}
* @memberof PaginatedBookmarkletImportListList
*/
results?: Array<BookmarkletImportList>;
}
/**
* Check if a given object implements the PaginatedBookmarkletImportListList interface.
*/
export function instanceOfPaginatedBookmarkletImportListList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedBookmarkletImportListListFromJSON(json: any): PaginatedBookmarkletImportListList {
return PaginatedBookmarkletImportListListFromJSONTyped(json, false);
}
export function PaginatedBookmarkletImportListListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedBookmarkletImportListList {
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(BookmarkletImportListFromJSON)),
};
}
export function PaginatedBookmarkletImportListListToJSON(value?: PaginatedBookmarkletImportListList | 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(BookmarkletImportListToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { CookLog } from './CookLog';
import {
CookLogFromJSON,
CookLogFromJSONTyped,
CookLogToJSON,
} from './CookLog';
/**
*
* @export
* @interface PaginatedCookLogList
*/
export interface PaginatedCookLogList {
/**
*
* @type {number}
* @memberof PaginatedCookLogList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedCookLogList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedCookLogList
*/
previous?: string | null;
/**
*
* @type {Array<CookLog>}
* @memberof PaginatedCookLogList
*/
results?: Array<CookLog>;
}
/**
* Check if a given object implements the PaginatedCookLogList interface.
*/
export function instanceOfPaginatedCookLogList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedCookLogListFromJSON(json: any): PaginatedCookLogList {
return PaginatedCookLogListFromJSONTyped(json, false);
}
export function PaginatedCookLogListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedCookLogList {
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 PaginatedCookLogListToJSON(value?: PaginatedCookLogList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { CustomFilter } from './CustomFilter';
import {
CustomFilterFromJSON,
CustomFilterFromJSONTyped,
CustomFilterToJSON,
} from './CustomFilter';
/**
*
* @export
* @interface PaginatedCustomFilterList
*/
export interface PaginatedCustomFilterList {
/**
*
* @type {number}
* @memberof PaginatedCustomFilterList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedCustomFilterList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedCustomFilterList
*/
previous?: string | null;
/**
*
* @type {Array<CustomFilter>}
* @memberof PaginatedCustomFilterList
*/
results?: Array<CustomFilter>;
}
/**
* Check if a given object implements the PaginatedCustomFilterList interface.
*/
export function instanceOfPaginatedCustomFilterList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedCustomFilterListFromJSON(json: any): PaginatedCustomFilterList {
return PaginatedCustomFilterListFromJSONTyped(json, false);
}
export function PaginatedCustomFilterListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedCustomFilterList {
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 PaginatedCustomFilterListToJSON(value?: PaginatedCustomFilterList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { ExportLog } from './ExportLog';
import {
ExportLogFromJSON,
ExportLogFromJSONTyped,
ExportLogToJSON,
} from './ExportLog';
/**
*
* @export
* @interface PaginatedExportLogList
*/
export interface PaginatedExportLogList {
/**
*
* @type {number}
* @memberof PaginatedExportLogList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedExportLogList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedExportLogList
*/
previous?: string | null;
/**
*
* @type {Array<ExportLog>}
* @memberof PaginatedExportLogList
*/
results?: Array<ExportLog>;
}
/**
* Check if a given object implements the PaginatedExportLogList interface.
*/
export function instanceOfPaginatedExportLogList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedExportLogListFromJSON(json: any): PaginatedExportLogList {
return PaginatedExportLogListFromJSONTyped(json, false);
}
export function PaginatedExportLogListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedExportLogList {
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 PaginatedExportLogListToJSON(value?: PaginatedExportLogList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Food } from './Food';
import {
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
} from './Food';
/**
*
* @export
* @interface PaginatedFoodList
*/
export interface PaginatedFoodList {
/**
*
* @type {number}
* @memberof PaginatedFoodList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedFoodList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedFoodList
*/
previous?: string | null;
/**
*
* @type {Array<Food>}
* @memberof PaginatedFoodList
*/
results?: Array<Food>;
}
/**
* Check if a given object implements the PaginatedFoodList interface.
*/
export function instanceOfPaginatedFoodList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedFoodListFromJSON(json: any): PaginatedFoodList {
return PaginatedFoodListFromJSONTyped(json, false);
}
export function PaginatedFoodListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedFoodList {
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 PaginatedFoodListToJSON(value?: PaginatedFoodList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { ImportLog } from './ImportLog';
import {
ImportLogFromJSON,
ImportLogFromJSONTyped,
ImportLogToJSON,
} from './ImportLog';
/**
*
* @export
* @interface PaginatedImportLogList
*/
export interface PaginatedImportLogList {
/**
*
* @type {number}
* @memberof PaginatedImportLogList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedImportLogList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedImportLogList
*/
previous?: string | null;
/**
*
* @type {Array<ImportLog>}
* @memberof PaginatedImportLogList
*/
results?: Array<ImportLog>;
}
/**
* Check if a given object implements the PaginatedImportLogList interface.
*/
export function instanceOfPaginatedImportLogList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedImportLogListFromJSON(json: any): PaginatedImportLogList {
return PaginatedImportLogListFromJSONTyped(json, false);
}
export function PaginatedImportLogListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedImportLogList {
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 PaginatedImportLogListToJSON(value?: PaginatedImportLogList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Ingredient } from './Ingredient';
import {
IngredientFromJSON,
IngredientFromJSONTyped,
IngredientToJSON,
} from './Ingredient';
/**
*
* @export
* @interface PaginatedIngredientList
*/
export interface PaginatedIngredientList {
/**
*
* @type {number}
* @memberof PaginatedIngredientList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedIngredientList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedIngredientList
*/
previous?: string | null;
/**
*
* @type {Array<Ingredient>}
* @memberof PaginatedIngredientList
*/
results?: Array<Ingredient>;
}
/**
* Check if a given object implements the PaginatedIngredientList interface.
*/
export function instanceOfPaginatedIngredientList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedIngredientListFromJSON(json: any): PaginatedIngredientList {
return PaginatedIngredientListFromJSONTyped(json, false);
}
export function PaginatedIngredientListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedIngredientList {
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 PaginatedIngredientListToJSON(value?: PaginatedIngredientList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { InviteLink } from './InviteLink';
import {
InviteLinkFromJSON,
InviteLinkFromJSONTyped,
InviteLinkToJSON,
} from './InviteLink';
/**
*
* @export
* @interface PaginatedInviteLinkList
*/
export interface PaginatedInviteLinkList {
/**
*
* @type {number}
* @memberof PaginatedInviteLinkList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedInviteLinkList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedInviteLinkList
*/
previous?: string | null;
/**
*
* @type {Array<InviteLink>}
* @memberof PaginatedInviteLinkList
*/
results?: Array<InviteLink>;
}
/**
* Check if a given object implements the PaginatedInviteLinkList interface.
*/
export function instanceOfPaginatedInviteLinkList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedInviteLinkListFromJSON(json: any): PaginatedInviteLinkList {
return PaginatedInviteLinkListFromJSONTyped(json, false);
}
export function PaginatedInviteLinkListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedInviteLinkList {
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(InviteLinkFromJSON)),
};
}
export function PaginatedInviteLinkListToJSON(value?: PaginatedInviteLinkList | 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(InviteLinkToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
} from './Keyword';
/**
*
* @export
* @interface PaginatedKeywordList
*/
export interface PaginatedKeywordList {
/**
*
* @type {number}
* @memberof PaginatedKeywordList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedKeywordList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedKeywordList
*/
previous?: string | null;
/**
*
* @type {Array<Keyword>}
* @memberof PaginatedKeywordList
*/
results?: Array<Keyword>;
}
/**
* Check if a given object implements the PaginatedKeywordList interface.
*/
export function instanceOfPaginatedKeywordList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedKeywordListFromJSON(json: any): PaginatedKeywordList {
return PaginatedKeywordListFromJSONTyped(json, false);
}
export function PaginatedKeywordListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedKeywordList {
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 PaginatedKeywordListToJSON(value?: PaginatedKeywordList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { MealPlan } from './MealPlan';
import {
MealPlanFromJSON,
MealPlanFromJSONTyped,
MealPlanToJSON,
} from './MealPlan';
/**
*
* @export
* @interface PaginatedMealPlanList
*/
export interface PaginatedMealPlanList {
/**
*
* @type {number}
* @memberof PaginatedMealPlanList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedMealPlanList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedMealPlanList
*/
previous?: string | null;
/**
*
* @type {Array<MealPlan>}
* @memberof PaginatedMealPlanList
*/
results?: Array<MealPlan>;
}
/**
* Check if a given object implements the PaginatedMealPlanList interface.
*/
export function instanceOfPaginatedMealPlanList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedMealPlanListFromJSON(json: any): PaginatedMealPlanList {
return PaginatedMealPlanListFromJSONTyped(json, false);
}
export function PaginatedMealPlanListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedMealPlanList {
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(MealPlanFromJSON)),
};
}
export function PaginatedMealPlanListToJSON(value?: PaginatedMealPlanList | 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(MealPlanToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { MealType } from './MealType';
import {
MealTypeFromJSON,
MealTypeFromJSONTyped,
MealTypeToJSON,
} from './MealType';
/**
*
* @export
* @interface PaginatedMealTypeList
*/
export interface PaginatedMealTypeList {
/**
*
* @type {number}
* @memberof PaginatedMealTypeList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedMealTypeList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedMealTypeList
*/
previous?: string | null;
/**
*
* @type {Array<MealType>}
* @memberof PaginatedMealTypeList
*/
results?: Array<MealType>;
}
/**
* Check if a given object implements the PaginatedMealTypeList interface.
*/
export function instanceOfPaginatedMealTypeList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedMealTypeListFromJSON(json: any): PaginatedMealTypeList {
return PaginatedMealTypeListFromJSONTyped(json, false);
}
export function PaginatedMealTypeListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedMealTypeList {
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(MealTypeFromJSON)),
};
}
export function PaginatedMealTypeListToJSON(value?: PaginatedMealTypeList | 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(MealTypeToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Property } from './Property';
import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
} from './Property';
/**
*
* @export
* @interface PaginatedPropertyList
*/
export interface PaginatedPropertyList {
/**
*
* @type {number}
* @memberof PaginatedPropertyList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedPropertyList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedPropertyList
*/
previous?: string | null;
/**
*
* @type {Array<Property>}
* @memberof PaginatedPropertyList
*/
results?: Array<Property>;
}
/**
* Check if a given object implements the PaginatedPropertyList interface.
*/
export function instanceOfPaginatedPropertyList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedPropertyListFromJSON(json: any): PaginatedPropertyList {
return PaginatedPropertyListFromJSONTyped(json, false);
}
export function PaginatedPropertyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPropertyList {
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(PropertyFromJSON)),
};
}
export function PaginatedPropertyListToJSON(value?: PaginatedPropertyList | 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(PropertyToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { PropertyType } from './PropertyType';
import {
PropertyTypeFromJSON,
PropertyTypeFromJSONTyped,
PropertyTypeToJSON,
} from './PropertyType';
/**
*
* @export
* @interface PaginatedPropertyTypeList
*/
export interface PaginatedPropertyTypeList {
/**
*
* @type {number}
* @memberof PaginatedPropertyTypeList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedPropertyTypeList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedPropertyTypeList
*/
previous?: string | null;
/**
*
* @type {Array<PropertyType>}
* @memberof PaginatedPropertyTypeList
*/
results?: Array<PropertyType>;
}
/**
* Check if a given object implements the PaginatedPropertyTypeList interface.
*/
export function instanceOfPaginatedPropertyTypeList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedPropertyTypeListFromJSON(json: any): PaginatedPropertyTypeList {
return PaginatedPropertyTypeListFromJSONTyped(json, false);
}
export function PaginatedPropertyTypeListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedPropertyTypeList {
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(PropertyTypeFromJSON)),
};
}
export function PaginatedPropertyTypeListToJSON(value?: PaginatedPropertyTypeList | 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(PropertyTypeToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { RecipeBookEntry } from './RecipeBookEntry';
import {
RecipeBookEntryFromJSON,
RecipeBookEntryFromJSONTyped,
RecipeBookEntryToJSON,
} from './RecipeBookEntry';
/**
*
* @export
* @interface PaginatedRecipeBookEntryList
*/
export interface PaginatedRecipeBookEntryList {
/**
*
* @type {number}
* @memberof PaginatedRecipeBookEntryList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedRecipeBookEntryList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedRecipeBookEntryList
*/
previous?: string | null;
/**
*
* @type {Array<RecipeBookEntry>}
* @memberof PaginatedRecipeBookEntryList
*/
results?: Array<RecipeBookEntry>;
}
/**
* Check if a given object implements the PaginatedRecipeBookEntryList interface.
*/
export function instanceOfPaginatedRecipeBookEntryList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedRecipeBookEntryListFromJSON(json: any): PaginatedRecipeBookEntryList {
return PaginatedRecipeBookEntryListFromJSONTyped(json, false);
}
export function PaginatedRecipeBookEntryListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRecipeBookEntryList {
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(RecipeBookEntryFromJSON)),
};
}
export function PaginatedRecipeBookEntryListToJSON(value?: PaginatedRecipeBookEntryList | 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(RecipeBookEntryToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { RecipeBook } from './RecipeBook';
import {
RecipeBookFromJSON,
RecipeBookFromJSONTyped,
RecipeBookToJSON,
} from './RecipeBook';
/**
*
* @export
* @interface PaginatedRecipeBookList
*/
export interface PaginatedRecipeBookList {
/**
*
* @type {number}
* @memberof PaginatedRecipeBookList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedRecipeBookList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedRecipeBookList
*/
previous?: string | null;
/**
*
* @type {Array<RecipeBook>}
* @memberof PaginatedRecipeBookList
*/
results?: Array<RecipeBook>;
}
/**
* Check if a given object implements the PaginatedRecipeBookList interface.
*/
export function instanceOfPaginatedRecipeBookList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedRecipeBookListFromJSON(json: any): PaginatedRecipeBookList {
return PaginatedRecipeBookListFromJSONTyped(json, false);
}
export function PaginatedRecipeBookListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRecipeBookList {
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(RecipeBookFromJSON)),
};
}
export function PaginatedRecipeBookListToJSON(value?: PaginatedRecipeBookList | 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(RecipeBookToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { RecipeOverview } from './RecipeOverview';
import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
} from './RecipeOverview';
/**
*
* @export
* @interface PaginatedRecipeOverviewList
*/
export interface PaginatedRecipeOverviewList {
/**
*
* @type {number}
* @memberof PaginatedRecipeOverviewList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedRecipeOverviewList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedRecipeOverviewList
*/
previous?: string | null;
/**
*
* @type {Array<RecipeOverview>}
* @memberof PaginatedRecipeOverviewList
*/
results?: Array<RecipeOverview>;
}
/**
* Check if a given object implements the PaginatedRecipeOverviewList interface.
*/
export function instanceOfPaginatedRecipeOverviewList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedRecipeOverviewListFromJSON(json: any): PaginatedRecipeOverviewList {
return PaginatedRecipeOverviewListFromJSONTyped(json, false);
}
export function PaginatedRecipeOverviewListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRecipeOverviewList {
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 PaginatedRecipeOverviewListToJSON(value?: PaginatedRecipeOverviewList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { ShoppingListEntry } from './ShoppingListEntry';
import {
ShoppingListEntryFromJSON,
ShoppingListEntryFromJSONTyped,
ShoppingListEntryToJSON,
} from './ShoppingListEntry';
/**
*
* @export
* @interface PaginatedShoppingListEntryList
*/
export interface PaginatedShoppingListEntryList {
/**
*
* @type {number}
* @memberof PaginatedShoppingListEntryList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedShoppingListEntryList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedShoppingListEntryList
*/
previous?: string | null;
/**
*
* @type {Array<ShoppingListEntry>}
* @memberof PaginatedShoppingListEntryList
*/
results?: Array<ShoppingListEntry>;
}
/**
* Check if a given object implements the PaginatedShoppingListEntryList interface.
*/
export function instanceOfPaginatedShoppingListEntryList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedShoppingListEntryListFromJSON(json: any): PaginatedShoppingListEntryList {
return PaginatedShoppingListEntryListFromJSONTyped(json, false);
}
export function PaginatedShoppingListEntryListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedShoppingListEntryList {
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(ShoppingListEntryFromJSON)),
};
}
export function PaginatedShoppingListEntryListToJSON(value?: PaginatedShoppingListEntryList | 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(ShoppingListEntryToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { ShoppingListRecipe } from './ShoppingListRecipe';
import {
ShoppingListRecipeFromJSON,
ShoppingListRecipeFromJSONTyped,
ShoppingListRecipeToJSON,
} from './ShoppingListRecipe';
/**
*
* @export
* @interface PaginatedShoppingListRecipeList
*/
export interface PaginatedShoppingListRecipeList {
/**
*
* @type {number}
* @memberof PaginatedShoppingListRecipeList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedShoppingListRecipeList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedShoppingListRecipeList
*/
previous?: string | null;
/**
*
* @type {Array<ShoppingListRecipe>}
* @memberof PaginatedShoppingListRecipeList
*/
results?: Array<ShoppingListRecipe>;
}
/**
* Check if a given object implements the PaginatedShoppingListRecipeList interface.
*/
export function instanceOfPaginatedShoppingListRecipeList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedShoppingListRecipeListFromJSON(json: any): PaginatedShoppingListRecipeList {
return PaginatedShoppingListRecipeListFromJSONTyped(json, false);
}
export function PaginatedShoppingListRecipeListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedShoppingListRecipeList {
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(ShoppingListRecipeFromJSON)),
};
}
export function PaginatedShoppingListRecipeListToJSON(value?: PaginatedShoppingListRecipeList | 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(ShoppingListRecipeToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Step } from './Step';
import {
StepFromJSON,
StepFromJSONTyped,
StepToJSON,
} from './Step';
/**
*
* @export
* @interface PaginatedStepList
*/
export interface PaginatedStepList {
/**
*
* @type {number}
* @memberof PaginatedStepList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedStepList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedStepList
*/
previous?: string | null;
/**
*
* @type {Array<Step>}
* @memberof PaginatedStepList
*/
results?: Array<Step>;
}
/**
* Check if a given object implements the PaginatedStepList interface.
*/
export function instanceOfPaginatedStepList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedStepListFromJSON(json: any): PaginatedStepList {
return PaginatedStepListFromJSONTyped(json, false);
}
export function PaginatedStepListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedStepList {
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 PaginatedStepListToJSON(value?: PaginatedStepList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { SupermarketCategory } from './SupermarketCategory';
import {
SupermarketCategoryFromJSON,
SupermarketCategoryFromJSONTyped,
SupermarketCategoryToJSON,
} from './SupermarketCategory';
/**
*
* @export
* @interface PaginatedSupermarketCategoryList
*/
export interface PaginatedSupermarketCategoryList {
/**
*
* @type {number}
* @memberof PaginatedSupermarketCategoryList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedSupermarketCategoryList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedSupermarketCategoryList
*/
previous?: string | null;
/**
*
* @type {Array<SupermarketCategory>}
* @memberof PaginatedSupermarketCategoryList
*/
results?: Array<SupermarketCategory>;
}
/**
* Check if a given object implements the PaginatedSupermarketCategoryList interface.
*/
export function instanceOfPaginatedSupermarketCategoryList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedSupermarketCategoryListFromJSON(json: any): PaginatedSupermarketCategoryList {
return PaginatedSupermarketCategoryListFromJSONTyped(json, false);
}
export function PaginatedSupermarketCategoryListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSupermarketCategoryList {
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(SupermarketCategoryFromJSON)),
};
}
export function PaginatedSupermarketCategoryListToJSON(value?: PaginatedSupermarketCategoryList | 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(SupermarketCategoryToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { SupermarketCategoryRelation } from './SupermarketCategoryRelation';
import {
SupermarketCategoryRelationFromJSON,
SupermarketCategoryRelationFromJSONTyped,
SupermarketCategoryRelationToJSON,
} from './SupermarketCategoryRelation';
/**
*
* @export
* @interface PaginatedSupermarketCategoryRelationList
*/
export interface PaginatedSupermarketCategoryRelationList {
/**
*
* @type {number}
* @memberof PaginatedSupermarketCategoryRelationList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedSupermarketCategoryRelationList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedSupermarketCategoryRelationList
*/
previous?: string | null;
/**
*
* @type {Array<SupermarketCategoryRelation>}
* @memberof PaginatedSupermarketCategoryRelationList
*/
results?: Array<SupermarketCategoryRelation>;
}
/**
* Check if a given object implements the PaginatedSupermarketCategoryRelationList interface.
*/
export function instanceOfPaginatedSupermarketCategoryRelationList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedSupermarketCategoryRelationListFromJSON(json: any): PaginatedSupermarketCategoryRelationList {
return PaginatedSupermarketCategoryRelationListFromJSONTyped(json, false);
}
export function PaginatedSupermarketCategoryRelationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSupermarketCategoryRelationList {
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 PaginatedSupermarketCategoryRelationListToJSON(value?: PaginatedSupermarketCategoryRelationList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Supermarket } from './Supermarket';
import {
SupermarketFromJSON,
SupermarketFromJSONTyped,
SupermarketToJSON,
} from './Supermarket';
/**
*
* @export
* @interface PaginatedSupermarketList
*/
export interface PaginatedSupermarketList {
/**
*
* @type {number}
* @memberof PaginatedSupermarketList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedSupermarketList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedSupermarketList
*/
previous?: string | null;
/**
*
* @type {Array<Supermarket>}
* @memberof PaginatedSupermarketList
*/
results?: Array<Supermarket>;
}
/**
* Check if a given object implements the PaginatedSupermarketList interface.
*/
export function instanceOfPaginatedSupermarketList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedSupermarketListFromJSON(json: any): PaginatedSupermarketList {
return PaginatedSupermarketListFromJSONTyped(json, false);
}
export function PaginatedSupermarketListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSupermarketList {
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(SupermarketFromJSON)),
};
}
export function PaginatedSupermarketListToJSON(value?: PaginatedSupermarketList | 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(SupermarketToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Sync } from './Sync';
import {
SyncFromJSON,
SyncFromJSONTyped,
SyncToJSON,
} from './Sync';
/**
*
* @export
* @interface PaginatedSyncList
*/
export interface PaginatedSyncList {
/**
*
* @type {number}
* @memberof PaginatedSyncList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedSyncList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedSyncList
*/
previous?: string | null;
/**
*
* @type {Array<Sync>}
* @memberof PaginatedSyncList
*/
results?: Array<Sync>;
}
/**
* Check if a given object implements the PaginatedSyncList interface.
*/
export function instanceOfPaginatedSyncList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedSyncListFromJSON(json: any): PaginatedSyncList {
return PaginatedSyncListFromJSONTyped(json, false);
}
export function PaginatedSyncListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSyncList {
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(SyncFromJSON)),
};
}
export function PaginatedSyncListToJSON(value?: PaginatedSyncList | 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(SyncToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { SyncLog } from './SyncLog';
import {
SyncLogFromJSON,
SyncLogFromJSONTyped,
SyncLogToJSON,
} from './SyncLog';
/**
*
* @export
* @interface PaginatedSyncLogList
*/
export interface PaginatedSyncLogList {
/**
*
* @type {number}
* @memberof PaginatedSyncLogList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedSyncLogList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedSyncLogList
*/
previous?: string | null;
/**
*
* @type {Array<SyncLog>}
* @memberof PaginatedSyncLogList
*/
results?: Array<SyncLog>;
}
/**
* Check if a given object implements the PaginatedSyncLogList interface.
*/
export function instanceOfPaginatedSyncLogList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedSyncLogListFromJSON(json: any): PaginatedSyncLogList {
return PaginatedSyncLogListFromJSONTyped(json, false);
}
export function PaginatedSyncLogListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSyncLogList {
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 PaginatedSyncLogListToJSON(value?: PaginatedSyncLogList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { UnitConversion } from './UnitConversion';
import {
UnitConversionFromJSON,
UnitConversionFromJSONTyped,
UnitConversionToJSON,
} from './UnitConversion';
/**
*
* @export
* @interface PaginatedUnitConversionList
*/
export interface PaginatedUnitConversionList {
/**
*
* @type {number}
* @memberof PaginatedUnitConversionList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedUnitConversionList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedUnitConversionList
*/
previous?: string | null;
/**
*
* @type {Array<UnitConversion>}
* @memberof PaginatedUnitConversionList
*/
results?: Array<UnitConversion>;
}
/**
* Check if a given object implements the PaginatedUnitConversionList interface.
*/
export function instanceOfPaginatedUnitConversionList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedUnitConversionListFromJSON(json: any): PaginatedUnitConversionList {
return PaginatedUnitConversionListFromJSONTyped(json, false);
}
export function PaginatedUnitConversionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUnitConversionList {
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(UnitConversionFromJSON)),
};
}
export function PaginatedUnitConversionListToJSON(value?: PaginatedUnitConversionList | 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(UnitConversionToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { Unit } from './Unit';
import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
} from './Unit';
/**
*
* @export
* @interface PaginatedUnitList
*/
export interface PaginatedUnitList {
/**
*
* @type {number}
* @memberof PaginatedUnitList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedUnitList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedUnitList
*/
previous?: string | null;
/**
*
* @type {Array<Unit>}
* @memberof PaginatedUnitList
*/
results?: Array<Unit>;
}
/**
* Check if a given object implements the PaginatedUnitList interface.
*/
export function instanceOfPaginatedUnitList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedUnitListFromJSON(json: any): PaginatedUnitList {
return PaginatedUnitListFromJSONTyped(json, false);
}
export function PaginatedUnitListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUnitList {
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 PaginatedUnitListToJSON(value?: PaginatedUnitList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { UserFile } from './UserFile';
import {
UserFileFromJSON,
UserFileFromJSONTyped,
UserFileToJSON,
} from './UserFile';
/**
*
* @export
* @interface PaginatedUserFileList
*/
export interface PaginatedUserFileList {
/**
*
* @type {number}
* @memberof PaginatedUserFileList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedUserFileList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedUserFileList
*/
previous?: string | null;
/**
*
* @type {Array<UserFile>}
* @memberof PaginatedUserFileList
*/
results?: Array<UserFile>;
}
/**
* Check if a given object implements the PaginatedUserFileList interface.
*/
export function instanceOfPaginatedUserFileList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedUserFileListFromJSON(json: any): PaginatedUserFileList {
return PaginatedUserFileListFromJSONTyped(json, false);
}
export function PaginatedUserFileListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserFileList {
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(UserFileFromJSON)),
};
}
export function PaginatedUserFileListToJSON(value?: PaginatedUserFileList | 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(UserFileToJSON)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { UserSpace } from './UserSpace';
import {
UserSpaceFromJSON,
UserSpaceFromJSONTyped,
UserSpaceToJSON,
} from './UserSpace';
/**
*
* @export
* @interface PaginatedUserSpaceList
*/
export interface PaginatedUserSpaceList {
/**
*
* @type {number}
* @memberof PaginatedUserSpaceList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedUserSpaceList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedUserSpaceList
*/
previous?: string | null;
/**
*
* @type {Array<UserSpace>}
* @memberof PaginatedUserSpaceList
*/
results?: Array<UserSpace>;
}
/**
* Check if a given object implements the PaginatedUserSpaceList interface.
*/
export function instanceOfPaginatedUserSpaceList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedUserSpaceListFromJSON(json: any): PaginatedUserSpaceList {
return PaginatedUserSpaceListFromJSONTyped(json, false);
}
export function PaginatedUserSpaceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserSpaceList {
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 PaginatedUserSpaceListToJSON(value?: PaginatedUserSpaceList | 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)),
};
}

View File

@@ -1,96 +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 { exists, mapValues } from '../runtime';
import type { ViewLog } from './ViewLog';
import {
ViewLogFromJSON,
ViewLogFromJSONTyped,
ViewLogToJSON,
} from './ViewLog';
/**
*
* @export
* @interface PaginatedViewLogList
*/
export interface PaginatedViewLogList {
/**
*
* @type {number}
* @memberof PaginatedViewLogList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedViewLogList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedViewLogList
*/
previous?: string | null;
/**
*
* @type {Array<ViewLog>}
* @memberof PaginatedViewLogList
*/
results?: Array<ViewLog>;
}
/**
* Check if a given object implements the PaginatedViewLogList interface.
*/
export function instanceOfPaginatedViewLogList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedViewLogListFromJSON(json: any): PaginatedViewLogList {
return PaginatedViewLogListFromJSONTyped(json, false);
}
export function PaginatedViewLogListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedViewLogList {
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 PaginatedViewLogListToJSON(value?: PaginatedViewLogList | 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)),
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedAccessToken
*/
export interface PatchedAccessToken {
/**
*
* @type {number}
* @memberof PatchedAccessToken
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedAccessToken
*/
readonly token?: string;
/**
*
* @type {Date}
* @memberof PatchedAccessToken
*/
expires?: Date;
/**
*
* @type {string}
* @memberof PatchedAccessToken
*/
scope?: string;
/**
*
* @type {Date}
* @memberof PatchedAccessToken
*/
readonly created?: Date;
/**
*
* @type {Date}
* @memberof PatchedAccessToken
*/
readonly updated?: Date;
}
/**
* Check if a given object implements the PatchedAccessToken interface.
*/
export function instanceOfPatchedAccessToken(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedAccessTokenFromJSON(json: any): PatchedAccessToken {
return PatchedAccessTokenFromJSONTyped(json, false);
}
export function PatchedAccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAccessToken {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'token': !exists(json, 'token') ? undefined : json['token'],
'expires': !exists(json, 'expires') ? undefined : (new Date(json['expires'])),
'scope': !exists(json, 'scope') ? undefined : json['scope'],
'created': !exists(json, 'created') ? undefined : (new Date(json['created'])),
'updated': !exists(json, 'updated') ? undefined : (new Date(json['updated'])),
};
}
export function PatchedAccessTokenToJSON(value?: PatchedAccessToken | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'expires': value.expires === undefined ? undefined : (value.expires.toISOString()),
'scope': value.scope,
};
}

View File

@@ -1,142 +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 { exists, mapValues } from '../runtime';
import type { TypeEnum } from './TypeEnum';
import {
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
} from './TypeEnum';
/**
*
* @export
* @interface PatchedAutomation
*/
export interface PatchedAutomation {
/**
*
* @type {number}
* @memberof PatchedAutomation
*/
readonly id?: number;
/**
*
* @type {TypeEnum}
* @memberof PatchedAutomation
*/
type?: TypeEnum;
/**
*
* @type {string}
* @memberof PatchedAutomation
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedAutomation
*/
description?: string | null;
/**
*
* @type {string}
* @memberof PatchedAutomation
*/
param1?: string | null;
/**
*
* @type {string}
* @memberof PatchedAutomation
*/
param2?: string | null;
/**
*
* @type {string}
* @memberof PatchedAutomation
*/
param3?: string | null;
/**
*
* @type {number}
* @memberof PatchedAutomation
*/
order?: number;
/**
*
* @type {boolean}
* @memberof PatchedAutomation
*/
disabled?: boolean;
/**
*
* @type {number}
* @memberof PatchedAutomation
*/
readonly createdBy?: number;
}
/**
* Check if a given object implements the PatchedAutomation interface.
*/
export function instanceOfPatchedAutomation(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedAutomationFromJSON(json: any): PatchedAutomation {
return PatchedAutomationFromJSONTyped(json, false);
}
export function PatchedAutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAutomation {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'type': !exists(json, 'type') ? undefined : TypeEnumFromJSON(json['type']),
'name': !exists(json, 'name') ? undefined : json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'param1': !exists(json, 'param_1') ? undefined : json['param_1'],
'param2': !exists(json, 'param_2') ? undefined : json['param_2'],
'param3': !exists(json, 'param_3') ? undefined : json['param_3'],
'order': !exists(json, 'order') ? undefined : json['order'],
'disabled': !exists(json, 'disabled') ? undefined : json['disabled'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
};
}
export function PatchedAutomationToJSON(value?: PatchedAutomation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
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,
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedBookmarkletImport
*/
export interface PatchedBookmarkletImport {
/**
*
* @type {number}
* @memberof PatchedBookmarkletImport
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedBookmarkletImport
*/
url?: string | null;
/**
*
* @type {string}
* @memberof PatchedBookmarkletImport
*/
html?: string;
/**
*
* @type {number}
* @memberof PatchedBookmarkletImport
*/
readonly createdBy?: number;
/**
*
* @type {Date}
* @memberof PatchedBookmarkletImport
*/
readonly createdAt?: Date;
}
/**
* Check if a given object implements the PatchedBookmarkletImport interface.
*/
export function instanceOfPatchedBookmarkletImport(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedBookmarkletImportFromJSON(json: any): PatchedBookmarkletImport {
return PatchedBookmarkletImportFromJSONTyped(json, false);
}
export function PatchedBookmarkletImportFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedBookmarkletImport {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'url': !exists(json, 'url') ? undefined : json['url'],
'html': !exists(json, 'html') ? undefined : json['html'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
};
}
export function PatchedBookmarkletImportToJSON(value?: PatchedBookmarkletImport | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'url': value.url,
'html': value.html,
};
}

View File

@@ -1,135 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedConnectorConfigConfig
*/
export interface PatchedConnectorConfigConfig {
/**
*
* @type {number}
* @memberof PatchedConnectorConfigConfig
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedConnectorConfigConfig
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedConnectorConfigConfig
*/
url?: string | null;
/**
*
* @type {string}
* @memberof PatchedConnectorConfigConfig
*/
token?: string | null;
/**
*
* @type {string}
* @memberof PatchedConnectorConfigConfig
*/
todoEntity?: string | null;
/**
* Is Connector Enabled
* @type {boolean}
* @memberof PatchedConnectorConfigConfig
*/
enabled?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedConnectorConfigConfig
*/
onShoppingListEntryCreatedEnabled?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedConnectorConfigConfig
*/
onShoppingListEntryUpdatedEnabled?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedConnectorConfigConfig
*/
onShoppingListEntryDeletedEnabled?: boolean;
/**
*
* @type {number}
* @memberof PatchedConnectorConfigConfig
*/
readonly createdBy?: number;
}
/**
* Check if a given object implements the PatchedConnectorConfigConfig interface.
*/
export function instanceOfPatchedConnectorConfigConfig(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedConnectorConfigConfigFromJSON(json: any): PatchedConnectorConfigConfig {
return PatchedConnectorConfigConfigFromJSONTyped(json, false);
}
export function PatchedConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedConnectorConfigConfig {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'url': !exists(json, 'url') ? undefined : json['url'],
'token': !exists(json, 'token') ? undefined : json['token'],
'todoEntity': !exists(json, 'todo_entity') ? undefined : json['todo_entity'],
'enabled': !exists(json, 'enabled') ? undefined : json['enabled'],
'onShoppingListEntryCreatedEnabled': !exists(json, 'on_shopping_list_entry_created_enabled') ? undefined : json['on_shopping_list_entry_created_enabled'],
'onShoppingListEntryUpdatedEnabled': !exists(json, 'on_shopping_list_entry_updated_enabled') ? undefined : json['on_shopping_list_entry_updated_enabled'],
'onShoppingListEntryDeletedEnabled': !exists(json, 'on_shopping_list_entry_deleted_enabled') ? undefined : json['on_shopping_list_entry_deleted_enabled'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
};
}
export function PatchedConnectorConfigConfigToJSON(value?: PatchedConnectorConfigConfig | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
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,
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
*
* @export
* @interface PatchedCookLog
*/
export interface PatchedCookLog {
/**
*
* @type {number}
* @memberof PatchedCookLog
*/
readonly id?: number;
/**
*
* @type {number}
* @memberof PatchedCookLog
*/
recipe?: number;
/**
*
* @type {number}
* @memberof PatchedCookLog
*/
servings?: number | null;
/**
*
* @type {number}
* @memberof PatchedCookLog
*/
rating?: number | null;
/**
*
* @type {string}
* @memberof PatchedCookLog
*/
comment?: string | null;
/**
*
* @type {User}
* @memberof PatchedCookLog
*/
readonly createdBy?: User;
/**
*
* @type {Date}
* @memberof PatchedCookLog
*/
createdAt?: Date;
/**
*
* @type {Date}
* @memberof PatchedCookLog
*/
readonly updatedAt?: Date;
}
/**
* Check if a given object implements the PatchedCookLog interface.
*/
export function instanceOfPatchedCookLog(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedCookLogFromJSON(json: any): PatchedCookLog {
return PatchedCookLogFromJSONTyped(json, false);
}
export function PatchedCookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCookLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'recipe': !exists(json, 'recipe') ? undefined : json['recipe'],
'servings': !exists(json, 'servings') ? undefined : json['servings'],
'rating': !exists(json, 'rating') ? undefined : json['rating'],
'comment': !exists(json, 'comment') ? undefined : json['comment'],
'createdBy': !exists(json, 'created_by') ? undefined : UserFromJSON(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'])),
};
}
export function PatchedCookLogToJSON(value?: PatchedCookLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'recipe': value.recipe,
'servings': value.servings,
'rating': value.rating,
'comment': value.comment,
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
};
}

View File

@@ -1,102 +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 { exists, mapValues } from '../runtime';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
* Adds nested create feature
* @export
* @interface PatchedCustomFilter
*/
export interface PatchedCustomFilter {
/**
*
* @type {number}
* @memberof PatchedCustomFilter
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedCustomFilter
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedCustomFilter
*/
search?: string;
/**
*
* @type {Array<User>}
* @memberof PatchedCustomFilter
*/
shared?: Array<User>;
/**
*
* @type {number}
* @memberof PatchedCustomFilter
*/
readonly createdBy?: number;
}
/**
* Check if a given object implements the PatchedCustomFilter interface.
*/
export function instanceOfPatchedCustomFilter(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedCustomFilterFromJSON(json: any): PatchedCustomFilter {
return PatchedCustomFilterFromJSONTyped(json, false);
}
export function PatchedCustomFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCustomFilter {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'search': !exists(json, 'search') ? undefined : json['search'],
'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
};
}
export function PatchedCustomFilterToJSON(value?: PatchedCustomFilter | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'search': value.search,
'shared': value.shared === undefined ? undefined : ((value.shared as Array<any>).map(UserToJSON)),
};
}

View File

@@ -1,134 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedExportLog
*/
export interface PatchedExportLog {
/**
*
* @type {number}
* @memberof PatchedExportLog
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedExportLog
*/
type?: string;
/**
*
* @type {string}
* @memberof PatchedExportLog
*/
msg?: string;
/**
*
* @type {boolean}
* @memberof PatchedExportLog
*/
running?: boolean;
/**
*
* @type {number}
* @memberof PatchedExportLog
*/
totalRecipes?: number;
/**
*
* @type {number}
* @memberof PatchedExportLog
*/
exportedRecipes?: number;
/**
*
* @type {number}
* @memberof PatchedExportLog
*/
cacheDuration?: number;
/**
*
* @type {boolean}
* @memberof PatchedExportLog
*/
possiblyNotExpired?: boolean;
/**
*
* @type {number}
* @memberof PatchedExportLog
*/
readonly createdBy?: number;
/**
*
* @type {Date}
* @memberof PatchedExportLog
*/
readonly createdAt?: Date;
}
/**
* Check if a given object implements the PatchedExportLog interface.
*/
export function instanceOfPatchedExportLog(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedExportLogFromJSON(json: any): PatchedExportLog {
return PatchedExportLogFromJSONTyped(json, false);
}
export function PatchedExportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedExportLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'type': !exists(json, 'type') ? undefined : json['type'],
'msg': !exists(json, 'msg') ? undefined : json['msg'],
'running': !exists(json, 'running') ? undefined : json['running'],
'totalRecipes': !exists(json, 'total_recipes') ? undefined : json['total_recipes'],
'exportedRecipes': !exists(json, 'exported_recipes') ? undefined : json['exported_recipes'],
'cacheDuration': !exists(json, 'cache_duration') ? undefined : json['cache_duration'],
'possiblyNotExpired': !exists(json, 'possibly_not_expired') ? undefined : json['possibly_not_expired'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
};
}
export function PatchedExportLogToJSON(value?: PatchedExportLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
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,
};
}

View File

@@ -1,315 +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 { exists, mapValues } from '../runtime';
import type { FoodInheritField } from './FoodInheritField';
import {
FoodInheritFieldFromJSON,
FoodInheritFieldFromJSONTyped,
FoodInheritFieldToJSON,
} from './FoodInheritField';
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
import {
FoodPropertiesFoodUnitFromJSON,
FoodPropertiesFoodUnitFromJSONTyped,
FoodPropertiesFoodUnitToJSON,
} from './FoodPropertiesFoodUnit';
import type { FoodRecipe } from './FoodRecipe';
import {
FoodRecipeFromJSON,
FoodRecipeFromJSONTyped,
FoodRecipeToJSON,
} from './FoodRecipe';
import type { FoodSimple } from './FoodSimple';
import {
FoodSimpleFromJSON,
FoodSimpleFromJSONTyped,
FoodSimpleToJSON,
} from './FoodSimple';
import type { FoodSupermarketCategory } from './FoodSupermarketCategory';
import {
FoodSupermarketCategoryFromJSON,
FoodSupermarketCategoryFromJSONTyped,
FoodSupermarketCategoryToJSON,
} from './FoodSupermarketCategory';
import type { Property } from './Property';
import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
} from './Property';
/**
* 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 PatchedFood
*/
export interface PatchedFood {
/**
*
* @type {number}
* @memberof PatchedFood
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedFood
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedFood
*/
pluralName?: string | null;
/**
*
* @type {string}
* @memberof PatchedFood
*/
description?: string;
/**
*
* @type {string}
* @memberof PatchedFood
*/
readonly shopping?: string;
/**
*
* @type {FoodRecipe}
* @memberof PatchedFood
*/
recipe?: FoodRecipe | null;
/**
*
* @type {string}
* @memberof PatchedFood
*/
url?: string | null;
/**
*
* @type {Array<Property>}
* @memberof PatchedFood
*/
properties?: Array<Property> | null;
/**
*
* @type {number}
* @memberof PatchedFood
*/
propertiesFoodAmount?: number;
/**
*
* @type {FoodPropertiesFoodUnit}
* @memberof PatchedFood
*/
propertiesFoodUnit?: FoodPropertiesFoodUnit | null;
/**
*
* @type {number}
* @memberof PatchedFood
*/
fdcId?: number | null;
/**
*
* @type {boolean}
* @memberof PatchedFood
*/
foodOnhand?: boolean | null;
/**
*
* @type {FoodSupermarketCategory}
* @memberof PatchedFood
*/
supermarketCategory?: FoodSupermarketCategory | null;
/**
*
* @type {number}
* @memberof PatchedFood
*/
readonly parent?: number;
/**
*
* @type {number}
* @memberof PatchedFood
*/
readonly numchild?: number;
/**
*
* @type {Array<FoodInheritField>}
* @memberof PatchedFood
*/
inheritFields?: Array<FoodInheritField> | null;
/**
* Returns a string representation of a tree node and it's ancestors,
* e.g. 'Cuisine > Asian > Chinese > Catonese'.
* @type {string}
* @memberof PatchedFood
*/
readonly fullName?: string;
/**
*
* @type {boolean}
* @memberof PatchedFood
*/
ignoreShopping?: boolean;
/**
*
* @type {Array<FoodSimple>}
* @memberof PatchedFood
*/
substitute?: Array<FoodSimple> | null;
/**
*
* @type {boolean}
* @memberof PatchedFood
*/
substituteSiblings?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedFood
*/
substituteChildren?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedFood
*/
readonly substituteOnhand?: boolean;
/**
*
* @type {Array<FoodInheritField>}
* @memberof PatchedFood
*/
childInheritFields?: Array<FoodInheritField> | null;
/**
*
* @type {string}
* @memberof PatchedFood
*/
openDataSlug?: string | null;
}
/**
* Check if a given object implements the PatchedFood interface.
*/
export function instanceOfPatchedFood(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedFoodFromJSON(json: any): PatchedFood {
return PatchedFoodFromJSONTyped(json, false);
}
export function PatchedFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedFood {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : 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(PropertyFromJSON)),
'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(FoodInheritFieldFromJSON)),
'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(FoodSimpleFromJSON)),
'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(FoodInheritFieldFromJSON)),
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
};
}
export function PatchedFoodToJSON(value?: PatchedFood | 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(PropertyToJSON)),
'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(FoodInheritFieldToJSON)),
'ignore_shopping': value.ignoreShopping,
'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array<any>).map(FoodSimpleToJSON)),
'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(FoodInheritFieldToJSON)),
'open_data_slug': value.openDataSlug,
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
} from './Keyword';
/**
*
* @export
* @interface PatchedImportLog
*/
export interface PatchedImportLog {
/**
*
* @type {number}
* @memberof PatchedImportLog
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedImportLog
*/
type?: string;
/**
*
* @type {string}
* @memberof PatchedImportLog
*/
msg?: string;
/**
*
* @type {boolean}
* @memberof PatchedImportLog
*/
running?: boolean;
/**
*
* @type {Keyword}
* @memberof PatchedImportLog
*/
readonly keyword?: Keyword;
/**
*
* @type {number}
* @memberof PatchedImportLog
*/
totalRecipes?: number;
/**
*
* @type {number}
* @memberof PatchedImportLog
*/
importedRecipes?: number;
/**
*
* @type {number}
* @memberof PatchedImportLog
*/
readonly createdBy?: number;
/**
*
* @type {Date}
* @memberof PatchedImportLog
*/
readonly createdAt?: Date;
}
/**
* Check if a given object implements the PatchedImportLog interface.
*/
export function instanceOfPatchedImportLog(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedImportLogFromJSON(json: any): PatchedImportLog {
return PatchedImportLogFromJSONTyped(json, false);
}
export function PatchedImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedImportLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'type': !exists(json, 'type') ? undefined : json['type'],
'msg': !exists(json, 'msg') ? undefined : json['msg'],
'running': !exists(json, 'running') ? undefined : json['running'],
'keyword': !exists(json, 'keyword') ? undefined : KeywordFromJSON(json['keyword']),
'totalRecipes': !exists(json, 'total_recipes') ? undefined : json['total_recipes'],
'importedRecipes': !exists(json, 'imported_recipes') ? undefined : json['imported_recipes'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
};
}
export function PatchedImportLogToJSON(value?: PatchedImportLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'type': value.type,
'msg': value.msg,
'running': value.running,
'total_recipes': value.totalRecipes,
'imported_recipes': value.importedRecipes,
};
}

View File

@@ -1,171 +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 { exists, mapValues } from '../runtime';
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
import {
FoodPropertiesFoodUnitFromJSON,
FoodPropertiesFoodUnitFromJSONTyped,
FoodPropertiesFoodUnitToJSON,
} from './FoodPropertiesFoodUnit';
import type { IngredientFood } from './IngredientFood';
import {
IngredientFoodFromJSON,
IngredientFoodFromJSONTyped,
IngredientFoodToJSON,
} from './IngredientFood';
/**
* Adds nested create feature
* @export
* @interface PatchedIngredient
*/
export interface PatchedIngredient {
/**
*
* @type {number}
* @memberof PatchedIngredient
*/
readonly id?: number;
/**
*
* @type {IngredientFood}
* @memberof PatchedIngredient
*/
food?: IngredientFood | null;
/**
*
* @type {FoodPropertiesFoodUnit}
* @memberof PatchedIngredient
*/
unit?: FoodPropertiesFoodUnit | null;
/**
*
* @type {number}
* @memberof PatchedIngredient
*/
amount?: number;
/**
*
* @type {Array<any>}
* @memberof PatchedIngredient
*/
readonly conversions?: Array<any>;
/**
*
* @type {string}
* @memberof PatchedIngredient
*/
note?: string | null;
/**
*
* @type {number}
* @memberof PatchedIngredient
*/
order?: number;
/**
*
* @type {boolean}
* @memberof PatchedIngredient
*/
isHeader?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedIngredient
*/
noAmount?: boolean;
/**
*
* @type {string}
* @memberof PatchedIngredient
*/
originalText?: string | null;
/**
*
* @type {Array<any>}
* @memberof PatchedIngredient
*/
readonly usedInRecipes?: Array<any>;
/**
*
* @type {boolean}
* @memberof PatchedIngredient
*/
alwaysUsePluralUnit?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedIngredient
*/
alwaysUsePluralFood?: boolean;
}
/**
* Check if a given object implements the PatchedIngredient interface.
*/
export function instanceOfPatchedIngredient(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedIngredientFromJSON(json: any): PatchedIngredient {
return PatchedIngredientFromJSONTyped(json, false);
}
export function PatchedIngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedIngredient {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'food': !exists(json, 'food') ? undefined : IngredientFoodFromJSON(json['food']),
'unit': !exists(json, 'unit') ? undefined : FoodPropertiesFoodUnitFromJSON(json['unit']),
'amount': !exists(json, 'amount') ? undefined : json['amount'],
'conversions': !exists(json, 'conversions') ? undefined : json['conversions'],
'note': !exists(json, 'note') ? undefined : json['note'],
'order': !exists(json, 'order') ? undefined : json['order'],
'isHeader': !exists(json, 'is_header') ? undefined : json['is_header'],
'noAmount': !exists(json, 'no_amount') ? undefined : json['no_amount'],
'originalText': !exists(json, 'original_text') ? undefined : json['original_text'],
'usedInRecipes': !exists(json, 'used_in_recipes') ? undefined : json['used_in_recipes'],
'alwaysUsePluralUnit': !exists(json, 'always_use_plural_unit') ? undefined : json['always_use_plural_unit'],
'alwaysUsePluralFood': !exists(json, 'always_use_plural_food') ? undefined : json['always_use_plural_food'],
};
}
export function PatchedIngredientToJSON(value?: PatchedIngredient | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'food': IngredientFoodToJSON(value.food),
'unit': FoodPropertiesFoodUnitToJSON(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,
};
}

View File

@@ -1,140 +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 { exists, mapValues } from '../runtime';
import type { Group } from './Group';
import {
GroupFromJSON,
GroupFromJSONTyped,
GroupToJSON,
} from './Group';
/**
* Adds nested create feature
* @export
* @interface PatchedInviteLink
*/
export interface PatchedInviteLink {
/**
*
* @type {number}
* @memberof PatchedInviteLink
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedInviteLink
*/
readonly uuid?: string;
/**
*
* @type {string}
* @memberof PatchedInviteLink
*/
email?: string;
/**
*
* @type {Group}
* @memberof PatchedInviteLink
*/
group?: Group;
/**
*
* @type {Date}
* @memberof PatchedInviteLink
*/
validUntil?: Date;
/**
*
* @type {number}
* @memberof PatchedInviteLink
*/
usedBy?: number | null;
/**
*
* @type {boolean}
* @memberof PatchedInviteLink
*/
reusable?: boolean;
/**
*
* @type {string}
* @memberof PatchedInviteLink
*/
internalNote?: string | null;
/**
*
* @type {number}
* @memberof PatchedInviteLink
*/
readonly createdBy?: number;
/**
*
* @type {Date}
* @memberof PatchedInviteLink
*/
readonly createdAt?: Date;
}
/**
* Check if a given object implements the PatchedInviteLink interface.
*/
export function instanceOfPatchedInviteLink(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedInviteLinkFromJSON(json: any): PatchedInviteLink {
return PatchedInviteLinkFromJSONTyped(json, false);
}
export function PatchedInviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedInviteLink {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'uuid': !exists(json, 'uuid') ? undefined : json['uuid'],
'email': !exists(json, 'email') ? undefined : json['email'],
'group': !exists(json, 'group') ? undefined : GroupFromJSON(json['group']),
'validUntil': !exists(json, 'valid_until') ? undefined : (new Date(json['valid_until'])),
'usedBy': !exists(json, 'used_by') ? undefined : json['used_by'],
'reusable': !exists(json, 'reusable') ? undefined : json['reusable'],
'internalNote': !exists(json, 'internal_note') ? undefined : json['internal_note'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
};
}
export function PatchedInviteLinkToJSON(value?: PatchedInviteLink | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'email': value.email,
'group': GroupToJSON(value.group),
'valid_until': value.validUntil === undefined ? undefined : (value.validUntil.toISOString().substr(0,10)),
'used_by': value.usedBy,
'reusable': value.reusable,
'internal_note': value.internalNote,
};
}

View File

@@ -1,157 +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 { exists, 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 PatchedKeyword
*/
export interface PatchedKeyword {
/**
*
* @type {number}
* @memberof PatchedKeyword
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedKeyword
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedKeyword
*/
readonly label?: string;
/**
*
* @type {string}
* @memberof PatchedKeyword
*/
description?: string;
/**
*
* @type {number}
* @memberof PatchedKeyword
*/
readonly parent?: number;
/**
*
* @type {number}
* @memberof PatchedKeyword
*/
readonly numchild?: number;
/**
*
* @type {Date}
* @memberof PatchedKeyword
*/
readonly createdAt?: Date;
/**
*
* @type {Date}
* @memberof PatchedKeyword
*/
readonly updatedAt?: Date;
/**
* Returns a string representation of a tree node and it's ancestors,
* e.g. 'Cuisine > Asian > Chinese > Catonese'.
* @type {string}
* @memberof PatchedKeyword
*/
readonly fullName?: string;
}
/**
* Check if a given object implements the PatchedKeyword interface.
*/
export function instanceOfPatchedKeyword(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedKeywordFromJSON(json: any): PatchedKeyword {
return PatchedKeywordFromJSONTyped(json, false);
}
export function PatchedKeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedKeyword {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : 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 PatchedKeywordToJSON(value?: PatchedKeyword | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'description': value.description,
};
}

View File

@@ -1,182 +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 { exists, mapValues } from '../runtime';
import type { MealPlanRecipe } from './MealPlanRecipe';
import {
MealPlanRecipeFromJSON,
MealPlanRecipeFromJSONTyped,
MealPlanRecipeToJSON,
} from './MealPlanRecipe';
import type { MealType } from './MealType';
import {
MealTypeFromJSON,
MealTypeFromJSONTyped,
MealTypeToJSON,
} from './MealType';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
* Adds nested create feature
* @export
* @interface PatchedMealPlan
*/
export interface PatchedMealPlan {
/**
*
* @type {number}
* @memberof PatchedMealPlan
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedMealPlan
*/
title?: string;
/**
*
* @type {MealPlanRecipe}
* @memberof PatchedMealPlan
*/
recipe?: MealPlanRecipe | null;
/**
*
* @type {number}
* @memberof PatchedMealPlan
*/
servings?: number;
/**
*
* @type {string}
* @memberof PatchedMealPlan
*/
note?: string;
/**
*
* @type {string}
* @memberof PatchedMealPlan
*/
readonly noteMarkdown?: string;
/**
*
* @type {Date}
* @memberof PatchedMealPlan
*/
fromDate?: Date;
/**
*
* @type {Date}
* @memberof PatchedMealPlan
*/
toDate?: Date;
/**
*
* @type {MealType}
* @memberof PatchedMealPlan
*/
mealType?: MealType;
/**
*
* @type {number}
* @memberof PatchedMealPlan
*/
readonly createdBy?: number;
/**
*
* @type {Array<User>}
* @memberof PatchedMealPlan
*/
shared?: Array<User> | null;
/**
*
* @type {string}
* @memberof PatchedMealPlan
*/
readonly recipeName?: string;
/**
*
* @type {string}
* @memberof PatchedMealPlan
*/
readonly mealTypeName?: string;
/**
*
* @type {boolean}
* @memberof PatchedMealPlan
*/
readonly shopping?: boolean;
}
/**
* Check if a given object implements the PatchedMealPlan interface.
*/
export function instanceOfPatchedMealPlan(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedMealPlanFromJSON(json: any): PatchedMealPlan {
return PatchedMealPlanFromJSONTyped(json, false);
}
export function PatchedMealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMealPlan {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'title': !exists(json, 'title') ? undefined : json['title'],
'recipe': !exists(json, 'recipe') ? undefined : MealPlanRecipeFromJSON(json['recipe']),
'servings': !exists(json, 'servings') ? undefined : json['servings'],
'note': !exists(json, 'note') ? undefined : json['note'],
'noteMarkdown': !exists(json, 'note_markdown') ? undefined : json['note_markdown'],
'fromDate': !exists(json, 'from_date') ? undefined : (new Date(json['from_date'])),
'toDate': !exists(json, 'to_date') ? undefined : (new Date(json['to_date'])),
'mealType': !exists(json, 'meal_type') ? undefined : MealTypeFromJSON(json['meal_type']),
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'shared': !exists(json, 'shared') ? undefined : (json['shared'] === null ? null : (json['shared'] as Array<any>).map(UserFromJSON)),
'recipeName': !exists(json, 'recipe_name') ? undefined : json['recipe_name'],
'mealTypeName': !exists(json, 'meal_type_name') ? undefined : json['meal_type_name'],
'shopping': !exists(json, 'shopping') ? undefined : json['shopping'],
};
}
export function PatchedMealPlanToJSON(value?: PatchedMealPlan | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'title': value.title,
'recipe': MealPlanRecipeToJSON(value.recipe),
'servings': value.servings,
'note': value.note,
'from_date': value.fromDate === undefined ? undefined : (value.fromDate.toISOString().substr(0,10)),
'to_date': value.toDate === undefined ? undefined : (value.toDate.toISOString().substr(0,10)),
'meal_type': MealTypeToJSON(value.mealType),
'shared': value.shared === undefined ? undefined : (value.shared === null ? null : (value.shared as Array<any>).map(UserToJSON)),
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
/**
* Adds nested create feature
* @export
* @interface PatchedMealType
*/
export interface PatchedMealType {
/**
*
* @type {number}
* @memberof PatchedMealType
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedMealType
*/
name?: string;
/**
*
* @type {number}
* @memberof PatchedMealType
*/
order?: number;
/**
*
* @type {string}
* @memberof PatchedMealType
*/
color?: string | null;
/**
*
* @type {boolean}
* @memberof PatchedMealType
*/
_default?: boolean;
/**
*
* @type {number}
* @memberof PatchedMealType
*/
readonly createdBy?: number;
}
/**
* Check if a given object implements the PatchedMealType interface.
*/
export function instanceOfPatchedMealType(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedMealTypeFromJSON(json: any): PatchedMealType {
return PatchedMealTypeFromJSONTyped(json, false);
}
export function PatchedMealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMealType {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : 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 PatchedMealTypeToJSON(value?: PatchedMealType | 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,
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
import type { PropertyType } from './PropertyType';
import {
PropertyTypeFromJSON,
PropertyTypeFromJSONTyped,
PropertyTypeToJSON,
} from './PropertyType';
/**
* 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 PatchedProperty
*/
export interface PatchedProperty {
/**
*
* @type {number}
* @memberof PatchedProperty
*/
readonly id?: number;
/**
*
* @type {number}
* @memberof PatchedProperty
*/
propertyAmount?: number | null;
/**
*
* @type {PropertyType}
* @memberof PatchedProperty
*/
propertyType?: PropertyType;
}
/**
* Check if a given object implements the PatchedProperty interface.
*/
export function instanceOfPatchedProperty(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedPropertyFromJSON(json: any): PatchedProperty {
return PatchedPropertyFromJSONTyped(json, false);
}
export function PatchedPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedProperty {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'propertyAmount': !exists(json, 'property_amount') ? undefined : json['property_amount'],
'propertyType': !exists(json, 'property_type') ? undefined : PropertyTypeFromJSON(json['property_type']),
};
}
export function PatchedPropertyToJSON(value?: PatchedProperty | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'property_amount': value.propertyAmount,
'property_type': PropertyTypeToJSON(value.propertyType),
};
}

View File

@@ -1,113 +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 { exists, mapValues } from '../runtime';
/**
* Adds nested create feature
* @export
* @interface PatchedPropertyType
*/
export interface PatchedPropertyType {
/**
*
* @type {number}
* @memberof PatchedPropertyType
*/
id?: number;
/**
*
* @type {string}
* @memberof PatchedPropertyType
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedPropertyType
*/
unit?: string | null;
/**
*
* @type {string}
* @memberof PatchedPropertyType
*/
description?: string | null;
/**
*
* @type {number}
* @memberof PatchedPropertyType
*/
order?: number;
/**
*
* @type {string}
* @memberof PatchedPropertyType
*/
openDataSlug?: string | null;
/**
*
* @type {number}
* @memberof PatchedPropertyType
*/
fdcId?: number | null;
}
/**
* Check if a given object implements the PatchedPropertyType interface.
*/
export function instanceOfPatchedPropertyType(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedPropertyTypeFromJSON(json: any): PatchedPropertyType {
return PatchedPropertyTypeFromJSONTyped(json, false);
}
export function PatchedPropertyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPropertyType {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : 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 PatchedPropertyTypeToJSON(value?: PatchedPropertyType | 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,
};
}

View File

@@ -1,272 +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 { exists, mapValues } from '../runtime';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
} from './Keyword';
import type { PatchedRecipeNutrition } from './PatchedRecipeNutrition';
import {
PatchedRecipeNutritionFromJSON,
PatchedRecipeNutritionFromJSONTyped,
PatchedRecipeNutritionToJSON,
} from './PatchedRecipeNutrition';
import type { Property } from './Property';
import {
PropertyFromJSON,
PropertyFromJSONTyped,
PropertyToJSON,
} from './Property';
import type { Step } from './Step';
import {
StepFromJSON,
StepFromJSONTyped,
StepToJSON,
} from './Step';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
* Adds nested create feature
* @export
* @interface PatchedRecipe
*/
export interface PatchedRecipe {
/**
*
* @type {number}
* @memberof PatchedRecipe
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedRecipe
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedRecipe
*/
description?: string | null;
/**
*
* @type {string}
* @memberof PatchedRecipe
*/
readonly image?: string | null;
/**
*
* @type {Array<Keyword>}
* @memberof PatchedRecipe
*/
keywords?: Array<Keyword>;
/**
*
* @type {Array<Step>}
* @memberof PatchedRecipe
*/
steps?: Array<Step>;
/**
*
* @type {number}
* @memberof PatchedRecipe
*/
workingTime?: number;
/**
*
* @type {number}
* @memberof PatchedRecipe
*/
waitingTime?: number;
/**
*
* @type {number}
* @memberof PatchedRecipe
*/
readonly createdBy?: number;
/**
*
* @type {Date}
* @memberof PatchedRecipe
*/
readonly createdAt?: Date;
/**
*
* @type {Date}
* @memberof PatchedRecipe
*/
readonly updatedAt?: Date;
/**
*
* @type {string}
* @memberof PatchedRecipe
*/
sourceUrl?: string | null;
/**
*
* @type {boolean}
* @memberof PatchedRecipe
*/
internal?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedRecipe
*/
showIngredientOverview?: boolean;
/**
*
* @type {PatchedRecipeNutrition}
* @memberof PatchedRecipe
*/
nutrition?: PatchedRecipeNutrition | null;
/**
*
* @type {Array<Property>}
* @memberof PatchedRecipe
*/
properties?: Array<Property>;
/**
*
* @type {any}
* @memberof PatchedRecipe
*/
readonly foodProperties?: any | null;
/**
*
* @type {number}
* @memberof PatchedRecipe
*/
servings?: number;
/**
*
* @type {string}
* @memberof PatchedRecipe
*/
filePath?: string;
/**
*
* @type {string}
* @memberof PatchedRecipe
*/
servingsText?: string;
/**
*
* @type {number}
* @memberof PatchedRecipe
*/
readonly rating?: number | null;
/**
*
* @type {Date}
* @memberof PatchedRecipe
*/
readonly lastCooked?: Date | null;
/**
*
* @type {boolean}
* @memberof PatchedRecipe
*/
_private?: boolean;
/**
*
* @type {Array<User>}
* @memberof PatchedRecipe
*/
shared?: Array<User>;
}
/**
* Check if a given object implements the PatchedRecipe interface.
*/
export function instanceOfPatchedRecipe(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedRecipeFromJSON(json: any): PatchedRecipe {
return PatchedRecipeFromJSONTyped(json, false);
}
export function PatchedRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipe {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'image': !exists(json, 'image') ? undefined : json['image'],
'keywords': !exists(json, 'keywords') ? undefined : ((json['keywords'] as Array<any>).map(KeywordFromJSON)),
'steps': !exists(json, 'steps') ? undefined : ((json['steps'] as Array<any>).map(StepFromJSON)),
'workingTime': !exists(json, 'working_time') ? undefined : json['working_time'],
'waitingTime': !exists(json, 'waiting_time') ? undefined : json['waiting_time'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
'sourceUrl': !exists(json, 'source_url') ? undefined : json['source_url'],
'internal': !exists(json, 'internal') ? undefined : json['internal'],
'showIngredientOverview': !exists(json, 'show_ingredient_overview') ? undefined : json['show_ingredient_overview'],
'nutrition': !exists(json, 'nutrition') ? undefined : PatchedRecipeNutritionFromJSON(json['nutrition']),
'properties': !exists(json, 'properties') ? undefined : ((json['properties'] as Array<any>).map(PropertyFromJSON)),
'foodProperties': !exists(json, 'food_properties') ? undefined : json['food_properties'],
'servings': !exists(json, 'servings') ? undefined : json['servings'],
'filePath': !exists(json, 'file_path') ? undefined : json['file_path'],
'servingsText': !exists(json, 'servings_text') ? undefined : json['servings_text'],
'rating': !exists(json, 'rating') ? undefined : json['rating'],
'lastCooked': !exists(json, 'last_cooked') ? undefined : (json['last_cooked'] === null ? null : new Date(json['last_cooked'])),
'_private': !exists(json, 'private') ? undefined : json['private'],
'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
};
}
export function PatchedRecipeToJSON(value?: PatchedRecipe | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'description': value.description,
'keywords': value.keywords === undefined ? undefined : ((value.keywords as Array<any>).map(KeywordToJSON)),
'steps': value.steps === undefined ? undefined : ((value.steps as Array<any>).map(StepToJSON)),
'working_time': value.workingTime,
'waiting_time': value.waitingTime,
'source_url': value.sourceUrl,
'internal': value.internal,
'show_ingredient_overview': value.showIngredientOverview,
'nutrition': PatchedRecipeNutritionToJSON(value.nutrition),
'properties': value.properties === undefined ? undefined : ((value.properties as Array<any>).map(PropertyToJSON)),
'servings': value.servings,
'file_path': value.filePath,
'servings_text': value.servingsText,
'private': value._private,
'shared': value.shared === undefined ? undefined : ((value.shared as Array<any>).map(UserToJSON)),
};
}

View File

@@ -1,124 +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 { exists, mapValues } from '../runtime';
import type { PatchedRecipeBookFilter } from './PatchedRecipeBookFilter';
import {
PatchedRecipeBookFilterFromJSON,
PatchedRecipeBookFilterFromJSONTyped,
PatchedRecipeBookFilterToJSON,
} from './PatchedRecipeBookFilter';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
* Adds nested create feature
* @export
* @interface PatchedRecipeBook
*/
export interface PatchedRecipeBook {
/**
*
* @type {number}
* @memberof PatchedRecipeBook
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedRecipeBook
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedRecipeBook
*/
description?: string;
/**
*
* @type {Array<User>}
* @memberof PatchedRecipeBook
*/
shared?: Array<User>;
/**
*
* @type {number}
* @memberof PatchedRecipeBook
*/
readonly createdBy?: number;
/**
*
* @type {PatchedRecipeBookFilter}
* @memberof PatchedRecipeBook
*/
filter?: PatchedRecipeBookFilter | null;
/**
*
* @type {number}
* @memberof PatchedRecipeBook
*/
order?: number;
}
/**
* Check if a given object implements the PatchedRecipeBook interface.
*/
export function instanceOfPatchedRecipeBook(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedRecipeBookFromJSON(json: any): PatchedRecipeBook {
return PatchedRecipeBookFromJSONTyped(json, false);
}
export function PatchedRecipeBookFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBook {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'filter': !exists(json, 'filter') ? undefined : PatchedRecipeBookFilterFromJSON(json['filter']),
'order': !exists(json, 'order') ? undefined : json['order'],
};
}
export function PatchedRecipeBookToJSON(value?: PatchedRecipeBook | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'description': value.description,
'shared': value.shared === undefined ? undefined : ((value.shared as Array<any>).map(UserToJSON)),
'filter': PatchedRecipeBookFilterToJSON(value.filter),
'order': value.order,
};
}

View File

@@ -1,107 +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 { exists, mapValues } from '../runtime';
import type { RecipeBook } from './RecipeBook';
import {
RecipeBookFromJSON,
RecipeBookFromJSONTyped,
RecipeBookToJSON,
} from './RecipeBook';
import type { RecipeOverview } from './RecipeOverview';
import {
RecipeOverviewFromJSON,
RecipeOverviewFromJSONTyped,
RecipeOverviewToJSON,
} from './RecipeOverview';
/**
*
* @export
* @interface PatchedRecipeBookEntry
*/
export interface PatchedRecipeBookEntry {
/**
*
* @type {number}
* @memberof PatchedRecipeBookEntry
*/
readonly id?: number;
/**
*
* @type {number}
* @memberof PatchedRecipeBookEntry
*/
book?: number;
/**
*
* @type {RecipeBook}
* @memberof PatchedRecipeBookEntry
*/
readonly bookContent?: RecipeBook;
/**
*
* @type {number}
* @memberof PatchedRecipeBookEntry
*/
recipe?: number;
/**
*
* @type {RecipeOverview}
* @memberof PatchedRecipeBookEntry
*/
readonly recipeContent?: RecipeOverview;
}
/**
* Check if a given object implements the PatchedRecipeBookEntry interface.
*/
export function instanceOfPatchedRecipeBookEntry(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedRecipeBookEntryFromJSON(json: any): PatchedRecipeBookEntry {
return PatchedRecipeBookEntryFromJSONTyped(json, false);
}
export function PatchedRecipeBookEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBookEntry {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'book': !exists(json, 'book') ? undefined : json['book'],
'bookContent': !exists(json, 'book_content') ? undefined : RecipeBookFromJSON(json['book_content']),
'recipe': !exists(json, 'recipe') ? undefined : json['recipe'],
'recipeContent': !exists(json, 'recipe_content') ? undefined : RecipeOverviewFromJSON(json['recipe_content']),
};
}
export function PatchedRecipeBookEntryToJSON(value?: PatchedRecipeBookEntry | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'book': value.book,
'recipe': value.recipe,
};
}

View File

@@ -1,106 +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 { exists, mapValues } from '../runtime';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
*
* @export
* @interface PatchedRecipeBookFilter
*/
export interface PatchedRecipeBookFilter {
/**
*
* @type {number}
* @memberof PatchedRecipeBookFilter
*/
readonly id: number;
/**
*
* @type {string}
* @memberof PatchedRecipeBookFilter
*/
name: string;
/**
*
* @type {string}
* @memberof PatchedRecipeBookFilter
*/
search: string;
/**
*
* @type {Array<User>}
* @memberof PatchedRecipeBookFilter
*/
shared?: Array<User>;
/**
*
* @type {number}
* @memberof PatchedRecipeBookFilter
*/
readonly createdBy: number;
}
/**
* Check if a given object implements the PatchedRecipeBookFilter interface.
*/
export function instanceOfPatchedRecipeBookFilter(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "search" in value;
isInstance = isInstance && "createdBy" in value;
return isInstance;
}
export function PatchedRecipeBookFilterFromJSON(json: any): PatchedRecipeBookFilter {
return PatchedRecipeBookFilterFromJSONTyped(json, false);
}
export function PatchedRecipeBookFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBookFilter {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'search': json['search'],
'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
'createdBy': json['created_by'],
};
}
export function PatchedRecipeBookFilterToJSON(value?: PatchedRecipeBookFilter | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'search': value.search,
'shared': value.shared === undefined ? undefined : ((value.shared as Array<any>).map(UserToJSON)),
};
}

View File

@@ -1,109 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedRecipeNutrition
*/
export interface PatchedRecipeNutrition {
/**
*
* @type {number}
* @memberof PatchedRecipeNutrition
*/
readonly id: number;
/**
*
* @type {number}
* @memberof PatchedRecipeNutrition
*/
carbohydrates: number;
/**
*
* @type {number}
* @memberof PatchedRecipeNutrition
*/
fats: number;
/**
*
* @type {number}
* @memberof PatchedRecipeNutrition
*/
proteins: number;
/**
*
* @type {number}
* @memberof PatchedRecipeNutrition
*/
calories: number;
/**
*
* @type {string}
* @memberof PatchedRecipeNutrition
*/
source?: string | null;
}
/**
* Check if a given object implements the PatchedRecipeNutrition interface.
*/
export function instanceOfPatchedRecipeNutrition(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "carbohydrates" in value;
isInstance = isInstance && "fats" in value;
isInstance = isInstance && "proteins" in value;
isInstance = isInstance && "calories" in value;
return isInstance;
}
export function PatchedRecipeNutritionFromJSON(json: any): PatchedRecipeNutrition {
return PatchedRecipeNutritionFromJSONTyped(json, false);
}
export function PatchedRecipeNutritionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeNutrition {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'carbohydrates': json['carbohydrates'],
'fats': json['fats'],
'proteins': json['proteins'],
'calories': json['calories'],
'source': !exists(json, 'source') ? undefined : json['source'],
};
}
export function PatchedRecipeNutritionToJSON(value?: PatchedRecipeNutrition | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'carbohydrates': value.carbohydrates,
'fats': value.fats,
'proteins': value.proteins,
'calories': value.calories,
'source': value.source,
};
}

View File

@@ -1,181 +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 { exists, mapValues } from '../runtime';
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
import {
FoodPropertiesFoodUnitFromJSON,
FoodPropertiesFoodUnitFromJSONTyped,
FoodPropertiesFoodUnitToJSON,
} from './FoodPropertiesFoodUnit';
import type { IngredientFood } from './IngredientFood';
import {
IngredientFoodFromJSON,
IngredientFoodFromJSONTyped,
IngredientFoodToJSON,
} from './IngredientFood';
import type { ShoppingListRecipe } from './ShoppingListRecipe';
import {
ShoppingListRecipeFromJSON,
ShoppingListRecipeFromJSONTyped,
ShoppingListRecipeToJSON,
} from './ShoppingListRecipe';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
* Adds nested create feature
* @export
* @interface PatchedShoppingListEntry
*/
export interface PatchedShoppingListEntry {
/**
*
* @type {number}
* @memberof PatchedShoppingListEntry
*/
readonly id?: number;
/**
*
* @type {number}
* @memberof PatchedShoppingListEntry
*/
listRecipe?: number | null;
/**
*
* @type {IngredientFood}
* @memberof PatchedShoppingListEntry
*/
food?: IngredientFood | null;
/**
*
* @type {FoodPropertiesFoodUnit}
* @memberof PatchedShoppingListEntry
*/
unit?: FoodPropertiesFoodUnit | null;
/**
*
* @type {number}
* @memberof PatchedShoppingListEntry
*/
amount?: number;
/**
*
* @type {number}
* @memberof PatchedShoppingListEntry
*/
order?: number;
/**
*
* @type {boolean}
* @memberof PatchedShoppingListEntry
*/
checked?: boolean;
/**
*
* @type {ShoppingListRecipe}
* @memberof PatchedShoppingListEntry
*/
readonly recipeMealplan?: ShoppingListRecipe;
/**
*
* @type {User}
* @memberof PatchedShoppingListEntry
*/
readonly createdBy?: User;
/**
*
* @type {Date}
* @memberof PatchedShoppingListEntry
*/
readonly createdAt?: Date;
/**
*
* @type {Date}
* @memberof PatchedShoppingListEntry
*/
readonly updatedAt?: Date;
/**
*
* @type {Date}
* @memberof PatchedShoppingListEntry
*/
completedAt?: Date | null;
/**
*
* @type {Date}
* @memberof PatchedShoppingListEntry
*/
delayUntil?: Date | null;
}
/**
* Check if a given object implements the PatchedShoppingListEntry interface.
*/
export function instanceOfPatchedShoppingListEntry(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedShoppingListEntryFromJSON(json: any): PatchedShoppingListEntry {
return PatchedShoppingListEntryFromJSONTyped(json, false);
}
export function PatchedShoppingListEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedShoppingListEntry {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'listRecipe': !exists(json, 'list_recipe') ? undefined : json['list_recipe'],
'food': !exists(json, 'food') ? undefined : IngredientFoodFromJSON(json['food']),
'unit': !exists(json, 'unit') ? undefined : FoodPropertiesFoodUnitFromJSON(json['unit']),
'amount': !exists(json, 'amount') ? undefined : json['amount'],
'order': !exists(json, 'order') ? undefined : json['order'],
'checked': !exists(json, 'checked') ? undefined : json['checked'],
'recipeMealplan': !exists(json, 'recipe_mealplan') ? undefined : ShoppingListRecipeFromJSON(json['recipe_mealplan']),
'createdBy': !exists(json, 'created_by') ? undefined : UserFromJSON(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'])),
'completedAt': !exists(json, 'completed_at') ? undefined : (json['completed_at'] === null ? null : new Date(json['completed_at'])),
'delayUntil': !exists(json, 'delay_until') ? undefined : (json['delay_until'] === null ? null : new Date(json['delay_until'])),
};
}
export function PatchedShoppingListEntryToJSON(value?: PatchedShoppingListEntry | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'list_recipe': value.listRecipe,
'food': IngredientFoodToJSON(value.food),
'unit': FoodPropertiesFoodUnitToJSON(value.unit),
'amount': value.amount,
'order': value.order,
'checked': value.checked,
'completed_at': value.completedAt === undefined ? undefined : (value.completedAt === null ? null : value.completedAt.toISOString()),
'delay_until': value.delayUntil === undefined ? undefined : (value.delayUntil === null ? null : value.delayUntil.toISOString()),
};
}

View File

@@ -1,123 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedShoppingListRecipe
*/
export interface PatchedShoppingListRecipe {
/**
*
* @type {number}
* @memberof PatchedShoppingListRecipe
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedShoppingListRecipe
*/
readonly recipeName?: string;
/**
*
* @type {string}
* @memberof PatchedShoppingListRecipe
*/
readonly name?: string;
/**
*
* @type {number}
* @memberof PatchedShoppingListRecipe
*/
recipe?: number | null;
/**
*
* @type {number}
* @memberof PatchedShoppingListRecipe
*/
mealplan?: number | null;
/**
*
* @type {number}
* @memberof PatchedShoppingListRecipe
*/
servings?: number;
/**
*
* @type {string}
* @memberof PatchedShoppingListRecipe
*/
readonly mealplanNote?: string;
/**
*
* @type {Date}
* @memberof PatchedShoppingListRecipe
*/
readonly mealplanFromDate?: Date;
/**
*
* @type {string}
* @memberof PatchedShoppingListRecipe
*/
readonly mealplanType?: string;
}
/**
* Check if a given object implements the PatchedShoppingListRecipe interface.
*/
export function instanceOfPatchedShoppingListRecipe(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedShoppingListRecipeFromJSON(json: any): PatchedShoppingListRecipe {
return PatchedShoppingListRecipeFromJSONTyped(json, false);
}
export function PatchedShoppingListRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedShoppingListRecipe {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'recipeName': !exists(json, 'recipe_name') ? undefined : json['recipe_name'],
'name': !exists(json, 'name') ? undefined : json['name'],
'recipe': !exists(json, 'recipe') ? undefined : json['recipe'],
'mealplan': !exists(json, 'mealplan') ? undefined : json['mealplan'],
'servings': !exists(json, 'servings') ? undefined : json['servings'],
'mealplanNote': !exists(json, 'mealplan_note') ? undefined : json['mealplan_note'],
'mealplanFromDate': !exists(json, 'mealplan_from_date') ? undefined : (new Date(json['mealplan_from_date'])),
'mealplanType': !exists(json, 'mealplan_type') ? undefined : json['mealplan_type'],
};
}
export function PatchedShoppingListRecipeToJSON(value?: PatchedShoppingListRecipe | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'recipe': value.recipe,
'mealplan': value.mealplan,
'servings': value.servings,
};
}

View File

@@ -1,287 +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 { exists, mapValues } from '../runtime';
import type { FoodInheritField } from './FoodInheritField';
import {
FoodInheritFieldFromJSON,
FoodInheritFieldFromJSONTyped,
FoodInheritFieldToJSON,
} from './FoodInheritField';
import type { PatchedSpaceImage } from './PatchedSpaceImage';
import {
PatchedSpaceImageFromJSON,
PatchedSpaceImageFromJSONTyped,
PatchedSpaceImageToJSON,
} from './PatchedSpaceImage';
import type { SpaceNavTextColorEnum } from './SpaceNavTextColorEnum';
import {
SpaceNavTextColorEnumFromJSON,
SpaceNavTextColorEnumFromJSONTyped,
SpaceNavTextColorEnumToJSON,
} from './SpaceNavTextColorEnum';
import type { SpaceThemeEnum } from './SpaceThemeEnum';
import {
SpaceThemeEnumFromJSON,
SpaceThemeEnumFromJSONTyped,
SpaceThemeEnumToJSON,
} from './SpaceThemeEnum';
/**
* Adds nested create feature
* @export
* @interface PatchedSpace
*/
export interface PatchedSpace {
/**
*
* @type {number}
* @memberof PatchedSpace
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedSpace
*/
name?: string;
/**
*
* @type {number}
* @memberof PatchedSpace
*/
readonly createdBy?: number | null;
/**
*
* @type {Date}
* @memberof PatchedSpace
*/
readonly createdAt?: Date;
/**
*
* @type {string}
* @memberof PatchedSpace
*/
message?: string;
/**
*
* @type {number}
* @memberof PatchedSpace
*/
readonly maxRecipes?: number;
/**
* Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload.
* @type {number}
* @memberof PatchedSpace
*/
readonly maxFileStorageMb?: number;
/**
*
* @type {number}
* @memberof PatchedSpace
*/
readonly maxUsers?: number;
/**
*
* @type {boolean}
* @memberof PatchedSpace
*/
readonly allowSharing?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedSpace
*/
readonly demo?: boolean;
/**
*
* @type {Array<FoodInheritField>}
* @memberof PatchedSpace
*/
foodInherit?: Array<FoodInheritField>;
/**
*
* @type {number}
* @memberof PatchedSpace
*/
readonly userCount?: number;
/**
*
* @type {number}
* @memberof PatchedSpace
*/
readonly recipeCount?: number;
/**
*
* @type {number}
* @memberof PatchedSpace
*/
readonly fileSizeMb?: number;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
image?: PatchedSpaceImage | null;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
navLogo?: PatchedSpaceImage | null;
/**
*
* @type {SpaceThemeEnum}
* @memberof PatchedSpace
*/
spaceTheme?: SpaceThemeEnum;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
customSpaceTheme?: PatchedSpaceImage | null;
/**
*
* @type {string}
* @memberof PatchedSpace
*/
navBgColor?: string;
/**
*
* @type {SpaceNavTextColorEnum}
* @memberof PatchedSpace
*/
navTextColor?: SpaceNavTextColorEnum;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
logoColor32?: PatchedSpaceImage | null;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
logoColor128?: PatchedSpaceImage | null;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
logoColor144?: PatchedSpaceImage | null;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
logoColor180?: PatchedSpaceImage | null;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
logoColor192?: PatchedSpaceImage | null;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
logoColor512?: PatchedSpaceImage | null;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedSpace
*/
logoColorSvg?: PatchedSpaceImage | null;
}
/**
* Check if a given object implements the PatchedSpace interface.
*/
export function instanceOfPatchedSpace(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedSpaceFromJSON(json: any): PatchedSpace {
return PatchedSpaceFromJSONTyped(json, false);
}
export function PatchedSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSpace {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'message': !exists(json, 'message') ? undefined : json['message'],
'maxRecipes': !exists(json, 'max_recipes') ? undefined : json['max_recipes'],
'maxFileStorageMb': !exists(json, 'max_file_storage_mb') ? undefined : json['max_file_storage_mb'],
'maxUsers': !exists(json, 'max_users') ? undefined : json['max_users'],
'allowSharing': !exists(json, 'allow_sharing') ? undefined : json['allow_sharing'],
'demo': !exists(json, 'demo') ? undefined : json['demo'],
'foodInherit': !exists(json, 'food_inherit') ? undefined : ((json['food_inherit'] as Array<any>).map(FoodInheritFieldFromJSON)),
'userCount': !exists(json, 'user_count') ? undefined : json['user_count'],
'recipeCount': !exists(json, 'recipe_count') ? undefined : json['recipe_count'],
'fileSizeMb': !exists(json, 'file_size_mb') ? undefined : json['file_size_mb'],
'image': !exists(json, 'image') ? undefined : PatchedSpaceImageFromJSON(json['image']),
'navLogo': !exists(json, 'nav_logo') ? undefined : PatchedSpaceImageFromJSON(json['nav_logo']),
'spaceTheme': !exists(json, 'space_theme') ? undefined : SpaceThemeEnumFromJSON(json['space_theme']),
'customSpaceTheme': !exists(json, 'custom_space_theme') ? undefined : PatchedSpaceImageFromJSON(json['custom_space_theme']),
'navBgColor': !exists(json, 'nav_bg_color') ? undefined : json['nav_bg_color'],
'navTextColor': !exists(json, 'nav_text_color') ? undefined : SpaceNavTextColorEnumFromJSON(json['nav_text_color']),
'logoColor32': !exists(json, 'logo_color_32') ? undefined : PatchedSpaceImageFromJSON(json['logo_color_32']),
'logoColor128': !exists(json, 'logo_color_128') ? undefined : PatchedSpaceImageFromJSON(json['logo_color_128']),
'logoColor144': !exists(json, 'logo_color_144') ? undefined : PatchedSpaceImageFromJSON(json['logo_color_144']),
'logoColor180': !exists(json, 'logo_color_180') ? undefined : PatchedSpaceImageFromJSON(json['logo_color_180']),
'logoColor192': !exists(json, 'logo_color_192') ? undefined : PatchedSpaceImageFromJSON(json['logo_color_192']),
'logoColor512': !exists(json, 'logo_color_512') ? undefined : PatchedSpaceImageFromJSON(json['logo_color_512']),
'logoColorSvg': !exists(json, 'logo_color_svg') ? undefined : PatchedSpaceImageFromJSON(json['logo_color_svg']),
};
}
export function PatchedSpaceToJSON(value?: PatchedSpace | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'message': value.message,
'food_inherit': value.foodInherit === undefined ? undefined : ((value.foodInherit as Array<any>).map(FoodInheritFieldToJSON)),
'image': PatchedSpaceImageToJSON(value.image),
'nav_logo': PatchedSpaceImageToJSON(value.navLogo),
'space_theme': SpaceThemeEnumToJSON(value.spaceTheme),
'custom_space_theme': PatchedSpaceImageToJSON(value.customSpaceTheme),
'nav_bg_color': value.navBgColor,
'nav_text_color': SpaceNavTextColorEnumToJSON(value.navTextColor),
'logo_color_32': PatchedSpaceImageToJSON(value.logoColor32),
'logo_color_128': PatchedSpaceImageToJSON(value.logoColor128),
'logo_color_144': PatchedSpaceImageToJSON(value.logoColor144),
'logo_color_180': PatchedSpaceImageToJSON(value.logoColor180),
'logo_color_192': PatchedSpaceImageToJSON(value.logoColor192),
'logo_color_512': PatchedSpaceImageToJSON(value.logoColor512),
'logo_color_svg': PatchedSpaceImageToJSON(value.logoColorSvg),
};
}

View File

@@ -1,90 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedSpaceImage
*/
export interface PatchedSpaceImage {
/**
*
* @type {number}
* @memberof PatchedSpaceImage
*/
readonly id: number;
/**
*
* @type {string}
* @memberof PatchedSpaceImage
*/
name: string;
/**
*
* @type {string}
* @memberof PatchedSpaceImage
*/
readonly fileDownload: string;
/**
*
* @type {string}
* @memberof PatchedSpaceImage
*/
readonly preview: string;
}
/**
* Check if a given object implements the PatchedSpaceImage interface.
*/
export function instanceOfPatchedSpaceImage(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "fileDownload" in value;
isInstance = isInstance && "preview" in value;
return isInstance;
}
export function PatchedSpaceImageFromJSON(json: any): PatchedSpaceImage {
return PatchedSpaceImageFromJSONTyped(json, false);
}
export function PatchedSpaceImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSpaceImage {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'fileDownload': json['file_download'],
'preview': json['preview'],
};
}
export function PatchedSpaceImageToJSON(value?: PatchedSpaceImage | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
};
}

View File

@@ -1,170 +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 { exists, mapValues } from '../runtime';
import type { Ingredient } from './Ingredient';
import {
IngredientFromJSON,
IngredientFromJSONTyped,
IngredientToJSON,
} from './Ingredient';
import type { PatchedSpaceImage } from './PatchedSpaceImage';
import {
PatchedSpaceImageFromJSON,
PatchedSpaceImageFromJSONTyped,
PatchedSpaceImageToJSON,
} from './PatchedSpaceImage';
/**
* Adds nested create feature
* @export
* @interface PatchedStep
*/
export interface PatchedStep {
/**
*
* @type {number}
* @memberof PatchedStep
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedStep
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedStep
*/
instruction?: string;
/**
*
* @type {Array<Ingredient>}
* @memberof PatchedStep
*/
ingredients?: Array<Ingredient>;
/**
*
* @type {string}
* @memberof PatchedStep
*/
readonly instructionsMarkdown?: string;
/**
*
* @type {number}
* @memberof PatchedStep
*/
time?: number;
/**
*
* @type {number}
* @memberof PatchedStep
*/
order?: number;
/**
*
* @type {boolean}
* @memberof PatchedStep
*/
showAsHeader?: boolean;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedStep
*/
file?: PatchedSpaceImage | null;
/**
*
* @type {number}
* @memberof PatchedStep
*/
stepRecipe?: number | null;
/**
*
* @type {any}
* @memberof PatchedStep
*/
readonly stepRecipeData?: any | null;
/**
*
* @type {number}
* @memberof PatchedStep
*/
readonly numrecipe?: number;
/**
*
* @type {boolean}
* @memberof PatchedStep
*/
showIngredientsTable?: boolean;
}
/**
* Check if a given object implements the PatchedStep interface.
*/
export function instanceOfPatchedStep(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedStepFromJSON(json: any): PatchedStep {
return PatchedStepFromJSONTyped(json, false);
}
export function PatchedStepFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStep {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'instruction': !exists(json, 'instruction') ? undefined : json['instruction'],
'ingredients': !exists(json, 'ingredients') ? undefined : ((json['ingredients'] as Array<any>).map(IngredientFromJSON)),
'instructionsMarkdown': !exists(json, 'instructions_markdown') ? undefined : json['instructions_markdown'],
'time': !exists(json, 'time') ? undefined : json['time'],
'order': !exists(json, 'order') ? undefined : json['order'],
'showAsHeader': !exists(json, 'show_as_header') ? undefined : json['show_as_header'],
'file': !exists(json, 'file') ? undefined : PatchedSpaceImageFromJSON(json['file']),
'stepRecipe': !exists(json, 'step_recipe') ? undefined : json['step_recipe'],
'stepRecipeData': !exists(json, 'step_recipe_data') ? undefined : json['step_recipe_data'],
'numrecipe': !exists(json, 'numrecipe') ? undefined : json['numrecipe'],
'showIngredientsTable': !exists(json, 'show_ingredients_table') ? undefined : json['show_ingredients_table'],
};
}
export function PatchedStepToJSON(value?: PatchedStep | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'instruction': value.instruction,
'ingredients': value.ingredients === undefined ? undefined : ((value.ingredients as Array<any>).map(IngredientToJSON)),
'time': value.time,
'order': value.order,
'show_as_header': value.showAsHeader,
'file': PatchedSpaceImageToJSON(value.file),
'step_recipe': value.stepRecipe,
'show_ingredients_table': value.showIngredientsTable,
};
}

View File

@@ -1,118 +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 { exists, mapValues } from '../runtime';
import type { MethodEnum } from './MethodEnum';
import {
MethodEnumFromJSON,
MethodEnumFromJSONTyped,
MethodEnumToJSON,
} from './MethodEnum';
/**
*
* @export
* @interface PatchedStorage
*/
export interface PatchedStorage {
/**
*
* @type {number}
* @memberof PatchedStorage
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedStorage
*/
name?: string;
/**
*
* @type {MethodEnum}
* @memberof PatchedStorage
*/
method?: MethodEnum;
/**
*
* @type {string}
* @memberof PatchedStorage
*/
username?: string | null;
/**
*
* @type {string}
* @memberof PatchedStorage
*/
password?: string | null;
/**
*
* @type {string}
* @memberof PatchedStorage
*/
token?: string | null;
/**
*
* @type {number}
* @memberof PatchedStorage
*/
readonly createdBy?: number;
}
/**
* Check if a given object implements the PatchedStorage interface.
*/
export function instanceOfPatchedStorage(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedStorageFromJSON(json: any): PatchedStorage {
return PatchedStorageFromJSONTyped(json, false);
}
export function PatchedStorageFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStorage {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'method': !exists(json, 'method') ? undefined : MethodEnumFromJSON(json['method']),
'username': !exists(json, 'username') ? undefined : json['username'],
'password': !exists(json, 'password') ? undefined : json['password'],
'token': !exists(json, 'token') ? undefined : json['token'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
};
}
export function PatchedStorageToJSON(value?: PatchedStorage | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'method': MethodEnumToJSON(value.method),
'username': value.username,
'password': value.password,
'token': value.token,
};
}

View File

@@ -1,136 +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 { exists, mapValues } from '../runtime';
import type { SupermarketCategoryRelation } from './SupermarketCategoryRelation';
import {
SupermarketCategoryRelationFromJSON,
SupermarketCategoryRelationFromJSONTyped,
SupermarketCategoryRelationToJSON,
} from './SupermarketCategoryRelation';
/**
* 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 PatchedSupermarket
*/
export interface PatchedSupermarket {
/**
*
* @type {number}
* @memberof PatchedSupermarket
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedSupermarket
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedSupermarket
*/
description?: string | null;
/**
*
* @type {Array<SupermarketCategoryRelation>}
* @memberof PatchedSupermarket
*/
readonly categoryToSupermarket?: Array<SupermarketCategoryRelation>;
/**
*
* @type {string}
* @memberof PatchedSupermarket
*/
openDataSlug?: string | null;
}
/**
* Check if a given object implements the PatchedSupermarket interface.
*/
export function instanceOfPatchedSupermarket(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedSupermarketFromJSON(json: any): PatchedSupermarket {
return PatchedSupermarketFromJSONTyped(json, false);
}
export function PatchedSupermarketFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarket {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'categoryToSupermarket': !exists(json, 'category_to_supermarket') ? undefined : ((json['category_to_supermarket'] as Array<any>).map(SupermarketCategoryRelationFromJSON)),
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
};
}
export function PatchedSupermarketToJSON(value?: PatchedSupermarket | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'description': value.description,
'open_data_slug': value.openDataSlug,
};
}

View File

@@ -1,114 +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 { exists, 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 PatchedSupermarketCategory
*/
export interface PatchedSupermarketCategory {
/**
*
* @type {number}
* @memberof PatchedSupermarketCategory
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedSupermarketCategory
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedSupermarketCategory
*/
description?: string | null;
}
/**
* Check if a given object implements the PatchedSupermarketCategory interface.
*/
export function instanceOfPatchedSupermarketCategory(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedSupermarketCategoryFromJSON(json: any): PatchedSupermarketCategory {
return PatchedSupermarketCategoryFromJSONTyped(json, false);
}
export function PatchedSupermarketCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketCategory {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
};
}
export function PatchedSupermarketCategoryToJSON(value?: PatchedSupermarketCategory | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'description': value.description,
};
}

View File

@@ -1,95 +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 { exists, mapValues } from '../runtime';
import type { SupermarketCategory } from './SupermarketCategory';
import {
SupermarketCategoryFromJSON,
SupermarketCategoryFromJSONTyped,
SupermarketCategoryToJSON,
} from './SupermarketCategory';
/**
* Adds nested create feature
* @export
* @interface PatchedSupermarketCategoryRelation
*/
export interface PatchedSupermarketCategoryRelation {
/**
*
* @type {number}
* @memberof PatchedSupermarketCategoryRelation
*/
readonly id?: number;
/**
*
* @type {SupermarketCategory}
* @memberof PatchedSupermarketCategoryRelation
*/
category?: SupermarketCategory;
/**
*
* @type {number}
* @memberof PatchedSupermarketCategoryRelation
*/
supermarket?: number;
/**
*
* @type {number}
* @memberof PatchedSupermarketCategoryRelation
*/
order?: number;
}
/**
* Check if a given object implements the PatchedSupermarketCategoryRelation interface.
*/
export function instanceOfPatchedSupermarketCategoryRelation(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedSupermarketCategoryRelationFromJSON(json: any): PatchedSupermarketCategoryRelation {
return PatchedSupermarketCategoryRelationFromJSONTyped(json, false);
}
export function PatchedSupermarketCategoryRelationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketCategoryRelation {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'category': !exists(json, 'category') ? undefined : SupermarketCategoryFromJSON(json['category']),
'supermarket': !exists(json, 'supermarket') ? undefined : json['supermarket'],
'order': !exists(json, 'order') ? undefined : json['order'],
};
}
export function PatchedSupermarketCategoryRelationToJSON(value?: PatchedSupermarketCategoryRelation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'category': SupermarketCategoryToJSON(value.category),
'supermarket': value.supermarket,
'order': value.order,
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedSync
*/
export interface PatchedSync {
/**
*
* @type {number}
* @memberof PatchedSync
*/
readonly id?: number;
/**
*
* @type {number}
* @memberof PatchedSync
*/
storage?: number;
/**
*
* @type {string}
* @memberof PatchedSync
*/
path?: string;
/**
*
* @type {boolean}
* @memberof PatchedSync
*/
active?: boolean;
/**
*
* @type {Date}
* @memberof PatchedSync
*/
lastChecked?: Date | null;
/**
*
* @type {Date}
* @memberof PatchedSync
*/
readonly createdAt?: Date;
/**
*
* @type {Date}
* @memberof PatchedSync
*/
readonly updatedAt?: Date;
}
/**
* Check if a given object implements the PatchedSync interface.
*/
export function instanceOfPatchedSync(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedSyncFromJSON(json: any): PatchedSync {
return PatchedSyncFromJSONTyped(json, false);
}
export function PatchedSyncFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSync {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'storage': !exists(json, 'storage') ? undefined : json['storage'],
'path': !exists(json, 'path') ? undefined : json['path'],
'active': !exists(json, 'active') ? undefined : json['active'],
'lastChecked': !exists(json, 'last_checked') ? undefined : (json['last_checked'] === null ? null : new Date(json['last_checked'])),
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
};
}
export function PatchedSyncToJSON(value?: PatchedSync | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'storage': value.storage,
'path': value.path,
'active': value.active,
'last_checked': value.lastChecked === undefined ? undefined : (value.lastChecked === null ? null : value.lastChecked.toISOString()),
};
}

View File

@@ -1,138 +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 { exists, 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 PatchedUnit
*/
export interface PatchedUnit {
/**
*
* @type {number}
* @memberof PatchedUnit
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedUnit
*/
name?: string;
/**
*
* @type {string}
* @memberof PatchedUnit
*/
pluralName?: string | null;
/**
*
* @type {string}
* @memberof PatchedUnit
*/
description?: string | null;
/**
*
* @type {string}
* @memberof PatchedUnit
*/
baseUnit?: string | null;
/**
*
* @type {string}
* @memberof PatchedUnit
*/
openDataSlug?: string | null;
}
/**
* Check if a given object implements the PatchedUnit interface.
*/
export function instanceOfPatchedUnit(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedUnitFromJSON(json: any): PatchedUnit {
return PatchedUnitFromJSONTyped(json, false);
}
export function PatchedUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnit {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : 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 PatchedUnitToJSON(value?: PatchedUnit | 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,
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
import type { IngredientFood } from './IngredientFood';
import {
IngredientFoodFromJSON,
IngredientFoodFromJSONTyped,
IngredientFoodToJSON,
} from './IngredientFood';
import type { Unit } from './Unit';
import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
} from './Unit';
/**
* Adds nested create feature
* @export
* @interface PatchedUnitConversion
*/
export interface PatchedUnitConversion {
/**
*
* @type {number}
* @memberof PatchedUnitConversion
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof PatchedUnitConversion
*/
readonly name?: string;
/**
*
* @type {number}
* @memberof PatchedUnitConversion
*/
baseAmount?: number;
/**
*
* @type {Unit}
* @memberof PatchedUnitConversion
*/
baseUnit?: Unit;
/**
*
* @type {number}
* @memberof PatchedUnitConversion
*/
convertedAmount?: number;
/**
*
* @type {Unit}
* @memberof PatchedUnitConversion
*/
convertedUnit?: Unit;
/**
*
* @type {IngredientFood}
* @memberof PatchedUnitConversion
*/
food?: IngredientFood | null;
/**
*
* @type {string}
* @memberof PatchedUnitConversion
*/
openDataSlug?: string | null;
}
/**
* Check if a given object implements the PatchedUnitConversion interface.
*/
export function instanceOfPatchedUnitConversion(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedUnitConversionFromJSON(json: any): PatchedUnitConversion {
return PatchedUnitConversionFromJSONTyped(json, false);
}
export function PatchedUnitConversionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnitConversion {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'baseAmount': !exists(json, 'base_amount') ? undefined : json['base_amount'],
'baseUnit': !exists(json, 'base_unit') ? undefined : UnitFromJSON(json['base_unit']),
'convertedAmount': !exists(json, 'converted_amount') ? undefined : json['converted_amount'],
'convertedUnit': !exists(json, 'converted_unit') ? undefined : UnitFromJSON(json['converted_unit']),
'food': !exists(json, 'food') ? undefined : IngredientFoodFromJSON(json['food']),
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
};
}
export function PatchedUnitConversionToJSON(value?: PatchedUnitConversion | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'base_amount': value.baseAmount,
'base_unit': UnitToJSON(value.baseUnit),
'converted_amount': value.convertedAmount,
'converted_unit': UnitToJSON(value.convertedUnit),
'food': IngredientFoodToJSON(value.food),
'open_data_slug': value.openDataSlug,
};
}

View File

@@ -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 { exists, mapValues } from '../runtime';
/**
* Adds nested create feature
* @export
* @interface PatchedUser
*/
export interface PatchedUser {
/**
*
* @type {number}
* @memberof PatchedUser
*/
readonly id?: number;
/**
* Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
* @type {string}
* @memberof PatchedUser
*/
readonly username?: string;
/**
*
* @type {string}
* @memberof PatchedUser
*/
firstName?: string;
/**
*
* @type {string}
* @memberof PatchedUser
*/
lastName?: string;
/**
*
* @type {string}
* @memberof PatchedUser
*/
readonly displayName?: string;
}
/**
* Check if a given object implements the PatchedUser interface.
*/
export function instanceOfPatchedUser(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedUserFromJSON(json: any): PatchedUser {
return PatchedUserFromJSONTyped(json, false);
}
export function PatchedUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUser {
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 PatchedUserToJSON(value?: PatchedUser | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'first_name': value.firstName,
'last_name': value.lastName,
};
}

View File

@@ -1,324 +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 { exists, mapValues } from '../runtime';
import type { DefaultPageEnum } from './DefaultPageEnum';
import {
DefaultPageEnumFromJSON,
DefaultPageEnumFromJSONTyped,
DefaultPageEnumToJSON,
} from './DefaultPageEnum';
import type { FoodInheritField } from './FoodInheritField';
import {
FoodInheritFieldFromJSON,
FoodInheritFieldFromJSONTyped,
FoodInheritFieldToJSON,
} from './FoodInheritField';
import type { PatchedSpaceImage } from './PatchedSpaceImage';
import {
PatchedSpaceImageFromJSON,
PatchedSpaceImageFromJSONTyped,
PatchedSpaceImageToJSON,
} from './PatchedSpaceImage';
import type { ThemeEnum } from './ThemeEnum';
import {
ThemeEnumFromJSON,
ThemeEnumFromJSONTyped,
ThemeEnumToJSON,
} from './ThemeEnum';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
import type { UserPreferenceNavTextColorEnum } from './UserPreferenceNavTextColorEnum';
import {
UserPreferenceNavTextColorEnumFromJSON,
UserPreferenceNavTextColorEnumFromJSONTyped,
UserPreferenceNavTextColorEnumToJSON,
} from './UserPreferenceNavTextColorEnum';
/**
* Adds nested create feature
* @export
* @interface PatchedUserPreference
*/
export interface PatchedUserPreference {
/**
*
* @type {number}
* @memberof PatchedUserPreference
*/
user?: number;
/**
*
* @type {PatchedSpaceImage}
* @memberof PatchedUserPreference
*/
image?: PatchedSpaceImage | null;
/**
*
* @type {ThemeEnum}
* @memberof PatchedUserPreference
*/
theme?: ThemeEnum;
/**
*
* @type {string}
* @memberof PatchedUserPreference
*/
navBgColor?: string;
/**
*
* @type {UserPreferenceNavTextColorEnum}
* @memberof PatchedUserPreference
*/
navTextColor?: UserPreferenceNavTextColorEnum;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
navShowLogo?: boolean;
/**
*
* @type {string}
* @memberof PatchedUserPreference
*/
defaultUnit?: string;
/**
*
* @type {DefaultPageEnum}
* @memberof PatchedUserPreference
*/
defaultPage?: DefaultPageEnum;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
useFractions?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
useKj?: boolean;
/**
*
* @type {Array<User>}
* @memberof PatchedUserPreference
*/
planShare?: Array<User> | null;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
navSticky?: boolean;
/**
*
* @type {number}
* @memberof PatchedUserPreference
*/
ingredientDecimals?: number;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
comments?: boolean;
/**
*
* @type {number}
* @memberof PatchedUserPreference
*/
shoppingAutoSync?: number;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
mealplanAutoaddShopping?: boolean;
/**
*
* @type {FoodInheritField}
* @memberof PatchedUserPreference
*/
readonly foodInheritDefault?: FoodInheritField;
/**
*
* @type {number}
* @memberof PatchedUserPreference
*/
defaultDelay?: number;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
mealplanAutoincludeRelated?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
mealplanAutoexcludeOnhand?: boolean;
/**
*
* @type {Array<User>}
* @memberof PatchedUserPreference
*/
shoppingShare?: Array<User> | null;
/**
*
* @type {number}
* @memberof PatchedUserPreference
*/
shoppingRecentDays?: number;
/**
*
* @type {string}
* @memberof PatchedUserPreference
*/
csvDelim?: string;
/**
*
* @type {string}
* @memberof PatchedUserPreference
*/
csvPrefix?: string;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
filterToSupermarket?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
shoppingAddOnhand?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
leftHanded?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
showStepIngredients?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedUserPreference
*/
readonly foodChildrenExist?: boolean;
}
/**
* Check if a given object implements the PatchedUserPreference interface.
*/
export function instanceOfPatchedUserPreference(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedUserPreferenceFromJSON(json: any): PatchedUserPreference {
return PatchedUserPreferenceFromJSONTyped(json, false);
}
export function PatchedUserPreferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserPreference {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'user': !exists(json, 'user') ? undefined : json['user'],
'image': !exists(json, 'image') ? undefined : PatchedSpaceImageFromJSON(json['image']),
'theme': !exists(json, 'theme') ? undefined : ThemeEnumFromJSON(json['theme']),
'navBgColor': !exists(json, 'nav_bg_color') ? undefined : json['nav_bg_color'],
'navTextColor': !exists(json, 'nav_text_color') ? undefined : UserPreferenceNavTextColorEnumFromJSON(json['nav_text_color']),
'navShowLogo': !exists(json, 'nav_show_logo') ? undefined : json['nav_show_logo'],
'defaultUnit': !exists(json, 'default_unit') ? undefined : json['default_unit'],
'defaultPage': !exists(json, 'default_page') ? undefined : DefaultPageEnumFromJSON(json['default_page']),
'useFractions': !exists(json, 'use_fractions') ? undefined : json['use_fractions'],
'useKj': !exists(json, 'use_kj') ? undefined : json['use_kj'],
'planShare': !exists(json, 'plan_share') ? undefined : (json['plan_share'] === null ? null : (json['plan_share'] as Array<any>).map(UserFromJSON)),
'navSticky': !exists(json, 'nav_sticky') ? undefined : json['nav_sticky'],
'ingredientDecimals': !exists(json, 'ingredient_decimals') ? undefined : json['ingredient_decimals'],
'comments': !exists(json, 'comments') ? undefined : json['comments'],
'shoppingAutoSync': !exists(json, 'shopping_auto_sync') ? undefined : json['shopping_auto_sync'],
'mealplanAutoaddShopping': !exists(json, 'mealplan_autoadd_shopping') ? undefined : json['mealplan_autoadd_shopping'],
'foodInheritDefault': !exists(json, 'food_inherit_default') ? undefined : FoodInheritFieldFromJSON(json['food_inherit_default']),
'defaultDelay': !exists(json, 'default_delay') ? undefined : json['default_delay'],
'mealplanAutoincludeRelated': !exists(json, 'mealplan_autoinclude_related') ? undefined : json['mealplan_autoinclude_related'],
'mealplanAutoexcludeOnhand': !exists(json, 'mealplan_autoexclude_onhand') ? undefined : json['mealplan_autoexclude_onhand'],
'shoppingShare': !exists(json, 'shopping_share') ? undefined : (json['shopping_share'] === null ? null : (json['shopping_share'] as Array<any>).map(UserFromJSON)),
'shoppingRecentDays': !exists(json, 'shopping_recent_days') ? undefined : json['shopping_recent_days'],
'csvDelim': !exists(json, 'csv_delim') ? undefined : json['csv_delim'],
'csvPrefix': !exists(json, 'csv_prefix') ? undefined : json['csv_prefix'],
'filterToSupermarket': !exists(json, 'filter_to_supermarket') ? undefined : json['filter_to_supermarket'],
'shoppingAddOnhand': !exists(json, 'shopping_add_onhand') ? undefined : json['shopping_add_onhand'],
'leftHanded': !exists(json, 'left_handed') ? undefined : json['left_handed'],
'showStepIngredients': !exists(json, 'show_step_ingredients') ? undefined : json['show_step_ingredients'],
'foodChildrenExist': !exists(json, 'food_children_exist') ? undefined : json['food_children_exist'],
};
}
export function PatchedUserPreferenceToJSON(value?: PatchedUserPreference | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'user': value.user,
'image': PatchedSpaceImageToJSON(value.image),
'theme': ThemeEnumToJSON(value.theme),
'nav_bg_color': value.navBgColor,
'nav_text_color': UserPreferenceNavTextColorEnumToJSON(value.navTextColor),
'nav_show_logo': value.navShowLogo,
'default_unit': value.defaultUnit,
'default_page': DefaultPageEnumToJSON(value.defaultPage),
'use_fractions': value.useFractions,
'use_kj': value.useKj,
'plan_share': value.planShare === undefined ? undefined : (value.planShare === null ? null : (value.planShare as Array<any>).map(UserToJSON)),
'nav_sticky': value.navSticky,
'ingredient_decimals': value.ingredientDecimals,
'comments': value.comments,
'shopping_auto_sync': value.shoppingAutoSync,
'mealplan_autoadd_shopping': value.mealplanAutoaddShopping,
'default_delay': value.defaultDelay,
'mealplan_autoinclude_related': value.mealplanAutoincludeRelated,
'mealplan_autoexclude_onhand': value.mealplanAutoexcludeOnhand,
'shopping_share': value.shoppingShare === undefined ? undefined : (value.shoppingShare === null ? null : (value.shoppingShare as Array<any>).map(UserToJSON)),
'shopping_recent_days': value.shoppingRecentDays,
'csv_delim': value.csvDelim,
'csv_prefix': value.csvPrefix,
'filter_to_supermarket': value.filterToSupermarket,
'shopping_add_onhand': value.shoppingAddOnhand,
'left_handed': value.leftHanded,
'show_step_ingredients': value.showStepIngredients,
};
}

View File

@@ -1,136 +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 { exists, mapValues } from '../runtime';
import type { Group } from './Group';
import {
GroupFromJSON,
GroupFromJSONTyped,
GroupToJSON,
} from './Group';
import type { User } from './User';
import {
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
* Adds nested create feature
* @export
* @interface PatchedUserSpace
*/
export interface PatchedUserSpace {
/**
*
* @type {number}
* @memberof PatchedUserSpace
*/
readonly id?: number;
/**
*
* @type {User}
* @memberof PatchedUserSpace
*/
readonly user?: User;
/**
*
* @type {number}
* @memberof PatchedUserSpace
*/
readonly space?: number;
/**
*
* @type {Array<Group>}
* @memberof PatchedUserSpace
*/
groups?: Array<Group>;
/**
*
* @type {boolean}
* @memberof PatchedUserSpace
*/
active?: boolean;
/**
*
* @type {string}
* @memberof PatchedUserSpace
*/
internalNote?: string | null;
/**
*
* @type {number}
* @memberof PatchedUserSpace
*/
readonly inviteLink?: number | null;
/**
*
* @type {Date}
* @memberof PatchedUserSpace
*/
readonly createdAt?: Date;
/**
*
* @type {Date}
* @memberof PatchedUserSpace
*/
readonly updatedAt?: Date;
}
/**
* Check if a given object implements the PatchedUserSpace interface.
*/
export function instanceOfPatchedUserSpace(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedUserSpaceFromJSON(json: any): PatchedUserSpace {
return PatchedUserSpaceFromJSONTyped(json, false);
}
export function PatchedUserSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserSpace {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'user': !exists(json, 'user') ? undefined : UserFromJSON(json['user']),
'space': !exists(json, 'space') ? undefined : json['space'],
'groups': !exists(json, 'groups') ? undefined : ((json['groups'] as Array<any>).map(GroupFromJSON)),
'active': !exists(json, 'active') ? undefined : json['active'],
'internalNote': !exists(json, 'internal_note') ? undefined : json['internal_note'],
'inviteLink': !exists(json, 'invite_link') ? undefined : json['invite_link'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
};
}
export function PatchedUserSpaceToJSON(value?: PatchedUserSpace | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'groups': value.groups === undefined ? undefined : ((value.groups as Array<any>).map(GroupToJSON)),
'active': value.active,
'internal_note': value.internalNote,
};
}

View File

@@ -1,86 +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 { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedViewLog
*/
export interface PatchedViewLog {
/**
*
* @type {number}
* @memberof PatchedViewLog
*/
readonly id?: number;
/**
*
* @type {number}
* @memberof PatchedViewLog
*/
recipe?: number;
/**
*
* @type {number}
* @memberof PatchedViewLog
*/
readonly createdBy?: number;
/**
*
* @type {Date}
* @memberof PatchedViewLog
*/
readonly createdAt?: Date;
}
/**
* Check if a given object implements the PatchedViewLog interface.
*/
export function instanceOfPatchedViewLog(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PatchedViewLogFromJSON(json: any): PatchedViewLog {
return PatchedViewLogFromJSONTyped(json, false);
}
export function PatchedViewLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedViewLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'recipe': !exists(json, 'recipe') ? undefined : json['recipe'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
};
}
export function PatchedViewLogToJSON(value?: PatchedViewLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'recipe': value.recipe,
};
}

View File

@@ -1,124 +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 { exists, mapValues } from '../runtime';
import type { PropertyType } from './PropertyType';
import {
PropertyTypeFromJSON,
PropertyTypeFromJSONTyped,
PropertyTypeToJSON,
} from './PropertyType';
/**
* 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 Property
*/
export interface Property {
/**
*
* @type {number}
* @memberof Property
*/
readonly id: number;
/**
*
* @type {number}
* @memberof Property
*/
propertyAmount: number | null;
/**
*
* @type {PropertyType}
* @memberof Property
*/
propertyType: PropertyType;
}
/**
* Check if a given object implements the Property interface.
*/
export function instanceOfProperty(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "propertyAmount" in value;
isInstance = isInstance && "propertyType" in value;
return isInstance;
}
export function PropertyFromJSON(json: any): Property {
return PropertyFromJSONTyped(json, false);
}
export function PropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): Property {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'propertyAmount': json['property_amount'],
'propertyType': PropertyTypeFromJSON(json['property_type']),
};
}
export function PropertyToJSON(value?: Property | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'property_amount': value.propertyAmount,
'property_type': PropertyTypeToJSON(value.propertyType),
};
}

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