mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
posprocessing hook for DRF
This commit is contained in:
@@ -24,7 +24,7 @@ export interface AccessToken {
|
||||
* @type {number}
|
||||
* @memberof AccessToken
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -61,7 +61,6 @@ export interface AccessToken {
|
||||
* Check if a given object implements the AccessToken interface.
|
||||
*/
|
||||
export function instanceOfAccessToken(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('token' in value)) return false;
|
||||
if (!('expires' in value)) return false;
|
||||
if (!('created' in value)) return false;
|
||||
@@ -79,7 +78,7 @@ export function AccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'token': json['token'],
|
||||
'expires': (new Date(json['expires'])),
|
||||
'scope': json['scope'] == null ? undefined : json['scope'],
|
||||
@@ -94,6 +93,7 @@ export function AccessTokenToJSON(value?: AccessToken | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'expires': ((value['expires']).toISOString()),
|
||||
'scope': value['scope'],
|
||||
};
|
||||
|
||||
69
vue3/src/openapi/models/AccessTokenRequest.ts
Normal file
69
vue3/src/openapi/models/AccessTokenRequest.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AccessTokenRequestToJSON(value?: AccessTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': ((value['expires']).toISOString()),
|
||||
'scope': value['scope'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,18 +19,6 @@ import { mapValues } from '../runtime';
|
||||
* @interface AuthToken
|
||||
*/
|
||||
export interface AuthToken {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthToken
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AuthToken
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -43,8 +31,6 @@ export interface AuthToken {
|
||||
* Check if a given object implements the AuthToken interface.
|
||||
*/
|
||||
export function instanceOfAuthToken(value: object): boolean {
|
||||
if (!('username' in value)) return false;
|
||||
if (!('password' in value)) return false;
|
||||
if (!('token' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -59,8 +45,6 @@ export function AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
||||
}
|
||||
return {
|
||||
|
||||
'username': json['username'],
|
||||
'password': json['password'],
|
||||
'token': json['token'],
|
||||
};
|
||||
}
|
||||
@@ -71,8 +55,6 @@ export function AuthTokenToJSON(value?: AuthToken | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'username': value['username'],
|
||||
'password': value['password'],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
70
vue3/src/openapi/models/AuthTokenRequest.ts
Normal file
70
vue3/src/openapi/models/AuthTokenRequest.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface Automation {
|
||||
* @type {number}
|
||||
* @memberof Automation
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {AutomationTypeEnum}
|
||||
@@ -92,7 +92,6 @@ export interface Automation {
|
||||
* Check if a given object implements the Automation interface.
|
||||
*/
|
||||
export function instanceOfAutomation(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('type' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
return true;
|
||||
@@ -108,7 +107,7 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'type': AutomationTypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
@@ -127,6 +126,7 @@ export function AutomationToJSON(value?: Automation | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'type': AutomationTypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
|
||||
124
vue3/src/openapi/models/AutomationRequest.ts
Normal file
124
vue3/src/openapi/models/AutomationRequest.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 { AutomationTypeEnum } from './AutomationTypeEnum';
|
||||
import {
|
||||
AutomationTypeEnumFromJSON,
|
||||
AutomationTypeEnumFromJSONTyped,
|
||||
AutomationTypeEnumToJSON,
|
||||
} from './AutomationTypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AutomationRequest
|
||||
*/
|
||||
export interface AutomationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {AutomationTypeEnum}
|
||||
* @memberof AutomationRequest
|
||||
*/
|
||||
type: AutomationTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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': AutomationTypeEnumFromJSON(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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function AutomationRequestToJSON(value?: AutomationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': AutomationTypeEnumToJSON(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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface BookmarkletImport {
|
||||
* @type {number}
|
||||
* @memberof BookmarkletImport
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -55,7 +55,6 @@ export interface BookmarkletImport {
|
||||
* Check if a given object implements the BookmarkletImport interface.
|
||||
*/
|
||||
export function instanceOfBookmarkletImport(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('html' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
if (!('createdAt' in value)) return false;
|
||||
@@ -72,7 +71,7 @@ export function BookmarkletImportFromJSONTyped(json: any, ignoreDiscriminator: b
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'html': json['html'],
|
||||
'createdBy': json['created_by'],
|
||||
@@ -86,6 +85,7 @@ export function BookmarkletImportToJSON(value?: BookmarkletImport | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'url': value['url'],
|
||||
'html': value['html'],
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface BookmarkletImportList {
|
||||
* @type {number}
|
||||
* @memberof BookmarkletImportList
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -49,7 +49,6 @@ export interface BookmarkletImportList {
|
||||
* Check if a given object implements the BookmarkletImportList interface.
|
||||
*/
|
||||
export function instanceOfBookmarkletImportList(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
if (!('createdAt' in value)) return false;
|
||||
return true;
|
||||
@@ -65,7 +64,7 @@ export function BookmarkletImportListFromJSONTyped(json: any, ignoreDiscriminato
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'url': json['url'] == null ? undefined : json['url'],
|
||||
'createdBy': json['created_by'],
|
||||
'createdAt': (new Date(json['created_at'])),
|
||||
@@ -78,6 +77,7 @@ export function BookmarkletImportListToJSON(value?: BookmarkletImportList | null
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'url': value['url'],
|
||||
};
|
||||
}
|
||||
|
||||
69
vue3/src/openapi/models/BookmarkletImportRequest.ts
Normal file
69
vue3/src/openapi/models/BookmarkletImportRequest.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function BookmarkletImportRequestToJSON(value?: BookmarkletImportRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value['url'],
|
||||
'html': value['html'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface ConnectorConfigConfig {
|
||||
* @type {number}
|
||||
* @memberof ConnectorConfigConfig
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -37,12 +37,6 @@ export interface ConnectorConfigConfig {
|
||||
* @memberof ConnectorConfigConfig
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConnectorConfigConfig
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -85,7 +79,6 @@ export interface ConnectorConfigConfig {
|
||||
* Check if a given object implements the ConnectorConfigConfig interface.
|
||||
*/
|
||||
export function instanceOfConnectorConfigConfig(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
return true;
|
||||
@@ -101,10 +94,9 @@ export function ConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscriminato
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'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'],
|
||||
@@ -120,9 +112,9 @@ export function ConnectorConfigConfigToJSON(value?: ConnectorConfigConfig | null
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'url': value['url'],
|
||||
'token': value['token'],
|
||||
'todo_entity': value['todoEntity'],
|
||||
'enabled': value['enabled'],
|
||||
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
|
||||
|
||||
117
vue3/src/openapi/models/ConnectorConfigConfigRequest.ts
Normal file
117
vue3/src/openapi/models/ConnectorConfigConfigRequest.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface CookLog {
|
||||
* @type {number}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
@@ -80,7 +80,6 @@ export interface CookLog {
|
||||
* Check if a given object implements the CookLog interface.
|
||||
*/
|
||||
export function instanceOfCookLog(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('recipe' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
if (!('updatedAt' in value)) return false;
|
||||
@@ -97,7 +96,7 @@ export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'recipe': json['recipe'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'rating': json['rating'] == null ? undefined : json['rating'],
|
||||
@@ -114,6 +113,7 @@ export function CookLogToJSON(value?: CookLog | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'recipe': value['recipe'],
|
||||
'servings': value['servings'],
|
||||
'rating': value['rating'],
|
||||
|
||||
93
vue3/src/openapi/models/CookLogRequest.ts
Normal file
93
vue3/src/openapi/models/CookLogRequest.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'])),
|
||||
};
|
||||
}
|
||||
|
||||
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()),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface CustomFilter {
|
||||
* @type {number}
|
||||
* @memberof CustomFilter
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -62,7 +62,6 @@ export interface CustomFilter {
|
||||
* Check if a given object implements the CustomFilter interface.
|
||||
*/
|
||||
export function instanceOfCustomFilter(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('search' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
@@ -79,7 +78,7 @@ export function CustomFilterFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'search': json['search'],
|
||||
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
|
||||
@@ -93,6 +92,7 @@ export function CustomFilterToJSON(value?: CustomFilter | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'search': value['search'],
|
||||
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),
|
||||
|
||||
85
vue3/src/openapi/models/CustomFilterRequest.ts
Normal file
85
vue3/src/openapi/models/CustomFilterRequest.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)),
|
||||
};
|
||||
}
|
||||
|
||||
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)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface ExportLog {
|
||||
* @type {number}
|
||||
* @memberof ExportLog
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -85,7 +85,6 @@ export interface ExportLog {
|
||||
* Check if a given object implements the ExportLog interface.
|
||||
*/
|
||||
export function instanceOfExportLog(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('type' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
if (!('createdAt' in value)) return false;
|
||||
@@ -102,7 +101,7 @@ export function ExportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'type': json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
@@ -121,6 +120,7 @@ export function ExportLogToJSON(value?: ExportLog | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
|
||||
109
vue3/src/openapi/models/ExportLogRequest.ts
Normal file
109
vue3/src/openapi/models/ExportLogRequest.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ export interface Food {
|
||||
* @type {number}
|
||||
* @memberof Food
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -240,7 +240,6 @@ export interface Food {
|
||||
* Check if a given object implements the Food interface.
|
||||
*/
|
||||
export function instanceOfFood(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('shopping' in value)) return false;
|
||||
if (!('parent' in value)) return false;
|
||||
@@ -260,7 +259,7 @@ export function FoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): Food
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
@@ -293,6 +292,7 @@ export function FoodToJSON(value?: Food | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
|
||||
@@ -58,7 +58,7 @@ export interface FoodInheritField {
|
||||
* @type {number}
|
||||
* @memberof FoodInheritField
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -77,7 +77,6 @@ export interface FoodInheritField {
|
||||
* Check if a given object implements the FoodInheritField interface.
|
||||
*/
|
||||
export function instanceOfFoodInheritField(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -91,7 +90,7 @@ export function FoodInheritFieldFromJSONTyped(json: any, ignoreDiscriminator: bo
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'field': json['field'] == null ? undefined : json['field'],
|
||||
};
|
||||
@@ -103,6 +102,7 @@ export function FoodInheritFieldToJSON(value?: FoodInheritField | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'field': value['field'],
|
||||
};
|
||||
|
||||
102
vue3/src/openapi/models/FoodInheritFieldRequest.ts
Normal file
102
vue3/src/openapi/models/FoodInheritFieldRequest.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodInheritFieldRequestToJSON(value?: FoodInheritFieldRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'field': value['field'],
|
||||
};
|
||||
}
|
||||
|
||||
268
vue3/src/openapi/models/FoodRequest.ts
Normal file
268
vue3/src/openapi/models/FoodRequest.ts
Normal file
@@ -0,0 +1,268 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FoodRequest
|
||||
*/
|
||||
foodOnhand?: string;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,13 +13,6 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { DeleteEnum } from './DeleteEnum';
|
||||
import {
|
||||
DeleteEnumFromJSON,
|
||||
DeleteEnumFromJSONTyped,
|
||||
DeleteEnumToJSON,
|
||||
} from './DeleteEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@@ -31,35 +24,13 @@ export interface FoodShoppingUpdate {
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdate
|
||||
*/
|
||||
readonly id: number;
|
||||
/**
|
||||
* Amount of food to add to the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdate
|
||||
*/
|
||||
amount?: number;
|
||||
/**
|
||||
* ID of unit to use for the shopping list
|
||||
* @type {number}
|
||||
* @memberof FoodShoppingUpdate
|
||||
*/
|
||||
unit?: number;
|
||||
/**
|
||||
* When set to true will delete all food from active shopping lists.
|
||||
*
|
||||
* * `true` - true
|
||||
* @type {DeleteEnum}
|
||||
* @memberof FoodShoppingUpdate
|
||||
*/
|
||||
_delete: DeleteEnum | null;
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FoodShoppingUpdate interface.
|
||||
*/
|
||||
export function instanceOfFoodShoppingUpdate(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('_delete' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -73,10 +44,7 @@ export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator:
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -86,9 +54,7 @@ export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': value['amount'],
|
||||
'unit': value['unit'],
|
||||
'delete': DeleteEnumToJSON(value['_delete']),
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
86
vue3/src/openapi/models/FoodShoppingUpdateRequest.ts
Normal file
86
vue3/src/openapi/models/FoodShoppingUpdateRequest.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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']),
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodShoppingUpdateRequestToJSON(value?: FoodShoppingUpdateRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'amount': value['amount'],
|
||||
'unit': value['unit'],
|
||||
'delete': DeleteEnumToJSON(value['_delete']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface FoodSimple {
|
||||
* @type {number}
|
||||
* @memberof FoodSimple
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -43,7 +43,6 @@ export interface FoodSimple {
|
||||
* Check if a given object implements the FoodSimple interface.
|
||||
*/
|
||||
export function instanceOfFoodSimple(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -58,7 +57,7 @@ export function FoodSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
};
|
||||
@@ -70,6 +69,7 @@ export function FoodSimpleToJSON(value?: FoodSimple | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
};
|
||||
|
||||
69
vue3/src/openapi/models/FoodSimpleRequest.ts
Normal file
69
vue3/src/openapi/models/FoodSimpleRequest.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FoodSimpleRequestToJSON(value?: FoodSimpleRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export interface Group {
|
||||
* @type {number}
|
||||
* @memberof Group
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -71,7 +71,6 @@ export interface Group {
|
||||
* Check if a given object implements the Group interface.
|
||||
*/
|
||||
export function instanceOfGroup(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -86,7 +85,7 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
};
|
||||
}
|
||||
@@ -97,6 +96,7 @@ export function GroupToJSON(value?: Group | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
};
|
||||
}
|
||||
|
||||
95
vue3/src/openapi/models/GroupRequest.ts
Normal file
95
vue3/src/openapi/models/GroupRequest.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function GroupRequestToJSON(value?: GroupRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface ImportLog {
|
||||
* @type {number}
|
||||
* @memberof ImportLog
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -86,7 +86,6 @@ export interface ImportLog {
|
||||
* Check if a given object implements the ImportLog interface.
|
||||
*/
|
||||
export function instanceOfImportLog(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('type' in value)) return false;
|
||||
if (!('keyword' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
@@ -104,7 +103,7 @@ export function ImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'type': json['type'],
|
||||
'msg': json['msg'] == null ? undefined : json['msg'],
|
||||
'running': json['running'] == null ? undefined : json['running'],
|
||||
@@ -122,6 +121,7 @@ export function ImportLogToJSON(value?: ImportLog | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'type': value['type'],
|
||||
'msg': value['msg'],
|
||||
'running': value['running'],
|
||||
|
||||
93
vue3/src/openapi/models/ImportLogRequest.ts
Normal file
93
vue3/src/openapi/models/ImportLogRequest.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface Ingredient {
|
||||
* @type {number}
|
||||
* @memberof Ingredient
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Food}
|
||||
@@ -116,7 +116,6 @@ export interface Ingredient {
|
||||
* Check if a given object implements the Ingredient interface.
|
||||
*/
|
||||
export function instanceOfIngredient(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('food' in value)) return false;
|
||||
if (!('unit' in value)) return false;
|
||||
if (!('amount' in value)) return false;
|
||||
@@ -135,7 +134,7 @@ export function IngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'food': FoodFromJSON(json['food']),
|
||||
'unit': UnitFromJSON(json['unit']),
|
||||
'amount': json['amount'],
|
||||
@@ -157,6 +156,7 @@ export function IngredientToJSON(value?: Ingredient | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'food': FoodToJSON(value['food']),
|
||||
'unit': UnitToJSON(value['unit']),
|
||||
'amount': value['amount'],
|
||||
|
||||
148
vue3/src/openapi/models/IngredientRequest.ts
Normal file
148
vue3/src/openapi/models/IngredientRequest.ts
Normal file
@@ -0,0 +1,148 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof IngredientRequest
|
||||
*/
|
||||
amount: string;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface InviteLink {
|
||||
* @type {number}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -92,7 +92,6 @@ export interface InviteLink {
|
||||
* Check if a given object implements the InviteLink interface.
|
||||
*/
|
||||
export function instanceOfInviteLink(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('uuid' in value)) return false;
|
||||
if (!('group' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
@@ -110,7 +109,7 @@ export function InviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'uuid': json['uuid'],
|
||||
'email': json['email'] == null ? undefined : json['email'],
|
||||
'group': GroupFromJSON(json['group']),
|
||||
@@ -129,6 +128,7 @@ export function InviteLinkToJSON(value?: InviteLink | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'email': value['email'],
|
||||
'group': GroupToJSON(value['group']),
|
||||
'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)),
|
||||
|
||||
108
vue3/src/openapi/models/InviteLinkRequest.ts
Normal file
108
vue3/src/openapi/models/InviteLinkRequest.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export interface Keyword {
|
||||
* @type {number}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -113,7 +113,6 @@ export interface Keyword {
|
||||
* Check if a given object implements the Keyword interface.
|
||||
*/
|
||||
export function instanceOfKeyword(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('label' in value)) return false;
|
||||
if (!('parent' in value)) return false;
|
||||
@@ -134,7 +133,7 @@ export function KeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): K
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'label': json['label'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
@@ -152,6 +151,7 @@ export function KeywordToJSON(value?: Keyword | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface KeywordLabel {
|
||||
* @type {number}
|
||||
* @memberof KeywordLabel
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -37,7 +37,6 @@ export interface KeywordLabel {
|
||||
* Check if a given object implements the KeywordLabel interface.
|
||||
*/
|
||||
export function instanceOfKeywordLabel(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('label' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -52,7 +51,7 @@ export function KeywordLabelFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'label': json['label'],
|
||||
};
|
||||
}
|
||||
@@ -63,6 +62,7 @@ export function KeywordLabelToJSON(value?: KeywordLabel | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
103
vue3/src/openapi/models/KeywordRequest.ts
Normal file
103
vue3/src/openapi/models/KeywordRequest.ts
Normal file
@@ -0,0 +1,103 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function KeywordRequestToJSON(value?: KeywordRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export interface MealPlan {
|
||||
* @type {number}
|
||||
* @memberof MealPlan
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -128,7 +128,6 @@ export interface MealPlan {
|
||||
* Check if a given object implements the MealPlan interface.
|
||||
*/
|
||||
export function instanceOfMealPlan(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('servings' in value)) return false;
|
||||
if (!('noteMarkdown' in value)) return false;
|
||||
if (!('fromDate' in value)) return false;
|
||||
@@ -150,7 +149,7 @@ export function MealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'title': json['title'] == null ? undefined : json['title'],
|
||||
'recipe': json['recipe'] == null ? undefined : RecipeOverviewFromJSON(json['recipe']),
|
||||
'servings': json['servings'],
|
||||
@@ -173,6 +172,7 @@ export function MealPlanToJSON(value?: MealPlan | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'title': value['title'],
|
||||
'recipe': RecipeOverviewToJSON(value['recipe']),
|
||||
'servings': value['servings'],
|
||||
|
||||
138
vue3/src/openapi/models/MealPlanRequest.ts
Normal file
138
vue3/src/openapi/models/MealPlanRequest.ts
Normal file
@@ -0,0 +1,138 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof MealPlanRequest
|
||||
*/
|
||||
servings: string;
|
||||
/**
|
||||
*
|
||||
* @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>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)),
|
||||
};
|
||||
}
|
||||
|
||||
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)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface MealType {
|
||||
* @type {number}
|
||||
* @memberof MealType
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -61,7 +61,6 @@ export interface MealType {
|
||||
* Check if a given object implements the MealType interface.
|
||||
*/
|
||||
export function instanceOfMealType(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
return true;
|
||||
@@ -77,7 +76,7 @@ export function MealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'color': json['color'] == null ? undefined : json['color'],
|
||||
@@ -92,6 +91,7 @@ export function MealTypeToJSON(value?: MealType | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'order': value['order'],
|
||||
'color': value['color'],
|
||||
|
||||
85
vue3/src/openapi/models/MealTypeRequest.ts
Normal file
85
vue3/src/openapi/models/MealTypeRequest.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface NutritionInformation {
|
||||
* @type {number}
|
||||
* @memberof NutritionInformation
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -61,7 +61,6 @@ export interface NutritionInformation {
|
||||
* Check if a given object implements the NutritionInformation interface.
|
||||
*/
|
||||
export function instanceOfNutritionInformation(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('carbohydrates' in value)) return false;
|
||||
if (!('fats' in value)) return false;
|
||||
if (!('proteins' in value)) return false;
|
||||
@@ -79,7 +78,7 @@ export function NutritionInformationFromJSONTyped(json: any, ignoreDiscriminator
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'carbohydrates': json['carbohydrates'],
|
||||
'fats': json['fats'],
|
||||
'proteins': json['proteins'],
|
||||
@@ -94,6 +93,7 @@ export function NutritionInformationToJSON(value?: NutritionInformation | null):
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'carbohydrates': value['carbohydrates'],
|
||||
'fats': value['fats'],
|
||||
'proteins': value['proteins'],
|
||||
|
||||
96
vue3/src/openapi/models/NutritionInformationRequest.ts
Normal file
96
vue3/src/openapi/models/NutritionInformationRequest.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
carbohydrates: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
fats: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
proteins: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
calories: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NutritionInformationRequest
|
||||
*/
|
||||
source?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export interface OpenDataCategory {
|
||||
* @type {number}
|
||||
* @memberof OpenDataCategory
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersion}
|
||||
@@ -108,7 +108,6 @@ export interface OpenDataCategory {
|
||||
* Check if a given object implements the OpenDataCategory interface.
|
||||
*/
|
||||
export function instanceOfOpenDataCategory(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
@@ -126,7 +125,7 @@ export function OpenDataCategoryFromJSONTyped(json: any, ignoreDiscriminator: bo
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'version': OpenDataVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
@@ -142,6 +141,7 @@ export function OpenDataCategoryToJSON(value?: OpenDataCategory | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'version': OpenDataVersionToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
|
||||
136
vue3/src/openapi/models/OpenDataCategoryRequest.ts
Normal file
136
vue3/src/openapi/models/OpenDataCategoryRequest.ts
Normal file
@@ -0,0 +1,136 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export interface OpenDataConversion {
|
||||
* @type {number}
|
||||
* @memberof OpenDataConversion
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersion}
|
||||
@@ -110,7 +110,6 @@ export interface OpenDataConversion {
|
||||
* Check if a given object implements the OpenDataConversion interface.
|
||||
*/
|
||||
export function instanceOfOpenDataConversion(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('food' in value)) return false;
|
||||
@@ -133,7 +132,7 @@ export function OpenDataConversionFromJSONTyped(json: any, ignoreDiscriminator:
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'version': OpenDataVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'food': OpenDataFoodFromJSON(json['food']),
|
||||
@@ -153,6 +152,7 @@ export function OpenDataConversionToJSON(value?: OpenDataConversion | null): any
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'version': OpenDataVersionToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'food': OpenDataFoodToJSON(value['food']),
|
||||
|
||||
151
vue3/src/openapi/models/OpenDataConversionRequest.ts
Normal file
151
vue3/src/openapi/models/OpenDataConversionRequest.ts
Normal file
@@ -0,0 +1,151 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export interface OpenDataFood {
|
||||
* @type {number}
|
||||
* @memberof OpenDataFood
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersion}
|
||||
@@ -186,7 +186,6 @@ export interface OpenDataFood {
|
||||
* Check if a given object implements the OpenDataFood interface.
|
||||
*/
|
||||
export function instanceOfOpenDataFood(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
@@ -209,7 +208,7 @@ export function OpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'version': OpenDataVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
@@ -235,6 +234,7 @@ export function OpenDataFoodToJSON(value?: OpenDataFood | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'version': OpenDataVersionToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface OpenDataFoodProperty {
|
||||
* @type {number}
|
||||
* @memberof OpenDataFoodProperty
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataProperty}
|
||||
@@ -50,7 +50,6 @@ export interface OpenDataFoodProperty {
|
||||
* Check if a given object implements the OpenDataFoodProperty interface.
|
||||
*/
|
||||
export function instanceOfOpenDataFoodProperty(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('property' in value)) return false;
|
||||
if (!('propertyAmount' in value)) return false;
|
||||
return true;
|
||||
@@ -66,7 +65,7 @@ export function OpenDataFoodPropertyFromJSONTyped(json: any, ignoreDiscriminator
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'property': OpenDataPropertyFromJSON(json['property']),
|
||||
'propertyAmount': json['property_amount'],
|
||||
};
|
||||
@@ -78,6 +77,7 @@ export function OpenDataFoodPropertyToJSON(value?: OpenDataFoodProperty | null):
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'property': OpenDataPropertyToJSON(value['property']),
|
||||
'property_amount': value['propertyAmount'],
|
||||
};
|
||||
|
||||
77
vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts
Normal file
77
vue3/src/openapi/models/OpenDataFoodPropertyRequest.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataFoodPropertyRequestToJSON(value?: OpenDataFoodPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'property': OpenDataPropertyRequestToJSON(value['property']),
|
||||
'property_amount': value['propertyAmount'],
|
||||
};
|
||||
}
|
||||
|
||||
239
vue3/src/openapi/models/OpenDataFoodRequest.ts
Normal file
239
vue3/src/openapi/models/OpenDataFoodRequest.ts
Normal file
@@ -0,0 +1,239 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export interface OpenDataProperty {
|
||||
* @type {number}
|
||||
* @memberof OpenDataProperty
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersion}
|
||||
@@ -114,7 +114,6 @@ export interface OpenDataProperty {
|
||||
* Check if a given object implements the OpenDataProperty interface.
|
||||
*/
|
||||
export function instanceOfOpenDataProperty(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
@@ -132,7 +131,7 @@ export function OpenDataPropertyFromJSONTyped(json: any, ignoreDiscriminator: bo
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'version': OpenDataVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
@@ -149,6 +148,7 @@ export function OpenDataPropertyToJSON(value?: OpenDataProperty | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'version': OpenDataVersionToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
|
||||
144
vue3/src/openapi/models/OpenDataPropertyRequest.ts
Normal file
144
vue3/src/openapi/models/OpenDataPropertyRequest.ts
Normal file
@@ -0,0 +1,144 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface OpenDataStore {
|
||||
* @type {number}
|
||||
* @memberof OpenDataStore
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersion}
|
||||
@@ -80,7 +80,6 @@ export interface OpenDataStore {
|
||||
* Check if a given object implements the OpenDataStore interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStore(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
@@ -99,7 +98,7 @@ export function OpenDataStoreFromJSONTyped(json: any, ignoreDiscriminator: boole
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'version': OpenDataVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
@@ -115,6 +114,7 @@ export function OpenDataStoreToJSON(value?: OpenDataStore | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'version': OpenDataVersionToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface OpenDataStoreCategory {
|
||||
* @type {number}
|
||||
* @memberof OpenDataStoreCategory
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataCategory}
|
||||
@@ -56,7 +56,6 @@ export interface OpenDataStoreCategory {
|
||||
* Check if a given object implements the OpenDataStoreCategory interface.
|
||||
*/
|
||||
export function instanceOfOpenDataStoreCategory(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('category' in value)) return false;
|
||||
if (!('store' in value)) return false;
|
||||
return true;
|
||||
@@ -72,7 +71,7 @@ export function OpenDataStoreCategoryFromJSONTyped(json: any, ignoreDiscriminato
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'category': OpenDataCategoryFromJSON(json['category']),
|
||||
'store': json['store'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
@@ -85,6 +84,7 @@ export function OpenDataStoreCategoryToJSON(value?: OpenDataStoreCategory | null
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'category': OpenDataCategoryToJSON(value['category']),
|
||||
'store': value['store'],
|
||||
'order': value['order'],
|
||||
|
||||
85
vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts
Normal file
85
vue3/src/openapi/models/OpenDataStoreCategoryRequest.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataStoreCategoryRequestToJSON(value?: OpenDataStoreCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': OpenDataCategoryRequestToJSON(value['category']),
|
||||
'store': value['store'],
|
||||
'order': value['order'],
|
||||
};
|
||||
}
|
||||
|
||||
109
vue3/src/openapi/models/OpenDataStoreRequest.ts
Normal file
109
vue3/src/openapi/models/OpenDataStoreRequest.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export interface OpenDataUnit {
|
||||
* @type {number}
|
||||
* @memberof OpenDataUnit
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {OpenDataVersion}
|
||||
@@ -132,7 +132,6 @@ export interface OpenDataUnit {
|
||||
* Check if a given object implements the OpenDataUnit interface.
|
||||
*/
|
||||
export function instanceOfOpenDataUnit(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('version' in value)) return false;
|
||||
if (!('slug' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
@@ -151,7 +150,7 @@ export function OpenDataUnitFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'version': OpenDataVersionFromJSON(json['version']),
|
||||
'slug': json['slug'],
|
||||
'name': json['name'],
|
||||
@@ -169,6 +168,7 @@ export function OpenDataUnitToJSON(value?: OpenDataUnit | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'version': OpenDataVersionToJSON(value['version']),
|
||||
'slug': value['slug'],
|
||||
'name': value['name'],
|
||||
|
||||
165
vue3/src/openapi/models/OpenDataUnitRequest.ts
Normal file
165
vue3/src/openapi/models/OpenDataUnitRequest.ts
Normal file
@@ -0,0 +1,165 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export interface OpenDataVersion {
|
||||
* @type {number}
|
||||
* @memberof OpenDataVersion
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -83,7 +83,6 @@ export interface OpenDataVersion {
|
||||
* Check if a given object implements the OpenDataVersion interface.
|
||||
*/
|
||||
export function instanceOfOpenDataVersion(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('code' in value)) return false;
|
||||
return true;
|
||||
@@ -99,7 +98,7 @@ export function OpenDataVersionFromJSONTyped(json: any, ignoreDiscriminator: boo
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'code': json['code'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
@@ -112,6 +111,7 @@ export function OpenDataVersionToJSON(value?: OpenDataVersion | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'code': value['code'],
|
||||
'comment': value['comment'],
|
||||
|
||||
112
vue3/src/openapi/models/OpenDataVersionRequest.ts
Normal file
112
vue3/src/openapi/models/OpenDataVersionRequest.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OpenDataVersionRequestToJSON(value?: OpenDataVersionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'code': value['code'],
|
||||
'comment': value['comment'],
|
||||
};
|
||||
}
|
||||
|
||||
68
vue3/src/openapi/models/PatchedAccessTokenRequest.ts
Normal file
68
vue3/src/openapi/models/PatchedAccessTokenRequest.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedAccessTokenRequestToJSON(value?: PatchedAccessTokenRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'expires': value['expires'] == null ? undefined : ((value['expires']).toISOString()),
|
||||
'scope': value['scope'],
|
||||
};
|
||||
}
|
||||
|
||||
123
vue3/src/openapi/models/PatchedAutomationRequest.ts
Normal file
123
vue3/src/openapi/models/PatchedAutomationRequest.ts
Normal file
@@ -0,0 +1,123 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 { AutomationTypeEnum } from './AutomationTypeEnum';
|
||||
import {
|
||||
AutomationTypeEnumFromJSON,
|
||||
AutomationTypeEnumFromJSONTyped,
|
||||
AutomationTypeEnumToJSON,
|
||||
} from './AutomationTypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedAutomationRequest
|
||||
*/
|
||||
export interface PatchedAutomationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {AutomationTypeEnum}
|
||||
* @memberof PatchedAutomationRequest
|
||||
*/
|
||||
type?: AutomationTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 : AutomationTypeEnumFromJSON(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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedAutomationRequestToJSON(value?: PatchedAutomationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'type': AutomationTypeEnumToJSON(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'],
|
||||
};
|
||||
}
|
||||
|
||||
68
vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts
Normal file
68
vue3/src/openapi/models/PatchedBookmarkletImportRequest.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedBookmarkletImportRequestToJSON(value?: PatchedBookmarkletImportRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value['url'],
|
||||
'html': value['html'],
|
||||
};
|
||||
}
|
||||
|
||||
116
vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts
Normal file
116
vue3/src/openapi/models/PatchedConnectorConfigConfigRequest.ts
Normal file
@@ -0,0 +1,116 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
92
vue3/src/openapi/models/PatchedCookLogRequest.ts
Normal file
92
vue3/src/openapi/models/PatchedCookLogRequest.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'])),
|
||||
};
|
||||
}
|
||||
|
||||
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()),
|
||||
};
|
||||
}
|
||||
|
||||
83
vue3/src/openapi/models/PatchedCustomFilterRequest.ts
Normal file
83
vue3/src/openapi/models/PatchedCustomFilterRequest.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)),
|
||||
};
|
||||
}
|
||||
|
||||
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)),
|
||||
};
|
||||
}
|
||||
|
||||
108
vue3/src/openapi/models/PatchedExportLogRequest.ts
Normal file
108
vue3/src/openapi/models/PatchedExportLogRequest.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
267
vue3/src/openapi/models/PatchedFoodRequest.ts
Normal file
267
vue3/src/openapi/models/PatchedFoodRequest.ts
Normal file
@@ -0,0 +1,267 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
propertiesFoodAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
propertiesFoodUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
fdcId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedFoodRequest
|
||||
*/
|
||||
foodOnhand?: string;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
92
vue3/src/openapi/models/PatchedImportLogRequest.ts
Normal file
92
vue3/src/openapi/models/PatchedImportLogRequest.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
145
vue3/src/openapi/models/PatchedIngredientRequest.ts
Normal file
145
vue3/src/openapi/models/PatchedIngredientRequest.ts
Normal file
@@ -0,0 +1,145 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof PatchedIngredientRequest
|
||||
*/
|
||||
amount?: string;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
107
vue3/src/openapi/models/PatchedInviteLinkRequest.ts
Normal file
107
vue3/src/openapi/models/PatchedInviteLinkRequest.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
102
vue3/src/openapi/models/PatchedKeywordRequest.ts
Normal file
102
vue3/src/openapi/models/PatchedKeywordRequest.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedKeywordRequestToJSON(value?: PatchedKeywordRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
};
|
||||
}
|
||||
|
||||
135
vue3/src/openapi/models/PatchedMealPlanRequest.ts
Normal file
135
vue3/src/openapi/models/PatchedMealPlanRequest.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof PatchedMealPlanRequest
|
||||
*/
|
||||
servings?: string;
|
||||
/**
|
||||
*
|
||||
* @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>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)),
|
||||
};
|
||||
}
|
||||
|
||||
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)),
|
||||
};
|
||||
}
|
||||
|
||||
84
vue3/src/openapi/models/PatchedMealTypeRequest.ts
Normal file
84
vue3/src/openapi/models/PatchedMealTypeRequest.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
133
vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts
Normal file
133
vue3/src/openapi/models/PatchedOpenDataCategoryRequest.ts
Normal file
@@ -0,0 +1,133 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
143
vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts
Normal file
143
vue3/src/openapi/models/PatchedOpenDataConversionRequest.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
231
vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts
Normal file
231
vue3/src/openapi/models/PatchedOpenDataFoodRequest.ts
Normal file
@@ -0,0 +1,231 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
141
vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts
Normal file
141
vue3/src/openapi/models/PatchedOpenDataPropertyRequest.ts
Normal file
@@ -0,0 +1,141 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
105
vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts
Normal file
105
vue3/src/openapi/models/PatchedOpenDataStoreRequest.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
161
vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts
Normal file
161
vue3/src/openapi/models/PatchedOpenDataUnitRequest.ts
Normal file
@@ -0,0 +1,161 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
110
vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts
Normal file
110
vue3/src/openapi/models/PatchedOpenDataVersionRequest.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedOpenDataVersionRequestToJSON(value?: PatchedOpenDataVersionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'code': value['code'],
|
||||
'comment': value['comment'],
|
||||
};
|
||||
}
|
||||
|
||||
109
vue3/src/openapi/models/PatchedPropertyRequest.ts
Normal file
109
vue3/src/openapi/models/PatchedPropertyRequest.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof PatchedPropertyRequest
|
||||
*/
|
||||
propertyAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {PropertyTypeRequest}
|
||||
* @memberof PatchedPropertyRequest
|
||||
*/
|
||||
propertyType?: PropertyTypeRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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']),
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedPropertyRequestToJSON(value?: PatchedPropertyRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'property_amount': value['propertyAmount'],
|
||||
'property_type': PropertyTypeRequestToJSON(value['propertyType']),
|
||||
};
|
||||
}
|
||||
|
||||
108
vue3/src/openapi/models/PatchedPropertyTypeRequest.ts
Normal file
108
vue3/src/openapi/models/PatchedPropertyTypeRequest.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
68
vue3/src/openapi/models/PatchedRecipeBookEntryRequest.ts
Normal file
68
vue3/src/openapi/models/PatchedRecipeBookEntryRequest.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedRecipeBookEntryRequestToJSON(value?: PatchedRecipeBookEntryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'book': value['book'],
|
||||
'recipe': value['recipe'],
|
||||
};
|
||||
}
|
||||
|
||||
105
vue3/src/openapi/models/PatchedRecipeBookRequest.ts
Normal file
105
vue3/src/openapi/models/PatchedRecipeBookRequest.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
};
|
||||
}
|
||||
|
||||
211
vue3/src/openapi/models/PatchedRecipeRequest.ts
Normal file
211
vue3/src/openapi/models/PatchedRecipeRequest.ts
Normal file
@@ -0,0 +1,211 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)),
|
||||
};
|
||||
}
|
||||
|
||||
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)),
|
||||
};
|
||||
}
|
||||
|
||||
129
vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts
Normal file
129
vue3/src/openapi/models/PatchedShoppingListEntryRequest.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 {string}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
amount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
checked?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
completedAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedShoppingListEntryRequest
|
||||
*/
|
||||
delayUntil?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'])),
|
||||
};
|
||||
}
|
||||
|
||||
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()),
|
||||
};
|
||||
}
|
||||
|
||||
76
vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts
Normal file
76
vue3/src/openapi/models/PatchedShoppingListRecipeRequest.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
export interface PatchedShoppingListRecipeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
recipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
mealplan?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedShoppingListRecipeRequest
|
||||
*/
|
||||
servings?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedShoppingListRecipeRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedShoppingListRecipeRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedShoppingListRecipeRequestFromJSON(json: any): PatchedShoppingListRecipeRequest {
|
||||
return PatchedShoppingListRecipeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedShoppingListRecipeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedShoppingListRecipeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': json['recipe'] == null ? undefined : json['recipe'],
|
||||
'mealplan': json['mealplan'] == null ? undefined : json['mealplan'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedShoppingListRecipeRequestToJSON(value?: PatchedShoppingListRecipeRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value['recipe'],
|
||||
'mealplan': value['mealplan'],
|
||||
'servings': value['servings'],
|
||||
};
|
||||
}
|
||||
|
||||
205
vue3/src/openapi/models/PatchedSpaceRequest.ts
Normal file
205
vue3/src/openapi/models/PatchedSpaceRequest.ts
Normal file
@@ -0,0 +1,205 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 { SpaceNavTextColorEnum } from './SpaceNavTextColorEnum';
|
||||
import {
|
||||
SpaceNavTextColorEnumFromJSON,
|
||||
SpaceNavTextColorEnumFromJSONTyped,
|
||||
SpaceNavTextColorEnumToJSON,
|
||||
} from './SpaceNavTextColorEnum';
|
||||
import type { SpaceThemeEnum } from './SpaceThemeEnum';
|
||||
import {
|
||||
SpaceThemeEnumFromJSON,
|
||||
SpaceThemeEnumFromJSONTyped,
|
||||
SpaceThemeEnumToJSON,
|
||||
} from './SpaceThemeEnum';
|
||||
import type { UserFileViewRequest } from './UserFileViewRequest';
|
||||
import {
|
||||
UserFileViewRequestFromJSON,
|
||||
UserFileViewRequestFromJSONTyped,
|
||||
UserFileViewRequestToJSON,
|
||||
} from './UserFileViewRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedSpaceRequest
|
||||
*/
|
||||
export interface PatchedSpaceRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FoodInheritFieldRequest>}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
foodInherit?: Array<FoodInheritFieldRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
image?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
navLogo?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {SpaceThemeEnum}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
spaceTheme?: SpaceThemeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
customSpaceTheme?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
navBgColor?: string;
|
||||
/**
|
||||
*
|
||||
* @type {SpaceNavTextColorEnum}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
navTextColor?: SpaceNavTextColorEnum;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor32?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor128?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor144?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor180?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor192?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColor512?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedSpaceRequest
|
||||
*/
|
||||
logoColorSvg?: UserFileViewRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSpaceRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSpaceRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSpaceRequestFromJSON(json: any): PatchedSpaceRequest {
|
||||
return PatchedSpaceRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSpaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSpaceRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'message': json['message'] == null ? undefined : json['message'],
|
||||
'foodInherit': json['food_inherit'] == null ? undefined : ((json['food_inherit'] as Array<any>).map(FoodInheritFieldRequestFromJSON)),
|
||||
'image': json['image'] == null ? undefined : UserFileViewRequestFromJSON(json['image']),
|
||||
'navLogo': json['nav_logo'] == null ? undefined : UserFileViewRequestFromJSON(json['nav_logo']),
|
||||
'spaceTheme': json['space_theme'] == null ? undefined : SpaceThemeEnumFromJSON(json['space_theme']),
|
||||
'customSpaceTheme': json['custom_space_theme'] == null ? undefined : UserFileViewRequestFromJSON(json['custom_space_theme']),
|
||||
'navBgColor': json['nav_bg_color'] == null ? undefined : json['nav_bg_color'],
|
||||
'navTextColor': json['nav_text_color'] == null ? undefined : SpaceNavTextColorEnumFromJSON(json['nav_text_color']),
|
||||
'logoColor32': json['logo_color_32'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_32']),
|
||||
'logoColor128': json['logo_color_128'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_128']),
|
||||
'logoColor144': json['logo_color_144'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_144']),
|
||||
'logoColor180': json['logo_color_180'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_180']),
|
||||
'logoColor192': json['logo_color_192'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_192']),
|
||||
'logoColor512': json['logo_color_512'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_512']),
|
||||
'logoColorSvg': json['logo_color_svg'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_svg']),
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSpaceRequestToJSON(value?: PatchedSpaceRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'message': value['message'],
|
||||
'food_inherit': value['foodInherit'] == null ? undefined : ((value['foodInherit'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
|
||||
'image': UserFileViewRequestToJSON(value['image']),
|
||||
'nav_logo': UserFileViewRequestToJSON(value['navLogo']),
|
||||
'space_theme': SpaceThemeEnumToJSON(value['spaceTheme']),
|
||||
'custom_space_theme': UserFileViewRequestToJSON(value['customSpaceTheme']),
|
||||
'nav_bg_color': value['navBgColor'],
|
||||
'nav_text_color': SpaceNavTextColorEnumToJSON(value['navTextColor']),
|
||||
'logo_color_32': UserFileViewRequestToJSON(value['logoColor32']),
|
||||
'logo_color_128': UserFileViewRequestToJSON(value['logoColor128']),
|
||||
'logo_color_144': UserFileViewRequestToJSON(value['logoColor144']),
|
||||
'logo_color_180': UserFileViewRequestToJSON(value['logoColor180']),
|
||||
'logo_color_192': UserFileViewRequestToJSON(value['logoColor192']),
|
||||
'logo_color_512': UserFileViewRequestToJSON(value['logoColor512']),
|
||||
'logo_color_svg': UserFileViewRequestToJSON(value['logoColorSvg']),
|
||||
};
|
||||
}
|
||||
|
||||
137
vue3/src/openapi/models/PatchedStepRequest.ts
Normal file
137
vue3/src/openapi/models/PatchedStepRequest.ts
Normal file
@@ -0,0 +1,137 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 { IngredientRequest } from './IngredientRequest';
|
||||
import {
|
||||
IngredientRequestFromJSON,
|
||||
IngredientRequestFromJSONTyped,
|
||||
IngredientRequestToJSON,
|
||||
} from './IngredientRequest';
|
||||
import type { UserFileViewRequest } from './UserFileViewRequest';
|
||||
import {
|
||||
UserFileViewRequestFromJSON,
|
||||
UserFileViewRequestFromJSONTyped,
|
||||
UserFileViewRequestToJSON,
|
||||
} from './UserFileViewRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedStepRequest
|
||||
*/
|
||||
export interface PatchedStepRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
instruction?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<IngredientRequest>}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
ingredients?: Array<IngredientRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
time?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
showAsHeader?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
file?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
stepRecipe?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedStepRequest
|
||||
*/
|
||||
showIngredientsTable?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedStepRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedStepRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedStepRequestFromJSON(json: any): PatchedStepRequest {
|
||||
return PatchedStepRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedStepRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStepRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'instruction': json['instruction'] == null ? undefined : json['instruction'],
|
||||
'ingredients': json['ingredients'] == null ? undefined : ((json['ingredients'] as Array<any>).map(IngredientRequestFromJSON)),
|
||||
'time': json['time'] == null ? undefined : json['time'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'showAsHeader': json['show_as_header'] == null ? undefined : json['show_as_header'],
|
||||
'file': json['file'] == null ? undefined : UserFileViewRequestFromJSON(json['file']),
|
||||
'stepRecipe': json['step_recipe'] == null ? undefined : json['step_recipe'],
|
||||
'showIngredientsTable': json['show_ingredients_table'] == null ? undefined : json['show_ingredients_table'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedStepRequestToJSON(value?: PatchedStepRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'instruction': value['instruction'],
|
||||
'ingredients': value['ingredients'] == null ? undefined : ((value['ingredients'] as Array<any>).map(IngredientRequestToJSON)),
|
||||
'time': value['time'],
|
||||
'order': value['order'],
|
||||
'show_as_header': value['showAsHeader'],
|
||||
'file': UserFileViewRequestToJSON(value['file']),
|
||||
'step_recipe': value['stepRecipe'],
|
||||
'show_ingredients_table': value['showIngredientsTable'],
|
||||
};
|
||||
}
|
||||
|
||||
99
vue3/src/openapi/models/PatchedStorageRequest.ts
Normal file
99
vue3/src/openapi/models/PatchedStorageRequest.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 { MethodEnum } from './MethodEnum';
|
||||
import {
|
||||
MethodEnumFromJSON,
|
||||
MethodEnumFromJSONTyped,
|
||||
MethodEnumToJSON,
|
||||
} from './MethodEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PatchedStorageRequest
|
||||
*/
|
||||
export interface PatchedStorageRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {MethodEnum}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
method?: MethodEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedStorageRequest
|
||||
*/
|
||||
token?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedStorageRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedStorageRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedStorageRequestFromJSON(json: any): PatchedStorageRequest {
|
||||
return PatchedStorageRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedStorageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedStorageRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'method': json['method'] == null ? undefined : MethodEnumFromJSON(json['method']),
|
||||
'username': json['username'] == null ? undefined : json['username'],
|
||||
'password': json['password'] == null ? undefined : json['password'],
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedStorageRequestToJSON(value?: PatchedStorageRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'method': MethodEnumToJSON(value['method']),
|
||||
'username': value['username'],
|
||||
'password': value['password'],
|
||||
'token': value['token'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 { SupermarketCategoryRequest } from './SupermarketCategoryRequest';
|
||||
import {
|
||||
SupermarketCategoryRequestFromJSON,
|
||||
SupermarketCategoryRequestFromJSONTyped,
|
||||
SupermarketCategoryRequestToJSON,
|
||||
} from './SupermarketCategoryRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
export interface PatchedSupermarketCategoryRelationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {SupermarketCategoryRequest}
|
||||
* @memberof PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
category?: SupermarketCategoryRequest;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
supermarket?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSupermarketCategoryRelationRequest
|
||||
*/
|
||||
order?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSupermarketCategoryRelationRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSupermarketCategoryRelationRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRelationRequestFromJSON(json: any): PatchedSupermarketCategoryRelationRequest {
|
||||
return PatchedSupermarketCategoryRelationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRelationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketCategoryRelationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': json['category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['category']),
|
||||
'supermarket': json['supermarket'] == null ? undefined : json['supermarket'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRelationRequestToJSON(value?: PatchedSupermarketCategoryRelationRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'category': SupermarketCategoryRequestToJSON(value['category']),
|
||||
'supermarket': value['supermarket'],
|
||||
'order': value['order'],
|
||||
};
|
||||
}
|
||||
|
||||
102
vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts
Normal file
102
vue3/src/openapi/models/PatchedSupermarketCategoryRequest.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 PatchedSupermarketCategoryRequest
|
||||
*/
|
||||
export interface PatchedSupermarketCategoryRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketCategoryRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketCategoryRequest
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSupermarketCategoryRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSupermarketCategoryRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRequestFromJSON(json: any): PatchedSupermarketCategoryRequest {
|
||||
return PatchedSupermarketCategoryRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketCategoryRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSupermarketCategoryRequestToJSON(value?: PatchedSupermarketCategoryRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
};
|
||||
}
|
||||
|
||||
110
vue3/src/openapi/models/PatchedSupermarketRequest.ts
Normal file
110
vue3/src/openapi/models/PatchedSupermarketRequest.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 PatchedSupermarketRequest
|
||||
*/
|
||||
export interface PatchedSupermarketRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSupermarketRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSupermarketRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSupermarketRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSupermarketRequestFromJSON(json: any): PatchedSupermarketRequest {
|
||||
return PatchedSupermarketRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSupermarketRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSupermarketRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSupermarketRequestToJSON(value?: PatchedSupermarketRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
};
|
||||
}
|
||||
|
||||
84
vue3/src/openapi/models/PatchedSyncRequest.ts
Normal file
84
vue3/src/openapi/models/PatchedSyncRequest.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 PatchedSyncRequest
|
||||
*/
|
||||
export interface PatchedSyncRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
storage?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
active?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PatchedSyncRequest
|
||||
*/
|
||||
lastChecked?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedSyncRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedSyncRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedSyncRequestFromJSON(json: any): PatchedSyncRequest {
|
||||
return PatchedSyncRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedSyncRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSyncRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'storage': json['storage'] == null ? undefined : json['storage'],
|
||||
'path': json['path'] == null ? undefined : json['path'],
|
||||
'active': json['active'] == null ? undefined : json['active'],
|
||||
'lastChecked': json['last_checked'] == null ? undefined : (new Date(json['last_checked'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedSyncRequestToJSON(value?: PatchedSyncRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'storage': value['storage'],
|
||||
'path': value['path'],
|
||||
'active': value['active'],
|
||||
'last_checked': value['lastChecked'] == null ? undefined : ((value['lastChecked'] as any).toISOString()),
|
||||
};
|
||||
}
|
||||
|
||||
113
vue3/src/openapi/models/PatchedUnitConversionRequest.ts
Normal file
113
vue3/src/openapi/models/PatchedUnitConversionRequest.ts
Normal file
@@ -0,0 +1,113 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 PatchedUnitConversionRequest
|
||||
*/
|
||||
export interface PatchedUnitConversionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
baseAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
baseUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
convertedAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UnitRequest}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
convertedUnit?: UnitRequest;
|
||||
/**
|
||||
*
|
||||
* @type {FoodRequest}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
food?: FoodRequest;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversionRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUnitConversionRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUnitConversionRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionRequestFromJSON(json: any): PatchedUnitConversionRequest {
|
||||
return PatchedUnitConversionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnitConversionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'baseAmount': json['base_amount'] == null ? undefined : json['base_amount'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : UnitRequestFromJSON(json['base_unit']),
|
||||
'convertedAmount': json['converted_amount'] == null ? undefined : json['converted_amount'],
|
||||
'convertedUnit': json['converted_unit'] == null ? undefined : UnitRequestFromJSON(json['converted_unit']),
|
||||
'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']),
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionRequestToJSON(value?: PatchedUnitConversionRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'base_amount': value['baseAmount'],
|
||||
'base_unit': UnitRequestToJSON(value['baseUnit']),
|
||||
'converted_amount': value['convertedAmount'],
|
||||
'converted_unit': UnitRequestToJSON(value['convertedUnit']),
|
||||
'food': FoodRequestToJSON(value['food']),
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
};
|
||||
}
|
||||
|
||||
126
vue3/src/openapi/models/PatchedUnitRequest.ts
Normal file
126
vue3/src/openapi/models/PatchedUnitRequest.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 PatchedUnitRequest
|
||||
*/
|
||||
export interface PatchedUnitRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
pluralName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
baseUnit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitRequest
|
||||
*/
|
||||
openDataSlug?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUnitRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUnitRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUnitRequestFromJSON(json: any): PatchedUnitRequest {
|
||||
return PatchedUnitRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUnitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnitRequest {
|
||||
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'],
|
||||
'baseUnit': json['base_unit'] == null ? undefined : json['base_unit'],
|
||||
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUnitRequestToJSON(value?: PatchedUnitRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
'base_unit': value['baseUnit'],
|
||||
'open_data_slug': value['openDataSlug'],
|
||||
};
|
||||
}
|
||||
|
||||
299
vue3/src/openapi/models/PatchedUserPreferenceRequest.ts
Normal file
299
vue3/src/openapi/models/PatchedUserPreferenceRequest.ts
Normal file
@@ -0,0 +1,299 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 { DefaultPageEnum } from './DefaultPageEnum';
|
||||
import {
|
||||
DefaultPageEnumFromJSON,
|
||||
DefaultPageEnumFromJSONTyped,
|
||||
DefaultPageEnumToJSON,
|
||||
} from './DefaultPageEnum';
|
||||
import type { ThemeEnum } from './ThemeEnum';
|
||||
import {
|
||||
ThemeEnumFromJSON,
|
||||
ThemeEnumFromJSONTyped,
|
||||
ThemeEnumToJSON,
|
||||
} from './ThemeEnum';
|
||||
import type { UserFileViewRequest } from './UserFileViewRequest';
|
||||
import {
|
||||
UserFileViewRequestFromJSON,
|
||||
UserFileViewRequestFromJSONTyped,
|
||||
UserFileViewRequestToJSON,
|
||||
} from './UserFileViewRequest';
|
||||
import type { UserPreferenceNavTextColorEnum } from './UserPreferenceNavTextColorEnum';
|
||||
import {
|
||||
UserPreferenceNavTextColorEnumFromJSON,
|
||||
UserPreferenceNavTextColorEnumFromJSONTyped,
|
||||
UserPreferenceNavTextColorEnumToJSON,
|
||||
} from './UserPreferenceNavTextColorEnum';
|
||||
import type { UserRequest } from './UserRequest';
|
||||
import {
|
||||
UserRequestFromJSON,
|
||||
UserRequestFromJSONTyped,
|
||||
UserRequestToJSON,
|
||||
} from './UserRequest';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedUserPreferenceRequest
|
||||
*/
|
||||
export interface PatchedUserPreferenceRequest {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
user?: number;
|
||||
/**
|
||||
*
|
||||
* @type {UserFileViewRequest}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
image?: UserFileViewRequest;
|
||||
/**
|
||||
*
|
||||
* @type {ThemeEnum}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
theme?: ThemeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
navBgColor?: string;
|
||||
/**
|
||||
*
|
||||
* @type {UserPreferenceNavTextColorEnum}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
navTextColor?: UserPreferenceNavTextColorEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
navShowLogo?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
defaultUnit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {DefaultPageEnum}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
defaultPage?: DefaultPageEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
useFractions?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
useKj?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
planShare?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
navSticky?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
ingredientDecimals?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
comments?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
shoppingAutoSync?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
mealplanAutoaddShopping?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
defaultDelay?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
mealplanAutoincludeRelated?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
mealplanAutoexcludeOnhand?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<UserRequest>}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
shoppingShare?: Array<UserRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
shoppingRecentDays?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
csvDelim?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
csvPrefix?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
filterToSupermarket?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
shoppingAddOnhand?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
leftHanded?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserPreferenceRequest
|
||||
*/
|
||||
showStepIngredients?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUserPreferenceRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUserPreferenceRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUserPreferenceRequestFromJSON(json: any): PatchedUserPreferenceRequest {
|
||||
return PatchedUserPreferenceRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUserPreferenceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserPreferenceRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'user': json['user'] == null ? undefined : json['user'],
|
||||
'image': json['image'] == null ? undefined : UserFileViewRequestFromJSON(json['image']),
|
||||
'theme': json['theme'] == null ? undefined : ThemeEnumFromJSON(json['theme']),
|
||||
'navBgColor': json['nav_bg_color'] == null ? undefined : json['nav_bg_color'],
|
||||
'navTextColor': json['nav_text_color'] == null ? undefined : UserPreferenceNavTextColorEnumFromJSON(json['nav_text_color']),
|
||||
'navShowLogo': json['nav_show_logo'] == null ? undefined : json['nav_show_logo'],
|
||||
'defaultUnit': json['default_unit'] == null ? undefined : json['default_unit'],
|
||||
'defaultPage': json['default_page'] == null ? undefined : DefaultPageEnumFromJSON(json['default_page']),
|
||||
'useFractions': json['use_fractions'] == null ? undefined : json['use_fractions'],
|
||||
'useKj': json['use_kj'] == null ? undefined : json['use_kj'],
|
||||
'planShare': json['plan_share'] == null ? undefined : ((json['plan_share'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'navSticky': json['nav_sticky'] == null ? undefined : json['nav_sticky'],
|
||||
'ingredientDecimals': json['ingredient_decimals'] == null ? undefined : json['ingredient_decimals'],
|
||||
'comments': json['comments'] == null ? undefined : json['comments'],
|
||||
'shoppingAutoSync': json['shopping_auto_sync'] == null ? undefined : json['shopping_auto_sync'],
|
||||
'mealplanAutoaddShopping': json['mealplan_autoadd_shopping'] == null ? undefined : json['mealplan_autoadd_shopping'],
|
||||
'defaultDelay': json['default_delay'] == null ? undefined : json['default_delay'],
|
||||
'mealplanAutoincludeRelated': json['mealplan_autoinclude_related'] == null ? undefined : json['mealplan_autoinclude_related'],
|
||||
'mealplanAutoexcludeOnhand': json['mealplan_autoexclude_onhand'] == null ? undefined : json['mealplan_autoexclude_onhand'],
|
||||
'shoppingShare': json['shopping_share'] == null ? undefined : ((json['shopping_share'] as Array<any>).map(UserRequestFromJSON)),
|
||||
'shoppingRecentDays': json['shopping_recent_days'] == null ? undefined : json['shopping_recent_days'],
|
||||
'csvDelim': json['csv_delim'] == null ? undefined : json['csv_delim'],
|
||||
'csvPrefix': json['csv_prefix'] == null ? undefined : json['csv_prefix'],
|
||||
'filterToSupermarket': json['filter_to_supermarket'] == null ? undefined : json['filter_to_supermarket'],
|
||||
'shoppingAddOnhand': json['shopping_add_onhand'] == null ? undefined : json['shopping_add_onhand'],
|
||||
'leftHanded': json['left_handed'] == null ? undefined : json['left_handed'],
|
||||
'showStepIngredients': json['show_step_ingredients'] == null ? undefined : json['show_step_ingredients'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUserPreferenceRequestToJSON(value?: PatchedUserPreferenceRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'user': value['user'],
|
||||
'image': UserFileViewRequestToJSON(value['image']),
|
||||
'theme': ThemeEnumToJSON(value['theme']),
|
||||
'nav_bg_color': value['navBgColor'],
|
||||
'nav_text_color': UserPreferenceNavTextColorEnumToJSON(value['navTextColor']),
|
||||
'nav_show_logo': value['navShowLogo'],
|
||||
'default_unit': value['defaultUnit'],
|
||||
'default_page': DefaultPageEnumToJSON(value['defaultPage']),
|
||||
'use_fractions': value['useFractions'],
|
||||
'use_kj': value['useKj'],
|
||||
'plan_share': value['planShare'] == null ? undefined : ((value['planShare'] as Array<any>).map(UserRequestToJSON)),
|
||||
'nav_sticky': value['navSticky'],
|
||||
'ingredient_decimals': value['ingredientDecimals'],
|
||||
'comments': value['comments'],
|
||||
'shopping_auto_sync': value['shoppingAutoSync'],
|
||||
'mealplan_autoadd_shopping': value['mealplanAutoaddShopping'],
|
||||
'default_delay': value['defaultDelay'],
|
||||
'mealplan_autoinclude_related': value['mealplanAutoincludeRelated'],
|
||||
'mealplan_autoexclude_onhand': value['mealplanAutoexcludeOnhand'],
|
||||
'shopping_share': value['shoppingShare'] == null ? undefined : ((value['shoppingShare'] as Array<any>).map(UserRequestToJSON)),
|
||||
'shopping_recent_days': value['shoppingRecentDays'],
|
||||
'csv_delim': value['csvDelim'],
|
||||
'csv_prefix': value['csvPrefix'],
|
||||
'filter_to_supermarket': value['filterToSupermarket'],
|
||||
'shopping_add_onhand': value['shoppingAddOnhand'],
|
||||
'left_handed': value['leftHanded'],
|
||||
'show_step_ingredients': value['showStepIngredients'],
|
||||
};
|
||||
}
|
||||
|
||||
68
vue3/src/openapi/models/PatchedUserRequest.ts
Normal file
68
vue3/src/openapi/models/PatchedUserRequest.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 PatchedUserRequest
|
||||
*/
|
||||
export interface PatchedUserRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserRequest
|
||||
*/
|
||||
firstName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserRequest
|
||||
*/
|
||||
lastName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUserRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUserRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUserRequestFromJSON(json: any): PatchedUserRequest {
|
||||
return PatchedUserRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'firstName': json['first_name'] == null ? undefined : json['first_name'],
|
||||
'lastName': json['last_name'] == null ? undefined : json['last_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUserRequestToJSON(value?: PatchedUserRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'first_name': value['firstName'],
|
||||
'last_name': value['lastName'],
|
||||
};
|
||||
}
|
||||
|
||||
83
vue3/src/openapi/models/PatchedUserSpaceRequest.ts
Normal file
83
vue3/src/openapi/models/PatchedUserSpaceRequest.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* 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 PatchedUserSpaceRequest
|
||||
*/
|
||||
export interface PatchedUserSpaceRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<GroupRequest>}
|
||||
* @memberof PatchedUserSpaceRequest
|
||||
*/
|
||||
groups?: Array<GroupRequest>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedUserSpaceRequest
|
||||
*/
|
||||
active?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUserSpaceRequest
|
||||
*/
|
||||
internalNote?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUserSpaceRequest interface.
|
||||
*/
|
||||
export function instanceOfPatchedUserSpaceRequest(value: object): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PatchedUserSpaceRequestFromJSON(json: any): PatchedUserSpaceRequest {
|
||||
return PatchedUserSpaceRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUserSpaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUserSpaceRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'groups': json['groups'] == null ? undefined : ((json['groups'] as Array<any>).map(GroupRequestFromJSON)),
|
||||
'active': json['active'] == null ? undefined : json['active'],
|
||||
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUserSpaceRequestToJSON(value?: PatchedUserSpaceRequest | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'groups': value['groups'] == null ? undefined : ((value['groups'] as Array<any>).map(GroupRequestToJSON)),
|
||||
'active': value['active'],
|
||||
'internal_note': value['internalNote'],
|
||||
};
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user