mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
basic url importer working
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AccessTokenRequest
|
||||
*/
|
||||
export interface AccessTokenRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
expires: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
scope?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AccessTokenRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AccessTokenRequest interface.
|
||||
*/
|
||||
export function instanceOfAccessTokenRequest(value: object): boolean {
|
||||
if (!('expires' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AccessTokenRequestFromJSON(json: any): AccessTokenRequest {
|
||||
return AccessTokenRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AccessTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessTokenRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': (new Date(json['expires'])),
|
||||
'scope': json['scope'] == null ? undefined : json['scope'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AccessTokenRequestToJSON(value?: AccessTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': ((value['expires']).toISOString()),
|
||||
'scope': value['scope'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AuthTokenRequest
|
||||
*/
|
||||
export interface AuthTokenRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthTokenRequest
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthTokenRequest
|
||||
*/
|
||||
password: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AuthTokenRequest interface.
|
||||
*/
|
||||
export function instanceOfAuthTokenRequest(value: object): boolean {
|
||||
if (!('username' in value)) return false;
|
||||
if (!('password' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AuthTokenRequestFromJSON(json: any): AuthTokenRequest {
|
||||
return AuthTokenRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AuthTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthTokenRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'username': json['username'],
|
||||
'password': json['password'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AuthTokenRequestToJSON(value?: AuthTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'username': value['username'],
|
||||
'password': value['password'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AutoMealPlanRequest
|
||||
*/
|
||||
export interface AutoMealPlanRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
startDate: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
endDate: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
mealTypeId: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<any>}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
keywordIds: Array<any>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
servings: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AutoMealPlanRequest
|
||||
*/
|
||||
addshopping: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AutoMealPlanRequest interface.
|
||||
*/
|
||||
export function instanceOfAutoMealPlanRequest(value: object): boolean {
|
||||
if (!('startDate' in value)) return false;
|
||||
if (!('endDate' in value)) return false;
|
||||
if (!('mealTypeId' in value)) return false;
|
||||
if (!('keywordIds' in value)) return false;
|
||||
if (!('servings' in value)) return false;
|
||||
if (!('addshopping' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AutoMealPlanRequestFromJSON(json: any): AutoMealPlanRequest {
|
||||
return AutoMealPlanRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AutoMealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutoMealPlanRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'startDate': (new Date(json['start_date'])),
|
||||
'endDate': (new Date(json['end_date'])),
|
||||
'mealTypeId': json['meal_type_id'],
|
||||
'keywordIds': json['keyword_ids'],
|
||||
'servings': json['servings'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'addshopping': json['addshopping'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AutoMealPlanRequestToJSON(value?: AutoMealPlanRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'start_date': ((value['startDate']).toISOString().substring(0,10)),
|
||||
'end_date': ((value['endDate']).toISOString().substring(0,10)),
|
||||
'meal_type_id': value['mealTypeId'],
|
||||
'keyword_ids': value['keywordIds'],
|
||||
'servings': value['servings'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'addshopping': value['addshopping'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { TypeEnum } from './TypeEnum';
|
||||
import {
|
||||
TypeEnumFromJSON,
|
||||
TypeEnumFromJSONTyped,
|
||||
TypeEnumToJSON,
|
||||
} from './TypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AutomationRequest
|
||||
*/
|
||||
export interface AutomationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {TypeEnum}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
type: TypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param1?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param2?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
param3?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AutomationRequest interface.
|
||||
*/
|
||||
export function instanceOfAutomationRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AutomationRequestFromJSON(json: any): AutomationRequest {
|
||||
return AutomationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': TypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
'param2': json['param_2'] == null ? undefined : json['param_2'],
|
||||
'param3': json['param_3'] == null ? undefined : json['param_3'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'disabled': json['disabled'] == null ? undefined : json['disabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AutomationRequestToJSON(value?: AutomationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': TypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
'param_2': value['param2'],
|
||||
'param_3': value['param3'],
|
||||
'order': value['order'],
|
||||
'disabled': value['disabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const BlankEnum = {
|
||||
Empty: ''
|
||||
} as const;
|
||||
export type BlankEnum = typeof BlankEnum[keyof typeof BlankEnum];
|
||||
|
||||
|
||||
export function BlankEnumFromJSON(json: any): BlankEnum {
|
||||
return BlankEnumFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function BlankEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlankEnum {
|
||||
return json as BlankEnum;
|
||||
}
|
||||
|
||||
export function BlankEnumToJSON(value?: BlankEnum | null): any {
|
||||
return value as any;
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface BookmarkletImportRequest
|
||||
*/
|
||||
export interface BookmarkletImportRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
html: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof BookmarkletImportRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the BookmarkletImportRequest interface.
|
||||
*/
|
||||
export function instanceOfBookmarkletImportRequest(value: object): boolean {
|
||||
if (!('html' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestFromJSON(json: any): BookmarkletImportRequest {
|
||||
return BookmarkletImportRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BookmarkletImportRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'html': json['html'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestToJSON(value?: BookmarkletImportRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value['url'],
|
||||
'html': value['html'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ConnectorConfigConfigRequest
|
||||
*/
|
||||
export interface ConnectorConfigConfigRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
todoEntity?: string;
|
||||
/**
|
||||
* Is Connector Enabled
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryCreatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryUpdatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryDeletedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ConnectorConfigConfigRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ConnectorConfigConfigRequest interface.
|
||||
*/
|
||||
export function instanceOfConnectorConfigConfigRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestFromJSON(json: any): ConnectorConfigConfigRequest {
|
||||
return ConnectorConfigConfigRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectorConfigConfigRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'],
|
||||
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
||||
'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_enabled'],
|
||||
'onShoppingListEntryUpdatedEnabled': json['on_shopping_list_entry_updated_enabled'] == null ? undefined : json['on_shopping_list_entry_updated_enabled'],
|
||||
'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ConnectorConfigConfigRequestToJSON(value?: ConnectorConfigConfigRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'url': value['url'],
|
||||
'token': value['token'],
|
||||
'todo_entity': value['todoEntity'],
|
||||
'enabled': value['enabled'],
|
||||
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
|
||||
'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'],
|
||||
'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CookLogCreatedBy
|
||||
*/
|
||||
export interface CookLogCreatedBy {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
* Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly username?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
firstName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
lastName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogCreatedBy
|
||||
*/
|
||||
readonly displayName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CookLogCreatedBy interface.
|
||||
*/
|
||||
export function instanceOfCookLogCreatedBy(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function CookLogCreatedByFromJSON(json: any): CookLogCreatedBy {
|
||||
return CookLogCreatedByFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CookLogCreatedByFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLogCreatedBy {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'username': !exists(json, 'username') ? undefined : json['username'],
|
||||
'firstName': !exists(json, 'first_name') ? undefined : json['first_name'],
|
||||
'lastName': !exists(json, 'last_name') ? undefined : json['last_name'],
|
||||
'displayName': !exists(json, 'display_name') ? undefined : json['display_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CookLogCreatedByToJSON(value?: CookLogCreatedBy | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'first_name': value.firstName,
|
||||
'last_name': value.lastName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CookLogRequest
|
||||
*/
|
||||
export interface CookLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
recipe: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
rating?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CookLogRequest interface.
|
||||
*/
|
||||
export function instanceOfCookLogRequest(value: object): boolean {
|
||||
if (!('recipe' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function CookLogRequestFromJSON(json: any): CookLogRequest {
|
||||
return CookLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CookLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': json['recipe'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'rating': json['rating'] == null ? undefined : json['rating'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CookLogRequestToJSON(value?: CookLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value['recipe'],
|
||||
'servings': value['servings'],
|
||||
'rating': value['rating'],
|
||||
'comment': value['comment'],
|
||||
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface CustomFilterRequest
|
||||
*/
|
||||
export interface CustomFilterRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
search: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CustomFilterRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CustomFilterRequest interface.
|
||||
*/
|
||||
export function instanceOfCustomFilterRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
if (!('search' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function CustomFilterRequestFromJSON(json: any): CustomFilterRequest {
|
||||
return CustomFilterRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CustomFilterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilterRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'search': json['search'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CustomFilterRequestToJSON(value?: CustomFilterRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'search': value['search'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CustomFilterSharedInner
|
||||
*/
|
||||
export interface CustomFilterSharedInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
* Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
|
||||
* @type {string}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
readonly username?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
firstName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
lastName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CustomFilterSharedInner
|
||||
*/
|
||||
readonly displayName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CustomFilterSharedInner interface.
|
||||
*/
|
||||
export function instanceOfCustomFilterSharedInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function CustomFilterSharedInnerFromJSON(json: any): CustomFilterSharedInner {
|
||||
return CustomFilterSharedInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CustomFilterSharedInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilterSharedInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'username': !exists(json, 'username') ? undefined : json['username'],
|
||||
'firstName': !exists(json, 'first_name') ? undefined : json['first_name'],
|
||||
'lastName': !exists(json, 'last_name') ? undefined : json['last_name'],
|
||||
'displayName': !exists(json, 'display_name') ? undefined : json['display_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CustomFilterSharedInnerToJSON(value?: CustomFilterSharedInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'first_name': value.firstName,
|
||||
'last_name': value.lastName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ExportLogRequest
|
||||
*/
|
||||
export interface ExportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
exportedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
cacheDuration?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
possiblyNotExpired?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ExportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ExportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfExportLogRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ExportLogRequestFromJSON(json: any): ExportLogRequest {
|
||||
return ExportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ExportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'],
|
||||
'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'],
|
||||
'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ExportLogRequestToJSON(value?: ExportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'exported_recipes': value['exportedRecipes'],
|
||||
'cache_duration': value['cacheDuration'],
|
||||
'possibly_not_expired': value['possiblyNotExpired'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface FoodInheritFieldRequest
|
||||
*/
|
||||
export interface FoodInheritFieldRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
field?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodInheritFieldRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodInheritFieldRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodInheritFieldRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestFromJSON(json: any): FoodInheritFieldRequest {
|
||||
return FoodInheritFieldRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodInheritFieldRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'field': json['field'] == null ? undefined : json['field'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestToJSON(value?: FoodInheritFieldRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'field': value['field'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodInheritFieldsInner
|
||||
*/
|
||||
export interface FoodInheritFieldsInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodInheritFieldsInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldsInner
|
||||
*/
|
||||
name?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodInheritFieldsInner
|
||||
*/
|
||||
field?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodInheritFieldsInner interface.
|
||||
*/
|
||||
export function instanceOfFoodInheritFieldsInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodInheritFieldsInnerFromJSON(json: any): FoodInheritFieldsInner {
|
||||
return FoodInheritFieldsInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodInheritFieldsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodInheritFieldsInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
||||
'field': !exists(json, 'field') ? undefined : json['field'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodInheritFieldsInnerToJSON(value?: FoodInheritFieldsInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'field': value.field,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodPropertiesFoodUnit
|
||||
*/
|
||||
export interface FoodPropertiesFoodUnit {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
pluralName?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
baseUnit?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesFoodUnit
|
||||
*/
|
||||
openDataSlug?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodPropertiesFoodUnit interface.
|
||||
*/
|
||||
export function instanceOfFoodPropertiesFoodUnit(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodPropertiesFoodUnitFromJSON(json: any): FoodPropertiesFoodUnit {
|
||||
return FoodPropertiesFoodUnitFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodPropertiesFoodUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesFoodUnit {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'],
|
||||
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodPropertiesFoodUnitToJSON(value?: FoodPropertiesFoodUnit | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'description': value.description,
|
||||
'base_unit': value.baseUnit,
|
||||
'open_data_slug': value.openDataSlug,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { FoodPropertiesInnerPropertyType } from './FoodPropertiesInnerPropertyType';
|
||||
import {
|
||||
FoodPropertiesInnerPropertyTypeFromJSON,
|
||||
FoodPropertiesInnerPropertyTypeFromJSONTyped,
|
||||
FoodPropertiesInnerPropertyTypeToJSON,
|
||||
} from './FoodPropertiesInnerPropertyType';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodPropertiesInner
|
||||
*/
|
||||
export interface FoodPropertiesInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInner
|
||||
*/
|
||||
propertyAmount: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {FoodPropertiesInnerPropertyType}
|
||||
* @memberof FoodPropertiesInner
|
||||
*/
|
||||
propertyType: FoodPropertiesInnerPropertyType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodPropertiesInner interface.
|
||||
*/
|
||||
export function instanceOfFoodPropertiesInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "propertyAmount" in value;
|
||||
isInstance = isInstance && "propertyType" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerFromJSON(json: any): FoodPropertiesInner {
|
||||
return FoodPropertiesInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'propertyAmount': json['property_amount'],
|
||||
'propertyType': FoodPropertiesInnerPropertyTypeFromJSON(json['property_type']),
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerToJSON(value?: FoodPropertiesInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'property_amount': value.propertyAmount,
|
||||
'property_type': FoodPropertiesInnerPropertyTypeToJSON(value.propertyType),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
export interface FoodPropertiesInnerPropertyType {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
unit?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
openDataSlug?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodPropertiesInnerPropertyType
|
||||
*/
|
||||
fdcId?: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodPropertiesInnerPropertyType interface.
|
||||
*/
|
||||
export function instanceOfFoodPropertiesInnerPropertyType(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerPropertyTypeFromJSON(json: any): FoodPropertiesInnerPropertyType {
|
||||
return FoodPropertiesInnerPropertyTypeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerPropertyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodPropertiesInnerPropertyType {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'unit': !exists(json, 'unit') ? undefined : json['unit'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
|
||||
'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodPropertiesInnerPropertyTypeToJSON(value?: FoodPropertiesInnerPropertyType | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value.id,
|
||||
'name': value.name,
|
||||
'unit': value.unit,
|
||||
'description': value.description,
|
||||
'order': value.order,
|
||||
'open_data_slug': value.openDataSlug,
|
||||
'fdc_id': value.fdcId,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodRecipe
|
||||
*/
|
||||
export interface FoodRecipe {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRecipe
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRecipe
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRecipe
|
||||
*/
|
||||
readonly url?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodRecipe interface.
|
||||
*/
|
||||
export function instanceOfFoodRecipe(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodRecipeFromJSON(json: any): FoodRecipe {
|
||||
return FoodRecipeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodRecipe {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'url': !exists(json, 'url') ? undefined : json['url'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodRecipeToJSON(value?: FoodRecipe | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,276 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { FoodInheritFieldRequest } from './FoodInheritFieldRequest';
|
||||
import {
|
||||
FoodInheritFieldRequestFromJSON,
|
||||
FoodInheritFieldRequestFromJSONTyped,
|
||||
FoodInheritFieldRequestToJSON,
|
||||
} from './FoodInheritFieldRequest';
|
||||
import type { FoodSimpleRequest } from './FoodSimpleRequest';
|
||||
import {
|
||||
FoodSimpleRequestFromJSON,
|
||||
FoodSimpleRequestFromJSONTyped,
|
||||
FoodSimpleRequestToJSON,
|
||||
} from './FoodSimpleRequest';
|
||||
import type { PropertyRequest } from './PropertyRequest';
|
||||
import {
|
||||
PropertyRequestFromJSON,
|
||||
PropertyRequestFromJSONTyped,
|
||||
PropertyRequestToJSON,
|
||||
} from './PropertyRequest';
|
||||
import type { RecipeSimpleRequest } from './RecipeSimpleRequest';
|
||||
import {
|
||||
RecipeSimpleRequestFromJSON,
|
||||
RecipeSimpleRequestFromJSONTyped,
|
||||
RecipeSimpleRequestToJSON,
|
||||
} from './RecipeSimpleRequest';
|
||||
import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest';
|
||||
import {
|
||||
SupermarketCategoryRequestFromJSON,
|
||||
SupermarketCategoryRequestFromJSONTyped,
|
||||
SupermarketCategoryRequestToJSON,
|
||||
} from './SupermarketCategoryRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface FoodRequest
|
||||
*/
|
||||
export interface FoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeSimpleRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
recipe?: RecipeSimpleRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PropertyRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
properties?: Array<PropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
foodOnhand?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {SupermarketCategoryRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
supermarketCategory?: SupermarketCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
inheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
ignoreShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodSimpleRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substitute?: Array<FoodSimpleRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substituteSiblings?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
substituteChildren?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
childInheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodRequestFromJSON(json: any): FoodRequest {
|
||||
return FoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeSimpleRequestFromJSON(json['recipe']),
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(PropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : UnitRequestFromJSON(json['properties_food_unit']),
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'foodOnhand': json['food_onhand'] == null ? undefined : json['food_onhand'],
|
||||
'supermarketCategory': json['supermarket_category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['supermarket_category']),
|
||||
'inheritFields': json['inherit_fields'] == null ? undefined : ((json['inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'ignoreShopping': json['ignore_shopping'] == null ? undefined : json['ignore_shopping'],
|
||||
'substitute': json['substitute'] == null ? undefined : ((json['substitute'] as Array<any>).map(FoodSimpleRequestFromJSON)),
|
||||
'substituteSiblings': json['substitute_siblings'] == null ? undefined : json['substitute_siblings'],
|
||||
'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'],
|
||||
'childInheritFields': json['child_inherit_fields'] == null ? undefined : ((json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodRequestToJSON(value?: FoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
'recipe': RecipeSimpleRequestToJSON(value['recipe']),
|
||||
'url': value['url'],
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(PropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': UnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'fdc_id': value['fdcId'],
|
||||
'food_onhand': value['foodOnhand'],
|
||||
'supermarket_category': SupermarketCategoryRequestToJSON(value['supermarketCategory']),
|
||||
'inherit_fields': value['inheritFields'] == null ? undefined : ((value['inheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'ignore_shopping': value['ignoreShopping'],
|
||||
'substitute': value['substitute'] == null ? undefined : ((value['substitute'] as Array<any>).map(FoodSimpleRequestToJSON)),
|
||||
'substitute_siblings': value['substituteSiblings'],
|
||||
'substitute_children': value['substituteChildren'],
|
||||
'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import type { BlankEnum } from './BlankEnum';
|
||||
import {
|
||||
instanceOfBlankEnum,
|
||||
BlankEnumFromJSON,
|
||||
BlankEnumFromJSONTyped,
|
||||
BlankEnumToJSON,
|
||||
} from './BlankEnum';
|
||||
import type { DeleteEnum } from './DeleteEnum';
|
||||
import {
|
||||
instanceOfDeleteEnum,
|
||||
DeleteEnumFromJSON,
|
||||
DeleteEnumFromJSONTyped,
|
||||
DeleteEnumToJSON,
|
||||
} from './DeleteEnum';
|
||||
|
||||
/**
|
||||
* @type FoodShoppingUpdateDelete
|
||||
* When set to true will delete all food from active shopping lists.
|
||||
*
|
||||
* * `true` - true
|
||||
* @export
|
||||
*/
|
||||
export type FoodShoppingUpdateDelete = BlankEnum | DeleteEnum;
|
||||
|
||||
export function FoodShoppingUpdateDeleteFromJSON(json: any): FoodShoppingUpdateDelete {
|
||||
return FoodShoppingUpdateDeleteFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateDeleteFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdateDelete {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return { ...BlankEnumFromJSONTyped(json, true), ...DeleteEnumFromJSONTyped(json, true) };
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateDeleteToJSON(value?: FoodShoppingUpdateDelete | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (instanceOfBlankEnum(value)) {
|
||||
return BlankEnumToJSON(value as BlankEnum);
|
||||
}
|
||||
if (instanceOfDeleteEnum(value)) {
|
||||
return DeleteEnumToJSON(value as DeleteEnum);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { DeleteEnum } from './DeleteEnum';
|
||||
import {
|
||||
DeleteEnumFromJSON,
|
||||
DeleteEnumFromJSONTyped,
|
||||
DeleteEnumToJSON,
|
||||
} from './DeleteEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodShoppingUpdateRequest
|
||||
*/
|
||||
export interface FoodShoppingUpdateRequest {
|
||||
/**
|
||||
* Amount of food to add to the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
amount?: number;
|
||||
/**
|
||||
* ID of unit to use for the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
unit?: number;
|
||||
/**
|
||||
* When set to true will delete all food from active shopping lists.
|
||||
*
|
||||
* * `true` - true
|
||||
* @type {DeleteEnum}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
_delete: DeleteEnum | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdateRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodShoppingUpdateRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodShoppingUpdateRequest(value: object): boolean {
|
||||
if (!('_delete' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestFromJSON(json: any): FoodShoppingUpdateRequest {
|
||||
return FoodShoppingUpdateRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdateRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'_delete': DeleteEnumFromJSON(json['delete']),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestToJSON(value?: FoodShoppingUpdateRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': value['amount'],
|
||||
'unit': value['unit'],
|
||||
'delete': DeleteEnumToJSON(value['_delete']),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodSimpleRequest
|
||||
*/
|
||||
export interface FoodSimpleRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodSimpleRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodSimpleRequest interface.
|
||||
*/
|
||||
export function instanceOfFoodSimpleRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestFromJSON(json: any): FoodSimpleRequest {
|
||||
return FoodSimpleRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSimpleRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestToJSON(value?: FoodSimpleRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodSubstituteInner
|
||||
*/
|
||||
export interface FoodSubstituteInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodSubstituteInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSubstituteInner
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSubstituteInner
|
||||
*/
|
||||
pluralName?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodSubstituteInner interface.
|
||||
*/
|
||||
export function instanceOfFoodSubstituteInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodSubstituteInnerFromJSON(json: any): FoodSubstituteInner {
|
||||
return FoodSubstituteInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodSubstituteInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSubstituteInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodSubstituteInnerToJSON(value?: FoodSubstituteInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FoodSupermarketCategory
|
||||
*/
|
||||
export interface FoodSupermarketCategory {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodSupermarketCategory
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSupermarketCategory
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodSupermarketCategory
|
||||
*/
|
||||
description?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodSupermarketCategory interface.
|
||||
*/
|
||||
export function instanceOfFoodSupermarketCategory(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function FoodSupermarketCategoryFromJSON(json: any): FoodSupermarketCategory {
|
||||
return FoodSupermarketCategoryFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FoodSupermarketCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSupermarketCategory {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodSupermarketCategoryToJSON(value?: FoodSupermarketCategory | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface GroupRequest
|
||||
*/
|
||||
export interface GroupRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof GroupRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof GroupRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the GroupRequest interface.
|
||||
*/
|
||||
export function instanceOfGroupRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function GroupRequestFromJSON(json: any): GroupRequest {
|
||||
return GroupRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function GroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function GroupRequestToJSON(value?: GroupRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ImportLogKeyword
|
||||
*/
|
||||
export interface ImportLogKeyword {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly parent?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly numchild?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly updatedAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogKeyword
|
||||
*/
|
||||
readonly fullName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ImportLogKeyword interface.
|
||||
*/
|
||||
export function instanceOfImportLogKeyword(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ImportLogKeywordFromJSON(json: any): ImportLogKeyword {
|
||||
return ImportLogKeywordFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ImportLogKeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLogKeyword {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'label': !exists(json, 'label') ? undefined : json['label'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'parent': !exists(json, 'parent') ? undefined : json['parent'],
|
||||
'numchild': !exists(json, 'numchild') ? undefined : json['numchild'],
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
|
||||
'fullName': !exists(json, 'full_name') ? undefined : json['full_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ImportLogKeywordToJSON(value?: ImportLogKeyword | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ImportLogRequest
|
||||
*/
|
||||
export interface ImportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
importedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ImportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ImportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfImportLogRequest(value: object): boolean {
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ImportLogRequestFromJSON(json: any): ImportLogRequest {
|
||||
return ImportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ImportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ImportLogRequestToJSON(value?: ImportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'imported_recipes': value['importedRecipes'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,281 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { FoodInheritFieldsInner } from './FoodInheritFieldsInner';
|
||||
import {
|
||||
FoodInheritFieldsInnerFromJSON,
|
||||
FoodInheritFieldsInnerFromJSONTyped,
|
||||
FoodInheritFieldsInnerToJSON,
|
||||
} from './FoodInheritFieldsInner';
|
||||
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
|
||||
import {
|
||||
FoodPropertiesFoodUnitFromJSON,
|
||||
FoodPropertiesFoodUnitFromJSONTyped,
|
||||
FoodPropertiesFoodUnitToJSON,
|
||||
} from './FoodPropertiesFoodUnit';
|
||||
import type { FoodPropertiesInner } from './FoodPropertiesInner';
|
||||
import {
|
||||
FoodPropertiesInnerFromJSON,
|
||||
FoodPropertiesInnerFromJSONTyped,
|
||||
FoodPropertiesInnerToJSON,
|
||||
} from './FoodPropertiesInner';
|
||||
import type { FoodRecipe } from './FoodRecipe';
|
||||
import {
|
||||
FoodRecipeFromJSON,
|
||||
FoodRecipeFromJSONTyped,
|
||||
FoodRecipeToJSON,
|
||||
} from './FoodRecipe';
|
||||
import type { FoodSubstituteInner } from './FoodSubstituteInner';
|
||||
import {
|
||||
FoodSubstituteInnerFromJSON,
|
||||
FoodSubstituteInnerFromJSONTyped,
|
||||
FoodSubstituteInnerToJSON,
|
||||
} from './FoodSubstituteInner';
|
||||
import type { FoodSupermarketCategory } from './FoodSupermarketCategory';
|
||||
import {
|
||||
FoodSupermarketCategoryFromJSON,
|
||||
FoodSupermarketCategoryFromJSONTyped,
|
||||
FoodSupermarketCategoryToJSON,
|
||||
} from './FoodSupermarketCategory';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface IngredientFood
|
||||
*/
|
||||
export interface IngredientFood {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
pluralName?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly shopping?: string;
|
||||
/**
|
||||
*
|
||||
* @type {FoodRecipe}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
recipe?: FoodRecipe | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
url?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodPropertiesInner>}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
properties?: Array<FoodPropertiesInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
propertiesFoodAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {FoodPropertiesFoodUnit}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
propertiesFoodUnit?: FoodPropertiesFoodUnit | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
fdcId?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
foodOnhand?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {FoodSupermarketCategory}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
supermarketCategory?: FoodSupermarketCategory | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly parent?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly numchild?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldsInner>}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
inheritFields?: Array<FoodInheritFieldsInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly fullName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
ignoreShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodSubstituteInner>}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
substitute?: Array<FoodSubstituteInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
substituteSiblings?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
substituteChildren?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
readonly substituteOnhand?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldsInner>}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
childInheritFields?: Array<FoodInheritFieldsInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientFood
|
||||
*/
|
||||
openDataSlug?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the IngredientFood interface.
|
||||
*/
|
||||
export function instanceOfIngredientFood(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function IngredientFoodFromJSON(json: any): IngredientFood {
|
||||
return IngredientFoodFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function IngredientFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientFood {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'shopping': !exists(json, 'shopping') ? undefined : json['shopping'],
|
||||
'recipe': !exists(json, 'recipe') ? undefined : FoodRecipeFromJSON(json['recipe']),
|
||||
'url': !exists(json, 'url') ? undefined : json['url'],
|
||||
'properties': !exists(json, 'properties') ? undefined : (json['properties'] === null ? null : (json['properties'] as Array<any>).map(FoodPropertiesInnerFromJSON)),
|
||||
'propertiesFoodAmount': !exists(json, 'properties_food_amount') ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': !exists(json, 'properties_food_unit') ? undefined : FoodPropertiesFoodUnitFromJSON(json['properties_food_unit']),
|
||||
'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'],
|
||||
'foodOnhand': !exists(json, 'food_onhand') ? undefined : json['food_onhand'],
|
||||
'supermarketCategory': !exists(json, 'supermarket_category') ? undefined : FoodSupermarketCategoryFromJSON(json['supermarket_category']),
|
||||
'parent': !exists(json, 'parent') ? undefined : json['parent'],
|
||||
'numchild': !exists(json, 'numchild') ? undefined : json['numchild'],
|
||||
'inheritFields': !exists(json, 'inherit_fields') ? undefined : (json['inherit_fields'] === null ? null : (json['inherit_fields'] as Array<any>).map(FoodInheritFieldsInnerFromJSON)),
|
||||
'fullName': !exists(json, 'full_name') ? undefined : json['full_name'],
|
||||
'ignoreShopping': !exists(json, 'ignore_shopping') ? undefined : json['ignore_shopping'],
|
||||
'substitute': !exists(json, 'substitute') ? undefined : (json['substitute'] === null ? null : (json['substitute'] as Array<any>).map(FoodSubstituteInnerFromJSON)),
|
||||
'substituteSiblings': !exists(json, 'substitute_siblings') ? undefined : json['substitute_siblings'],
|
||||
'substituteChildren': !exists(json, 'substitute_children') ? undefined : json['substitute_children'],
|
||||
'substituteOnhand': !exists(json, 'substitute_onhand') ? undefined : json['substitute_onhand'],
|
||||
'childInheritFields': !exists(json, 'child_inherit_fields') ? undefined : (json['child_inherit_fields'] === null ? null : (json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldsInnerFromJSON)),
|
||||
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
|
||||
};
|
||||
}
|
||||
|
||||
export function IngredientFoodToJSON(value?: IngredientFood | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'description': value.description,
|
||||
'recipe': FoodRecipeToJSON(value.recipe),
|
||||
'url': value.url,
|
||||
'properties': value.properties === undefined ? undefined : (value.properties === null ? null : (value.properties as Array<any>).map(FoodPropertiesInnerToJSON)),
|
||||
'properties_food_amount': value.propertiesFoodAmount,
|
||||
'properties_food_unit': FoodPropertiesFoodUnitToJSON(value.propertiesFoodUnit),
|
||||
'fdc_id': value.fdcId,
|
||||
'food_onhand': value.foodOnhand,
|
||||
'supermarket_category': FoodSupermarketCategoryToJSON(value.supermarketCategory),
|
||||
'inherit_fields': value.inheritFields === undefined ? undefined : (value.inheritFields === null ? null : (value.inheritFields as Array<any>).map(FoodInheritFieldsInnerToJSON)),
|
||||
'ignore_shopping': value.ignoreShopping,
|
||||
'substitute': value.substitute === undefined ? undefined : (value.substitute === null ? null : (value.substitute as Array<any>).map(FoodSubstituteInnerToJSON)),
|
||||
'substitute_siblings': value.substituteSiblings,
|
||||
'substitute_children': value.substituteChildren,
|
||||
'child_inherit_fields': value.childInheritFields === undefined ? undefined : (value.childInheritFields === null ? null : (value.childInheritFields as Array<any>).map(FoodInheritFieldsInnerToJSON)),
|
||||
'open_data_slug': value.openDataSlug,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { FoodRequest } from './FoodRequest';
|
||||
import {
|
||||
FoodRequestFromJSON,
|
||||
FoodRequestFromJSONTyped,
|
||||
FoodRequestToJSON,
|
||||
} from './FoodRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface IngredientRequest
|
||||
*/
|
||||
export interface IngredientRequest {
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
food: FoodRequest | null;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
unit: UnitRequest | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
isHeader?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
noAmount?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
originalText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
alwaysUsePluralUnit?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
alwaysUsePluralFood?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the IngredientRequest interface.
|
||||
*/
|
||||
export function instanceOfIngredientRequest(value: object): boolean {
|
||||
if (!('food' in value)) return false;
|
||||
if (!('unit' in value)) return false;
|
||||
if (!('amount' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function IngredientRequestFromJSON(json: any): IngredientRequest {
|
||||
return IngredientRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function IngredientRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodRequestFromJSON(json['food']),
|
||||
'unit': UnitRequestFromJSON(json['unit']),
|
||||
'amount': json['amount'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'isHeader': json['is_header'] == null ? undefined : json['is_header'],
|
||||
'noAmount': json['no_amount'] == null ? undefined : json['no_amount'],
|
||||
'originalText': json['original_text'] == null ? undefined : json['original_text'],
|
||||
'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'],
|
||||
'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function IngredientRequestToJSON(value?: IngredientRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'unit': UnitRequestToJSON(value['unit']),
|
||||
'amount': value['amount'],
|
||||
'note': value['note'],
|
||||
'order': value['order'],
|
||||
'is_header': value['isHeader'],
|
||||
'no_amount': value['noAmount'],
|
||||
'original_text': value['originalText'],
|
||||
'always_use_plural_unit': value['alwaysUsePluralUnit'],
|
||||
'always_use_plural_food': value['alwaysUsePluralFood'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface IngredientStringRequest
|
||||
*/
|
||||
export interface IngredientStringRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IngredientStringRequest
|
||||
*/
|
||||
text: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the IngredientStringRequest interface.
|
||||
*/
|
||||
export function instanceOfIngredientStringRequest(value: object): boolean {
|
||||
if (!('text' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function IngredientStringRequestFromJSON(json: any): IngredientStringRequest {
|
||||
return IngredientStringRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function IngredientStringRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngredientStringRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'text': json['text'],
|
||||
};
|
||||
}
|
||||
|
||||
export function IngredientStringRequestToJSON(value?: IngredientStringRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'text': value['text'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface InviteLinkGroup
|
||||
*/
|
||||
export interface InviteLinkGroup {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLinkGroup
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLinkGroup
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the InviteLinkGroup interface.
|
||||
*/
|
||||
export function instanceOfInviteLinkGroup(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function InviteLinkGroupFromJSON(json: any): InviteLinkGroup {
|
||||
return InviteLinkGroupFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function InviteLinkGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLinkGroup {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function InviteLinkGroupToJSON(value?: InviteLinkGroup | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { GroupRequest } from './GroupRequest';
|
||||
import {
|
||||
GroupRequestFromJSON,
|
||||
GroupRequestFromJSONTyped,
|
||||
GroupRequestToJSON,
|
||||
} from './GroupRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface InviteLinkRequest
|
||||
*/
|
||||
export interface InviteLinkRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {GroupRequest}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
group: GroupRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
validUntil?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
usedBy?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
reusable?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
internalNote?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLinkRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the InviteLinkRequest interface.
|
||||
*/
|
||||
export function instanceOfInviteLinkRequest(value: object): boolean {
|
||||
if (!('group' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function InviteLinkRequestFromJSON(json: any): InviteLinkRequest {
|
||||
return InviteLinkRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function InviteLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLinkRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': json['email'] == null ? undefined : json['email'],
|
||||
'group': GroupRequestFromJSON(json['group']),
|
||||
'validUntil': json['valid_until'] == null ? undefined : (new Date(json['valid_until'])),
|
||||
'usedBy': json['used_by'] == null ? undefined : json['used_by'],
|
||||
'reusable': json['reusable'] == null ? undefined : json['reusable'],
|
||||
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function InviteLinkRequestToJSON(value?: InviteLinkRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': value['email'],
|
||||
'group': GroupRequestToJSON(value['group']),
|
||||
'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)),
|
||||
'used_by': value['usedBy'],
|
||||
'reusable': value['reusable'],
|
||||
'internal_note': value['internalNote'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface KeywordRequest
|
||||
*/
|
||||
export interface KeywordRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof KeywordRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the KeywordRequest interface.
|
||||
*/
|
||||
export function instanceOfKeywordRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function KeywordRequestFromJSON(json: any): KeywordRequest {
|
||||
return KeywordRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function KeywordRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeywordRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function KeywordRequestToJSON(value?: KeywordRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Automation } from './Automation';
|
||||
import {
|
||||
AutomationFromJSON,
|
||||
AutomationFromJSONTyped,
|
||||
AutomationToJSON,
|
||||
} from './Automation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListAutomations200Response
|
||||
*/
|
||||
export interface ListAutomations200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListAutomations200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListAutomations200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListAutomations200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Automation>}
|
||||
* @memberof ListAutomations200Response
|
||||
*/
|
||||
results?: Array<Automation>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListAutomations200Response interface.
|
||||
*/
|
||||
export function instanceOfListAutomations200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListAutomations200ResponseFromJSON(json: any): ListAutomations200Response {
|
||||
return ListAutomations200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListAutomations200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAutomations200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(AutomationFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListAutomations200ResponseToJSON(value?: ListAutomations200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(AutomationToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CookLog } from './CookLog';
|
||||
import {
|
||||
CookLogFromJSON,
|
||||
CookLogFromJSONTyped,
|
||||
CookLogToJSON,
|
||||
} from './CookLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListCookLogs200Response
|
||||
*/
|
||||
export interface ListCookLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListCookLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListCookLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListCookLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<CookLog>}
|
||||
* @memberof ListCookLogs200Response
|
||||
*/
|
||||
results?: Array<CookLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListCookLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListCookLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListCookLogs200ResponseFromJSON(json: any): ListCookLogs200Response {
|
||||
return ListCookLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListCookLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListCookLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(CookLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListCookLogs200ResponseToJSON(value?: ListCookLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(CookLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { CustomFilter } from './CustomFilter';
|
||||
import {
|
||||
CustomFilterFromJSON,
|
||||
CustomFilterFromJSONTyped,
|
||||
CustomFilterToJSON,
|
||||
} from './CustomFilter';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListCustomFilters200Response
|
||||
*/
|
||||
export interface ListCustomFilters200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListCustomFilters200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListCustomFilters200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListCustomFilters200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<CustomFilter>}
|
||||
* @memberof ListCustomFilters200Response
|
||||
*/
|
||||
results?: Array<CustomFilter>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListCustomFilters200Response interface.
|
||||
*/
|
||||
export function instanceOfListCustomFilters200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListCustomFilters200ResponseFromJSON(json: any): ListCustomFilters200Response {
|
||||
return ListCustomFilters200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListCustomFilters200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListCustomFilters200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(CustomFilterFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListCustomFilters200ResponseToJSON(value?: ListCustomFilters200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(CustomFilterToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { ExportLog } from './ExportLog';
|
||||
import {
|
||||
ExportLogFromJSON,
|
||||
ExportLogFromJSONTyped,
|
||||
ExportLogToJSON,
|
||||
} from './ExportLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListExportLogs200Response
|
||||
*/
|
||||
export interface ListExportLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListExportLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListExportLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListExportLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ExportLog>}
|
||||
* @memberof ListExportLogs200Response
|
||||
*/
|
||||
results?: Array<ExportLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListExportLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListExportLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListExportLogs200ResponseFromJSON(json: any): ListExportLogs200Response {
|
||||
return ListExportLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListExportLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListExportLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(ExportLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListExportLogs200ResponseToJSON(value?: ListExportLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(ExportLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Food } from './Food';
|
||||
import {
|
||||
FoodFromJSON,
|
||||
FoodFromJSONTyped,
|
||||
FoodToJSON,
|
||||
} from './Food';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListFoods200Response
|
||||
*/
|
||||
export interface ListFoods200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListFoods200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListFoods200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListFoods200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Food>}
|
||||
* @memberof ListFoods200Response
|
||||
*/
|
||||
results?: Array<Food>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListFoods200Response interface.
|
||||
*/
|
||||
export function instanceOfListFoods200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListFoods200ResponseFromJSON(json: any): ListFoods200Response {
|
||||
return ListFoods200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListFoods200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFoods200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(FoodFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListFoods200ResponseToJSON(value?: ListFoods200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(FoodToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { ImportLog } from './ImportLog';
|
||||
import {
|
||||
ImportLogFromJSON,
|
||||
ImportLogFromJSONTyped,
|
||||
ImportLogToJSON,
|
||||
} from './ImportLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListImportLogs200Response
|
||||
*/
|
||||
export interface ListImportLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListImportLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListImportLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListImportLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ImportLog>}
|
||||
* @memberof ListImportLogs200Response
|
||||
*/
|
||||
results?: Array<ImportLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListImportLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListImportLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListImportLogs200ResponseFromJSON(json: any): ListImportLogs200Response {
|
||||
return ListImportLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListImportLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListImportLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(ImportLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListImportLogs200ResponseToJSON(value?: ListImportLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(ImportLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Ingredient } from './Ingredient';
|
||||
import {
|
||||
IngredientFromJSON,
|
||||
IngredientFromJSONTyped,
|
||||
IngredientToJSON,
|
||||
} from './Ingredient';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListIngredients200Response
|
||||
*/
|
||||
export interface ListIngredients200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListIngredients200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListIngredients200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListIngredients200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Ingredient>}
|
||||
* @memberof ListIngredients200Response
|
||||
*/
|
||||
results?: Array<Ingredient>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListIngredients200Response interface.
|
||||
*/
|
||||
export function instanceOfListIngredients200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListIngredients200ResponseFromJSON(json: any): ListIngredients200Response {
|
||||
return ListIngredients200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListIngredients200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListIngredients200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(IngredientFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListIngredients200ResponseToJSON(value?: ListIngredients200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(IngredientToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Keyword } from './Keyword';
|
||||
import {
|
||||
KeywordFromJSON,
|
||||
KeywordFromJSONTyped,
|
||||
KeywordToJSON,
|
||||
} from './Keyword';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListKeywords200Response
|
||||
*/
|
||||
export interface ListKeywords200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListKeywords200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListKeywords200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListKeywords200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Keyword>}
|
||||
* @memberof ListKeywords200Response
|
||||
*/
|
||||
results?: Array<Keyword>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListKeywords200Response interface.
|
||||
*/
|
||||
export function instanceOfListKeywords200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListKeywords200ResponseFromJSON(json: any): ListKeywords200Response {
|
||||
return ListKeywords200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListKeywords200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListKeywords200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(KeywordFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListKeywords200ResponseToJSON(value?: ListKeywords200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(KeywordToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { RecipeOverview } from './RecipeOverview';
|
||||
import {
|
||||
RecipeOverviewFromJSON,
|
||||
RecipeOverviewFromJSONTyped,
|
||||
RecipeOverviewToJSON,
|
||||
} from './RecipeOverview';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListRecipes200Response
|
||||
*/
|
||||
export interface ListRecipes200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListRecipes200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListRecipes200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListRecipes200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<RecipeOverview>}
|
||||
* @memberof ListRecipes200Response
|
||||
*/
|
||||
results?: Array<RecipeOverview>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListRecipes200Response interface.
|
||||
*/
|
||||
export function instanceOfListRecipes200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListRecipes200ResponseFromJSON(json: any): ListRecipes200Response {
|
||||
return ListRecipes200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListRecipes200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListRecipes200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(RecipeOverviewFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListRecipes200ResponseToJSON(value?: ListRecipes200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(RecipeOverviewToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Step } from './Step';
|
||||
import {
|
||||
StepFromJSON,
|
||||
StepFromJSONTyped,
|
||||
StepToJSON,
|
||||
} from './Step';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListSteps200Response
|
||||
*/
|
||||
export interface ListSteps200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListSteps200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSteps200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSteps200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Step>}
|
||||
* @memberof ListSteps200Response
|
||||
*/
|
||||
results?: Array<Step>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListSteps200Response interface.
|
||||
*/
|
||||
export function instanceOfListSteps200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListSteps200ResponseFromJSON(json: any): ListSteps200Response {
|
||||
return ListSteps200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListSteps200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSteps200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(StepFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListSteps200ResponseToJSON(value?: ListSteps200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(StepToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { SupermarketCategoryRelation } from './SupermarketCategoryRelation';
|
||||
import {
|
||||
SupermarketCategoryRelationFromJSON,
|
||||
SupermarketCategoryRelationFromJSONTyped,
|
||||
SupermarketCategoryRelationToJSON,
|
||||
} from './SupermarketCategoryRelation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
export interface ListSupermarketCategoryRelations200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<SupermarketCategoryRelation>}
|
||||
* @memberof ListSupermarketCategoryRelations200Response
|
||||
*/
|
||||
results?: Array<SupermarketCategoryRelation>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListSupermarketCategoryRelations200Response interface.
|
||||
*/
|
||||
export function instanceOfListSupermarketCategoryRelations200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListSupermarketCategoryRelations200ResponseFromJSON(json: any): ListSupermarketCategoryRelations200Response {
|
||||
return ListSupermarketCategoryRelations200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListSupermarketCategoryRelations200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSupermarketCategoryRelations200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(SupermarketCategoryRelationFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListSupermarketCategoryRelations200ResponseToJSON(value?: ListSupermarketCategoryRelations200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(SupermarketCategoryRelationToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { SyncLog } from './SyncLog';
|
||||
import {
|
||||
SyncLogFromJSON,
|
||||
SyncLogFromJSONTyped,
|
||||
SyncLogToJSON,
|
||||
} from './SyncLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListSyncLogs200Response
|
||||
*/
|
||||
export interface ListSyncLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListSyncLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSyncLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListSyncLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<SyncLog>}
|
||||
* @memberof ListSyncLogs200Response
|
||||
*/
|
||||
results?: Array<SyncLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListSyncLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListSyncLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListSyncLogs200ResponseFromJSON(json: any): ListSyncLogs200Response {
|
||||
return ListSyncLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListSyncLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListSyncLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(SyncLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListSyncLogs200ResponseToJSON(value?: ListSyncLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(SyncLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { Unit } from './Unit';
|
||||
import {
|
||||
UnitFromJSON,
|
||||
UnitFromJSONTyped,
|
||||
UnitToJSON,
|
||||
} from './Unit';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListUnits200Response
|
||||
*/
|
||||
export interface ListUnits200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListUnits200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListUnits200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListUnits200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Unit>}
|
||||
* @memberof ListUnits200Response
|
||||
*/
|
||||
results?: Array<Unit>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListUnits200Response interface.
|
||||
*/
|
||||
export function instanceOfListUnits200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListUnits200ResponseFromJSON(json: any): ListUnits200Response {
|
||||
return ListUnits200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListUnits200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListUnits200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(UnitFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListUnits200ResponseToJSON(value?: ListUnits200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(UnitToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { UserSpace } from './UserSpace';
|
||||
import {
|
||||
UserSpaceFromJSON,
|
||||
UserSpaceFromJSONTyped,
|
||||
UserSpaceToJSON,
|
||||
} from './UserSpace';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListUserSpaces200Response
|
||||
*/
|
||||
export interface ListUserSpaces200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListUserSpaces200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListUserSpaces200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListUserSpaces200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserSpace>}
|
||||
* @memberof ListUserSpaces200Response
|
||||
*/
|
||||
results?: Array<UserSpace>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListUserSpaces200Response interface.
|
||||
*/
|
||||
export function instanceOfListUserSpaces200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListUserSpaces200ResponseFromJSON(json: any): ListUserSpaces200Response {
|
||||
return ListUserSpaces200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListUserSpaces200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListUserSpaces200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(UserSpaceFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListUserSpaces200ResponseToJSON(value?: ListUserSpaces200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(UserSpaceToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { ViewLog } from './ViewLog';
|
||||
import {
|
||||
ViewLogFromJSON,
|
||||
ViewLogFromJSONTyped,
|
||||
ViewLogToJSON,
|
||||
} from './ViewLog';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListViewLogs200Response
|
||||
*/
|
||||
export interface ListViewLogs200Response {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ListViewLogs200Response
|
||||
*/
|
||||
count?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListViewLogs200Response
|
||||
*/
|
||||
next?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListViewLogs200Response
|
||||
*/
|
||||
previous?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ViewLog>}
|
||||
* @memberof ListViewLogs200Response
|
||||
*/
|
||||
results?: Array<ViewLog>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListViewLogs200Response interface.
|
||||
*/
|
||||
export function instanceOfListViewLogs200Response(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ListViewLogs200ResponseFromJSON(json: any): ListViewLogs200Response {
|
||||
return ListViewLogs200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListViewLogs200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListViewLogs200Response {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': !exists(json, 'count') ? undefined : json['count'],
|
||||
'next': !exists(json, 'next') ? undefined : json['next'],
|
||||
'previous': !exists(json, 'previous') ? undefined : json['previous'],
|
||||
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(ViewLogFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ListViewLogs200ResponseToJSON(value?: ListViewLogs200Response | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': value.count,
|
||||
'next': value.next,
|
||||
'previous': value.previous,
|
||||
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(ViewLogToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MealPlanMealType
|
||||
*/
|
||||
export interface MealPlanMealType {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
color?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
_default?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanMealType
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanMealType interface.
|
||||
*/
|
||||
export function instanceOfMealPlanMealType(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function MealPlanMealTypeFromJSON(json: any): MealPlanMealType {
|
||||
return MealPlanMealTypeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanMealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanMealType {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
'color': !exists(json, 'color') ? undefined : json['color'],
|
||||
'_default': !exists(json, 'default') ? undefined : json['default'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanMealTypeToJSON(value?: MealPlanMealType | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'order': value.order,
|
||||
'color': value.color,
|
||||
'default': value._default,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { MealPlanRecipeKeywordsInner } from './MealPlanRecipeKeywordsInner';
|
||||
import {
|
||||
MealPlanRecipeKeywordsInnerFromJSON,
|
||||
MealPlanRecipeKeywordsInnerFromJSONTyped,
|
||||
MealPlanRecipeKeywordsInnerToJSON,
|
||||
} from './MealPlanRecipeKeywordsInner';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MealPlanRecipe
|
||||
*/
|
||||
export interface MealPlanRecipe {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Blob}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly image?: Blob | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<MealPlanRecipeKeywordsInner>}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
keywords: Array<MealPlanRecipeKeywordsInner>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
workingTime?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
waitingTime?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly updatedAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
internal?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
servingsText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
rating?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
lastCooked?: Date | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly _new?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipe
|
||||
*/
|
||||
readonly recent?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanRecipe interface.
|
||||
*/
|
||||
export function instanceOfMealPlanRecipe(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "keywords" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function MealPlanRecipeFromJSON(json: any): MealPlanRecipe {
|
||||
return MealPlanRecipeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRecipe {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'image': !exists(json, 'image') ? undefined : json['image'],
|
||||
'keywords': ((json['keywords'] as Array<any>).map(MealPlanRecipeKeywordsInnerFromJSON)),
|
||||
'workingTime': !exists(json, 'working_time') ? undefined : json['working_time'],
|
||||
'waitingTime': !exists(json, 'waiting_time') ? undefined : json['waiting_time'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
|
||||
'internal': !exists(json, 'internal') ? undefined : json['internal'],
|
||||
'servings': !exists(json, 'servings') ? undefined : json['servings'],
|
||||
'servingsText': !exists(json, 'servings_text') ? undefined : json['servings_text'],
|
||||
'rating': !exists(json, 'rating') ? undefined : json['rating'],
|
||||
'lastCooked': !exists(json, 'last_cooked') ? undefined : (json['last_cooked'] === null ? null : new Date(json['last_cooked'])),
|
||||
'_new': !exists(json, 'new') ? undefined : json['new'],
|
||||
'recent': !exists(json, 'recent') ? undefined : json['recent'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanRecipeToJSON(value?: MealPlanRecipe | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
'keywords': ((value.keywords as Array<any>).map(MealPlanRecipeKeywordsInnerToJSON)),
|
||||
'working_time': value.workingTime,
|
||||
'waiting_time': value.waitingTime,
|
||||
'internal': value.internal,
|
||||
'servings': value.servings,
|
||||
'servings_text': value.servingsText,
|
||||
'rating': value.rating,
|
||||
'last_cooked': value.lastCooked === undefined ? undefined : (value.lastCooked === null ? null : value.lastCooked.toISOString()),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MealPlanRecipeKeywordsInner
|
||||
*/
|
||||
export interface MealPlanRecipeKeywordsInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRecipeKeywordsInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRecipeKeywordsInner
|
||||
*/
|
||||
readonly label?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanRecipeKeywordsInner interface.
|
||||
*/
|
||||
export function instanceOfMealPlanRecipeKeywordsInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function MealPlanRecipeKeywordsInnerFromJSON(json: any): MealPlanRecipeKeywordsInner {
|
||||
return MealPlanRecipeKeywordsInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanRecipeKeywordsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRecipeKeywordsInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'label': !exists(json, 'label') ? undefined : json['label'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanRecipeKeywordsInnerToJSON(value?: MealPlanRecipeKeywordsInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { MealTypeRequest } from './MealTypeRequest';
|
||||
import {
|
||||
MealTypeRequestFromJSON,
|
||||
MealTypeRequestFromJSONTyped,
|
||||
MealTypeRequestToJSON,
|
||||
} from './MealTypeRequest';
|
||||
import type { RecipeOverviewRequest } from './RecipeOverviewRequest';
|
||||
import {
|
||||
RecipeOverviewRequestFromJSON,
|
||||
RecipeOverviewRequestFromJSONTyped,
|
||||
RecipeOverviewRequestToJSON,
|
||||
} from './RecipeOverviewRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface MealPlanRequest
|
||||
*/
|
||||
export interface MealPlanRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeOverviewRequest}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
recipe?: RecipeOverviewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
servings: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
fromDate: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
toDate?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {MealTypeRequest}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
mealType: MealTypeRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealPlanRequest interface.
|
||||
*/
|
||||
export function instanceOfMealPlanRequest(value: object): boolean {
|
||||
if (!('servings' in value)) return false;
|
||||
if (!('fromDate' in value)) return false;
|
||||
if (!('mealType' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function MealPlanRequestFromJSON(json: any): MealPlanRequest {
|
||||
return MealPlanRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealPlanRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': json['title'] == null ? undefined : json['title'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeOverviewRequestFromJSON(json['recipe']),
|
||||
'servings': json['servings'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'fromDate': (new Date(json['from_date'])),
|
||||
'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])),
|
||||
'mealType': MealTypeRequestFromJSON(json['meal_type']),
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealPlanRequestToJSON(value?: MealPlanRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': value['title'],
|
||||
'recipe': RecipeOverviewRequestToJSON(value['recipe']),
|
||||
'servings': value['servings'],
|
||||
'note': value['note'],
|
||||
'from_date': ((value['fromDate']).toISOString().substring(0,10)),
|
||||
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)),
|
||||
'meal_type': MealTypeRequestToJSON(value['mealType']),
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface MealTypeRequest
|
||||
*/
|
||||
export interface MealTypeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
_default?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MealTypeRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the MealTypeRequest interface.
|
||||
*/
|
||||
export function instanceOfMealTypeRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function MealTypeRequestFromJSON(json: any): MealTypeRequest {
|
||||
return MealTypeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MealTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MealTypeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'color': json['color'] == null ? undefined : json['color'],
|
||||
'_default': json['default'] == null ? undefined : json['default'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function MealTypeRequestToJSON(value?: MealTypeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'order': value['order'],
|
||||
'color': value['color'],
|
||||
'default': value['_default'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const NullEnum = {
|
||||
Null: 'null'
|
||||
} as const;
|
||||
export type NullEnum = typeof NullEnum[keyof typeof NullEnum];
|
||||
|
||||
|
||||
export function NullEnumFromJSON(json: any): NullEnum {
|
||||
return NullEnumFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function NullEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): NullEnum {
|
||||
return json as NullEnum;
|
||||
}
|
||||
|
||||
export function NullEnumToJSON(value?: NullEnum | null): any {
|
||||
return value as any;
|
||||
}
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NutritionInformationRequest
|
||||
*/
|
||||
export interface NutritionInformationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
carbohydrates: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
fats: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
proteins: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
calories: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the NutritionInformationRequest interface.
|
||||
*/
|
||||
export function instanceOfNutritionInformationRequest(value: object): boolean {
|
||||
if (!('carbohydrates' in value)) return false;
|
||||
if (!('fats' in value)) return false;
|
||||
if (!('proteins' in value)) return false;
|
||||
if (!('calories' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestFromJSON(json: any): NutritionInformationRequest {
|
||||
return NutritionInformationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NutritionInformationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'carbohydrates': json['carbohydrates'],
|
||||
'fats': json['fats'],
|
||||
'proteins': json['proteins'],
|
||||
'calories': json['calories'],
|
||||
'source': json['source'] == null ? undefined : json['source'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function NutritionInformationRequestToJSON(value?: NutritionInformationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'carbohydrates': value['carbohydrates'],
|
||||
'fats': value['fats'],
|
||||
'proteins': value['proteins'],
|
||||
'calories': value['calories'],
|
||||
'source': value['source'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataCategoryRequest
|
||||
*/
|
||||
export interface OpenDataCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataCategoryRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestFromJSON(json: any): OpenDataCategoryRequest {
|
||||
return OpenDataCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataCategoryRequestToJSON(value?: OpenDataCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,230 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataConversionFoodPreferredUnitMetric } from './OpenDataConversionFoodPreferredUnitMetric';
|
||||
import {
|
||||
OpenDataConversionFoodPreferredUnitMetricFromJSON,
|
||||
OpenDataConversionFoodPreferredUnitMetricFromJSONTyped,
|
||||
OpenDataConversionFoodPreferredUnitMetricToJSON,
|
||||
} from './OpenDataConversionFoodPreferredUnitMetric';
|
||||
import type { OpenDataConversionFoodPropertiesFoodUnit } from './OpenDataConversionFoodPropertiesFoodUnit';
|
||||
import {
|
||||
OpenDataConversionFoodPropertiesFoodUnitFromJSON,
|
||||
OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped,
|
||||
OpenDataConversionFoodPropertiesFoodUnitToJSON,
|
||||
} from './OpenDataConversionFoodPropertiesFoodUnit';
|
||||
import type { OpenDataConversionFoodPropertiesInner } from './OpenDataConversionFoodPropertiesInner';
|
||||
import {
|
||||
OpenDataConversionFoodPropertiesInnerFromJSON,
|
||||
OpenDataConversionFoodPropertiesInnerFromJSONTyped,
|
||||
OpenDataConversionFoodPropertiesInnerToJSON,
|
||||
} from './OpenDataConversionFoodPropertiesInner';
|
||||
import type { OpenDataStoreCategoryToStoreInnerCategory } from './OpenDataStoreCategoryToStoreInnerCategory';
|
||||
import {
|
||||
OpenDataStoreCategoryToStoreInnerCategoryFromJSON,
|
||||
OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped,
|
||||
OpenDataStoreCategoryToStoreInnerCategoryToJSON,
|
||||
} from './OpenDataStoreCategoryToStoreInnerCategory';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFood
|
||||
*/
|
||||
export interface OpenDataConversionFood {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
pluralName: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataStoreCategoryToStoreInnerCategory}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
storeCategory: OpenDataStoreCategoryToStoreInnerCategory;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPreferredUnitMetric}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
preferredUnitMetric?: OpenDataConversionFoodPreferredUnitMetric | null;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPreferredUnitMetric}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
preferredShoppingUnitMetric?: OpenDataConversionFoodPreferredUnitMetric | null;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPreferredUnitMetric}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
preferredUnitImperial?: OpenDataConversionFoodPreferredUnitMetric | null;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPreferredUnitMetric}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
preferredShoppingUnitImperial?: OpenDataConversionFoodPreferredUnitMetric | null;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataConversionFoodPropertiesInner>}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
properties: Array<OpenDataConversionFoodPropertiesInner> | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPropertiesFoodUnit}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
propertiesFoodUnit: OpenDataConversionFoodPropertiesFoodUnit;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
propertiesSource?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
fdcId: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFood
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFood interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFood(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "pluralName" in value;
|
||||
isInstance = isInstance && "storeCategory" in value;
|
||||
isInstance = isInstance && "properties" in value;
|
||||
isInstance = isInstance && "propertiesFoodUnit" in value;
|
||||
isInstance = isInstance && "fdcId" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodFromJSON(json: any): OpenDataConversionFood {
|
||||
return OpenDataConversionFoodFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFood {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'],
|
||||
'storeCategory': OpenDataStoreCategoryToStoreInnerCategoryFromJSON(json['store_category']),
|
||||
'preferredUnitMetric': !exists(json, 'preferred_unit_metric') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_unit_metric']),
|
||||
'preferredShoppingUnitMetric': !exists(json, 'preferred_shopping_unit_metric') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_shopping_unit_metric']),
|
||||
'preferredUnitImperial': !exists(json, 'preferred_unit_imperial') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_unit_imperial']),
|
||||
'preferredShoppingUnitImperial': !exists(json, 'preferred_shopping_unit_imperial') ? undefined : OpenDataConversionFoodPreferredUnitMetricFromJSON(json['preferred_shopping_unit_imperial']),
|
||||
'properties': (json['properties'] === null ? null : (json['properties'] as Array<any>).map(OpenDataConversionFoodPropertiesInnerFromJSON)),
|
||||
'propertiesFoodAmount': !exists(json, 'properties_food_amount') ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': OpenDataConversionFoodPropertiesFoodUnitFromJSON(json['properties_food_unit']),
|
||||
'propertiesSource': !exists(json, 'properties_source') ? undefined : json['properties_source'],
|
||||
'fdcId': json['fdc_id'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodToJSON(value?: OpenDataConversionFood | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'store_category': OpenDataStoreCategoryToStoreInnerCategoryToJSON(value.storeCategory),
|
||||
'preferred_unit_metric': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredUnitMetric),
|
||||
'preferred_shopping_unit_metric': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredShoppingUnitMetric),
|
||||
'preferred_unit_imperial': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredUnitImperial),
|
||||
'preferred_shopping_unit_imperial': OpenDataConversionFoodPreferredUnitMetricToJSON(value.preferredShoppingUnitImperial),
|
||||
'properties': (value.properties === null ? null : (value.properties as Array<any>).map(OpenDataConversionFoodPropertiesInnerToJSON)),
|
||||
'properties_food_amount': value.propertiesFoodAmount,
|
||||
'properties_food_unit': OpenDataConversionFoodPropertiesFoodUnitToJSON(value.propertiesFoodUnit),
|
||||
'properties_source': value.propertiesSource,
|
||||
'fdc_id': value.fdcId,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
export interface OpenDataConversionFoodPreferredUnitMetric {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
baseUnit?: OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
type: OpenDataConversionFoodPreferredUnitMetricTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPreferredUnitMetric
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum = {
|
||||
G: 'G',
|
||||
Kg: 'KG',
|
||||
Ml: 'ML',
|
||||
L: 'L',
|
||||
Ounce: 'OUNCE',
|
||||
Pound: 'POUND',
|
||||
FluidOunce: 'FLUID_OUNCE',
|
||||
Tsp: 'TSP',
|
||||
Tbsp: 'TBSP',
|
||||
Cup: 'CUP',
|
||||
Pint: 'PINT',
|
||||
Quart: 'QUART',
|
||||
Gallon: 'GALLON',
|
||||
ImperialFluidOunce: 'IMPERIAL_FLUID_OUNCE',
|
||||
ImperialPint: 'IMPERIAL_PINT',
|
||||
ImperialQuart: 'IMPERIAL_QUART',
|
||||
ImperialGallon: 'IMPERIAL_GALLON'
|
||||
} as const;
|
||||
export type OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum = typeof OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum[keyof typeof OpenDataConversionFoodPreferredUnitMetricBaseUnitEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenDataConversionFoodPreferredUnitMetricTypeEnum = {
|
||||
Weight: 'WEIGHT',
|
||||
Volume: 'VOLUME',
|
||||
Other: 'OTHER'
|
||||
} as const;
|
||||
export type OpenDataConversionFoodPreferredUnitMetricTypeEnum = typeof OpenDataConversionFoodPreferredUnitMetricTypeEnum[keyof typeof OpenDataConversionFoodPreferredUnitMetricTypeEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFoodPreferredUnitMetric interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFoodPreferredUnitMetric(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPreferredUnitMetricFromJSON(json: any): OpenDataConversionFoodPreferredUnitMetric {
|
||||
return OpenDataConversionFoodPreferredUnitMetricFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPreferredUnitMetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPreferredUnitMetric {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'],
|
||||
'type': json['type'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPreferredUnitMetricToJSON(value?: OpenDataConversionFoodPreferredUnitMetric | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'base_unit': value.baseUnit,
|
||||
'type': value.type,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
export interface OpenDataConversionFoodPropertiesFoodUnit {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
baseUnit?: OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
type: OpenDataConversionFoodPropertiesFoodUnitTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesFoodUnit
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum = {
|
||||
G: 'G',
|
||||
Kg: 'KG',
|
||||
Ml: 'ML',
|
||||
L: 'L',
|
||||
Ounce: 'OUNCE',
|
||||
Pound: 'POUND',
|
||||
FluidOunce: 'FLUID_OUNCE',
|
||||
Tsp: 'TSP',
|
||||
Tbsp: 'TBSP',
|
||||
Cup: 'CUP',
|
||||
Pint: 'PINT',
|
||||
Quart: 'QUART',
|
||||
Gallon: 'GALLON',
|
||||
ImperialFluidOunce: 'IMPERIAL_FLUID_OUNCE',
|
||||
ImperialPint: 'IMPERIAL_PINT',
|
||||
ImperialQuart: 'IMPERIAL_QUART',
|
||||
ImperialGallon: 'IMPERIAL_GALLON'
|
||||
} as const;
|
||||
export type OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum = typeof OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum[keyof typeof OpenDataConversionFoodPropertiesFoodUnitBaseUnitEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OpenDataConversionFoodPropertiesFoodUnitTypeEnum = {
|
||||
Weight: 'WEIGHT',
|
||||
Volume: 'VOLUME',
|
||||
Other: 'OTHER'
|
||||
} as const;
|
||||
export type OpenDataConversionFoodPropertiesFoodUnitTypeEnum = typeof OpenDataConversionFoodPropertiesFoodUnitTypeEnum[keyof typeof OpenDataConversionFoodPropertiesFoodUnitTypeEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFoodPropertiesFoodUnit interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFoodPropertiesFoodUnit(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesFoodUnitFromJSON(json: any): OpenDataConversionFoodPropertiesFoodUnit {
|
||||
return OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesFoodUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesFoodUnit {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
||||
'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'],
|
||||
'type': json['type'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesFoodUnitToJSON(value?: OpenDataConversionFoodPropertiesFoodUnit | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'plural_name': value.pluralName,
|
||||
'base_unit': value.baseUnit,
|
||||
'type': value.type,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataConversionFoodPropertiesInnerProperty } from './OpenDataConversionFoodPropertiesInnerProperty';
|
||||
import {
|
||||
OpenDataConversionFoodPropertiesInnerPropertyFromJSON,
|
||||
OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped,
|
||||
OpenDataConversionFoodPropertiesInnerPropertyToJSON,
|
||||
} from './OpenDataConversionFoodPropertiesInnerProperty';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFoodPropertiesInner
|
||||
*/
|
||||
export interface OpenDataConversionFoodPropertiesInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPropertiesInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataConversionFoodPropertiesInnerProperty}
|
||||
* @memberof OpenDataConversionFoodPropertiesInner
|
||||
*/
|
||||
property: OpenDataConversionFoodPropertiesInnerProperty;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInner
|
||||
*/
|
||||
propertyAmount: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFoodPropertiesInner interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFoodPropertiesInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "property" in value;
|
||||
isInstance = isInstance && "propertyAmount" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerFromJSON(json: any): OpenDataConversionFoodPropertiesInner {
|
||||
return OpenDataConversionFoodPropertiesInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'property': OpenDataConversionFoodPropertiesInnerPropertyFromJSON(json['property']),
|
||||
'propertyAmount': json['property_amount'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerToJSON(value?: OpenDataConversionFoodPropertiesInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataConversionFoodPropertiesInnerPropertyToJSON(value.property),
|
||||
'property_amount': value.propertyAmount,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
export interface OpenDataConversionFoodPropertiesInnerProperty {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
fdcId?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionFoodPropertiesInnerProperty
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionFoodPropertiesInnerProperty interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionFoodPropertiesInnerProperty(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerPropertyFromJSON(json: any): OpenDataConversionFoodPropertiesInnerProperty {
|
||||
return OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerPropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionFoodPropertiesInnerProperty {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'unit': !exists(json, 'unit') ? undefined : json['unit'],
|
||||
'fdcId': !exists(json, 'fdc_id') ? undefined : json['fdc_id'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionFoodPropertiesInnerPropertyToJSON(value?: OpenDataConversionFoodPropertiesInnerProperty | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'unit': value.unit,
|
||||
'fdc_id': value.fdcId,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataFoodRequest } from './OpenDataFoodRequest';
|
||||
import {
|
||||
OpenDataFoodRequestFromJSON,
|
||||
OpenDataFoodRequestFromJSONTyped,
|
||||
OpenDataFoodRequestToJSON,
|
||||
} from './OpenDataFoodRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataConversionRequest
|
||||
*/
|
||||
export interface OpenDataConversionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataFoodRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
food: OpenDataFoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
baseAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
baseUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
convertedAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
convertedUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
source: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataConversionRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversionRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('food' in value)) return false;
|
||||
if (!('baseAmount' in value)) return false;
|
||||
if (!('baseUnit' in value)) return false;
|
||||
if (!('convertedAmount' in value)) return false;
|
||||
if (!('convertedUnit' in value)) return false;
|
||||
if (!('source' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestFromJSON(json: any): OpenDataConversionRequest {
|
||||
return OpenDataConversionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataConversionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'food': OpenDataFoodRequestFromJSON(json['food']),
|
||||
'baseAmount': json['base_amount'],
|
||||
'baseUnit': OpenDataUnitRequestFromJSON(json['base_unit']),
|
||||
'convertedAmount': json['converted_amount'],
|
||||
'convertedUnit': OpenDataUnitRequestFromJSON(json['converted_unit']),
|
||||
'source': json['source'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataConversionRequestToJSON(value?: OpenDataConversionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'food': OpenDataFoodRequestToJSON(value['food']),
|
||||
'base_amount': value['baseAmount'],
|
||||
'base_unit': OpenDataUnitRequestToJSON(value['baseUnit']),
|
||||
'converted_amount': value['convertedAmount'],
|
||||
'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']),
|
||||
'source': value['source'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataPropertyRequest } from './OpenDataPropertyRequest';
|
||||
import {
|
||||
OpenDataPropertyRequestFromJSON,
|
||||
OpenDataPropertyRequestFromJSONTyped,
|
||||
OpenDataPropertyRequestToJSON,
|
||||
} from './OpenDataPropertyRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataFoodPropertyRequest
|
||||
*/
|
||||
export interface OpenDataFoodPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataPropertyRequest}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
property: OpenDataPropertyRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
propertyAmount: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataFoodPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataFoodPropertyRequest(value: object): boolean {
|
||||
if (!('property' in value)) return false;
|
||||
if (!('propertyAmount' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestFromJSON(json: any): OpenDataFoodPropertyRequest {
|
||||
return OpenDataFoodPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataFoodPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataPropertyRequestFromJSON(json['property']),
|
||||
'propertyAmount': json['property_amount'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestToJSON(value?: OpenDataFoodPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataPropertyRequestToJSON(value['property']),
|
||||
'property_amount': value['propertyAmount'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,247 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataCategoryRequest } from './OpenDataCategoryRequest';
|
||||
import {
|
||||
OpenDataCategoryRequestFromJSON,
|
||||
OpenDataCategoryRequestFromJSONTyped,
|
||||
OpenDataCategoryRequestToJSON,
|
||||
} from './OpenDataCategoryRequest';
|
||||
import type { OpenDataFoodPropertyRequest } from './OpenDataFoodPropertyRequest';
|
||||
import {
|
||||
OpenDataFoodPropertyRequestFromJSON,
|
||||
OpenDataFoodPropertyRequestFromJSONTyped,
|
||||
OpenDataFoodPropertyRequestToJSON,
|
||||
} from './OpenDataFoodPropertyRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataFoodRequest
|
||||
*/
|
||||
export interface OpenDataFoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
pluralName: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategoryRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
storeCategory: OpenDataCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataFoodPropertyRequest>}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
properties: Array<OpenDataFoodPropertyRequest> | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodUnit: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
propertiesSource?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
fdcId: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataFoodRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataFoodRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('pluralName' in value)) return false;
|
||||
if (!('storeCategory' in value)) return false;
|
||||
if (!('properties' in value)) return false;
|
||||
if (!('propertiesFoodUnit' in value)) return false;
|
||||
if (!('fdcId' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestFromJSON(json: any): OpenDataFoodRequest {
|
||||
return OpenDataFoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataFoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'],
|
||||
'storeCategory': OpenDataCategoryRequestFromJSON(json['store_category']),
|
||||
'preferredUnitMetric': json['preferred_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_metric']),
|
||||
'preferredShoppingUnitMetric': json['preferred_shopping_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_metric']),
|
||||
'preferredUnitImperial': json['preferred_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_imperial']),
|
||||
'preferredShoppingUnitImperial': json['preferred_shopping_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_imperial']),
|
||||
'properties': (json['properties'] == null ? null : (json['properties'] as Array<any>).map(OpenDataFoodPropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': OpenDataUnitRequestFromJSON(json['properties_food_unit']),
|
||||
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
|
||||
'fdcId': json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataFoodRequestToJSON(value?: OpenDataFoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'store_category': OpenDataCategoryRequestToJSON(value['storeCategory']),
|
||||
'preferred_unit_metric': OpenDataUnitRequestToJSON(value['preferredUnitMetric']),
|
||||
'preferred_shopping_unit_metric': OpenDataUnitRequestToJSON(value['preferredShoppingUnitMetric']),
|
||||
'preferred_unit_imperial': OpenDataUnitRequestToJSON(value['preferredUnitImperial']),
|
||||
'preferred_shopping_unit_imperial': OpenDataUnitRequestToJSON(value['preferredShoppingUnitImperial']),
|
||||
'properties': (value['properties'] == null ? null : (value['properties'] as Array<any>).map(OpenDataFoodPropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': OpenDataUnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'properties_source': value['propertiesSource'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataPropertyRequest
|
||||
*/
|
||||
export interface OpenDataPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataPropertyRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestFromJSON(json: any): OpenDataPropertyRequest {
|
||||
return OpenDataPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataPropertyRequestToJSON(value?: OpenDataPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'unit': value['unit'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataCategoryRequest } from './OpenDataCategoryRequest';
|
||||
import {
|
||||
OpenDataCategoryRequestFromJSON,
|
||||
OpenDataCategoryRequestFromJSONTyped,
|
||||
OpenDataCategoryRequestToJSON,
|
||||
} from './OpenDataCategoryRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataStoreCategoryRequest
|
||||
*/
|
||||
export interface OpenDataStoreCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategoryRequest}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
category: OpenDataCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
store: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataStoreCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStoreCategoryRequest(value: object): boolean {
|
||||
if (!('category' in value)) return false;
|
||||
if (!('store' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestFromJSON(json: any): OpenDataStoreCategoryRequest {
|
||||
return OpenDataStoreCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': OpenDataCategoryRequestFromJSON(json['category']),
|
||||
'store': json['store'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestToJSON(value?: OpenDataStoreCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': OpenDataCategoryRequestToJSON(value['category']),
|
||||
'store': value['store'],
|
||||
'order': value['order'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataStoreCategoryToStoreInnerCategory } from './OpenDataStoreCategoryToStoreInnerCategory';
|
||||
import {
|
||||
OpenDataStoreCategoryToStoreInnerCategoryFromJSON,
|
||||
OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped,
|
||||
OpenDataStoreCategoryToStoreInnerCategoryToJSON,
|
||||
} from './OpenDataStoreCategoryToStoreInnerCategory';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataStoreCategoryToStoreInner
|
||||
*/
|
||||
export interface OpenDataStoreCategoryToStoreInner {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryToStoreInner
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataStoreCategoryToStoreInnerCategory}
|
||||
* @memberof OpenDataStoreCategoryToStoreInner
|
||||
*/
|
||||
category: OpenDataStoreCategoryToStoreInnerCategory;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryToStoreInner
|
||||
*/
|
||||
store: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryToStoreInner
|
||||
*/
|
||||
order?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataStoreCategoryToStoreInner interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStoreCategoryToStoreInner(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "category" in value;
|
||||
isInstance = isInstance && "store" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryToStoreInnerFromJSON(json: any): OpenDataStoreCategoryToStoreInner {
|
||||
return OpenDataStoreCategoryToStoreInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryToStoreInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreCategoryToStoreInner {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'category': OpenDataStoreCategoryToStoreInnerCategoryFromJSON(json['category']),
|
||||
'store': json['store'],
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryToStoreInnerToJSON(value?: OpenDataStoreCategoryToStoreInner | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': OpenDataStoreCategoryToStoreInnerCategoryToJSON(value.category),
|
||||
'store': value.store,
|
||||
'order': value.order,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { OpenDataUnitVersion } from './OpenDataUnitVersion';
|
||||
import {
|
||||
OpenDataUnitVersionFromJSON,
|
||||
OpenDataUnitVersionFromJSONTyped,
|
||||
OpenDataUnitVersionToJSON,
|
||||
} from './OpenDataUnitVersion';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataStoreCategoryToStoreInnerCategory
|
||||
*/
|
||||
export interface OpenDataStoreCategoryToStoreInnerCategory {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategoryToStoreInnerCategory
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitVersion}
|
||||
* @memberof OpenDataStoreCategoryToStoreInnerCategory
|
||||
*/
|
||||
version: OpenDataUnitVersion;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreCategoryToStoreInnerCategory
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreCategoryToStoreInnerCategory
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreCategoryToStoreInnerCategory
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreCategoryToStoreInnerCategory
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreCategoryToStoreInnerCategory
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataStoreCategoryToStoreInnerCategory interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStoreCategoryToStoreInnerCategory(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "version" in value;
|
||||
isInstance = isInstance && "slug" in value;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryToStoreInnerCategoryFromJSON(json: any): OpenDataStoreCategoryToStoreInnerCategory {
|
||||
return OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryToStoreInnerCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreCategoryToStoreInnerCategory {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'version': OpenDataUnitVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryToStoreInnerCategoryToJSON(value?: OpenDataStoreCategoryToStoreInnerCategory | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataUnitVersionToJSON(value.version),
|
||||
'slug': value.slug,
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataStoreCategoryRequest } from './OpenDataStoreCategoryRequest';
|
||||
import {
|
||||
OpenDataStoreCategoryRequestFromJSON,
|
||||
OpenDataStoreCategoryRequestFromJSONTyped,
|
||||
OpenDataStoreCategoryRequestToJSON,
|
||||
} from './OpenDataStoreCategoryRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface OpenDataStoreRequest
|
||||
*/
|
||||
export interface OpenDataStoreRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataStoreCategoryRequest>}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
categoryToStore: Array<OpenDataStoreCategoryRequest> | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataStoreRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStoreRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('categoryToStore' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataStoreRequestFromJSON(json: any): OpenDataStoreRequest {
|
||||
return OpenDataStoreRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStoreRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'categoryToStore': (json['category_to_store'] == null ? null : (json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryRequestFromJSON)),
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataStoreRequestToJSON(value?: OpenDataStoreRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'category_to_store': (value['categoryToStore'] == null ? null : (value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryRequestToJSON)),
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import type { BaseUnitEnum } from './BaseUnitEnum';
|
||||
import {
|
||||
instanceOfBaseUnitEnum,
|
||||
BaseUnitEnumFromJSON,
|
||||
BaseUnitEnumFromJSONTyped,
|
||||
BaseUnitEnumToJSON,
|
||||
} from './BaseUnitEnum';
|
||||
import type { BlankEnum } from './BlankEnum';
|
||||
import {
|
||||
instanceOfBlankEnum,
|
||||
BlankEnumFromJSON,
|
||||
BlankEnumFromJSONTyped,
|
||||
BlankEnumToJSON,
|
||||
} from './BlankEnum';
|
||||
|
||||
/**
|
||||
* @type OpenDataUnitBaseUnit
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export type OpenDataUnitBaseUnit = BaseUnitEnum | BlankEnum;
|
||||
|
||||
export function OpenDataUnitBaseUnitFromJSON(json: any): OpenDataUnitBaseUnit {
|
||||
return OpenDataUnitBaseUnitFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataUnitBaseUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataUnitBaseUnit {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return { ...BaseUnitEnumFromJSONTyped(json, true), ...BlankEnumFromJSONTyped(json, true) };
|
||||
}
|
||||
|
||||
export function OpenDataUnitBaseUnitToJSON(value?: OpenDataUnitBaseUnit | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (instanceOfBaseUnitEnum(value)) {
|
||||
return BaseUnitEnumToJSON(value as BaseUnitEnum);
|
||||
}
|
||||
if (instanceOfBlankEnum(value)) {
|
||||
return BlankEnumToJSON(value as BlankEnum);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { BaseUnitEnum } from './BaseUnitEnum';
|
||||
import {
|
||||
BaseUnitEnumFromJSON,
|
||||
BaseUnitEnumFromJSONTyped,
|
||||
BaseUnitEnumToJSON,
|
||||
} from './BaseUnitEnum';
|
||||
import type { OpenDataUnitTypeEnum } from './OpenDataUnitTypeEnum';
|
||||
import {
|
||||
OpenDataUnitTypeEnumFromJSON,
|
||||
OpenDataUnitTypeEnumFromJSONTyped,
|
||||
OpenDataUnitTypeEnumToJSON,
|
||||
} from './OpenDataUnitTypeEnum';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataUnitRequest
|
||||
*/
|
||||
export interface OpenDataUnitRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
version: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {BaseUnitEnum}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
baseUnit?: BaseUnitEnum;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitTypeEnum}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
type: OpenDataUnitTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataUnitRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataUnitRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataUnitRequest(value: object): boolean {
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('type' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataUnitRequestFromJSON(json: any): OpenDataUnitRequest {
|
||||
return OpenDataUnitRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataUnitRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']),
|
||||
'type': OpenDataUnitTypeEnumFromJSON(json['type']),
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataUnitRequestToJSON(value?: OpenDataUnitRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'base_unit': BaseUnitEnumToJSON(value['baseUnit']),
|
||||
'type': OpenDataUnitTypeEnumToJSON(value['type']),
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OpenDataUnitVersion
|
||||
*/
|
||||
export interface OpenDataUnitVersion {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataUnitVersion
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitVersion
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitVersion
|
||||
*/
|
||||
code: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataUnitVersion
|
||||
*/
|
||||
comment?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataUnitVersion interface.
|
||||
*/
|
||||
export function instanceOfOpenDataUnitVersion(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OpenDataUnitVersionFromJSON(json: any): OpenDataUnitVersion {
|
||||
return OpenDataUnitVersionFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataUnitVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataUnitVersion {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'code': json['code'],
|
||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataUnitVersionToJSON(value?: OpenDataUnitVersion | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'code': value.code,
|
||||
'comment': value.comment,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface OpenDataVersionRequest
|
||||
*/
|
||||
export interface OpenDataVersionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataVersionRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataVersionRequest
|
||||
*/
|
||||
code: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OpenDataVersionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OpenDataVersionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OpenDataVersionRequest interface.
|
||||
*/
|
||||
export function instanceOfOpenDataVersionRequest(value: object): boolean {
|
||||
if (!('name' in value)) return false;
|
||||
if (!('code' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function OpenDataVersionRequestFromJSON(json: any): OpenDataVersionRequest {
|
||||
return OpenDataVersionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OpenDataVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataVersionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'],
|
||||
'code': json['code'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataVersionRequestToJSON(value?: OpenDataVersionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'code': value['code'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedAccessTokenRequest
|
||||
*/
|
||||
export interface PatchedAccessTokenRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedAccessTokenRequest
|
||||
*/
|
||||
expires?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAccessTokenRequest
|
||||
*/
|
||||
scope?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedAccessTokenRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedAccessTokenRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedAccessTokenRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedAccessTokenRequestFromJSON(json: any): PatchedAccessTokenRequest {
|
||||
return PatchedAccessTokenRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedAccessTokenRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAccessTokenRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': json['expires'] == null ? undefined : (new Date(json['expires'])),
|
||||
'scope': json['scope'] == null ? undefined : json['scope'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedAccessTokenRequestToJSON(value?: PatchedAccessTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': value['expires'] == null ? undefined : ((value['expires']).toISOString()),
|
||||
'scope': value['scope'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { TypeEnum } from './TypeEnum';
|
||||
import {
|
||||
TypeEnumFromJSON,
|
||||
TypeEnumFromJSONTyped,
|
||||
TypeEnumToJSON,
|
||||
} from './TypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedAutomationRequest
|
||||
*/
|
||||
export interface PatchedAutomationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {TypeEnum}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
type?: TypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
param1?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
param2?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
param3?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedAutomationRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedAutomationRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedAutomationRequestFromJSON(json: any): PatchedAutomationRequest {
|
||||
return PatchedAutomationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedAutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAutomationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'] == null ? undefined : TypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
'param2': json['param_2'] == null ? undefined : json['param_2'],
|
||||
'param3': json['param_3'] == null ? undefined : json['param_3'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'disabled': json['disabled'] == null ? undefined : json['disabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedAutomationRequestToJSON(value?: PatchedAutomationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': TypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
'param_2': value['param2'],
|
||||
'param_3': value['param3'],
|
||||
'order': value['order'],
|
||||
'disabled': value['disabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedBookmarkletImportRequest
|
||||
*/
|
||||
export interface PatchedBookmarkletImportRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedBookmarkletImportRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedBookmarkletImportRequest
|
||||
*/
|
||||
html?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedBookmarkletImportRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedBookmarkletImportRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedBookmarkletImportRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedBookmarkletImportRequestFromJSON(json: any): PatchedBookmarkletImportRequest {
|
||||
return PatchedBookmarkletImportRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedBookmarkletImportRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedBookmarkletImportRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'html': json['html'] == null ? undefined : json['html'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedBookmarkletImportRequestToJSON(value?: PatchedBookmarkletImportRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value['url'],
|
||||
'html': value['html'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
export interface PatchedConnectorConfigConfigRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
todoEntity?: string;
|
||||
/**
|
||||
* Is Connector Enabled
|
||||
* @type {boolean}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryCreatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryUpdatedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
onShoppingListEntryDeletedEnabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedConnectorConfigConfigRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedConnectorConfigConfigRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedConnectorConfigConfigRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedConnectorConfigConfigRequestFromJSON(json: any): PatchedConnectorConfigConfigRequest {
|
||||
return PatchedConnectorConfigConfigRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedConnectorConfigConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedConnectorConfigConfigRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'],
|
||||
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
||||
'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_enabled'],
|
||||
'onShoppingListEntryUpdatedEnabled': json['on_shopping_list_entry_updated_enabled'] == null ? undefined : json['on_shopping_list_entry_updated_enabled'],
|
||||
'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedConnectorConfigConfigRequestToJSON(value?: PatchedConnectorConfigConfigRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'url': value['url'],
|
||||
'token': value['token'],
|
||||
'todo_entity': value['todoEntity'],
|
||||
'enabled': value['enabled'],
|
||||
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
|
||||
'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'],
|
||||
'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedCookLogRequest
|
||||
*/
|
||||
export interface PatchedCookLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
recipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
rating?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCookLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedCookLogRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedCookLogRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedCookLogRequestFromJSON(json: any): PatchedCookLogRequest {
|
||||
return PatchedCookLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedCookLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCookLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': json['recipe'] == null ? undefined : json['recipe'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'rating': json['rating'] == null ? undefined : json['rating'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedCookLogRequestToJSON(value?: PatchedCookLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value['recipe'],
|
||||
'servings': value['servings'],
|
||||
'rating': value['rating'],
|
||||
'comment': value['comment'],
|
||||
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedCustomFilterRequest
|
||||
*/
|
||||
export interface PatchedCustomFilterRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedCustomFilterRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedCustomFilterRequest
|
||||
*/
|
||||
search?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedCustomFilterRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedCustomFilterRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedCustomFilterRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedCustomFilterRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedCustomFilterRequestFromJSON(json: any): PatchedCustomFilterRequest {
|
||||
return PatchedCustomFilterRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedCustomFilterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCustomFilterRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'search': json['search'] == null ? undefined : json['search'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedCustomFilterRequestToJSON(value?: PatchedCustomFilterRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'search': value['search'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedExportLogRequest
|
||||
*/
|
||||
export interface PatchedExportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
exportedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
cacheDuration?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
possiblyNotExpired?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedExportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedExportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedExportLogRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedExportLogRequestFromJSON(json: any): PatchedExportLogRequest {
|
||||
return PatchedExportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedExportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedExportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'],
|
||||
'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'],
|
||||
'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedExportLogRequestToJSON(value?: PatchedExportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'exported_recipes': value['exportedRecipes'],
|
||||
'cache_duration': value['cacheDuration'],
|
||||
'possibly_not_expired': value['possiblyNotExpired'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,275 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { FoodInheritFieldRequest } from './FoodInheritFieldRequest';
|
||||
import {
|
||||
FoodInheritFieldRequestFromJSON,
|
||||
FoodInheritFieldRequestFromJSONTyped,
|
||||
FoodInheritFieldRequestToJSON,
|
||||
} from './FoodInheritFieldRequest';
|
||||
import type { FoodSimpleRequest } from './FoodSimpleRequest';
|
||||
import {
|
||||
FoodSimpleRequestFromJSON,
|
||||
FoodSimpleRequestFromJSONTyped,
|
||||
FoodSimpleRequestToJSON,
|
||||
} from './FoodSimpleRequest';
|
||||
import type { PropertyRequest } from './PropertyRequest';
|
||||
import {
|
||||
PropertyRequestFromJSON,
|
||||
PropertyRequestFromJSONTyped,
|
||||
PropertyRequestToJSON,
|
||||
} from './PropertyRequest';
|
||||
import type { RecipeSimpleRequest } from './RecipeSimpleRequest';
|
||||
import {
|
||||
RecipeSimpleRequestFromJSON,
|
||||
RecipeSimpleRequestFromJSONTyped,
|
||||
RecipeSimpleRequestToJSON,
|
||||
} from './RecipeSimpleRequest';
|
||||
import type { SupermarketCategoryRequest } from './SupermarketCategoryRequest';
|
||||
import {
|
||||
SupermarketCategoryRequestFromJSON,
|
||||
SupermarketCategoryRequestFromJSONTyped,
|
||||
SupermarketCategoryRequestToJSON,
|
||||
} from './SupermarketCategoryRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedFoodRequest
|
||||
*/
|
||||
export interface PatchedFoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeSimpleRequest}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
recipe?: RecipeSimpleRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PropertyRequest>}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
properties?: Array<PropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
foodOnhand?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {SupermarketCategoryRequest}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
supermarketCategory?: SupermarketCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
inheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
ignoreShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodSimpleRequest>}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
substitute?: Array<FoodSimpleRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
substituteSiblings?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
substituteChildren?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
childInheritFields?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedFoodRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedFoodRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedFoodRequestFromJSON(json: any): PatchedFoodRequest {
|
||||
return PatchedFoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedFoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeSimpleRequestFromJSON(json['recipe']),
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(PropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : UnitRequestFromJSON(json['properties_food_unit']),
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'foodOnhand': json['food_onhand'] == null ? undefined : json['food_onhand'],
|
||||
'supermarketCategory': json['supermarket_category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['supermarket_category']),
|
||||
'inheritFields': json['inherit_fields'] == null ? undefined : ((json['inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'ignoreShopping': json['ignore_shopping'] == null ? undefined : json['ignore_shopping'],
|
||||
'substitute': json['substitute'] == null ? undefined : ((json['substitute'] as Array<any>).map(FoodSimpleRequestFromJSON)),
|
||||
'substituteSiblings': json['substitute_siblings'] == null ? undefined : json['substitute_siblings'],
|
||||
'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'],
|
||||
'childInheritFields': json['child_inherit_fields'] == null ? undefined : ((json['child_inherit_fields'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedFoodRequestToJSON(value?: PatchedFoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
'recipe': RecipeSimpleRequestToJSON(value['recipe']),
|
||||
'url': value['url'],
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(PropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': UnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'fdc_id': value['fdcId'],
|
||||
'food_onhand': value['foodOnhand'],
|
||||
'supermarket_category': SupermarketCategoryRequestToJSON(value['supermarketCategory']),
|
||||
'inherit_fields': value['inheritFields'] == null ? undefined : ((value['inheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'ignore_shopping': value['ignoreShopping'],
|
||||
'substitute': value['substitute'] == null ? undefined : ((value['substitute'] as Array<any>).map(FoodSimpleRequestToJSON)),
|
||||
'substitute_siblings': value['substituteSiblings'],
|
||||
'substitute_children': value['substituteChildren'],
|
||||
'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedImportLogRequest
|
||||
*/
|
||||
export interface PatchedImportLogRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
running?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
totalRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
importedRecipes?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedImportLogRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedImportLogRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedImportLogRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedImportLogRequestFromJSON(json: any): PatchedImportLogRequest {
|
||||
return PatchedImportLogRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedImportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedImportLogRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
|
||||
'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedImportLogRequestToJSON(value?: PatchedImportLogRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
'total_recipes': value['totalRecipes'],
|
||||
'imported_recipes': value['importedRecipes'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { FoodRequest } from './FoodRequest';
|
||||
import {
|
||||
FoodRequestFromJSON,
|
||||
FoodRequestFromJSONTyped,
|
||||
FoodRequestToJSON,
|
||||
} from './FoodRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedIngredientRequest
|
||||
*/
|
||||
export interface PatchedIngredientRequest {
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
food?: FoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
unit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
amount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
isHeader?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
noAmount?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
originalText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
alwaysUsePluralUnit?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
alwaysUsePluralFood?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedIngredientRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedIngredientRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedIngredientRequestFromJSON(json: any): PatchedIngredientRequest {
|
||||
return PatchedIngredientRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedIngredientRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedIngredientRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']),
|
||||
'unit': json['unit'] == null ? undefined : UnitRequestFromJSON(json['unit']),
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'isHeader': json['is_header'] == null ? undefined : json['is_header'],
|
||||
'noAmount': json['no_amount'] == null ? undefined : json['no_amount'],
|
||||
'originalText': json['original_text'] == null ? undefined : json['original_text'],
|
||||
'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'],
|
||||
'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedIngredientRequestToJSON(value?: PatchedIngredientRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'unit': UnitRequestToJSON(value['unit']),
|
||||
'amount': value['amount'],
|
||||
'note': value['note'],
|
||||
'order': value['order'],
|
||||
'is_header': value['isHeader'],
|
||||
'no_amount': value['noAmount'],
|
||||
'original_text': value['originalText'],
|
||||
'always_use_plural_unit': value['alwaysUsePluralUnit'],
|
||||
'always_use_plural_food': value['alwaysUsePluralFood'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,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 { mapValues } from '../runtime';
|
||||
import type { GroupRequest } from './GroupRequest';
|
||||
import {
|
||||
GroupRequestFromJSON,
|
||||
GroupRequestFromJSONTyped,
|
||||
GroupRequestToJSON,
|
||||
} from './GroupRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedInviteLinkRequest
|
||||
*/
|
||||
export interface PatchedInviteLinkRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {GroupRequest}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
group?: GroupRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
validUntil?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
usedBy?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
reusable?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
internalNote?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedInviteLinkRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedInviteLinkRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedInviteLinkRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedInviteLinkRequestFromJSON(json: any): PatchedInviteLinkRequest {
|
||||
return PatchedInviteLinkRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedInviteLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedInviteLinkRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': json['email'] == null ? undefined : json['email'],
|
||||
'group': json['group'] == null ? undefined : GroupRequestFromJSON(json['group']),
|
||||
'validUntil': json['valid_until'] == null ? undefined : (new Date(json['valid_until'])),
|
||||
'usedBy': json['used_by'] == null ? undefined : json['used_by'],
|
||||
'reusable': json['reusable'] == null ? undefined : json['reusable'],
|
||||
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedInviteLinkRequestToJSON(value?: PatchedInviteLinkRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': value['email'],
|
||||
'group': GroupRequestToJSON(value['group']),
|
||||
'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)),
|
||||
'used_by': value['usedBy'],
|
||||
'reusable': value['reusable'],
|
||||
'internal_note': value['internalNote'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedKeywordRequest
|
||||
*/
|
||||
export interface PatchedKeywordRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedKeywordRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedKeywordRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedKeywordRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedKeywordRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedKeywordRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedKeywordRequestFromJSON(json: any): PatchedKeywordRequest {
|
||||
return PatchedKeywordRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedKeywordRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedKeywordRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedKeywordRequestToJSON(value?: PatchedKeywordRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 { mapValues } from '../runtime';
|
||||
import type { MealTypeRequest } from './MealTypeRequest';
|
||||
import {
|
||||
MealTypeRequestFromJSON,
|
||||
MealTypeRequestFromJSONTyped,
|
||||
MealTypeRequestToJSON,
|
||||
} from './MealTypeRequest';
|
||||
import type { RecipeOverviewRequest } from './RecipeOverviewRequest';
|
||||
import {
|
||||
RecipeOverviewRequestFromJSON,
|
||||
RecipeOverviewRequestFromJSONTyped,
|
||||
RecipeOverviewRequestToJSON,
|
||||
} from './RecipeOverviewRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedMealPlanRequest
|
||||
*/
|
||||
export interface PatchedMealPlanRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeOverviewRequest}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
recipe?: RecipeOverviewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
fromDate?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
toDate?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {MealTypeRequest}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
mealType?: MealTypeRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedMealPlanRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedMealPlanRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedMealPlanRequestFromJSON(json: any): PatchedMealPlanRequest {
|
||||
return PatchedMealPlanRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedMealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMealPlanRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': json['title'] == null ? undefined : json['title'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeOverviewRequestFromJSON(json['recipe']),
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'note': json['note'] == null ? undefined : json['note'],
|
||||
'fromDate': json['from_date'] == null ? undefined : (new Date(json['from_date'])),
|
||||
'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])),
|
||||
'mealType': json['meal_type'] == null ? undefined : MealTypeRequestFromJSON(json['meal_type']),
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedMealPlanRequestToJSON(value?: PatchedMealPlanRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': value['title'],
|
||||
'recipe': RecipeOverviewRequestToJSON(value['recipe']),
|
||||
'servings': value['servings'],
|
||||
'note': value['note'],
|
||||
'from_date': value['fromDate'] == null ? undefined : ((value['fromDate']).toISOString().substring(0,10)),
|
||||
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)),
|
||||
'meal_type': MealTypeRequestToJSON(value['mealType']),
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedMealTypeRequest
|
||||
*/
|
||||
export interface PatchedMealTypeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
_default?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedMealTypeRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedMealTypeRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedMealTypeRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedMealTypeRequestFromJSON(json: any): PatchedMealTypeRequest {
|
||||
return PatchedMealTypeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedMealTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMealTypeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'color': json['color'] == null ? undefined : json['color'],
|
||||
'_default': json['default'] == null ? undefined : json['default'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedMealTypeRequestToJSON(value?: PatchedMealTypeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'order': value['order'],
|
||||
'color': value['color'],
|
||||
'default': value['_default'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
export interface PatchedOpenDataCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataCategoryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataCategoryRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataCategoryRequestFromJSON(json: any): PatchedOpenDataCategoryRequest {
|
||||
return PatchedOpenDataCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataCategoryRequestToJSON(value?: PatchedOpenDataCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataFoodRequest } from './OpenDataFoodRequest';
|
||||
import {
|
||||
OpenDataFoodRequestFromJSON,
|
||||
OpenDataFoodRequestFromJSONTyped,
|
||||
OpenDataFoodRequestToJSON,
|
||||
} from './OpenDataFoodRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedOpenDataConversionRequest
|
||||
*/
|
||||
export interface PatchedOpenDataConversionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataFoodRequest}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
food?: OpenDataFoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
baseAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
baseUnit?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
convertedAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
convertedUnit?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataConversionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataConversionRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataConversionRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataConversionRequestFromJSON(json: any): PatchedOpenDataConversionRequest {
|
||||
return PatchedOpenDataConversionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataConversionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'food': json['food'] == null ? undefined : OpenDataFoodRequestFromJSON(json['food']),
|
||||
'baseAmount': json['base_amount'] == null ? undefined : json['base_amount'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['base_unit']),
|
||||
'convertedAmount': json['converted_amount'] == null ? undefined : json['converted_amount'],
|
||||
'convertedUnit': json['converted_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['converted_unit']),
|
||||
'source': json['source'] == null ? undefined : json['source'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataConversionRequestToJSON(value?: PatchedOpenDataConversionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'food': OpenDataFoodRequestToJSON(value['food']),
|
||||
'base_amount': value['baseAmount'],
|
||||
'base_unit': OpenDataUnitRequestToJSON(value['baseUnit']),
|
||||
'converted_amount': value['convertedAmount'],
|
||||
'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']),
|
||||
'source': value['source'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,239 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataCategoryRequest } from './OpenDataCategoryRequest';
|
||||
import {
|
||||
OpenDataCategoryRequestFromJSON,
|
||||
OpenDataCategoryRequestFromJSONTyped,
|
||||
OpenDataCategoryRequestToJSON,
|
||||
} from './OpenDataCategoryRequest';
|
||||
import type { OpenDataFoodPropertyRequest } from './OpenDataFoodPropertyRequest';
|
||||
import {
|
||||
OpenDataFoodPropertyRequestFromJSON,
|
||||
OpenDataFoodPropertyRequestFromJSONTyped,
|
||||
OpenDataFoodPropertyRequestToJSON,
|
||||
} from './OpenDataFoodPropertyRequest';
|
||||
import type { OpenDataUnitRequest } from './OpenDataUnitRequest';
|
||||
import {
|
||||
OpenDataUnitRequestFromJSON,
|
||||
OpenDataUnitRequestFromJSONTyped,
|
||||
OpenDataUnitRequestToJSON,
|
||||
} from './OpenDataUnitRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataFoodRequest
|
||||
*/
|
||||
export interface PatchedOpenDataFoodRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategoryRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
storeCategory?: OpenDataCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitMetric?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
preferredUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
preferredShoppingUnitImperial?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataFoodPropertyRequest>}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
properties?: Array<OpenDataFoodPropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitRequest}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: OpenDataUnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
propertiesSource?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
fdcId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataFoodRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataFoodRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataFoodRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataFoodRequestFromJSON(json: any): PatchedOpenDataFoodRequest {
|
||||
return PatchedOpenDataFoodRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataFoodRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'storeCategory': json['store_category'] == null ? undefined : OpenDataCategoryRequestFromJSON(json['store_category']),
|
||||
'preferredUnitMetric': json['preferred_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_metric']),
|
||||
'preferredShoppingUnitMetric': json['preferred_shopping_unit_metric'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_metric']),
|
||||
'preferredUnitImperial': json['preferred_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_unit_imperial']),
|
||||
'preferredShoppingUnitImperial': json['preferred_shopping_unit_imperial'] == null ? undefined : OpenDataUnitRequestFromJSON(json['preferred_shopping_unit_imperial']),
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(OpenDataFoodPropertyRequestFromJSON)),
|
||||
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
|
||||
'propertiesFoodUnit': json['properties_food_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['properties_food_unit']),
|
||||
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataFoodRequestToJSON(value?: PatchedOpenDataFoodRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'store_category': OpenDataCategoryRequestToJSON(value['storeCategory']),
|
||||
'preferred_unit_metric': OpenDataUnitRequestToJSON(value['preferredUnitMetric']),
|
||||
'preferred_shopping_unit_metric': OpenDataUnitRequestToJSON(value['preferredShoppingUnitMetric']),
|
||||
'preferred_unit_imperial': OpenDataUnitRequestToJSON(value['preferredUnitImperial']),
|
||||
'preferred_shopping_unit_imperial': OpenDataUnitRequestToJSON(value['preferredShoppingUnitImperial']),
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(OpenDataFoodPropertyRequestToJSON)),
|
||||
'properties_food_amount': value['propertiesFoodAmount'],
|
||||
'properties_food_unit': OpenDataUnitRequestToJSON(value['propertiesFoodUnit']),
|
||||
'properties_source': value['propertiesSource'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
export interface PatchedOpenDataPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataPropertyRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataPropertyRequestFromJSON(json: any): PatchedOpenDataPropertyRequest {
|
||||
return PatchedOpenDataPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataPropertyRequestToJSON(value?: PatchedOpenDataPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'unit': value['unit'],
|
||||
'fdc_id': value['fdcId'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,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 { mapValues } from '../runtime';
|
||||
import type { OpenDataStoreCategoryRequest } from './OpenDataStoreCategoryRequest';
|
||||
import {
|
||||
OpenDataStoreCategoryRequestFromJSON,
|
||||
OpenDataStoreCategoryRequestFromJSONTyped,
|
||||
OpenDataStoreCategoryRequestToJSON,
|
||||
} from './OpenDataStoreCategoryRequest';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedOpenDataStoreRequest
|
||||
*/
|
||||
export interface PatchedOpenDataStoreRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<OpenDataStoreCategoryRequest>}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
categoryToStore?: Array<OpenDataStoreCategoryRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataStoreRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataStoreRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataStoreRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataStoreRequestFromJSON(json: any): PatchedOpenDataStoreRequest {
|
||||
return PatchedOpenDataStoreRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataStoreRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'categoryToStore': json['category_to_store'] == null ? undefined : ((json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryRequestFromJSON)),
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataStoreRequestToJSON(value?: PatchedOpenDataStoreRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'category_to_store': value['categoryToStore'] == null ? undefined : ((value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryRequestToJSON)),
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { BaseUnitEnum } from './BaseUnitEnum';
|
||||
import {
|
||||
BaseUnitEnumFromJSON,
|
||||
BaseUnitEnumFromJSONTyped,
|
||||
BaseUnitEnumToJSON,
|
||||
} from './BaseUnitEnum';
|
||||
import type { OpenDataUnitTypeEnum } from './OpenDataUnitTypeEnum';
|
||||
import {
|
||||
OpenDataUnitTypeEnumFromJSON,
|
||||
OpenDataUnitTypeEnumFromJSONTyped,
|
||||
OpenDataUnitTypeEnumToJSON,
|
||||
} from './OpenDataUnitTypeEnum';
|
||||
import type { OpenDataVersionRequest } from './OpenDataVersionRequest';
|
||||
import {
|
||||
OpenDataVersionRequestFromJSON,
|
||||
OpenDataVersionRequestFromJSONTyped,
|
||||
OpenDataVersionRequestToJSON,
|
||||
} from './OpenDataVersionRequest';
|
||||
|
||||
/**
|
||||
* Moves `UniqueValidator`'s from the validation stage to the save stage.
|
||||
* It solves the problem with nested validation for unique fields on update.
|
||||
*
|
||||
* If you want more details, you can read related issues and articles:
|
||||
* https://github.com/beda-software/drf-writable-nested/issues/1
|
||||
* http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers
|
||||
*
|
||||
* Example of usage:
|
||||
* ```
|
||||
* class Child(models.Model):
|
||||
* field = models.CharField(unique=True)
|
||||
*
|
||||
*
|
||||
* class Parent(models.Model):
|
||||
* child = models.ForeignKey('Child')
|
||||
*
|
||||
*
|
||||
* class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
|
||||
* class Meta:
|
||||
* model = Child
|
||||
*
|
||||
*
|
||||
* class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):
|
||||
* child = ChildSerializer()
|
||||
*
|
||||
* class Meta:
|
||||
* model = Parent
|
||||
* ```
|
||||
*
|
||||
* Note: `UniqueFieldsMixin` must be applied only on the serializer
|
||||
* which has unique fields.
|
||||
*
|
||||
* Note: When you are using both mixins
|
||||
* (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)
|
||||
* you should put `UniqueFieldsMixin` ahead.
|
||||
* @export
|
||||
* @interface PatchedOpenDataUnitRequest
|
||||
*/
|
||||
export interface PatchedOpenDataUnitRequest {
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersionRequest}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
version?: OpenDataVersionRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {BaseUnitEnum}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
baseUnit?: BaseUnitEnum;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataUnitTypeEnum}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
type?: OpenDataUnitTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataUnitRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataUnitRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataUnitRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataUnitRequestFromJSON(json: any): PatchedOpenDataUnitRequest {
|
||||
return PatchedOpenDataUnitRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataUnitRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : OpenDataVersionRequestFromJSON(json['version']),
|
||||
'slug': json['slug'] == null ? undefined : json['slug'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']),
|
||||
'type': json['type'] == null ? undefined : OpenDataUnitTypeEnumFromJSON(json['type']),
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataUnitRequestToJSON(value?: PatchedOpenDataUnitRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': OpenDataVersionRequestToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'base_unit': BaseUnitEnumToJSON(value['baseUnit']),
|
||||
'type': OpenDataUnitTypeEnumToJSON(value['type']),
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 { 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 PatchedOpenDataVersionRequest
|
||||
*/
|
||||
export interface PatchedOpenDataVersionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataVersionRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataVersionRequest
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedOpenDataVersionRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedOpenDataVersionRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedOpenDataVersionRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedOpenDataVersionRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedOpenDataVersionRequestFromJSON(json: any): PatchedOpenDataVersionRequest {
|
||||
return PatchedOpenDataVersionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedOpenDataVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedOpenDataVersionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'code': json['code'] == null ? undefined : json['code'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataVersionRequestToJSON(value?: PatchedOpenDataVersionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'code': value['code'],
|
||||
'comment': value['comment'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { PropertyTypeRequest } from './PropertyTypeRequest';
|
||||
import {
|
||||
PropertyTypeRequestFromJSON,
|
||||
PropertyTypeRequestFromJSONTyped,
|
||||
PropertyTypeRequestToJSON,
|
||||
} from './PropertyTypeRequest';
|
||||
|
||||
/**
|
||||
* 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 PatchedPropertyRequest
|
||||
*/
|
||||
export interface PatchedPropertyRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyRequest
|
||||
*/
|
||||
propertyAmount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {PropertyTypeRequest}
|
||||
* @memberof PatchedPropertyRequest
|
||||
*/
|
||||
propertyType?: PropertyTypeRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedPropertyRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedPropertyRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedPropertyRequestFromJSON(json: any): PatchedPropertyRequest {
|
||||
return PatchedPropertyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedPropertyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPropertyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'propertyAmount': json['property_amount'] == null ? undefined : json['property_amount'],
|
||||
'propertyType': json['property_type'] == null ? undefined : PropertyTypeRequestFromJSON(json['property_type']),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedPropertyRequestToJSON(value?: PatchedPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'property_amount': value['propertyAmount'],
|
||||
'property_type': PropertyTypeRequestToJSON(value['propertyType']),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 { mapValues } from '../runtime';
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedPropertyTypeRequest
|
||||
*/
|
||||
export interface PatchedPropertyTypeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
unit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedPropertyTypeRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedPropertyTypeRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedPropertyTypeRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedPropertyTypeRequestFromJSON(json: any): PatchedPropertyTypeRequest {
|
||||
return PatchedPropertyTypeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedPropertyTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedPropertyTypeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'unit': json['unit'] == null ? undefined : json['unit'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedPropertyTypeRequestToJSON(value?: PatchedPropertyTypeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'unit': value['unit'],
|
||||
'description': value['description'],
|
||||
'order': value['order'],
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
'fdc_id': value['fdcId'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedRecipeBookEntryRequest
|
||||
*/
|
||||
export interface PatchedRecipeBookEntryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookEntryRequest
|
||||
*/
|
||||
book?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookEntryRequest
|
||||
*/
|
||||
recipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookEntryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedRecipeBookEntryRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedRecipeBookEntryRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookEntryRequestFromJSON(json: any): PatchedRecipeBookEntryRequest {
|
||||
return PatchedRecipeBookEntryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBookEntryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'book': json['book'] == null ? undefined : json['book'],
|
||||
'recipe': json['recipe'] == null ? undefined : json['recipe'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookEntryRequestToJSON(value?: PatchedRecipeBookEntryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'book': value['book'],
|
||||
'recipe': value['recipe'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 { mapValues } from '../runtime';
|
||||
import type { CustomFilterRequest } from './CustomFilterRequest';
|
||||
import {
|
||||
CustomFilterRequestFromJSON,
|
||||
CustomFilterRequestFromJSONTyped,
|
||||
CustomFilterRequestToJSON,
|
||||
} from './CustomFilterRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedRecipeBookRequest
|
||||
*/
|
||||
export interface PatchedRecipeBookRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {CustomFilterRequest}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
filter?: CustomFilterRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeBookRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedRecipeBookRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedRecipeBookRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookRequestFromJSON(json: any): PatchedRecipeBookRequest {
|
||||
return PatchedRecipeBookRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeBookRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'filter': json['filter'] == null ? undefined : CustomFilterRequestFromJSON(json['filter']),
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookRequestToJSON(value?: PatchedRecipeBookRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'filter': CustomFilterRequestToJSON(value['filter']),
|
||||
'order': value['order'],
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { KeywordRequest } from './KeywordRequest';
|
||||
import {
|
||||
KeywordRequestFromJSON,
|
||||
KeywordRequestFromJSONTyped,
|
||||
KeywordRequestToJSON,
|
||||
} from './KeywordRequest';
|
||||
import type { NutritionInformationRequest } from './NutritionInformationRequest';
|
||||
import {
|
||||
NutritionInformationRequestFromJSON,
|
||||
NutritionInformationRequestFromJSONTyped,
|
||||
NutritionInformationRequestToJSON,
|
||||
} from './NutritionInformationRequest';
|
||||
import type { PropertyRequest } from './PropertyRequest';
|
||||
import {
|
||||
PropertyRequestFromJSON,
|
||||
PropertyRequestFromJSONTyped,
|
||||
PropertyRequestToJSON,
|
||||
} from './PropertyRequest';
|
||||
import type { StepRequest } from './StepRequest';
|
||||
import {
|
||||
StepRequestFromJSON,
|
||||
StepRequestFromJSONTyped,
|
||||
StepRequestToJSON,
|
||||
} from './StepRequest';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedRecipeRequest
|
||||
*/
|
||||
export interface PatchedRecipeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<KeywordRequest>}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
keywords?: Array<KeywordRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<StepRequest>}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
steps?: Array<StepRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
workingTime?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
waitingTime?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
sourceUrl?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
internal?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
showIngredientOverview?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {NutritionInformationRequest}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
nutrition?: NutritionInformationRequest;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PropertyRequest>}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
properties?: Array<PropertyRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
filePath?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
servingsText?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
_private?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
shared?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedRecipeRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedRecipeRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedRecipeRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedRecipeRequestFromJSON(json: any): PatchedRecipeRequest {
|
||||
return PatchedRecipeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedRecipeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedRecipeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'keywords': json['keywords'] == null ? undefined : ((json['keywords'] as Array<any>).map(KeywordRequestFromJSON)),
|
||||
'steps': json['steps'] == null ? undefined : ((json['steps'] as Array<any>).map(StepRequestFromJSON)),
|
||||
'workingTime': json['working_time'] == null ? undefined : json['working_time'],
|
||||
'waitingTime': json['waiting_time'] == null ? undefined : json['waiting_time'],
|
||||
'sourceUrl': json['source_url'] == null ? undefined : json['source_url'],
|
||||
'internal': json['internal'] == null ? undefined : json['internal'],
|
||||
'showIngredientOverview': json['show_ingredient_overview'] == null ? undefined : json['show_ingredient_overview'],
|
||||
'nutrition': json['nutrition'] == null ? undefined : NutritionInformationRequestFromJSON(json['nutrition']),
|
||||
'properties': json['properties'] == null ? undefined : ((json['properties'] as Array<any>).map(PropertyRequestFromJSON)),
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'filePath': json['file_path'] == null ? undefined : json['file_path'],
|
||||
'servingsText': json['servings_text'] == null ? undefined : json['servings_text'],
|
||||
'_private': json['private'] == null ? undefined : json['private'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedRecipeRequestToJSON(value?: PatchedRecipeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'keywords': value['keywords'] == null ? undefined : ((value['keywords'] as Array<any>).map(KeywordRequestToJSON)),
|
||||
'steps': value['steps'] == null ? undefined : ((value['steps'] as Array<any>).map(StepRequestToJSON)),
|
||||
'working_time': value['workingTime'],
|
||||
'waiting_time': value['waitingTime'],
|
||||
'source_url': value['sourceUrl'],
|
||||
'internal': value['internal'],
|
||||
'show_ingredient_overview': value['showIngredientOverview'],
|
||||
'nutrition': NutritionInformationRequestToJSON(value['nutrition']),
|
||||
'properties': value['properties'] == null ? undefined : ((value['properties'] as Array<any>).map(PropertyRequestToJSON)),
|
||||
'servings': value['servings'],
|
||||
'file_path': value['filePath'],
|
||||
'servings_text': value['servingsText'],
|
||||
'private': value['_private'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 { mapValues } from '../runtime';
|
||||
import type { FoodRequest } from './FoodRequest';
|
||||
import {
|
||||
FoodRequestFromJSON,
|
||||
FoodRequestFromJSONTyped,
|
||||
FoodRequestToJSON,
|
||||
} from './FoodRequest';
|
||||
import type { UnitRequest } from './UnitRequest';
|
||||
import {
|
||||
UnitRequestFromJSON,
|
||||
UnitRequestFromJSONTyped,
|
||||
UnitRequestToJSON,
|
||||
} from './UnitRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedShoppingListEntryRequest
|
||||
*/
|
||||
export interface PatchedShoppingListEntryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
listRecipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
food?: FoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
unit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
amount?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
checked?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
completedAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
delayUntil?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedShoppingListEntryRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedShoppingListEntryRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedShoppingListEntryRequestFromJSON(json: any): PatchedShoppingListEntryRequest {
|
||||
return PatchedShoppingListEntryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedShoppingListEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedShoppingListEntryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'],
|
||||
'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']),
|
||||
'unit': json['unit'] == null ? undefined : UnitRequestFromJSON(json['unit']),
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'checked': json['checked'] == null ? undefined : json['checked'],
|
||||
'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
|
||||
'delayUntil': json['delay_until'] == null ? undefined : (new Date(json['delay_until'])),
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedShoppingListEntryRequestToJSON(value?: PatchedShoppingListEntryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'list_recipe': value['listRecipe'],
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'unit': UnitRequestToJSON(value['unit']),
|
||||
'amount': value['amount'],
|
||||
'order': value['order'],
|
||||
'checked': value['checked'],
|
||||
'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()),
|
||||
'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user