diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6fd124e60..039e8fb93 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -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" } - ] -} \ No newline at end of file + }, + { + "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"] + } + ] +} diff --git a/models/AccessToken.ts b/models/AccessToken.ts deleted file mode 100644 index 9c52b9c6b..000000000 --- a/models/AccessToken.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/AuthToken.ts b/models/AuthToken.ts deleted file mode 100644 index a2476e85e..000000000 --- a/models/AuthToken.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/AutoMealPlan.ts b/models/AutoMealPlan.ts deleted file mode 100644 index 11cf98944..000000000 --- a/models/AutoMealPlan.ts +++ /dev/null @@ -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} - * @memberof AutoMealPlan - */ - keywordIds: Array; - /** - * - * @type {number} - * @memberof AutoMealPlan - */ - servings: number; - /** - * - * @type {Array} - * @memberof AutoMealPlan - */ - shared?: Array | 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).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).map(UserToJSON)), - 'addshopping': value.addshopping, - }; -} - diff --git a/models/Automation.ts b/models/Automation.ts deleted file mode 100644 index 6d2b60944..000000000 --- a/models/Automation.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/BookmarkletImport.ts b/models/BookmarkletImport.ts deleted file mode 100644 index 40bb648d8..000000000 --- a/models/BookmarkletImport.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/BookmarkletImportList.ts b/models/BookmarkletImportList.ts deleted file mode 100644 index 2c729ca4a..000000000 --- a/models/BookmarkletImportList.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/ConnectorConfigConfig.ts b/models/ConnectorConfigConfig.ts deleted file mode 100644 index 65a3ce8ee..000000000 --- a/models/ConnectorConfigConfig.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/CookLog.ts b/models/CookLog.ts deleted file mode 100644 index 0f6f98e3f..000000000 --- a/models/CookLog.ts +++ /dev/null @@ -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()), - }; -} - diff --git a/models/CustomFilter.ts b/models/CustomFilter.ts deleted file mode 100644 index 92284df99..000000000 --- a/models/CustomFilter.ts +++ /dev/null @@ -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} - * @memberof CustomFilter - */ - shared?: Array; - /** - * - * @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).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).map(UserToJSON)), - }; -} - diff --git a/models/DefaultPageEnum.ts b/models/DefaultPageEnum.ts deleted file mode 100644 index 9aed6b3b0..000000000 --- a/models/DefaultPageEnum.ts +++ /dev/null @@ -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; -} - diff --git a/models/DeleteEnum.ts b/models/DeleteEnum.ts deleted file mode 100644 index 937d1cfa4..000000000 --- a/models/DeleteEnum.ts +++ /dev/null @@ -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; -} - diff --git a/models/ExportLog.ts b/models/ExportLog.ts deleted file mode 100644 index 0d0b9c648..000000000 --- a/models/ExportLog.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/Food.ts b/models/Food.ts deleted file mode 100644 index f15c872a7..000000000 --- a/models/Food.ts +++ /dev/null @@ -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} - * @memberof Food - */ - properties?: Array | 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} - * @memberof Food - */ - inheritFields?: Array | 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} - * @memberof Food - */ - substitute?: Array | null; - /** - * - * @type {boolean} - * @memberof Food - */ - substituteSiblings?: boolean; - /** - * - * @type {boolean} - * @memberof Food - */ - substituteChildren?: boolean; - /** - * - * @type {boolean} - * @memberof Food - */ - readonly substituteOnhand: boolean; - /** - * - * @type {Array} - * @memberof Food - */ - childInheritFields?: Array | 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).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).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).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).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).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).map(FoodInheritFieldToJSON)), - 'ignore_shopping': value.ignoreShopping, - 'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array).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).map(FoodInheritFieldToJSON)), - 'open_data_slug': value.openDataSlug, - }; -} - diff --git a/models/FoodInheritField.ts b/models/FoodInheritField.ts deleted file mode 100644 index d8d0306ac..000000000 --- a/models/FoodInheritField.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/FoodPropertiesFoodUnit.ts b/models/FoodPropertiesFoodUnit.ts deleted file mode 100644 index cc6906c6b..000000000 --- a/models/FoodPropertiesFoodUnit.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/FoodRecipe.ts b/models/FoodRecipe.ts deleted file mode 100644 index 7a3567c4c..000000000 --- a/models/FoodRecipe.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/FoodShoppingUpdate.ts b/models/FoodShoppingUpdate.ts deleted file mode 100644 index 9b8dbb344..000000000 --- a/models/FoodShoppingUpdate.ts +++ /dev/null @@ -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), - }; -} - diff --git a/models/FoodSimple.ts b/models/FoodSimple.ts deleted file mode 100644 index 3bfb8e6ca..000000000 --- a/models/FoodSimple.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/FoodSupermarketCategory.ts b/models/FoodSupermarketCategory.ts deleted file mode 100644 index f459523f1..000000000 --- a/models/FoodSupermarketCategory.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/Group.ts b/models/Group.ts deleted file mode 100644 index 0e9ac20b8..000000000 --- a/models/Group.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/ImportLog.ts b/models/ImportLog.ts deleted file mode 100644 index 746a488d9..000000000 --- a/models/ImportLog.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/Ingredient.ts b/models/Ingredient.ts deleted file mode 100644 index ddf74766c..000000000 --- a/models/Ingredient.ts +++ /dev/null @@ -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} - * @memberof Ingredient - */ - readonly conversions: Array; - /** - * - * @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} - * @memberof Ingredient - */ - readonly usedInRecipes: Array; - /** - * - * @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, - }; -} - diff --git a/models/IngredientFood.ts b/models/IngredientFood.ts deleted file mode 100644 index fbdea12a9..000000000 --- a/models/IngredientFood.ts +++ /dev/null @@ -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} - * @memberof IngredientFood - */ - properties?: Array | 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} - * @memberof IngredientFood - */ - inheritFields?: Array | 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} - * @memberof IngredientFood - */ - substitute?: Array | null; - /** - * - * @type {boolean} - * @memberof IngredientFood - */ - substituteSiblings?: boolean; - /** - * - * @type {boolean} - * @memberof IngredientFood - */ - substituteChildren?: boolean; - /** - * - * @type {boolean} - * @memberof IngredientFood - */ - readonly substituteOnhand: boolean; - /** - * - * @type {Array} - * @memberof IngredientFood - */ - childInheritFields?: Array | 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).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).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).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).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).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).map(FoodInheritFieldToJSON)), - 'ignore_shopping': value.ignoreShopping, - 'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array).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).map(FoodInheritFieldToJSON)), - 'open_data_slug': value.openDataSlug, - }; -} - diff --git a/models/InviteLink.ts b/models/InviteLink.ts deleted file mode 100644 index e6b5ea302..000000000 --- a/models/InviteLink.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/Keyword.ts b/models/Keyword.ts deleted file mode 100644 index 0fd02d0e1..000000000 --- a/models/Keyword.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/KeywordLabel.ts b/models/KeywordLabel.ts deleted file mode 100644 index 8f975015d..000000000 --- a/models/KeywordLabel.ts +++ /dev/null @@ -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 { - - }; -} - diff --git a/models/MealPlan.ts b/models/MealPlan.ts deleted file mode 100644 index 086bea312..000000000 --- a/models/MealPlan.ts +++ /dev/null @@ -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} - * @memberof MealPlan - */ - shared?: Array | 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).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).map(UserToJSON)), - }; -} - diff --git a/models/MealPlanRecipe.ts b/models/MealPlanRecipe.ts deleted file mode 100644 index 22ddcf2a4..000000000 --- a/models/MealPlanRecipe.ts +++ /dev/null @@ -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} - * @memberof MealPlanRecipe - */ - readonly keywords: Array; - /** - * - * @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).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 { - - }; -} - diff --git a/models/MealType.ts b/models/MealType.ts deleted file mode 100644 index 1dcc52589..000000000 --- a/models/MealType.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/MethodEnum.ts b/models/MethodEnum.ts deleted file mode 100644 index 9c9eb0afe..000000000 --- a/models/MethodEnum.ts +++ /dev/null @@ -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; -} - diff --git a/models/NutritionInformation.ts b/models/NutritionInformation.ts deleted file mode 100644 index 4e17dc87f..000000000 --- a/models/NutritionInformation.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PaginatedAutomationList.ts b/models/PaginatedAutomationList.ts deleted file mode 100644 index 5a338ce16..000000000 --- a/models/PaginatedAutomationList.ts +++ /dev/null @@ -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} - * @memberof PaginatedAutomationList - */ - results?: Array; -} - -/** - * 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).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).map(AutomationToJSON)), - }; -} - diff --git a/models/PaginatedBookmarkletImportListList.ts b/models/PaginatedBookmarkletImportListList.ts deleted file mode 100644 index db31e83b6..000000000 --- a/models/PaginatedBookmarkletImportListList.ts +++ /dev/null @@ -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} - * @memberof PaginatedBookmarkletImportListList - */ - results?: Array; -} - -/** - * 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).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).map(BookmarkletImportListToJSON)), - }; -} - diff --git a/models/PaginatedCookLogList.ts b/models/PaginatedCookLogList.ts deleted file mode 100644 index 186a079ab..000000000 --- a/models/PaginatedCookLogList.ts +++ /dev/null @@ -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} - * @memberof PaginatedCookLogList - */ - results?: Array; -} - -/** - * 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).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).map(CookLogToJSON)), - }; -} - diff --git a/models/PaginatedCustomFilterList.ts b/models/PaginatedCustomFilterList.ts deleted file mode 100644 index 0f527be75..000000000 --- a/models/PaginatedCustomFilterList.ts +++ /dev/null @@ -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} - * @memberof PaginatedCustomFilterList - */ - results?: Array; -} - -/** - * 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).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).map(CustomFilterToJSON)), - }; -} - diff --git a/models/PaginatedExportLogList.ts b/models/PaginatedExportLogList.ts deleted file mode 100644 index 983f4d94a..000000000 --- a/models/PaginatedExportLogList.ts +++ /dev/null @@ -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} - * @memberof PaginatedExportLogList - */ - results?: Array; -} - -/** - * 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).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).map(ExportLogToJSON)), - }; -} - diff --git a/models/PaginatedFoodList.ts b/models/PaginatedFoodList.ts deleted file mode 100644 index 4c78e338a..000000000 --- a/models/PaginatedFoodList.ts +++ /dev/null @@ -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} - * @memberof PaginatedFoodList - */ - results?: Array; -} - -/** - * 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).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).map(FoodToJSON)), - }; -} - diff --git a/models/PaginatedImportLogList.ts b/models/PaginatedImportLogList.ts deleted file mode 100644 index 148f1dc19..000000000 --- a/models/PaginatedImportLogList.ts +++ /dev/null @@ -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} - * @memberof PaginatedImportLogList - */ - results?: Array; -} - -/** - * 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).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).map(ImportLogToJSON)), - }; -} - diff --git a/models/PaginatedIngredientList.ts b/models/PaginatedIngredientList.ts deleted file mode 100644 index 38299a7a0..000000000 --- a/models/PaginatedIngredientList.ts +++ /dev/null @@ -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} - * @memberof PaginatedIngredientList - */ - results?: Array; -} - -/** - * 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).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).map(IngredientToJSON)), - }; -} - diff --git a/models/PaginatedInviteLinkList.ts b/models/PaginatedInviteLinkList.ts deleted file mode 100644 index b5dab6406..000000000 --- a/models/PaginatedInviteLinkList.ts +++ /dev/null @@ -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} - * @memberof PaginatedInviteLinkList - */ - results?: Array; -} - -/** - * 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).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).map(InviteLinkToJSON)), - }; -} - diff --git a/models/PaginatedKeywordList.ts b/models/PaginatedKeywordList.ts deleted file mode 100644 index 93aec2819..000000000 --- a/models/PaginatedKeywordList.ts +++ /dev/null @@ -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} - * @memberof PaginatedKeywordList - */ - results?: Array; -} - -/** - * 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).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).map(KeywordToJSON)), - }; -} - diff --git a/models/PaginatedMealPlanList.ts b/models/PaginatedMealPlanList.ts deleted file mode 100644 index 5cd9176f7..000000000 --- a/models/PaginatedMealPlanList.ts +++ /dev/null @@ -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} - * @memberof PaginatedMealPlanList - */ - results?: Array; -} - -/** - * 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).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).map(MealPlanToJSON)), - }; -} - diff --git a/models/PaginatedMealTypeList.ts b/models/PaginatedMealTypeList.ts deleted file mode 100644 index 70773377c..000000000 --- a/models/PaginatedMealTypeList.ts +++ /dev/null @@ -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} - * @memberof PaginatedMealTypeList - */ - results?: Array; -} - -/** - * 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).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).map(MealTypeToJSON)), - }; -} - diff --git a/models/PaginatedPropertyList.ts b/models/PaginatedPropertyList.ts deleted file mode 100644 index 00b97297d..000000000 --- a/models/PaginatedPropertyList.ts +++ /dev/null @@ -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} - * @memberof PaginatedPropertyList - */ - results?: Array; -} - -/** - * 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).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).map(PropertyToJSON)), - }; -} - diff --git a/models/PaginatedPropertyTypeList.ts b/models/PaginatedPropertyTypeList.ts deleted file mode 100644 index 7f3b5ba60..000000000 --- a/models/PaginatedPropertyTypeList.ts +++ /dev/null @@ -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} - * @memberof PaginatedPropertyTypeList - */ - results?: Array; -} - -/** - * 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).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).map(PropertyTypeToJSON)), - }; -} - diff --git a/models/PaginatedRecipeBookEntryList.ts b/models/PaginatedRecipeBookEntryList.ts deleted file mode 100644 index d0431806f..000000000 --- a/models/PaginatedRecipeBookEntryList.ts +++ /dev/null @@ -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} - * @memberof PaginatedRecipeBookEntryList - */ - results?: Array; -} - -/** - * 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).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).map(RecipeBookEntryToJSON)), - }; -} - diff --git a/models/PaginatedRecipeBookList.ts b/models/PaginatedRecipeBookList.ts deleted file mode 100644 index e54dbae33..000000000 --- a/models/PaginatedRecipeBookList.ts +++ /dev/null @@ -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} - * @memberof PaginatedRecipeBookList - */ - results?: Array; -} - -/** - * 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).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).map(RecipeBookToJSON)), - }; -} - diff --git a/models/PaginatedRecipeOverviewList.ts b/models/PaginatedRecipeOverviewList.ts deleted file mode 100644 index 470cd47a9..000000000 --- a/models/PaginatedRecipeOverviewList.ts +++ /dev/null @@ -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} - * @memberof PaginatedRecipeOverviewList - */ - results?: Array; -} - -/** - * 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).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).map(RecipeOverviewToJSON)), - }; -} - diff --git a/models/PaginatedShoppingListEntryList.ts b/models/PaginatedShoppingListEntryList.ts deleted file mode 100644 index af0403905..000000000 --- a/models/PaginatedShoppingListEntryList.ts +++ /dev/null @@ -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} - * @memberof PaginatedShoppingListEntryList - */ - results?: Array; -} - -/** - * 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).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).map(ShoppingListEntryToJSON)), - }; -} - diff --git a/models/PaginatedShoppingListRecipeList.ts b/models/PaginatedShoppingListRecipeList.ts deleted file mode 100644 index bddcc8248..000000000 --- a/models/PaginatedShoppingListRecipeList.ts +++ /dev/null @@ -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} - * @memberof PaginatedShoppingListRecipeList - */ - results?: Array; -} - -/** - * 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).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).map(ShoppingListRecipeToJSON)), - }; -} - diff --git a/models/PaginatedStepList.ts b/models/PaginatedStepList.ts deleted file mode 100644 index a5d793fa6..000000000 --- a/models/PaginatedStepList.ts +++ /dev/null @@ -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} - * @memberof PaginatedStepList - */ - results?: Array; -} - -/** - * 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).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).map(StepToJSON)), - }; -} - diff --git a/models/PaginatedSupermarketCategoryList.ts b/models/PaginatedSupermarketCategoryList.ts deleted file mode 100644 index 5c7baae18..000000000 --- a/models/PaginatedSupermarketCategoryList.ts +++ /dev/null @@ -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} - * @memberof PaginatedSupermarketCategoryList - */ - results?: Array; -} - -/** - * 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).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).map(SupermarketCategoryToJSON)), - }; -} - diff --git a/models/PaginatedSupermarketCategoryRelationList.ts b/models/PaginatedSupermarketCategoryRelationList.ts deleted file mode 100644 index 4cdfe496c..000000000 --- a/models/PaginatedSupermarketCategoryRelationList.ts +++ /dev/null @@ -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} - * @memberof PaginatedSupermarketCategoryRelationList - */ - results?: Array; -} - -/** - * 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).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).map(SupermarketCategoryRelationToJSON)), - }; -} - diff --git a/models/PaginatedSupermarketList.ts b/models/PaginatedSupermarketList.ts deleted file mode 100644 index 91e013a55..000000000 --- a/models/PaginatedSupermarketList.ts +++ /dev/null @@ -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} - * @memberof PaginatedSupermarketList - */ - results?: Array; -} - -/** - * 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).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).map(SupermarketToJSON)), - }; -} - diff --git a/models/PaginatedSyncList.ts b/models/PaginatedSyncList.ts deleted file mode 100644 index f3b38a4d2..000000000 --- a/models/PaginatedSyncList.ts +++ /dev/null @@ -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} - * @memberof PaginatedSyncList - */ - results?: Array; -} - -/** - * 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).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).map(SyncToJSON)), - }; -} - diff --git a/models/PaginatedSyncLogList.ts b/models/PaginatedSyncLogList.ts deleted file mode 100644 index 8f3fc165e..000000000 --- a/models/PaginatedSyncLogList.ts +++ /dev/null @@ -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} - * @memberof PaginatedSyncLogList - */ - results?: Array; -} - -/** - * 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).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).map(SyncLogToJSON)), - }; -} - diff --git a/models/PaginatedUnitConversionList.ts b/models/PaginatedUnitConversionList.ts deleted file mode 100644 index 38dc2b687..000000000 --- a/models/PaginatedUnitConversionList.ts +++ /dev/null @@ -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} - * @memberof PaginatedUnitConversionList - */ - results?: Array; -} - -/** - * 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).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).map(UnitConversionToJSON)), - }; -} - diff --git a/models/PaginatedUnitList.ts b/models/PaginatedUnitList.ts deleted file mode 100644 index 9bbcdcf5f..000000000 --- a/models/PaginatedUnitList.ts +++ /dev/null @@ -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} - * @memberof PaginatedUnitList - */ - results?: Array; -} - -/** - * 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).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).map(UnitToJSON)), - }; -} - diff --git a/models/PaginatedUserFileList.ts b/models/PaginatedUserFileList.ts deleted file mode 100644 index 2450732cc..000000000 --- a/models/PaginatedUserFileList.ts +++ /dev/null @@ -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} - * @memberof PaginatedUserFileList - */ - results?: Array; -} - -/** - * 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).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).map(UserFileToJSON)), - }; -} - diff --git a/models/PaginatedUserSpaceList.ts b/models/PaginatedUserSpaceList.ts deleted file mode 100644 index 74a77eb74..000000000 --- a/models/PaginatedUserSpaceList.ts +++ /dev/null @@ -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} - * @memberof PaginatedUserSpaceList - */ - results?: Array; -} - -/** - * 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).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).map(UserSpaceToJSON)), - }; -} - diff --git a/models/PaginatedViewLogList.ts b/models/PaginatedViewLogList.ts deleted file mode 100644 index dbf3b0534..000000000 --- a/models/PaginatedViewLogList.ts +++ /dev/null @@ -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} - * @memberof PaginatedViewLogList - */ - results?: Array; -} - -/** - * 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).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).map(ViewLogToJSON)), - }; -} - diff --git a/models/PatchedAccessToken.ts b/models/PatchedAccessToken.ts deleted file mode 100644 index 1c136a970..000000000 --- a/models/PatchedAccessToken.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedAutomation.ts b/models/PatchedAutomation.ts deleted file mode 100644 index 25b659a61..000000000 --- a/models/PatchedAutomation.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedBookmarkletImport.ts b/models/PatchedBookmarkletImport.ts deleted file mode 100644 index ff6499b93..000000000 --- a/models/PatchedBookmarkletImport.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedConnectorConfigConfig.ts b/models/PatchedConnectorConfigConfig.ts deleted file mode 100644 index 468ccb9c6..000000000 --- a/models/PatchedConnectorConfigConfig.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedCookLog.ts b/models/PatchedCookLog.ts deleted file mode 100644 index 46e1b4db9..000000000 --- a/models/PatchedCookLog.ts +++ /dev/null @@ -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()), - }; -} - diff --git a/models/PatchedCustomFilter.ts b/models/PatchedCustomFilter.ts deleted file mode 100644 index 356455110..000000000 --- a/models/PatchedCustomFilter.ts +++ /dev/null @@ -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} - * @memberof PatchedCustomFilter - */ - shared?: Array; - /** - * - * @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).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).map(UserToJSON)), - }; -} - diff --git a/models/PatchedExportLog.ts b/models/PatchedExportLog.ts deleted file mode 100644 index 90040ef12..000000000 --- a/models/PatchedExportLog.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedFood.ts b/models/PatchedFood.ts deleted file mode 100644 index 0ad725428..000000000 --- a/models/PatchedFood.ts +++ /dev/null @@ -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} - * @memberof PatchedFood - */ - properties?: Array | 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} - * @memberof PatchedFood - */ - inheritFields?: Array | 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} - * @memberof PatchedFood - */ - substitute?: Array | null; - /** - * - * @type {boolean} - * @memberof PatchedFood - */ - substituteSiblings?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedFood - */ - substituteChildren?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedFood - */ - readonly substituteOnhand?: boolean; - /** - * - * @type {Array} - * @memberof PatchedFood - */ - childInheritFields?: Array | 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).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).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).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).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).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).map(FoodInheritFieldToJSON)), - 'ignore_shopping': value.ignoreShopping, - 'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array).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).map(FoodInheritFieldToJSON)), - 'open_data_slug': value.openDataSlug, - }; -} - diff --git a/models/PatchedImportLog.ts b/models/PatchedImportLog.ts deleted file mode 100644 index 94a4c8bc6..000000000 --- a/models/PatchedImportLog.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedIngredient.ts b/models/PatchedIngredient.ts deleted file mode 100644 index 40c494021..000000000 --- a/models/PatchedIngredient.ts +++ /dev/null @@ -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} - * @memberof PatchedIngredient - */ - readonly conversions?: Array; - /** - * - * @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} - * @memberof PatchedIngredient - */ - readonly usedInRecipes?: Array; - /** - * - * @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, - }; -} - diff --git a/models/PatchedInviteLink.ts b/models/PatchedInviteLink.ts deleted file mode 100644 index 6301e0fd0..000000000 --- a/models/PatchedInviteLink.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedKeyword.ts b/models/PatchedKeyword.ts deleted file mode 100644 index 83933dad5..000000000 --- a/models/PatchedKeyword.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedMealPlan.ts b/models/PatchedMealPlan.ts deleted file mode 100644 index b186e9817..000000000 --- a/models/PatchedMealPlan.ts +++ /dev/null @@ -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} - * @memberof PatchedMealPlan - */ - shared?: Array | 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).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).map(UserToJSON)), - }; -} - diff --git a/models/PatchedMealType.ts b/models/PatchedMealType.ts deleted file mode 100644 index 71b8a0feb..000000000 --- a/models/PatchedMealType.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedProperty.ts b/models/PatchedProperty.ts deleted file mode 100644 index ba5990954..000000000 --- a/models/PatchedProperty.ts +++ /dev/null @@ -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), - }; -} - diff --git a/models/PatchedPropertyType.ts b/models/PatchedPropertyType.ts deleted file mode 100644 index aeb13f06d..000000000 --- a/models/PatchedPropertyType.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedRecipe.ts b/models/PatchedRecipe.ts deleted file mode 100644 index 3ef820f98..000000000 --- a/models/PatchedRecipe.ts +++ /dev/null @@ -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} - * @memberof PatchedRecipe - */ - keywords?: Array; - /** - * - * @type {Array} - * @memberof PatchedRecipe - */ - steps?: Array; - /** - * - * @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} - * @memberof PatchedRecipe - */ - properties?: Array; - /** - * - * @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} - * @memberof PatchedRecipe - */ - shared?: Array; -} - -/** - * 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).map(KeywordFromJSON)), - 'steps': !exists(json, 'steps') ? undefined : ((json['steps'] as Array).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).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).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).map(KeywordToJSON)), - 'steps': value.steps === undefined ? undefined : ((value.steps as Array).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).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).map(UserToJSON)), - }; -} - diff --git a/models/PatchedRecipeBook.ts b/models/PatchedRecipeBook.ts deleted file mode 100644 index b365d9645..000000000 --- a/models/PatchedRecipeBook.ts +++ /dev/null @@ -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} - * @memberof PatchedRecipeBook - */ - shared?: Array; - /** - * - * @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).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).map(UserToJSON)), - 'filter': PatchedRecipeBookFilterToJSON(value.filter), - 'order': value.order, - }; -} - diff --git a/models/PatchedRecipeBookEntry.ts b/models/PatchedRecipeBookEntry.ts deleted file mode 100644 index 7f93b90ce..000000000 --- a/models/PatchedRecipeBookEntry.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedRecipeBookFilter.ts b/models/PatchedRecipeBookFilter.ts deleted file mode 100644 index ce79cad3c..000000000 --- a/models/PatchedRecipeBookFilter.ts +++ /dev/null @@ -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} - * @memberof PatchedRecipeBookFilter - */ - shared?: Array; - /** - * - * @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).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).map(UserToJSON)), - }; -} - diff --git a/models/PatchedRecipeNutrition.ts b/models/PatchedRecipeNutrition.ts deleted file mode 100644 index dd1f39368..000000000 --- a/models/PatchedRecipeNutrition.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedShoppingListEntry.ts b/models/PatchedShoppingListEntry.ts deleted file mode 100644 index a348caaeb..000000000 --- a/models/PatchedShoppingListEntry.ts +++ /dev/null @@ -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()), - }; -} - diff --git a/models/PatchedShoppingListRecipe.ts b/models/PatchedShoppingListRecipe.ts deleted file mode 100644 index 5db07829a..000000000 --- a/models/PatchedShoppingListRecipe.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedSpace.ts b/models/PatchedSpace.ts deleted file mode 100644 index d24bcc3f4..000000000 --- a/models/PatchedSpace.ts +++ /dev/null @@ -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} - * @memberof PatchedSpace - */ - foodInherit?: Array; - /** - * - * @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).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).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), - }; -} - diff --git a/models/PatchedSpaceImage.ts b/models/PatchedSpaceImage.ts deleted file mode 100644 index 5aa629148..000000000 --- a/models/PatchedSpaceImage.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedStep.ts b/models/PatchedStep.ts deleted file mode 100644 index c30e2f44d..000000000 --- a/models/PatchedStep.ts +++ /dev/null @@ -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} - * @memberof PatchedStep - */ - ingredients?: Array; - /** - * - * @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).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).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, - }; -} - diff --git a/models/PatchedStorage.ts b/models/PatchedStorage.ts deleted file mode 100644 index aa760b3e0..000000000 --- a/models/PatchedStorage.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedSupermarket.ts b/models/PatchedSupermarket.ts deleted file mode 100644 index d895df855..000000000 --- a/models/PatchedSupermarket.ts +++ /dev/null @@ -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} - * @memberof PatchedSupermarket - */ - readonly categoryToSupermarket?: Array; - /** - * - * @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).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, - }; -} - diff --git a/models/PatchedSupermarketCategory.ts b/models/PatchedSupermarketCategory.ts deleted file mode 100644 index 43c46ad1b..000000000 --- a/models/PatchedSupermarketCategory.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedSupermarketCategoryRelation.ts b/models/PatchedSupermarketCategoryRelation.ts deleted file mode 100644 index 211ae3c01..000000000 --- a/models/PatchedSupermarketCategoryRelation.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedSync.ts b/models/PatchedSync.ts deleted file mode 100644 index 7d1cb60c6..000000000 --- a/models/PatchedSync.ts +++ /dev/null @@ -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()), - }; -} - diff --git a/models/PatchedUnit.ts b/models/PatchedUnit.ts deleted file mode 100644 index 5fe1da326..000000000 --- a/models/PatchedUnit.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedUnitConversion.ts b/models/PatchedUnitConversion.ts deleted file mode 100644 index 3bea42a93..000000000 --- a/models/PatchedUnitConversion.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedUser.ts b/models/PatchedUser.ts deleted file mode 100644 index 96a235776..000000000 --- a/models/PatchedUser.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/PatchedUserPreference.ts b/models/PatchedUserPreference.ts deleted file mode 100644 index 9e83267ed..000000000 --- a/models/PatchedUserPreference.ts +++ /dev/null @@ -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} - * @memberof PatchedUserPreference - */ - planShare?: Array | 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} - * @memberof PatchedUserPreference - */ - shoppingShare?: Array | 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).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).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).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).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, - }; -} - diff --git a/models/PatchedUserSpace.ts b/models/PatchedUserSpace.ts deleted file mode 100644 index 1e419f25f..000000000 --- a/models/PatchedUserSpace.ts +++ /dev/null @@ -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} - * @memberof PatchedUserSpace - */ - groups?: Array; - /** - * - * @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).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).map(GroupToJSON)), - 'active': value.active, - 'internal_note': value.internalNote, - }; -} - diff --git a/models/PatchedViewLog.ts b/models/PatchedViewLog.ts deleted file mode 100644 index 3c188b2ba..000000000 --- a/models/PatchedViewLog.ts +++ /dev/null @@ -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, - }; -} - diff --git a/models/Property.ts b/models/Property.ts deleted file mode 100644 index d3f09d094..000000000 --- a/models/Property.ts +++ /dev/null @@ -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), - }; -} - diff --git a/models/PropertyType.ts b/models/PropertyType.ts deleted file mode 100644 index 765ff06cd..000000000 --- a/models/PropertyType.ts +++ /dev/null @@ -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'; -/** - * Adds nested create feature - * @export - * @interface PropertyType - */ -export interface PropertyType { - /** - * - * @type {number} - * @memberof PropertyType - */ - id?: number; - /** - * - * @type {string} - * @memberof PropertyType - */ - name: string; - /** - * - * @type {string} - * @memberof PropertyType - */ - unit?: string | null; - /** - * - * @type {string} - * @memberof PropertyType - */ - description?: string | null; - /** - * - * @type {number} - * @memberof PropertyType - */ - order?: number; - /** - * - * @type {string} - * @memberof PropertyType - */ - openDataSlug?: string | null; - /** - * - * @type {number} - * @memberof PropertyType - */ - fdcId?: number | null; -} - -/** - * Check if a given object implements the PropertyType interface. - */ -export function instanceOfPropertyType(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function PropertyTypeFromJSON(json: any): PropertyType { - return PropertyTypeFromJSONTyped(json, false); -} - -export function PropertyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PropertyType { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': json['name'], - 'unit': !exists(json, 'unit') ? undefined : json['unit'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'order': !exists(json, 'order') ? undefined : json['order'], - 'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'], - 'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'], - }; -} - -export function PropertyTypeToJSON(value?: PropertyType | 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, - }; -} - diff --git a/models/Recipe.ts b/models/Recipe.ts deleted file mode 100644 index 633bcc659..000000000 --- a/models/Recipe.ts +++ /dev/null @@ -1,282 +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 Recipe - */ -export interface Recipe { - /** - * - * @type {number} - * @memberof Recipe - */ - readonly id: number; - /** - * - * @type {string} - * @memberof Recipe - */ - name: string; - /** - * - * @type {string} - * @memberof Recipe - */ - description?: string | null; - /** - * - * @type {string} - * @memberof Recipe - */ - readonly image: string | null; - /** - * - * @type {Array} - * @memberof Recipe - */ - keywords?: Array; - /** - * - * @type {Array} - * @memberof Recipe - */ - steps: Array; - /** - * - * @type {number} - * @memberof Recipe - */ - workingTime?: number; - /** - * - * @type {number} - * @memberof Recipe - */ - waitingTime?: number; - /** - * - * @type {number} - * @memberof Recipe - */ - readonly createdBy: number; - /** - * - * @type {Date} - * @memberof Recipe - */ - readonly createdAt: Date; - /** - * - * @type {Date} - * @memberof Recipe - */ - readonly updatedAt: Date; - /** - * - * @type {string} - * @memberof Recipe - */ - sourceUrl?: string | null; - /** - * - * @type {boolean} - * @memberof Recipe - */ - internal?: boolean; - /** - * - * @type {boolean} - * @memberof Recipe - */ - showIngredientOverview?: boolean; - /** - * - * @type {PatchedRecipeNutrition} - * @memberof Recipe - */ - nutrition?: PatchedRecipeNutrition | null; - /** - * - * @type {Array} - * @memberof Recipe - */ - properties?: Array; - /** - * - * @type {any} - * @memberof Recipe - */ - readonly foodProperties: any | null; - /** - * - * @type {number} - * @memberof Recipe - */ - servings?: number; - /** - * - * @type {string} - * @memberof Recipe - */ - filePath?: string; - /** - * - * @type {string} - * @memberof Recipe - */ - servingsText?: string; - /** - * - * @type {number} - * @memberof Recipe - */ - readonly rating: number | null; - /** - * - * @type {Date} - * @memberof Recipe - */ - readonly lastCooked: Date | null; - /** - * - * @type {boolean} - * @memberof Recipe - */ - _private?: boolean; - /** - * - * @type {Array} - * @memberof Recipe - */ - shared?: Array; -} - -/** - * Check if a given object implements the Recipe interface. - */ -export function instanceOfRecipe(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "image" in value; - isInstance = isInstance && "steps" in value; - isInstance = isInstance && "createdBy" in value; - isInstance = isInstance && "createdAt" in value; - isInstance = isInstance && "updatedAt" in value; - isInstance = isInstance && "foodProperties" in value; - isInstance = isInstance && "rating" in value; - isInstance = isInstance && "lastCooked" in value; - - return isInstance; -} - -export function RecipeFromJSON(json: any): Recipe { - return RecipeFromJSONTyped(json, false); -} - -export function RecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Recipe { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'image': json['image'], - 'keywords': !exists(json, 'keywords') ? undefined : ((json['keywords'] as Array).map(KeywordFromJSON)), - 'steps': ((json['steps'] as Array).map(StepFromJSON)), - 'workingTime': !exists(json, 'working_time') ? undefined : json['working_time'], - 'waitingTime': !exists(json, 'waiting_time') ? undefined : json['waiting_time'], - 'createdBy': json['created_by'], - 'createdAt': (new Date(json['created_at'])), - 'updatedAt': (new Date(json['updated_at'])), - 'sourceUrl': !exists(json, 'source_url') ? undefined : json['source_url'], - 'internal': !exists(json, 'internal') ? undefined : json['internal'], - 'showIngredientOverview': !exists(json, 'show_ingredient_overview') ? undefined : json['show_ingredient_overview'], - 'nutrition': !exists(json, 'nutrition') ? undefined : PatchedRecipeNutritionFromJSON(json['nutrition']), - 'properties': !exists(json, 'properties') ? undefined : ((json['properties'] as Array).map(PropertyFromJSON)), - 'foodProperties': json['food_properties'], - 'servings': !exists(json, 'servings') ? undefined : json['servings'], - 'filePath': !exists(json, 'file_path') ? undefined : json['file_path'], - 'servingsText': !exists(json, 'servings_text') ? undefined : json['servings_text'], - 'rating': json['rating'], - 'lastCooked': (json['last_cooked'] === null ? null : new Date(json['last_cooked'])), - '_private': !exists(json, 'private') ? undefined : json['private'], - 'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array).map(UserFromJSON)), - }; -} - -export function RecipeToJSON(value?: Recipe | 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).map(KeywordToJSON)), - 'steps': ((value.steps as Array).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).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).map(UserToJSON)), - }; -} - diff --git a/models/RecipeBook.ts b/models/RecipeBook.ts deleted file mode 100644 index 32898e558..000000000 --- a/models/RecipeBook.ts +++ /dev/null @@ -1,128 +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 RecipeBook - */ -export interface RecipeBook { - /** - * - * @type {number} - * @memberof RecipeBook - */ - readonly id: number; - /** - * - * @type {string} - * @memberof RecipeBook - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeBook - */ - description?: string; - /** - * - * @type {Array} - * @memberof RecipeBook - */ - shared: Array; - /** - * - * @type {number} - * @memberof RecipeBook - */ - readonly createdBy: number; - /** - * - * @type {PatchedRecipeBookFilter} - * @memberof RecipeBook - */ - filter?: PatchedRecipeBookFilter | null; - /** - * - * @type {number} - * @memberof RecipeBook - */ - order?: number; -} - -/** - * Check if a given object implements the RecipeBook interface. - */ -export function instanceOfRecipeBook(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "shared" in value; - isInstance = isInstance && "createdBy" in value; - - return isInstance; -} - -export function RecipeBookFromJSON(json: any): RecipeBook { - return RecipeBookFromJSONTyped(json, false); -} - -export function RecipeBookFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeBook { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'shared': ((json['shared'] as Array).map(UserFromJSON)), - 'createdBy': json['created_by'], - 'filter': !exists(json, 'filter') ? undefined : PatchedRecipeBookFilterFromJSON(json['filter']), - 'order': !exists(json, 'order') ? undefined : json['order'], - }; -} - -export function RecipeBookToJSON(value?: RecipeBook | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - 'shared': ((value.shared as Array).map(UserToJSON)), - 'filter': PatchedRecipeBookFilterToJSON(value.filter), - 'order': value.order, - }; -} - diff --git a/models/RecipeBookEntry.ts b/models/RecipeBookEntry.ts deleted file mode 100644 index 7fcb67cf3..000000000 --- a/models/RecipeBookEntry.ts +++ /dev/null @@ -1,112 +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 RecipeBookEntry - */ -export interface RecipeBookEntry { - /** - * - * @type {number} - * @memberof RecipeBookEntry - */ - readonly id: number; - /** - * - * @type {number} - * @memberof RecipeBookEntry - */ - book: number; - /** - * - * @type {RecipeBook} - * @memberof RecipeBookEntry - */ - readonly bookContent: RecipeBook; - /** - * - * @type {number} - * @memberof RecipeBookEntry - */ - recipe: number; - /** - * - * @type {RecipeOverview} - * @memberof RecipeBookEntry - */ - readonly recipeContent: RecipeOverview; -} - -/** - * Check if a given object implements the RecipeBookEntry interface. - */ -export function instanceOfRecipeBookEntry(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "book" in value; - isInstance = isInstance && "bookContent" in value; - isInstance = isInstance && "recipe" in value; - isInstance = isInstance && "recipeContent" in value; - - return isInstance; -} - -export function RecipeBookEntryFromJSON(json: any): RecipeBookEntry { - return RecipeBookEntryFromJSONTyped(json, false); -} - -export function RecipeBookEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeBookEntry { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'book': json['book'], - 'bookContent': RecipeBookFromJSON(json['book_content']), - 'recipe': json['recipe'], - 'recipeContent': RecipeOverviewFromJSON(json['recipe_content']), - }; -} - -export function RecipeBookEntryToJSON(value?: RecipeBookEntry | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'book': value.book, - 'recipe': value.recipe, - }; -} - diff --git a/models/RecipeFlat.ts b/models/RecipeFlat.ts deleted file mode 100644 index bbf32af3e..000000000 --- a/models/RecipeFlat.ts +++ /dev/null @@ -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'; -/** - * Adds nested create feature - * @export - * @interface RecipeFlat - */ -export interface RecipeFlat { - /** - * - * @type {number} - * @memberof RecipeFlat - */ - readonly id: number; - /** - * - * @type {string} - * @memberof RecipeFlat - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeFlat - */ - image?: string | null; -} - -/** - * Check if a given object implements the RecipeFlat interface. - */ -export function instanceOfRecipeFlat(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function RecipeFlatFromJSON(json: any): RecipeFlat { - return RecipeFlatFromJSONTyped(json, false); -} - -export function RecipeFlatFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeFlat { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'image': !exists(json, 'image') ? undefined : json['image'], - }; -} - -export function RecipeFlatToJSON(value?: RecipeFlat | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'image': value.image, - }; -} - diff --git a/models/RecipeImage.ts b/models/RecipeImage.ts deleted file mode 100644 index 3045a4076..000000000 --- a/models/RecipeImage.ts +++ /dev/null @@ -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'; -/** - * Adds nested create feature - * @export - * @interface RecipeImage - */ -export interface RecipeImage { - /** - * - * @type {string} - * @memberof RecipeImage - */ - image?: string | null; - /** - * - * @type {string} - * @memberof RecipeImage - */ - imageUrl?: string | null; -} - -/** - * Check if a given object implements the RecipeImage interface. - */ -export function instanceOfRecipeImage(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function RecipeImageFromJSON(json: any): RecipeImage { - return RecipeImageFromJSONTyped(json, false); -} - -export function RecipeImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeImage { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'image': !exists(json, 'image') ? undefined : json['image'], - 'imageUrl': !exists(json, 'image_url') ? undefined : json['image_url'], - }; -} - -export function RecipeImageToJSON(value?: RecipeImage | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'image': value.image, - 'image_url': value.imageUrl, - }; -} - diff --git a/models/RecipeOverview.ts b/models/RecipeOverview.ts deleted file mode 100644 index 0288e2a30..000000000 --- a/models/RecipeOverview.ts +++ /dev/null @@ -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'; - -/** - * Adds nested create feature - * @export - * @interface RecipeOverview - */ -export interface RecipeOverview { - /** - * - * @type {number} - * @memberof RecipeOverview - */ - readonly id: number; - /** - * - * @type {string} - * @memberof RecipeOverview - */ - readonly name: string; - /** - * - * @type {string} - * @memberof RecipeOverview - */ - readonly description: string | null; - /** - * - * @type {string} - * @memberof RecipeOverview - */ - readonly image: string | null; - /** - * - * @type {Array} - * @memberof RecipeOverview - */ - readonly keywords: Array; - /** - * - * @type {number} - * @memberof RecipeOverview - */ - readonly workingTime: number; - /** - * - * @type {number} - * @memberof RecipeOverview - */ - readonly waitingTime: number; - /** - * - * @type {number} - * @memberof RecipeOverview - */ - readonly createdBy: number; - /** - * - * @type {Date} - * @memberof RecipeOverview - */ - readonly createdAt: Date; - /** - * - * @type {Date} - * @memberof RecipeOverview - */ - readonly updatedAt: Date; - /** - * - * @type {boolean} - * @memberof RecipeOverview - */ - readonly internal: boolean; - /** - * - * @type {number} - * @memberof RecipeOverview - */ - readonly servings: number; - /** - * - * @type {string} - * @memberof RecipeOverview - */ - readonly servingsText: string; - /** - * - * @type {number} - * @memberof RecipeOverview - */ - readonly rating: number | null; - /** - * - * @type {Date} - * @memberof RecipeOverview - */ - readonly lastCooked: Date | null; - /** - * - * @type {boolean} - * @memberof RecipeOverview - */ - readonly _new: boolean; - /** - * - * @type {string} - * @memberof RecipeOverview - */ - readonly recent: string; -} - -/** - * Check if a given object implements the RecipeOverview interface. - */ -export function instanceOfRecipeOverview(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 RecipeOverviewFromJSON(json: any): RecipeOverview { - return RecipeOverviewFromJSONTyped(json, false); -} - -export function RecipeOverviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeOverview { - 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).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 RecipeOverviewToJSON(value?: RecipeOverview | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - }; -} - diff --git a/models/RecipeShoppingUpdate.ts b/models/RecipeShoppingUpdate.ts deleted file mode 100644 index a9e57aed6..000000000 --- a/models/RecipeShoppingUpdate.ts +++ /dev/null @@ -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 RecipeShoppingUpdate - */ -export interface RecipeShoppingUpdate { - /** - * - * @type {number} - * @memberof RecipeShoppingUpdate - */ - readonly id: number; - /** - * Existing shopping list to update - * @type {number} - * @memberof RecipeShoppingUpdate - */ - listRecipe?: number | null; - /** - * List of ingredient IDs from the recipe to add, if not provided all ingredients will be added. - * @type {number} - * @memberof RecipeShoppingUpdate - */ - ingredients?: number | null; - /** - * Providing a list_recipe ID and servings of 0 will delete that shopping list. - * @type {number} - * @memberof RecipeShoppingUpdate - */ - servings?: number | null; -} - -/** - * Check if a given object implements the RecipeShoppingUpdate interface. - */ -export function instanceOfRecipeShoppingUpdate(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - - return isInstance; -} - -export function RecipeShoppingUpdateFromJSON(json: any): RecipeShoppingUpdate { - return RecipeShoppingUpdateFromJSONTyped(json, false); -} - -export function RecipeShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeShoppingUpdate { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'listRecipe': !exists(json, 'list_recipe') ? undefined : json['list_recipe'], - 'ingredients': !exists(json, 'ingredients') ? undefined : json['ingredients'], - 'servings': !exists(json, 'servings') ? undefined : json['servings'], - }; -} - -export function RecipeShoppingUpdateToJSON(value?: RecipeShoppingUpdate | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'list_recipe': value.listRecipe, - 'ingredients': value.ingredients, - 'servings': value.servings, - }; -} - diff --git a/models/RecipeSimple.ts b/models/RecipeSimple.ts deleted file mode 100644 index a811bc742..000000000 --- a/models/RecipeSimple.ts +++ /dev/null @@ -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'; -/** - * Adds nested create feature - * @export - * @interface RecipeSimple - */ -export interface RecipeSimple { - /** - * - * @type {number} - * @memberof RecipeSimple - */ - readonly id: number; - /** - * - * @type {string} - * @memberof RecipeSimple - */ - name: string; - /** - * - * @type {string} - * @memberof RecipeSimple - */ - readonly url: string; -} - -/** - * Check if a given object implements the RecipeSimple interface. - */ -export function instanceOfRecipeSimple(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 RecipeSimpleFromJSON(json: any): RecipeSimple { - return RecipeSimpleFromJSONTyped(json, false); -} - -export function RecipeSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeSimple { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'url': json['url'], - }; -} - -export function RecipeSimpleToJSON(value?: RecipeSimple | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - }; -} - diff --git a/models/ShoppingListEntry.ts b/models/ShoppingListEntry.ts deleted file mode 100644 index 7845759c3..000000000 --- a/models/ShoppingListEntry.ts +++ /dev/null @@ -1,188 +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 ShoppingListEntry - */ -export interface ShoppingListEntry { - /** - * - * @type {number} - * @memberof ShoppingListEntry - */ - readonly id: number; - /** - * - * @type {number} - * @memberof ShoppingListEntry - */ - listRecipe?: number | null; - /** - * - * @type {IngredientFood} - * @memberof ShoppingListEntry - */ - food: IngredientFood | null; - /** - * - * @type {FoodPropertiesFoodUnit} - * @memberof ShoppingListEntry - */ - unit?: FoodPropertiesFoodUnit | null; - /** - * - * @type {number} - * @memberof ShoppingListEntry - */ - amount: number; - /** - * - * @type {number} - * @memberof ShoppingListEntry - */ - order?: number; - /** - * - * @type {boolean} - * @memberof ShoppingListEntry - */ - checked?: boolean; - /** - * - * @type {ShoppingListRecipe} - * @memberof ShoppingListEntry - */ - readonly recipeMealplan: ShoppingListRecipe; - /** - * - * @type {User} - * @memberof ShoppingListEntry - */ - readonly createdBy: User; - /** - * - * @type {Date} - * @memberof ShoppingListEntry - */ - readonly createdAt: Date; - /** - * - * @type {Date} - * @memberof ShoppingListEntry - */ - readonly updatedAt: Date; - /** - * - * @type {Date} - * @memberof ShoppingListEntry - */ - completedAt?: Date | null; - /** - * - * @type {Date} - * @memberof ShoppingListEntry - */ - delayUntil?: Date | null; -} - -/** - * Check if a given object implements the ShoppingListEntry interface. - */ -export function instanceOfShoppingListEntry(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "food" in value; - isInstance = isInstance && "amount" in value; - isInstance = isInstance && "recipeMealplan" in value; - isInstance = isInstance && "createdBy" in value; - isInstance = isInstance && "createdAt" in value; - isInstance = isInstance && "updatedAt" in value; - - return isInstance; -} - -export function ShoppingListEntryFromJSON(json: any): ShoppingListEntry { - return ShoppingListEntryFromJSONTyped(json, false); -} - -export function ShoppingListEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntry { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'listRecipe': !exists(json, 'list_recipe') ? undefined : json['list_recipe'], - 'food': IngredientFoodFromJSON(json['food']), - 'unit': !exists(json, 'unit') ? undefined : FoodPropertiesFoodUnitFromJSON(json['unit']), - 'amount': json['amount'], - 'order': !exists(json, 'order') ? undefined : json['order'], - 'checked': !exists(json, 'checked') ? undefined : json['checked'], - 'recipeMealplan': ShoppingListRecipeFromJSON(json['recipe_mealplan']), - 'createdBy': UserFromJSON(json['created_by']), - 'createdAt': (new Date(json['created_at'])), - 'updatedAt': (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 ShoppingListEntryToJSON(value?: ShoppingListEntry | 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()), - }; -} - diff --git a/models/ShoppingListEntryBulk.ts b/models/ShoppingListEntryBulk.ts deleted file mode 100644 index 96f2ace96..000000000 --- a/models/ShoppingListEntryBulk.ts +++ /dev/null @@ -1,75 +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 ShoppingListEntryBulk - */ -export interface ShoppingListEntryBulk { - /** - * - * @type {Array} - * @memberof ShoppingListEntryBulk - */ - ids: Array; - /** - * - * @type {boolean} - * @memberof ShoppingListEntryBulk - */ - checked: boolean; -} - -/** - * Check if a given object implements the ShoppingListEntryBulk interface. - */ -export function instanceOfShoppingListEntryBulk(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "ids" in value; - isInstance = isInstance && "checked" in value; - - return isInstance; -} - -export function ShoppingListEntryBulkFromJSON(json: any): ShoppingListEntryBulk { - return ShoppingListEntryBulkFromJSONTyped(json, false); -} - -export function ShoppingListEntryBulkFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListEntryBulk { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'ids': json['ids'], - 'checked': json['checked'], - }; -} - -export function ShoppingListEntryBulkToJSON(value?: ShoppingListEntryBulk | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'ids': value.ids, - 'checked': value.checked, - }; -} - diff --git a/models/ShoppingListRecipe.ts b/models/ShoppingListRecipe.ts deleted file mode 100644 index 644383232..000000000 --- a/models/ShoppingListRecipe.ts +++ /dev/null @@ -1,130 +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 ShoppingListRecipe - */ -export interface ShoppingListRecipe { - /** - * - * @type {number} - * @memberof ShoppingListRecipe - */ - readonly id: number; - /** - * - * @type {string} - * @memberof ShoppingListRecipe - */ - readonly recipeName: string; - /** - * - * @type {string} - * @memberof ShoppingListRecipe - */ - readonly name: string; - /** - * - * @type {number} - * @memberof ShoppingListRecipe - */ - recipe?: number | null; - /** - * - * @type {number} - * @memberof ShoppingListRecipe - */ - mealplan?: number | null; - /** - * - * @type {number} - * @memberof ShoppingListRecipe - */ - servings: number; - /** - * - * @type {string} - * @memberof ShoppingListRecipe - */ - readonly mealplanNote: string; - /** - * - * @type {Date} - * @memberof ShoppingListRecipe - */ - readonly mealplanFromDate: Date; - /** - * - * @type {string} - * @memberof ShoppingListRecipe - */ - readonly mealplanType: string; -} - -/** - * Check if a given object implements the ShoppingListRecipe interface. - */ -export function instanceOfShoppingListRecipe(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "recipeName" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "servings" in value; - isInstance = isInstance && "mealplanNote" in value; - isInstance = isInstance && "mealplanFromDate" in value; - isInstance = isInstance && "mealplanType" in value; - - return isInstance; -} - -export function ShoppingListRecipeFromJSON(json: any): ShoppingListRecipe { - return ShoppingListRecipeFromJSONTyped(json, false); -} - -export function ShoppingListRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListRecipe { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'recipeName': json['recipe_name'], - 'name': json['name'], - 'recipe': !exists(json, 'recipe') ? undefined : json['recipe'], - 'mealplan': !exists(json, 'mealplan') ? undefined : json['mealplan'], - 'servings': json['servings'], - 'mealplanNote': json['mealplan_note'], - 'mealplanFromDate': (new Date(json['mealplan_from_date'])), - 'mealplanType': json['mealplan_type'], - }; -} - -export function ShoppingListRecipeToJSON(value?: ShoppingListRecipe | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'recipe': value.recipe, - 'mealplan': value.mealplan, - 'servings': value.servings, - }; -} - diff --git a/models/Space.ts b/models/Space.ts deleted file mode 100644 index dcb8fc503..000000000 --- a/models/Space.ts +++ /dev/null @@ -1,299 +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 Space - */ -export interface Space { - /** - * - * @type {number} - * @memberof Space - */ - readonly id: number; - /** - * - * @type {string} - * @memberof Space - */ - name?: string; - /** - * - * @type {number} - * @memberof Space - */ - readonly createdBy: number | null; - /** - * - * @type {Date} - * @memberof Space - */ - readonly createdAt: Date; - /** - * - * @type {string} - * @memberof Space - */ - message?: string; - /** - * - * @type {number} - * @memberof Space - */ - readonly maxRecipes: number; - /** - * Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload. - * @type {number} - * @memberof Space - */ - readonly maxFileStorageMb: number; - /** - * - * @type {number} - * @memberof Space - */ - readonly maxUsers: number; - /** - * - * @type {boolean} - * @memberof Space - */ - readonly allowSharing: boolean; - /** - * - * @type {boolean} - * @memberof Space - */ - readonly demo: boolean; - /** - * - * @type {Array} - * @memberof Space - */ - foodInherit: Array; - /** - * - * @type {number} - * @memberof Space - */ - readonly userCount: number; - /** - * - * @type {number} - * @memberof Space - */ - readonly recipeCount: number; - /** - * - * @type {number} - * @memberof Space - */ - readonly fileSizeMb: number; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - image?: PatchedSpaceImage | null; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - navLogo?: PatchedSpaceImage | null; - /** - * - * @type {SpaceThemeEnum} - * @memberof Space - */ - spaceTheme?: SpaceThemeEnum; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - customSpaceTheme?: PatchedSpaceImage | null; - /** - * - * @type {string} - * @memberof Space - */ - navBgColor?: string; - /** - * - * @type {SpaceNavTextColorEnum} - * @memberof Space - */ - navTextColor?: SpaceNavTextColorEnum; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - logoColor32?: PatchedSpaceImage | null; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - logoColor128?: PatchedSpaceImage | null; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - logoColor144?: PatchedSpaceImage | null; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - logoColor180?: PatchedSpaceImage | null; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - logoColor192?: PatchedSpaceImage | null; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - logoColor512?: PatchedSpaceImage | null; - /** - * - * @type {PatchedSpaceImage} - * @memberof Space - */ - logoColorSvg?: PatchedSpaceImage | null; -} - -/** - * Check if a given object implements the Space interface. - */ -export function instanceOfSpace(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "createdBy" in value; - isInstance = isInstance && "createdAt" in value; - isInstance = isInstance && "maxRecipes" in value; - isInstance = isInstance && "maxFileStorageMb" in value; - isInstance = isInstance && "maxUsers" in value; - isInstance = isInstance && "allowSharing" in value; - isInstance = isInstance && "demo" in value; - isInstance = isInstance && "foodInherit" in value; - isInstance = isInstance && "userCount" in value; - isInstance = isInstance && "recipeCount" in value; - isInstance = isInstance && "fileSizeMb" in value; - - return isInstance; -} - -export function SpaceFromJSON(json: any): Space { - return SpaceFromJSONTyped(json, false); -} - -export function SpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Space { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - 'createdBy': json['created_by'], - 'createdAt': (new Date(json['created_at'])), - 'message': !exists(json, 'message') ? undefined : json['message'], - 'maxRecipes': json['max_recipes'], - 'maxFileStorageMb': json['max_file_storage_mb'], - 'maxUsers': json['max_users'], - 'allowSharing': json['allow_sharing'], - 'demo': json['demo'], - 'foodInherit': ((json['food_inherit'] as Array).map(FoodInheritFieldFromJSON)), - 'userCount': json['user_count'], - 'recipeCount': json['recipe_count'], - 'fileSizeMb': 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 SpaceToJSON(value?: Space | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'message': value.message, - 'food_inherit': ((value.foodInherit as Array).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), - }; -} - diff --git a/models/SpaceNavTextColorEnum.ts b/models/SpaceNavTextColorEnum.ts deleted file mode 100644 index ea1a950b3..000000000 --- a/models/SpaceNavTextColorEnum.ts +++ /dev/null @@ -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. - */ - - -/** - * * `BLANK` - ------- - * * `LIGHT` - Light - * * `DARK` - Dark - * @export - */ -export const SpaceNavTextColorEnum = { - Blank: 'BLANK', - Light: 'LIGHT', - Dark: 'DARK' -} as const; -export type SpaceNavTextColorEnum = typeof SpaceNavTextColorEnum[keyof typeof SpaceNavTextColorEnum]; - - -export function SpaceNavTextColorEnumFromJSON(json: any): SpaceNavTextColorEnum { - return SpaceNavTextColorEnumFromJSONTyped(json, false); -} - -export function SpaceNavTextColorEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SpaceNavTextColorEnum { - return json as SpaceNavTextColorEnum; -} - -export function SpaceNavTextColorEnumToJSON(value?: SpaceNavTextColorEnum | null): any { - return value as any; -} - diff --git a/models/SpaceThemeEnum.ts b/models/SpaceThemeEnum.ts deleted file mode 100644 index f8dde967e..000000000 --- a/models/SpaceThemeEnum.ts +++ /dev/null @@ -1,49 +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. - */ - - -/** - * * `BLANK` - ------- - * * `TANDOOR` - Tandoor - * * `BOOTSTRAP` - Bootstrap - * * `DARKLY` - Darkly - * * `FLATLY` - Flatly - * * `SUPERHERO` - Superhero - * * `TANDOOR_DARK` - Tandoor Dark (INCOMPLETE) - * @export - */ -export const SpaceThemeEnum = { - Blank: 'BLANK', - Tandoor: 'TANDOOR', - Bootstrap: 'BOOTSTRAP', - Darkly: 'DARKLY', - Flatly: 'FLATLY', - Superhero: 'SUPERHERO', - TandoorDark: 'TANDOOR_DARK' -} as const; -export type SpaceThemeEnum = typeof SpaceThemeEnum[keyof typeof SpaceThemeEnum]; - - -export function SpaceThemeEnumFromJSON(json: any): SpaceThemeEnum { - return SpaceThemeEnumFromJSONTyped(json, false); -} - -export function SpaceThemeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): SpaceThemeEnum { - return json as SpaceThemeEnum; -} - -export function SpaceThemeEnumToJSON(value?: SpaceThemeEnum | null): any { - return value as any; -} - diff --git a/models/Step.ts b/models/Step.ts deleted file mode 100644 index 10b15ad0a..000000000 --- a/models/Step.ts +++ /dev/null @@ -1,175 +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 Step - */ -export interface Step { - /** - * - * @type {number} - * @memberof Step - */ - readonly id: number; - /** - * - * @type {string} - * @memberof Step - */ - name?: string; - /** - * - * @type {string} - * @memberof Step - */ - instruction?: string; - /** - * - * @type {Array} - * @memberof Step - */ - ingredients: Array; - /** - * - * @type {string} - * @memberof Step - */ - readonly instructionsMarkdown: string; - /** - * - * @type {number} - * @memberof Step - */ - time?: number; - /** - * - * @type {number} - * @memberof Step - */ - order?: number; - /** - * - * @type {boolean} - * @memberof Step - */ - showAsHeader?: boolean; - /** - * - * @type {PatchedSpaceImage} - * @memberof Step - */ - file?: PatchedSpaceImage | null; - /** - * - * @type {number} - * @memberof Step - */ - stepRecipe?: number | null; - /** - * - * @type {any} - * @memberof Step - */ - readonly stepRecipeData: any | null; - /** - * - * @type {number} - * @memberof Step - */ - readonly numrecipe: number; - /** - * - * @type {boolean} - * @memberof Step - */ - showIngredientsTable?: boolean; -} - -/** - * Check if a given object implements the Step interface. - */ -export function instanceOfStep(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "ingredients" in value; - isInstance = isInstance && "instructionsMarkdown" in value; - isInstance = isInstance && "stepRecipeData" in value; - isInstance = isInstance && "numrecipe" in value; - - return isInstance; -} - -export function StepFromJSON(json: any): Step { - return StepFromJSONTyped(json, false); -} - -export function StepFromJSONTyped(json: any, ignoreDiscriminator: boolean): Step { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - 'instruction': !exists(json, 'instruction') ? undefined : json['instruction'], - 'ingredients': ((json['ingredients'] as Array).map(IngredientFromJSON)), - 'instructionsMarkdown': 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': json['step_recipe_data'], - 'numrecipe': json['numrecipe'], - 'showIngredientsTable': !exists(json, 'show_ingredients_table') ? undefined : json['show_ingredients_table'], - }; -} - -export function StepToJSON(value?: Step | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'instruction': value.instruction, - 'ingredients': ((value.ingredients as Array).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, - }; -} - diff --git a/models/Storage.ts b/models/Storage.ts deleted file mode 100644 index 150702d33..000000000 --- a/models/Storage.ts +++ /dev/null @@ -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 { MethodEnum } from './MethodEnum'; -import { - MethodEnumFromJSON, - MethodEnumFromJSONTyped, - MethodEnumToJSON, -} from './MethodEnum'; - -/** - * - * @export - * @interface Storage - */ -export interface Storage { - /** - * - * @type {number} - * @memberof Storage - */ - readonly id: number; - /** - * - * @type {string} - * @memberof Storage - */ - name: string; - /** - * - * @type {MethodEnum} - * @memberof Storage - */ - method?: MethodEnum; - /** - * - * @type {string} - * @memberof Storage - */ - username?: string | null; - /** - * - * @type {string} - * @memberof Storage - */ - password?: string | null; - /** - * - * @type {string} - * @memberof Storage - */ - token?: string | null; - /** - * - * @type {number} - * @memberof Storage - */ - readonly createdBy: number; -} - -/** - * Check if a given object implements the Storage interface. - */ -export function instanceOfStorage(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 StorageFromJSON(json: any): Storage { - return StorageFromJSONTyped(json, false); -} - -export function StorageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Storage { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': 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': json['created_by'], - }; -} - -export function StorageToJSON(value?: Storage | 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, - }; -} - diff --git a/models/Supermarket.ts b/models/Supermarket.ts deleted file mode 100644 index 4717f8d52..000000000 --- a/models/Supermarket.ts +++ /dev/null @@ -1,139 +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 Supermarket - */ -export interface Supermarket { - /** - * - * @type {number} - * @memberof Supermarket - */ - readonly id: number; - /** - * - * @type {string} - * @memberof Supermarket - */ - name: string; - /** - * - * @type {string} - * @memberof Supermarket - */ - description?: string | null; - /** - * - * @type {Array} - * @memberof Supermarket - */ - readonly categoryToSupermarket: Array; - /** - * - * @type {string} - * @memberof Supermarket - */ - openDataSlug?: string | null; -} - -/** - * Check if a given object implements the Supermarket interface. - */ -export function instanceOfSupermarket(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "categoryToSupermarket" in value; - - return isInstance; -} - -export function SupermarketFromJSON(json: any): Supermarket { - return SupermarketFromJSONTyped(json, false); -} - -export function SupermarketFromJSONTyped(json: any, ignoreDiscriminator: boolean): Supermarket { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - 'categoryToSupermarket': ((json['category_to_supermarket'] as Array).map(SupermarketCategoryRelationFromJSON)), - 'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'], - }; -} - -export function SupermarketToJSON(value?: Supermarket | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - 'open_data_slug': value.openDataSlug, - }; -} - diff --git a/models/SupermarketCategory.ts b/models/SupermarketCategory.ts deleted file mode 100644 index d3ea28875..000000000 --- a/models/SupermarketCategory.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Tandoor - * Tandoor API Docs - * - * The version of the OpenAPI document: 0.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { 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 SupermarketCategory - */ -export interface SupermarketCategory { - /** - * - * @type {number} - * @memberof SupermarketCategory - */ - readonly id: number; - /** - * - * @type {string} - * @memberof SupermarketCategory - */ - name: string; - /** - * - * @type {string} - * @memberof SupermarketCategory - */ - description?: string | null; -} - -/** - * Check if a given object implements the SupermarketCategory interface. - */ -export function instanceOfSupermarketCategory(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function SupermarketCategoryFromJSON(json: any): SupermarketCategory { - return SupermarketCategoryFromJSONTyped(json, false); -} - -export function SupermarketCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategory { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'description': !exists(json, 'description') ? undefined : json['description'], - }; -} - -export function SupermarketCategoryToJSON(value?: SupermarketCategory | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'description': value.description, - }; -} - diff --git a/models/SupermarketCategoryRelation.ts b/models/SupermarketCategoryRelation.ts deleted file mode 100644 index da12b45e4..000000000 --- a/models/SupermarketCategoryRelation.ts +++ /dev/null @@ -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'; -import type { SupermarketCategory } from './SupermarketCategory'; -import { - SupermarketCategoryFromJSON, - SupermarketCategoryFromJSONTyped, - SupermarketCategoryToJSON, -} from './SupermarketCategory'; - -/** - * Adds nested create feature - * @export - * @interface SupermarketCategoryRelation - */ -export interface SupermarketCategoryRelation { - /** - * - * @type {number} - * @memberof SupermarketCategoryRelation - */ - readonly id: number; - /** - * - * @type {SupermarketCategory} - * @memberof SupermarketCategoryRelation - */ - category: SupermarketCategory; - /** - * - * @type {number} - * @memberof SupermarketCategoryRelation - */ - supermarket: number; - /** - * - * @type {number} - * @memberof SupermarketCategoryRelation - */ - order?: number; -} - -/** - * Check if a given object implements the SupermarketCategoryRelation interface. - */ -export function instanceOfSupermarketCategoryRelation(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "category" in value; - isInstance = isInstance && "supermarket" in value; - - return isInstance; -} - -export function SupermarketCategoryRelationFromJSON(json: any): SupermarketCategoryRelation { - return SupermarketCategoryRelationFromJSONTyped(json, false); -} - -export function SupermarketCategoryRelationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategoryRelation { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'category': SupermarketCategoryFromJSON(json['category']), - 'supermarket': json['supermarket'], - 'order': !exists(json, 'order') ? undefined : json['order'], - }; -} - -export function SupermarketCategoryRelationToJSON(value?: SupermarketCategoryRelation | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'category': SupermarketCategoryToJSON(value.category), - 'supermarket': value.supermarket, - 'order': value.order, - }; -} - diff --git a/models/Sync.ts b/models/Sync.ts deleted file mode 100644 index 6855c2e17..000000000 --- a/models/Sync.ts +++ /dev/null @@ -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'; -/** - * - * @export - * @interface Sync - */ -export interface Sync { - /** - * - * @type {number} - * @memberof Sync - */ - readonly id: number; - /** - * - * @type {number} - * @memberof Sync - */ - storage: number; - /** - * - * @type {string} - * @memberof Sync - */ - path?: string; - /** - * - * @type {boolean} - * @memberof Sync - */ - active?: boolean; - /** - * - * @type {Date} - * @memberof Sync - */ - lastChecked?: Date | null; - /** - * - * @type {Date} - * @memberof Sync - */ - readonly createdAt: Date; - /** - * - * @type {Date} - * @memberof Sync - */ - readonly updatedAt: Date; -} - -/** - * Check if a given object implements the Sync interface. - */ -export function instanceOfSync(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "storage" in value; - isInstance = isInstance && "createdAt" in value; - isInstance = isInstance && "updatedAt" in value; - - return isInstance; -} - -export function SyncFromJSON(json: any): Sync { - return SyncFromJSONTyped(json, false); -} - -export function SyncFromJSONTyped(json: any, ignoreDiscriminator: boolean): Sync { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'storage': 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': (new Date(json['created_at'])), - 'updatedAt': (new Date(json['updated_at'])), - }; -} - -export function SyncToJSON(value?: Sync | 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()), - }; -} - diff --git a/models/SyncLog.ts b/models/SyncLog.ts deleted file mode 100644 index 840da46f7..000000000 --- a/models/SyncLog.ts +++ /dev/null @@ -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'; -/** - * - * @export - * @interface SyncLog - */ -export interface SyncLog { - /** - * - * @type {number} - * @memberof SyncLog - */ - readonly id: number; - /** - * - * @type {number} - * @memberof SyncLog - */ - sync: number; - /** - * - * @type {string} - * @memberof SyncLog - */ - status: string; - /** - * - * @type {string} - * @memberof SyncLog - */ - msg?: string; - /** - * - * @type {Date} - * @memberof SyncLog - */ - readonly createdAt: Date; -} - -/** - * Check if a given object implements the SyncLog interface. - */ -export function instanceOfSyncLog(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "sync" in value; - isInstance = isInstance && "status" in value; - isInstance = isInstance && "createdAt" in value; - - return isInstance; -} - -export function SyncLogFromJSON(json: any): SyncLog { - return SyncLogFromJSONTyped(json, false); -} - -export function SyncLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncLog { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'sync': json['sync'], - 'status': json['status'], - 'msg': !exists(json, 'msg') ? undefined : json['msg'], - 'createdAt': (new Date(json['created_at'])), - }; -} - -export function SyncLogToJSON(value?: SyncLog | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'sync': value.sync, - 'status': value.status, - 'msg': value.msg, - }; -} - diff --git a/models/ThemeEnum.ts b/models/ThemeEnum.ts deleted file mode 100644 index f9c343f3f..000000000 --- a/models/ThemeEnum.ts +++ /dev/null @@ -1,47 +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. - */ - - -/** - * * `TANDOOR` - Tandoor - * * `BOOTSTRAP` - Bootstrap - * * `DARKLY` - Darkly - * * `FLATLY` - Flatly - * * `SUPERHERO` - Superhero - * * `TANDOOR_DARK` - Tandoor Dark (INCOMPLETE) - * @export - */ -export const ThemeEnum = { - Tandoor: 'TANDOOR', - Bootstrap: 'BOOTSTRAP', - Darkly: 'DARKLY', - Flatly: 'FLATLY', - Superhero: 'SUPERHERO', - TandoorDark: 'TANDOOR_DARK' -} as const; -export type ThemeEnum = typeof ThemeEnum[keyof typeof ThemeEnum]; - - -export function ThemeEnumFromJSON(json: any): ThemeEnum { - return ThemeEnumFromJSONTyped(json, false); -} - -export function ThemeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ThemeEnum { - return json as ThemeEnum; -} - -export function ThemeEnumToJSON(value?: ThemeEnum | null): any { - return value as any; -} - diff --git a/models/TypeEnum.ts b/models/TypeEnum.ts deleted file mode 100644 index 90cb70902..000000000 --- a/models/TypeEnum.ts +++ /dev/null @@ -1,55 +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. - */ - - -/** - * * `FOOD_ALIAS` - Food Alias - * * `UNIT_ALIAS` - Unit Alias - * * `KEYWORD_ALIAS` - Keyword Alias - * * `DESCRIPTION_REPLACE` - Description Replace - * * `INSTRUCTION_REPLACE` - Instruction Replace - * * `NEVER_UNIT` - Never Unit - * * `TRANSPOSE_WORDS` - Transpose Words - * * `FOOD_REPLACE` - Food Replace - * * `UNIT_REPLACE` - Unit Replace - * * `NAME_REPLACE` - Name Replace - * @export - */ -export const TypeEnum = { - FoodAlias: 'FOOD_ALIAS', - UnitAlias: 'UNIT_ALIAS', - KeywordAlias: 'KEYWORD_ALIAS', - DescriptionReplace: 'DESCRIPTION_REPLACE', - InstructionReplace: 'INSTRUCTION_REPLACE', - NeverUnit: 'NEVER_UNIT', - TransposeWords: 'TRANSPOSE_WORDS', - FoodReplace: 'FOOD_REPLACE', - UnitReplace: 'UNIT_REPLACE', - NameReplace: 'NAME_REPLACE' -} as const; -export type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum]; - - -export function TypeEnumFromJSON(json: any): TypeEnum { - return TypeEnumFromJSONTyped(json, false); -} - -export function TypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): TypeEnum { - return json as TypeEnum; -} - -export function TypeEnumToJSON(value?: TypeEnum | null): any { - return value as any; -} - diff --git a/models/Unit.ts b/models/Unit.ts deleted file mode 100644 index 0ef5662b8..000000000 --- a/models/Unit.ts +++ /dev/null @@ -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'; -/** - * 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 Unit - */ -export interface Unit { - /** - * - * @type {number} - * @memberof Unit - */ - readonly id: number; - /** - * - * @type {string} - * @memberof Unit - */ - name: string; - /** - * - * @type {string} - * @memberof Unit - */ - pluralName?: string | null; - /** - * - * @type {string} - * @memberof Unit - */ - description?: string | null; - /** - * - * @type {string} - * @memberof Unit - */ - baseUnit?: string | null; - /** - * - * @type {string} - * @memberof Unit - */ - openDataSlug?: string | null; -} - -/** - * Check if a given object implements the Unit interface. - */ -export function instanceOfUnit(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "name" in value; - - return isInstance; -} - -export function UnitFromJSON(json: any): Unit { - return UnitFromJSONTyped(json, false); -} - -export function UnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): Unit { - 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 UnitToJSON(value?: Unit | 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, - }; -} - diff --git a/models/UnitConversion.ts b/models/UnitConversion.ts deleted file mode 100644 index e756c50e1..000000000 --- a/models/UnitConversion.ts +++ /dev/null @@ -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'; -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 UnitConversion - */ -export interface UnitConversion { - /** - * - * @type {number} - * @memberof UnitConversion - */ - readonly id: number; - /** - * - * @type {string} - * @memberof UnitConversion - */ - readonly name: string; - /** - * - * @type {number} - * @memberof UnitConversion - */ - baseAmount: number; - /** - * - * @type {Unit} - * @memberof UnitConversion - */ - baseUnit: Unit; - /** - * - * @type {number} - * @memberof UnitConversion - */ - convertedAmount: number; - /** - * - * @type {Unit} - * @memberof UnitConversion - */ - convertedUnit: Unit; - /** - * - * @type {IngredientFood} - * @memberof UnitConversion - */ - food?: IngredientFood | null; - /** - * - * @type {string} - * @memberof UnitConversion - */ - openDataSlug?: string | null; -} - -/** - * Check if a given object implements the UnitConversion interface. - */ -export function instanceOfUnitConversion(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "baseAmount" in value; - isInstance = isInstance && "baseUnit" in value; - isInstance = isInstance && "convertedAmount" in value; - isInstance = isInstance && "convertedUnit" in value; - - return isInstance; -} - -export function UnitConversionFromJSON(json: any): UnitConversion { - return UnitConversionFromJSONTyped(json, false); -} - -export function UnitConversionFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnitConversion { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'baseAmount': json['base_amount'], - 'baseUnit': UnitFromJSON(json['base_unit']), - 'convertedAmount': json['converted_amount'], - 'convertedUnit': 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 UnitConversionToJSON(value?: UnitConversion | 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, - }; -} - diff --git a/models/User.ts b/models/User.ts deleted file mode 100644 index 7b5226787..000000000 --- a/models/User.ts +++ /dev/null @@ -1,97 +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 User - */ -export interface User { - /** - * - * @type {number} - * @memberof User - */ - readonly id: number; - /** - * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. - * @type {string} - * @memberof User - */ - readonly username: string; - /** - * - * @type {string} - * @memberof User - */ - firstName?: string; - /** - * - * @type {string} - * @memberof User - */ - lastName?: string; - /** - * - * @type {string} - * @memberof User - */ - readonly displayName: string; -} - -/** - * Check if a given object implements the User interface. - */ -export function instanceOfUser(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "username" in value; - isInstance = isInstance && "displayName" in value; - - return isInstance; -} - -export function UserFromJSON(json: any): User { - return UserFromJSONTyped(json, false); -} - -export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'username': json['username'], - 'firstName': !exists(json, 'first_name') ? undefined : json['first_name'], - 'lastName': !exists(json, 'last_name') ? undefined : json['last_name'], - 'displayName': json['display_name'], - }; -} - -export function UserToJSON(value?: User | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'first_name': value.firstName, - 'last_name': value.lastName, - }; -} - diff --git a/models/UserFile.ts b/models/UserFile.ts deleted file mode 100644 index d1c04a481..000000000 --- a/models/UserFile.ts +++ /dev/null @@ -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'; -/** - * - * @export - * @interface UserFile - */ -export interface UserFile { - /** - * - * @type {number} - * @memberof UserFile - */ - readonly id: number; - /** - * - * @type {string} - * @memberof UserFile - */ - name: string; - /** - * - * @type {string} - * @memberof UserFile - */ - file: string; - /** - * - * @type {string} - * @memberof UserFile - */ - readonly fileDownload: string; - /** - * - * @type {string} - * @memberof UserFile - */ - readonly preview: string; - /** - * - * @type {number} - * @memberof UserFile - */ - readonly fileSizeKb: number; -} - -/** - * Check if a given object implements the UserFile interface. - */ -export function instanceOfUserFile(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "name" in value; - isInstance = isInstance && "file" in value; - isInstance = isInstance && "fileDownload" in value; - isInstance = isInstance && "preview" in value; - isInstance = isInstance && "fileSizeKb" in value; - - return isInstance; -} - -export function UserFileFromJSON(json: any): UserFile { - return UserFileFromJSONTyped(json, false); -} - -export function UserFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFile { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'file': json['file'], - 'fileDownload': json['file_download'], - 'preview': json['preview'], - 'fileSizeKb': json['file_size_kb'], - }; -} - -export function UserFileToJSON(value?: UserFile | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - 'file': value.file, - }; -} - diff --git a/models/UserFileView.ts b/models/UserFileView.ts deleted file mode 100644 index a6ef56828..000000000 --- a/models/UserFileView.ts +++ /dev/null @@ -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 UserFileView - */ -export interface UserFileView { - /** - * - * @type {number} - * @memberof UserFileView - */ - readonly id: number; - /** - * - * @type {string} - * @memberof UserFileView - */ - name: string; - /** - * - * @type {string} - * @memberof UserFileView - */ - readonly fileDownload: string; - /** - * - * @type {string} - * @memberof UserFileView - */ - readonly preview: string; -} - -/** - * Check if a given object implements the UserFileView interface. - */ -export function instanceOfUserFileView(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 UserFileViewFromJSON(json: any): UserFileView { - return UserFileViewFromJSONTyped(json, false); -} - -export function UserFileViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFileView { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'name': json['name'], - 'fileDownload': json['file_download'], - 'preview': json['preview'], - }; -} - -export function UserFileViewToJSON(value?: UserFileView | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'name': value.name, - }; -} - diff --git a/models/UserPreference.ts b/models/UserPreference.ts deleted file mode 100644 index 1e7eb72d2..000000000 --- a/models/UserPreference.ts +++ /dev/null @@ -1,327 +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 UserPreference - */ -export interface UserPreference { - /** - * - * @type {number} - * @memberof UserPreference - */ - user: number; - /** - * - * @type {PatchedSpaceImage} - * @memberof UserPreference - */ - image?: PatchedSpaceImage | null; - /** - * - * @type {ThemeEnum} - * @memberof UserPreference - */ - theme?: ThemeEnum; - /** - * - * @type {string} - * @memberof UserPreference - */ - navBgColor?: string; - /** - * - * @type {UserPreferenceNavTextColorEnum} - * @memberof UserPreference - */ - navTextColor?: UserPreferenceNavTextColorEnum; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - navShowLogo?: boolean; - /** - * - * @type {string} - * @memberof UserPreference - */ - defaultUnit?: string; - /** - * - * @type {DefaultPageEnum} - * @memberof UserPreference - */ - defaultPage?: DefaultPageEnum; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - useFractions?: boolean; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - useKj?: boolean; - /** - * - * @type {Array} - * @memberof UserPreference - */ - planShare?: Array | null; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - navSticky?: boolean; - /** - * - * @type {number} - * @memberof UserPreference - */ - ingredientDecimals?: number; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - comments?: boolean; - /** - * - * @type {number} - * @memberof UserPreference - */ - shoppingAutoSync?: number; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - mealplanAutoaddShopping?: boolean; - /** - * - * @type {FoodInheritField} - * @memberof UserPreference - */ - readonly foodInheritDefault: FoodInheritField; - /** - * - * @type {number} - * @memberof UserPreference - */ - defaultDelay?: number; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - mealplanAutoincludeRelated?: boolean; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - mealplanAutoexcludeOnhand?: boolean; - /** - * - * @type {Array} - * @memberof UserPreference - */ - shoppingShare?: Array | null; - /** - * - * @type {number} - * @memberof UserPreference - */ - shoppingRecentDays?: number; - /** - * - * @type {string} - * @memberof UserPreference - */ - csvDelim?: string; - /** - * - * @type {string} - * @memberof UserPreference - */ - csvPrefix?: string; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - filterToSupermarket?: boolean; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - shoppingAddOnhand?: boolean; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - leftHanded?: boolean; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - showStepIngredients?: boolean; - /** - * - * @type {boolean} - * @memberof UserPreference - */ - readonly foodChildrenExist: boolean; -} - -/** - * Check if a given object implements the UserPreference interface. - */ -export function instanceOfUserPreference(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "user" in value; - isInstance = isInstance && "foodInheritDefault" in value; - isInstance = isInstance && "foodChildrenExist" in value; - - return isInstance; -} - -export function UserPreferenceFromJSON(json: any): UserPreference { - return UserPreferenceFromJSONTyped(json, false); -} - -export function UserPreferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreference { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'user': 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).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': 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).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': json['food_children_exist'], - }; -} - -export function UserPreferenceToJSON(value?: UserPreference | 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).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).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, - }; -} - diff --git a/models/UserPreferenceNavTextColorEnum.ts b/models/UserPreferenceNavTextColorEnum.ts deleted file mode 100644 index b86aaf3b1..000000000 --- a/models/UserPreferenceNavTextColorEnum.ts +++ /dev/null @@ -1,39 +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. - */ - - -/** - * * `LIGHT` - Light - * * `DARK` - Dark - * @export - */ -export const UserPreferenceNavTextColorEnum = { - Light: 'LIGHT', - Dark: 'DARK' -} as const; -export type UserPreferenceNavTextColorEnum = typeof UserPreferenceNavTextColorEnum[keyof typeof UserPreferenceNavTextColorEnum]; - - -export function UserPreferenceNavTextColorEnumFromJSON(json: any): UserPreferenceNavTextColorEnum { - return UserPreferenceNavTextColorEnumFromJSONTyped(json, false); -} - -export function UserPreferenceNavTextColorEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferenceNavTextColorEnum { - return json as UserPreferenceNavTextColorEnum; -} - -export function UserPreferenceNavTextColorEnumToJSON(value?: UserPreferenceNavTextColorEnum | null): any { - return value as any; -} - diff --git a/models/UserSpace.ts b/models/UserSpace.ts deleted file mode 100644 index 11dfeb19c..000000000 --- a/models/UserSpace.ts +++ /dev/null @@ -1,143 +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 UserSpace - */ -export interface UserSpace { - /** - * - * @type {number} - * @memberof UserSpace - */ - readonly id: number; - /** - * - * @type {User} - * @memberof UserSpace - */ - readonly user: User; - /** - * - * @type {number} - * @memberof UserSpace - */ - readonly space: number; - /** - * - * @type {Array} - * @memberof UserSpace - */ - groups: Array; - /** - * - * @type {boolean} - * @memberof UserSpace - */ - active?: boolean; - /** - * - * @type {string} - * @memberof UserSpace - */ - internalNote?: string | null; - /** - * - * @type {number} - * @memberof UserSpace - */ - readonly inviteLink: number | null; - /** - * - * @type {Date} - * @memberof UserSpace - */ - readonly createdAt: Date; - /** - * - * @type {Date} - * @memberof UserSpace - */ - readonly updatedAt: Date; -} - -/** - * Check if a given object implements the UserSpace interface. - */ -export function instanceOfUserSpace(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "user" in value; - isInstance = isInstance && "space" in value; - isInstance = isInstance && "groups" in value; - isInstance = isInstance && "inviteLink" in value; - isInstance = isInstance && "createdAt" in value; - isInstance = isInstance && "updatedAt" in value; - - return isInstance; -} - -export function UserSpaceFromJSON(json: any): UserSpace { - return UserSpaceFromJSONTyped(json, false); -} - -export function UserSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSpace { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'user': UserFromJSON(json['user']), - 'space': json['space'], - 'groups': ((json['groups'] as Array).map(GroupFromJSON)), - 'active': !exists(json, 'active') ? undefined : json['active'], - 'internalNote': !exists(json, 'internal_note') ? undefined : json['internal_note'], - 'inviteLink': json['invite_link'], - 'createdAt': (new Date(json['created_at'])), - 'updatedAt': (new Date(json['updated_at'])), - }; -} - -export function UserSpaceToJSON(value?: UserSpace | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'groups': ((value.groups as Array).map(GroupToJSON)), - 'active': value.active, - 'internal_note': value.internalNote, - }; -} - diff --git a/models/ViewLog.ts b/models/ViewLog.ts deleted file mode 100644 index 5bc85d8d7..000000000 --- a/models/ViewLog.ts +++ /dev/null @@ -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 ViewLog - */ -export interface ViewLog { - /** - * - * @type {number} - * @memberof ViewLog - */ - readonly id: number; - /** - * - * @type {number} - * @memberof ViewLog - */ - recipe: number; - /** - * - * @type {number} - * @memberof ViewLog - */ - readonly createdBy: number; - /** - * - * @type {Date} - * @memberof ViewLog - */ - readonly createdAt: Date; -} - -/** - * Check if a given object implements the ViewLog interface. - */ -export function instanceOfViewLog(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "recipe" in value; - isInstance = isInstance && "createdBy" in value; - isInstance = isInstance && "createdAt" in value; - - return isInstance; -} - -export function ViewLogFromJSON(json: any): ViewLog { - return ViewLogFromJSONTyped(json, false); -} - -export function ViewLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ViewLog { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'recipe': json['recipe'], - 'createdBy': json['created_by'], - 'createdAt': (new Date(json['created_at'])), - }; -} - -export function ViewLogToJSON(value?: ViewLog | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'recipe': value.recipe, - }; -} - diff --git a/models/index.ts b/models/index.ts deleted file mode 100644 index 010531d48..000000000 --- a/models/index.ts +++ /dev/null @@ -1,134 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './AccessToken'; -export * from './AuthToken'; -export * from './AutoMealPlan'; -export * from './Automation'; -export * from './BookmarkletImport'; -export * from './BookmarkletImportList'; -export * from './ConnectorConfigConfig'; -export * from './CookLog'; -export * from './CustomFilter'; -export * from './DefaultPageEnum'; -export * from './DeleteEnum'; -export * from './ExportLog'; -export * from './Food'; -export * from './FoodInheritField'; -export * from './FoodPropertiesFoodUnit'; -export * from './FoodRecipe'; -export * from './FoodShoppingUpdate'; -export * from './FoodSimple'; -export * from './FoodSupermarketCategory'; -export * from './Group'; -export * from './ImportLog'; -export * from './Ingredient'; -export * from './IngredientFood'; -export * from './InviteLink'; -export * from './Keyword'; -export * from './KeywordLabel'; -export * from './MealPlan'; -export * from './MealPlanRecipe'; -export * from './MealType'; -export * from './MethodEnum'; -export * from './NutritionInformation'; -export * from './PaginatedAutomationList'; -export * from './PaginatedBookmarkletImportListList'; -export * from './PaginatedCookLogList'; -export * from './PaginatedCustomFilterList'; -export * from './PaginatedExportLogList'; -export * from './PaginatedFoodList'; -export * from './PaginatedImportLogList'; -export * from './PaginatedIngredientList'; -export * from './PaginatedInviteLinkList'; -export * from './PaginatedKeywordList'; -export * from './PaginatedMealPlanList'; -export * from './PaginatedMealTypeList'; -export * from './PaginatedPropertyList'; -export * from './PaginatedPropertyTypeList'; -export * from './PaginatedRecipeBookEntryList'; -export * from './PaginatedRecipeBookList'; -export * from './PaginatedRecipeOverviewList'; -export * from './PaginatedShoppingListEntryList'; -export * from './PaginatedShoppingListRecipeList'; -export * from './PaginatedStepList'; -export * from './PaginatedSupermarketCategoryList'; -export * from './PaginatedSupermarketCategoryRelationList'; -export * from './PaginatedSupermarketList'; -export * from './PaginatedSyncList'; -export * from './PaginatedSyncLogList'; -export * from './PaginatedUnitConversionList'; -export * from './PaginatedUnitList'; -export * from './PaginatedUserFileList'; -export * from './PaginatedUserSpaceList'; -export * from './PaginatedViewLogList'; -export * from './PatchedAccessToken'; -export * from './PatchedAutomation'; -export * from './PatchedBookmarkletImport'; -export * from './PatchedConnectorConfigConfig'; -export * from './PatchedCookLog'; -export * from './PatchedCustomFilter'; -export * from './PatchedExportLog'; -export * from './PatchedFood'; -export * from './PatchedImportLog'; -export * from './PatchedIngredient'; -export * from './PatchedInviteLink'; -export * from './PatchedKeyword'; -export * from './PatchedMealPlan'; -export * from './PatchedMealType'; -export * from './PatchedProperty'; -export * from './PatchedPropertyType'; -export * from './PatchedRecipe'; -export * from './PatchedRecipeBook'; -export * from './PatchedRecipeBookEntry'; -export * from './PatchedRecipeBookFilter'; -export * from './PatchedRecipeNutrition'; -export * from './PatchedShoppingListEntry'; -export * from './PatchedShoppingListRecipe'; -export * from './PatchedSpace'; -export * from './PatchedSpaceImage'; -export * from './PatchedStep'; -export * from './PatchedStorage'; -export * from './PatchedSupermarket'; -export * from './PatchedSupermarketCategory'; -export * from './PatchedSupermarketCategoryRelation'; -export * from './PatchedSync'; -export * from './PatchedUnit'; -export * from './PatchedUnitConversion'; -export * from './PatchedUser'; -export * from './PatchedUserPreference'; -export * from './PatchedUserSpace'; -export * from './PatchedViewLog'; -export * from './Property'; -export * from './PropertyType'; -export * from './Recipe'; -export * from './RecipeBook'; -export * from './RecipeBookEntry'; -export * from './RecipeFlat'; -export * from './RecipeImage'; -export * from './RecipeOverview'; -export * from './RecipeShoppingUpdate'; -export * from './RecipeSimple'; -export * from './ShoppingListEntry'; -export * from './ShoppingListEntryBulk'; -export * from './ShoppingListRecipe'; -export * from './Space'; -export * from './SpaceNavTextColorEnum'; -export * from './SpaceThemeEnum'; -export * from './Step'; -export * from './Storage'; -export * from './Supermarket'; -export * from './SupermarketCategory'; -export * from './SupermarketCategoryRelation'; -export * from './Sync'; -export * from './SyncLog'; -export * from './ThemeEnum'; -export * from './TypeEnum'; -export * from './Unit'; -export * from './UnitConversion'; -export * from './User'; -export * from './UserFile'; -export * from './UserFileView'; -export * from './UserPreference'; -export * from './UserPreferenceNavTextColorEnum'; -export * from './UserSpace'; -export * from './ViewLog';