fixed api client generation

This commit is contained in:
vabene1111
2024-04-22 19:33:09 +02:00
parent c47e46263c
commit 12cf9da8fc
145 changed files with 914 additions and 175 deletions

View File

@@ -1,11 +1,39 @@
from drf_spectacular.types import OpenApiTypes # custom processing for schema
# reason: DRF writable nested needs ID's to decide if a nested object should be created or updated
# the API schema/client make ID's read only by default and strips them entirely in request objects (with COMPONENT_SPLIT_REQUEST enabled)
# change request objects (schema ends with Request) and response objects (just model name) to the following:
# response objects: id field is required but read only
# request objects: id field is optional but writable/included
# WARNING: COMPONENT_SPLIT_REQUEST must be enabled, if not schemas might be wrong
def custom_postprocessing_hook(result, generator, request, public): def custom_postprocessing_hook(result, generator, request, public):
for c in result['components']['schemas'].keys(): for c in result['components']['schemas'].keys():
if 'properties' in result['components']['schemas'][c] and 'id' in result['components']['schemas'][c]['properties']: # handle schemas used by the client to do requests on the server
print('setting non read only for ', c) if c.strip().endswith('Request'):
result['components']['schemas'][c]['properties']['id']['readOnly'] = False # check if request schema has a corresponding response schema to avoid changing request schemas for models that end with the word Request
response_schema = None
if c.strip().replace('Request', '') in result['components']['schemas'].keys():
response_schema = c.strip().replace('Request', '')
elif c.strip().startswith('Patched') and c.strip().replace('Request', '').replace('Patched', '', 1) in result['components']['schemas'].keys():
response_schema = c.strip().replace('Request', '').replace('Patched', '', 1)
# if response schema exist update request schema to include writable, optional id
if response_schema and 'id' in result['components']['schemas'][response_schema]['properties']:
if 'id' not in result['components']['schemas'][c]['properties']:
result['components']['schemas'][c]['properties']['id'] = {'readOnly': False, 'type': 'integer'}
# this is probably never the case but make sure ID is not required anyway
if 'required' in result['components']['schemas'][c] and 'id' in result['components']['schemas'][c]['required']: if 'required' in result['components']['schemas'][c] and 'id' in result['components']['schemas'][c]['required']:
result['components']['schemas'][c]['required'].remove('id') result['components']['schemas'][c]['required'].remove('id')
# handle all schemas returned by the server to the client
else:
if 'properties' in result['components']['schemas'][c] and 'id' in result['components']['schemas'][c]['properties']:
# make ID field not read only so it's not stripped from the request on the client
result['components']['schemas'][c]['properties']['id']['readOnly'] = True
# make ID field required because if an object has an id it should also always be returned
if 'required' not in result['components']['schemas'][c]:
result['components']['schemas'][c]['required'] = ['id']
else:
result['components']['schemas'][c]['required'].append('id')
return result return result

View File

@@ -1535,6 +1535,7 @@ export interface ApiUnitUpdateRequest {
export interface ApiUserFileCreateRequest { export interface ApiUserFileCreateRequest {
name: string; name: string;
file: Blob; file: Blob;
id?: number;
} }
export interface ApiUserFileDestroyRequest { export interface ApiUserFileDestroyRequest {
@@ -1552,6 +1553,7 @@ export interface ApiUserFilePartialUpdateRequest {
id: number; id: number;
name?: string; name?: string;
file?: Blob; file?: Blob;
id2?: number;
} }
export interface ApiUserFileRetrieveRequest { export interface ApiUserFileRetrieveRequest {
@@ -1562,6 +1564,7 @@ export interface ApiUserFileUpdateRequest {
id: number; id: number;
name: string; name: string;
file: Blob; file: Blob;
id2?: number;
} }
export interface ApiUserPartialUpdateRequest { export interface ApiUserPartialUpdateRequest {
@@ -11254,6 +11257,10 @@ export class ApiApi extends runtime.BaseAPI {
formParams.append('file', requestParameters['file'] as any); formParams.append('file', requestParameters['file'] as any);
} }
if (requestParameters['id'] != null) {
formParams.append('id', requestParameters['id'] as any);
}
const response = await this.request({ const response = await this.request({
path: `/api/user-file/`, path: `/api/user-file/`,
method: 'POST', method: 'POST',
@@ -11392,6 +11399,10 @@ export class ApiApi extends runtime.BaseAPI {
formParams.append('file', requestParameters['file'] as any); formParams.append('file', requestParameters['file'] as any);
} }
if (requestParameters['id2'] != null) {
formParams.append('id', requestParameters['id2'] as any);
}
const response = await this.request({ const response = await this.request({
path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
method: 'PATCH', method: 'PATCH',
@@ -11501,6 +11512,10 @@ export class ApiApi extends runtime.BaseAPI {
formParams.append('file', requestParameters['file'] as any); formParams.append('file', requestParameters['file'] as any);
} }
if (requestParameters['id2'] != null) {
formParams.append('id', requestParameters['id2'] as any);
}
const response = await this.request({ const response = await this.request({
path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), path: `/api/user-file/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
method: 'PUT', method: 'PUT',

View File

@@ -24,7 +24,7 @@ export interface AccessToken {
* @type {number} * @type {number}
* @memberof AccessToken * @memberof AccessToken
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -61,6 +61,7 @@ export interface AccessToken {
* Check if a given object implements the AccessToken interface. * Check if a given object implements the AccessToken interface.
*/ */
export function instanceOfAccessToken(value: object): boolean { export function instanceOfAccessToken(value: object): boolean {
if (!('id' in value)) return false;
if (!('token' in value)) return false; if (!('token' in value)) return false;
if (!('expires' in value)) return false; if (!('expires' in value)) return false;
if (!('created' in value)) return false; if (!('created' in value)) return false;
@@ -78,7 +79,7 @@ export function AccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'token': json['token'], 'token': json['token'],
'expires': (new Date(json['expires'])), 'expires': (new Date(json['expires'])),
'scope': json['scope'] == null ? undefined : json['scope'], 'scope': json['scope'] == null ? undefined : json['scope'],
@@ -93,7 +94,6 @@ export function AccessTokenToJSON(value?: AccessToken | null): any {
} }
return { return {
'id': value['id'],
'expires': ((value['expires']).toISOString()), 'expires': ((value['expires']).toISOString()),
'scope': value['scope'], 'scope': value['scope'],
}; };

View File

@@ -31,6 +31,12 @@ export interface AccessTokenRequest {
* @memberof AccessTokenRequest * @memberof AccessTokenRequest
*/ */
scope?: string; scope?: string;
/**
*
* @type {number}
* @memberof AccessTokenRequest
*/
id?: number;
} }
/** /**
@@ -53,6 +59,7 @@ export function AccessTokenRequestFromJSONTyped(json: any, ignoreDiscriminator:
'expires': (new Date(json['expires'])), 'expires': (new Date(json['expires'])),
'scope': json['scope'] == null ? undefined : json['scope'], 'scope': json['scope'] == null ? undefined : json['scope'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -64,6 +71,7 @@ export function AccessTokenRequestToJSON(value?: AccessTokenRequest | null): any
'expires': ((value['expires']).toISOString()), 'expires': ((value['expires']).toISOString()),
'scope': value['scope'], 'scope': value['scope'],
'id': value['id'],
}; };
} }

View File

@@ -31,7 +31,7 @@ export interface Automation {
* @type {number} * @type {number}
* @memberof Automation * @memberof Automation
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {AutomationTypeEnum} * @type {AutomationTypeEnum}
@@ -92,6 +92,7 @@ export interface Automation {
* Check if a given object implements the Automation interface. * Check if a given object implements the Automation interface.
*/ */
export function instanceOfAutomation(value: object): boolean { export function instanceOfAutomation(value: object): boolean {
if (!('id' in value)) return false;
if (!('type' in value)) return false; if (!('type' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
return true; return true;
@@ -107,7 +108,7 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'type': AutomationTypeEnumFromJSON(json['type']), 'type': AutomationTypeEnumFromJSON(json['type']),
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
@@ -126,7 +127,6 @@ export function AutomationToJSON(value?: Automation | null): any {
} }
return { return {
'id': value['id'],
'type': AutomationTypeEnumToJSON(value['type']), 'type': AutomationTypeEnumToJSON(value['type']),
'name': value['name'], 'name': value['name'],
'description': value['description'], 'description': value['description'],

View File

@@ -74,6 +74,12 @@ export interface AutomationRequest {
* @memberof AutomationRequest * @memberof AutomationRequest
*/ */
disabled?: boolean; disabled?: boolean;
/**
*
* @type {number}
* @memberof AutomationRequest
*/
id?: number;
} }
/** /**
@@ -102,6 +108,7 @@ export function AutomationRequestFromJSONTyped(json: any, ignoreDiscriminator: b
'param3': json['param_3'] == null ? undefined : json['param_3'], 'param3': json['param_3'] == null ? undefined : json['param_3'],
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
'disabled': json['disabled'] == null ? undefined : json['disabled'], 'disabled': json['disabled'] == null ? undefined : json['disabled'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -119,6 +126,7 @@ export function AutomationRequestToJSON(value?: AutomationRequest | null): any {
'param_3': value['param3'], 'param_3': value['param3'],
'order': value['order'], 'order': value['order'],
'disabled': value['disabled'], 'disabled': value['disabled'],
'id': value['id'],
}; };
} }

View File

@@ -24,7 +24,7 @@ export interface BookmarkletImport {
* @type {number} * @type {number}
* @memberof BookmarkletImport * @memberof BookmarkletImport
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -55,6 +55,7 @@ export interface BookmarkletImport {
* Check if a given object implements the BookmarkletImport interface. * Check if a given object implements the BookmarkletImport interface.
*/ */
export function instanceOfBookmarkletImport(value: object): boolean { export function instanceOfBookmarkletImport(value: object): boolean {
if (!('id' in value)) return false;
if (!('html' in value)) return false; if (!('html' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
if (!('createdAt' in value)) return false; if (!('createdAt' in value)) return false;
@@ -71,7 +72,7 @@ export function BookmarkletImportFromJSONTyped(json: any, ignoreDiscriminator: b
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'url': json['url'] == null ? undefined : json['url'], 'url': json['url'] == null ? undefined : json['url'],
'html': json['html'], 'html': json['html'],
'createdBy': json['created_by'], 'createdBy': json['created_by'],
@@ -85,7 +86,6 @@ export function BookmarkletImportToJSON(value?: BookmarkletImport | null): any {
} }
return { return {
'id': value['id'],
'url': value['url'], 'url': value['url'],
'html': value['html'], 'html': value['html'],
}; };

View File

@@ -24,7 +24,7 @@ export interface BookmarkletImportList {
* @type {number} * @type {number}
* @memberof BookmarkletImportList * @memberof BookmarkletImportList
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -49,6 +49,7 @@ export interface BookmarkletImportList {
* Check if a given object implements the BookmarkletImportList interface. * Check if a given object implements the BookmarkletImportList interface.
*/ */
export function instanceOfBookmarkletImportList(value: object): boolean { export function instanceOfBookmarkletImportList(value: object): boolean {
if (!('id' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
if (!('createdAt' in value)) return false; if (!('createdAt' in value)) return false;
return true; return true;
@@ -64,7 +65,7 @@ export function BookmarkletImportListFromJSONTyped(json: any, ignoreDiscriminato
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'url': json['url'] == null ? undefined : json['url'], 'url': json['url'] == null ? undefined : json['url'],
'createdBy': json['created_by'], 'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])), 'createdAt': (new Date(json['created_at'])),
@@ -77,7 +78,6 @@ export function BookmarkletImportListToJSON(value?: BookmarkletImportList | null
} }
return { return {
'id': value['id'],
'url': value['url'], 'url': value['url'],
}; };
} }

View File

@@ -31,6 +31,12 @@ export interface BookmarkletImportRequest {
* @memberof BookmarkletImportRequest * @memberof BookmarkletImportRequest
*/ */
html: string; html: string;
/**
*
* @type {number}
* @memberof BookmarkletImportRequest
*/
id?: number;
} }
/** /**
@@ -53,6 +59,7 @@ export function BookmarkletImportRequestFromJSONTyped(json: any, ignoreDiscrimin
'url': json['url'] == null ? undefined : json['url'], 'url': json['url'] == null ? undefined : json['url'],
'html': json['html'], 'html': json['html'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -64,6 +71,7 @@ export function BookmarkletImportRequestToJSON(value?: BookmarkletImportRequest
'url': value['url'], 'url': value['url'],
'html': value['html'], 'html': value['html'],
'id': value['id'],
}; };
} }

View File

@@ -24,7 +24,7 @@ export interface ConnectorConfigConfig {
* @type {number} * @type {number}
* @memberof ConnectorConfigConfig * @memberof ConnectorConfigConfig
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -79,6 +79,7 @@ export interface ConnectorConfigConfig {
* Check if a given object implements the ConnectorConfigConfig interface. * Check if a given object implements the ConnectorConfigConfig interface.
*/ */
export function instanceOfConnectorConfigConfig(value: object): boolean { export function instanceOfConnectorConfigConfig(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
return true; return true;
@@ -94,7 +95,7 @@ export function ConnectorConfigConfigFromJSONTyped(json: any, ignoreDiscriminato
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'], 'name': json['name'],
'url': json['url'] == null ? undefined : json['url'], 'url': json['url'] == null ? undefined : json['url'],
'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'], 'todoEntity': json['todo_entity'] == null ? undefined : json['todo_entity'],
@@ -112,7 +113,6 @@ export function ConnectorConfigConfigToJSON(value?: ConnectorConfigConfig | null
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
'url': value['url'], 'url': value['url'],
'todo_entity': value['todoEntity'], 'todo_entity': value['todoEntity'],

View File

@@ -67,6 +67,12 @@ export interface ConnectorConfigConfigRequest {
* @memberof ConnectorConfigConfigRequest * @memberof ConnectorConfigConfigRequest
*/ */
onShoppingListEntryDeletedEnabled?: boolean; onShoppingListEntryDeletedEnabled?: boolean;
/**
*
* @type {number}
* @memberof ConnectorConfigConfigRequest
*/
id?: number;
} }
/** /**
@@ -95,6 +101,7 @@ export function ConnectorConfigConfigRequestFromJSONTyped(json: any, ignoreDiscr
'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_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'], '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'], 'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -112,6 +119,7 @@ export function ConnectorConfigConfigRequestToJSON(value?: ConnectorConfigConfig
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'], 'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'], 'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'],
'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'], 'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'],
'id': value['id'],
}; };
} }

View File

@@ -31,7 +31,7 @@ export interface CookLog {
* @type {number} * @type {number}
* @memberof CookLog * @memberof CookLog
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {number} * @type {number}
@@ -80,6 +80,7 @@ export interface CookLog {
* Check if a given object implements the CookLog interface. * Check if a given object implements the CookLog interface.
*/ */
export function instanceOfCookLog(value: object): boolean { export function instanceOfCookLog(value: object): boolean {
if (!('id' in value)) return false;
if (!('recipe' in value)) return false; if (!('recipe' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
if (!('updatedAt' in value)) return false; if (!('updatedAt' in value)) return false;
@@ -96,7 +97,7 @@ export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'recipe': json['recipe'], 'recipe': json['recipe'],
'servings': json['servings'] == null ? undefined : json['servings'], 'servings': json['servings'] == null ? undefined : json['servings'],
'rating': json['rating'] == null ? undefined : json['rating'], 'rating': json['rating'] == null ? undefined : json['rating'],
@@ -113,7 +114,6 @@ export function CookLogToJSON(value?: CookLog | null): any {
} }
return { return {
'id': value['id'],
'recipe': value['recipe'], 'recipe': value['recipe'],
'servings': value['servings'], 'servings': value['servings'],
'rating': value['rating'], 'rating': value['rating'],

View File

@@ -49,6 +49,12 @@ export interface CookLogRequest {
* @memberof CookLogRequest * @memberof CookLogRequest
*/ */
createdAt?: Date; createdAt?: Date;
/**
*
* @type {number}
* @memberof CookLogRequest
*/
id?: number;
} }
/** /**
@@ -74,6 +80,7 @@ export function CookLogRequestFromJSONTyped(json: any, ignoreDiscriminator: bool
'rating': json['rating'] == null ? undefined : json['rating'], 'rating': json['rating'] == null ? undefined : json['rating'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -88,6 +95,7 @@ export function CookLogRequestToJSON(value?: CookLogRequest | null): any {
'rating': value['rating'], 'rating': value['rating'],
'comment': value['comment'], 'comment': value['comment'],
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
'id': value['id'],
}; };
} }

View File

@@ -31,7 +31,7 @@ export interface CustomFilter {
* @type {number} * @type {number}
* @memberof CustomFilter * @memberof CustomFilter
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -62,6 +62,7 @@ export interface CustomFilter {
* Check if a given object implements the CustomFilter interface. * Check if a given object implements the CustomFilter interface.
*/ */
export function instanceOfCustomFilter(value: object): boolean { export function instanceOfCustomFilter(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
if (!('search' in value)) return false; if (!('search' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
@@ -78,7 +79,7 @@ export function CustomFilterFromJSONTyped(json: any, ignoreDiscriminator: boolea
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'], 'name': json['name'],
'search': json['search'], 'search': json['search'],
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)), 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
@@ -92,7 +93,6 @@ export function CustomFilterToJSON(value?: CustomFilter | null): any {
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
'search': value['search'], 'search': value['search'],
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)), 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserToJSON)),

View File

@@ -44,6 +44,12 @@ export interface CustomFilterRequest {
* @memberof CustomFilterRequest * @memberof CustomFilterRequest
*/ */
shared?: Array<UserRequest>; shared?: Array<UserRequest>;
/**
*
* @type {number}
* @memberof CustomFilterRequest
*/
id?: number;
} }
/** /**
@@ -68,6 +74,7 @@ export function CustomFilterRequestFromJSONTyped(json: any, ignoreDiscriminator:
'name': json['name'], 'name': json['name'],
'search': json['search'], 'search': json['search'],
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)), 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -80,6 +87,7 @@ export function CustomFilterRequestToJSON(value?: CustomFilterRequest | null): a
'name': value['name'], 'name': value['name'],
'search': value['search'], 'search': value['search'],
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)), 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
'id': value['id'],
}; };
} }

View File

@@ -24,7 +24,7 @@ export interface ExportLog {
* @type {number} * @type {number}
* @memberof ExportLog * @memberof ExportLog
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -85,6 +85,7 @@ export interface ExportLog {
* Check if a given object implements the ExportLog interface. * Check if a given object implements the ExportLog interface.
*/ */
export function instanceOfExportLog(value: object): boolean { export function instanceOfExportLog(value: object): boolean {
if (!('id' in value)) return false;
if (!('type' in value)) return false; if (!('type' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
if (!('createdAt' in value)) return false; if (!('createdAt' in value)) return false;
@@ -101,7 +102,7 @@ export function ExportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'type': json['type'], 'type': json['type'],
'msg': json['msg'] == null ? undefined : json['msg'], 'msg': json['msg'] == null ? undefined : json['msg'],
'running': json['running'] == null ? undefined : json['running'], 'running': json['running'] == null ? undefined : json['running'],
@@ -120,7 +121,6 @@ export function ExportLogToJSON(value?: ExportLog | null): any {
} }
return { return {
'id': value['id'],
'type': value['type'], 'type': value['type'],
'msg': value['msg'], 'msg': value['msg'],
'running': value['running'], 'running': value['running'],

View File

@@ -61,6 +61,12 @@ export interface ExportLogRequest {
* @memberof ExportLogRequest * @memberof ExportLogRequest
*/ */
possiblyNotExpired?: boolean; possiblyNotExpired?: boolean;
/**
*
* @type {number}
* @memberof ExportLogRequest
*/
id?: number;
} }
/** /**
@@ -88,6 +94,7 @@ export function ExportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: bo
'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'], 'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'],
'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'], 'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'],
'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'], 'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -104,6 +111,7 @@ export function ExportLogRequestToJSON(value?: ExportLogRequest | null): any {
'exported_recipes': value['exportedRecipes'], 'exported_recipes': value['exportedRecipes'],
'cache_duration': value['cacheDuration'], 'cache_duration': value['cacheDuration'],
'possibly_not_expired': value['possiblyNotExpired'], 'possibly_not_expired': value['possiblyNotExpired'],
'id': value['id'],
}; };
} }

View File

@@ -95,7 +95,7 @@ export interface Food {
* @type {number} * @type {number}
* @memberof Food * @memberof Food
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -240,6 +240,7 @@ export interface Food {
* Check if a given object implements the Food interface. * Check if a given object implements the Food interface.
*/ */
export function instanceOfFood(value: object): boolean { export function instanceOfFood(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
if (!('shopping' in value)) return false; if (!('shopping' in value)) return false;
if (!('parent' in value)) return false; if (!('parent' in value)) return false;
@@ -259,7 +260,7 @@ export function FoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): Food
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'], 'name': json['name'],
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
@@ -292,7 +293,6 @@ export function FoodToJSON(value?: Food | null): any {
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
'plural_name': value['pluralName'], 'plural_name': value['pluralName'],
'description': value['description'], 'description': value['description'],

View File

@@ -58,7 +58,7 @@ export interface FoodInheritField {
* @type {number} * @type {number}
* @memberof FoodInheritField * @memberof FoodInheritField
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -77,6 +77,7 @@ export interface FoodInheritField {
* Check if a given object implements the FoodInheritField interface. * Check if a given object implements the FoodInheritField interface.
*/ */
export function instanceOfFoodInheritField(value: object): boolean { export function instanceOfFoodInheritField(value: object): boolean {
if (!('id' in value)) return false;
return true; return true;
} }
@@ -90,7 +91,7 @@ export function FoodInheritFieldFromJSONTyped(json: any, ignoreDiscriminator: bo
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'field': json['field'] == null ? undefined : json['field'], 'field': json['field'] == null ? undefined : json['field'],
}; };
@@ -102,7 +103,6 @@ export function FoodInheritFieldToJSON(value?: FoodInheritField | null): any {
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
'field': value['field'], 'field': value['field'],
}; };

View File

@@ -65,6 +65,12 @@ export interface FoodInheritFieldRequest {
* @memberof FoodInheritFieldRequest * @memberof FoodInheritFieldRequest
*/ */
field?: string; field?: string;
/**
*
* @type {number}
* @memberof FoodInheritFieldRequest
*/
id?: number;
} }
/** /**
@@ -86,6 +92,7 @@ export function FoodInheritFieldRequestFromJSONTyped(json: any, ignoreDiscrimina
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'field': json['field'] == null ? undefined : json['field'], 'field': json['field'] == null ? undefined : json['field'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -97,6 +104,7 @@ export function FoodInheritFieldRequestToJSON(value?: FoodInheritFieldRequest |
'name': value['name'], 'name': value['name'],
'field': value['field'], 'field': value['field'],
'id': value['id'],
}; };
} }

View File

@@ -198,6 +198,12 @@ export interface FoodRequest {
* @memberof FoodRequest * @memberof FoodRequest
*/ */
openDataSlug?: string; openDataSlug?: string;
/**
*
* @type {number}
* @memberof FoodRequest
*/
id?: number;
} }
/** /**
@@ -236,6 +242,7 @@ export function FoodRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean
'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'], '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)), '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'], 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -263,6 +270,7 @@ export function FoodRequestToJSON(value?: FoodRequest | null): any {
'substitute_children': value['substituteChildren'], 'substitute_children': value['substituteChildren'],
'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)), 'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
'open_data_slug': value['openDataSlug'], 'open_data_slug': value['openDataSlug'],
'id': value['id'],
}; };
} }

View File

@@ -24,13 +24,14 @@ export interface FoodShoppingUpdate {
* @type {number} * @type {number}
* @memberof FoodShoppingUpdate * @memberof FoodShoppingUpdate
*/ */
id?: number; readonly id: number;
} }
/** /**
* Check if a given object implements the FoodShoppingUpdate interface. * Check if a given object implements the FoodShoppingUpdate interface.
*/ */
export function instanceOfFoodShoppingUpdate(value: object): boolean { export function instanceOfFoodShoppingUpdate(value: object): boolean {
if (!('id' in value)) return false;
return true; return true;
} }
@@ -44,7 +45,7 @@ export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator:
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
}; };
} }
@@ -54,7 +55,6 @@ export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any
} }
return { return {
'id': value['id'],
}; };
} }

View File

@@ -46,6 +46,12 @@ export interface FoodShoppingUpdateRequest {
* @memberof FoodShoppingUpdateRequest * @memberof FoodShoppingUpdateRequest
*/ */
_delete: DeleteEnum | null; _delete: DeleteEnum | null;
/**
*
* @type {number}
* @memberof FoodShoppingUpdateRequest
*/
id?: number;
} }
/** /**
@@ -69,6 +75,7 @@ export function FoodShoppingUpdateRequestFromJSONTyped(json: any, ignoreDiscrimi
'amount': json['amount'] == null ? undefined : json['amount'], 'amount': json['amount'] == null ? undefined : json['amount'],
'unit': json['unit'] == null ? undefined : json['unit'], 'unit': json['unit'] == null ? undefined : json['unit'],
'_delete': DeleteEnumFromJSON(json['delete']), '_delete': DeleteEnumFromJSON(json['delete']),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -81,6 +88,7 @@ export function FoodShoppingUpdateRequestToJSON(value?: FoodShoppingUpdateReques
'amount': value['amount'], 'amount': value['amount'],
'unit': value['unit'], 'unit': value['unit'],
'delete': DeleteEnumToJSON(value['_delete']), 'delete': DeleteEnumToJSON(value['_delete']),
'id': value['id'],
}; };
} }

View File

@@ -24,7 +24,7 @@ export interface FoodSimple {
* @type {number} * @type {number}
* @memberof FoodSimple * @memberof FoodSimple
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -43,6 +43,7 @@ export interface FoodSimple {
* Check if a given object implements the FoodSimple interface. * Check if a given object implements the FoodSimple interface.
*/ */
export function instanceOfFoodSimple(value: object): boolean { export function instanceOfFoodSimple(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
return true; return true;
} }
@@ -57,7 +58,7 @@ export function FoodSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean)
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'], 'name': json['name'],
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
}; };
@@ -69,7 +70,6 @@ export function FoodSimpleToJSON(value?: FoodSimple | null): any {
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
'plural_name': value['pluralName'], 'plural_name': value['pluralName'],
}; };

View File

@@ -31,6 +31,12 @@ export interface FoodSimpleRequest {
* @memberof FoodSimpleRequest * @memberof FoodSimpleRequest
*/ */
pluralName?: string; pluralName?: string;
/**
*
* @type {number}
* @memberof FoodSimpleRequest
*/
id?: number;
} }
/** /**
@@ -53,6 +59,7 @@ export function FoodSimpleRequestFromJSONTyped(json: any, ignoreDiscriminator: b
'name': json['name'], 'name': json['name'],
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'], 'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -64,6 +71,7 @@ export function FoodSimpleRequestToJSON(value?: FoodSimpleRequest | null): any {
'name': value['name'], 'name': value['name'],
'plural_name': value['pluralName'], 'plural_name': value['pluralName'],
'id': value['id'],
}; };
} }

View File

@@ -58,7 +58,7 @@ export interface Group {
* @type {number} * @type {number}
* @memberof Group * @memberof Group
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -71,6 +71,7 @@ export interface Group {
* Check if a given object implements the Group interface. * Check if a given object implements the Group interface.
*/ */
export function instanceOfGroup(value: object): boolean { export function instanceOfGroup(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
return true; return true;
} }
@@ -85,7 +86,7 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'], 'name': json['name'],
}; };
} }
@@ -96,7 +97,6 @@ export function GroupToJSON(value?: Group | null): any {
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
}; };
} }

View File

@@ -59,6 +59,12 @@ export interface GroupRequest {
* @memberof GroupRequest * @memberof GroupRequest
*/ */
name: string; name: string;
/**
*
* @type {number}
* @memberof GroupRequest
*/
id?: number;
} }
/** /**
@@ -80,6 +86,7 @@ export function GroupRequestFromJSONTyped(json: any, ignoreDiscriminator: boolea
return { return {
'name': json['name'], 'name': json['name'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -90,6 +97,7 @@ export function GroupRequestToJSON(value?: GroupRequest | null): any {
return { return {
'name': value['name'], 'name': value['name'],
'id': value['id'],
}; };
} }

View File

@@ -31,7 +31,7 @@ export interface ImportLog {
* @type {number} * @type {number}
* @memberof ImportLog * @memberof ImportLog
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -86,6 +86,7 @@ export interface ImportLog {
* Check if a given object implements the ImportLog interface. * Check if a given object implements the ImportLog interface.
*/ */
export function instanceOfImportLog(value: object): boolean { export function instanceOfImportLog(value: object): boolean {
if (!('id' in value)) return false;
if (!('type' in value)) return false; if (!('type' in value)) return false;
if (!('keyword' in value)) return false; if (!('keyword' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
@@ -103,7 +104,7 @@ export function ImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'type': json['type'], 'type': json['type'],
'msg': json['msg'] == null ? undefined : json['msg'], 'msg': json['msg'] == null ? undefined : json['msg'],
'running': json['running'] == null ? undefined : json['running'], 'running': json['running'] == null ? undefined : json['running'],
@@ -121,7 +122,6 @@ export function ImportLogToJSON(value?: ImportLog | null): any {
} }
return { return {
'id': value['id'],
'type': value['type'], 'type': value['type'],
'msg': value['msg'], 'msg': value['msg'],
'running': value['running'], 'running': value['running'],

View File

@@ -49,6 +49,12 @@ export interface ImportLogRequest {
* @memberof ImportLogRequest * @memberof ImportLogRequest
*/ */
importedRecipes?: number; importedRecipes?: number;
/**
*
* @type {number}
* @memberof ImportLogRequest
*/
id?: number;
} }
/** /**
@@ -74,6 +80,7 @@ export function ImportLogRequestFromJSONTyped(json: any, ignoreDiscriminator: bo
'running': json['running'] == null ? undefined : json['running'], 'running': json['running'] == null ? undefined : json['running'],
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'], 'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'], 'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -88,6 +95,7 @@ export function ImportLogRequestToJSON(value?: ImportLogRequest | null): any {
'running': value['running'], 'running': value['running'],
'total_recipes': value['totalRecipes'], 'total_recipes': value['totalRecipes'],
'imported_recipes': value['importedRecipes'], 'imported_recipes': value['importedRecipes'],
'id': value['id'],
}; };
} }

View File

@@ -37,7 +37,7 @@ export interface Ingredient {
* @type {number} * @type {number}
* @memberof Ingredient * @memberof Ingredient
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {Food} * @type {Food}
@@ -116,6 +116,7 @@ export interface Ingredient {
* Check if a given object implements the Ingredient interface. * Check if a given object implements the Ingredient interface.
*/ */
export function instanceOfIngredient(value: object): boolean { export function instanceOfIngredient(value: object): boolean {
if (!('id' in value)) return false;
if (!('food' in value)) return false; if (!('food' in value)) return false;
if (!('unit' in value)) return false; if (!('unit' in value)) return false;
if (!('amount' in value)) return false; if (!('amount' in value)) return false;
@@ -134,7 +135,7 @@ export function IngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean)
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'food': FoodFromJSON(json['food']), 'food': FoodFromJSON(json['food']),
'unit': UnitFromJSON(json['unit']), 'unit': UnitFromJSON(json['unit']),
'amount': json['amount'], 'amount': json['amount'],
@@ -156,7 +157,6 @@ export function IngredientToJSON(value?: Ingredient | null): any {
} }
return { return {
'id': value['id'],
'food': FoodToJSON(value['food']), 'food': FoodToJSON(value['food']),
'unit': UnitToJSON(value['unit']), 'unit': UnitToJSON(value['unit']),
'amount': value['amount'], 'amount': value['amount'],

View File

@@ -92,6 +92,12 @@ export interface IngredientRequest {
* @memberof IngredientRequest * @memberof IngredientRequest
*/ */
alwaysUsePluralFood?: boolean; alwaysUsePluralFood?: boolean;
/**
*
* @type {number}
* @memberof IngredientRequest
*/
id?: number;
} }
/** /**
@@ -124,6 +130,7 @@ export function IngredientRequestFromJSONTyped(json: any, ignoreDiscriminator: b
'originalText': json['original_text'] == null ? undefined : json['original_text'], 'originalText': json['original_text'] == null ? undefined : json['original_text'],
'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'], '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'], 'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -143,6 +150,7 @@ export function IngredientRequestToJSON(value?: IngredientRequest | null): any {
'original_text': value['originalText'], 'original_text': value['originalText'],
'always_use_plural_unit': value['alwaysUsePluralUnit'], 'always_use_plural_unit': value['alwaysUsePluralUnit'],
'always_use_plural_food': value['alwaysUsePluralFood'], 'always_use_plural_food': value['alwaysUsePluralFood'],
'id': value['id'],
}; };
} }

View File

@@ -31,7 +31,7 @@ export interface InviteLink {
* @type {number} * @type {number}
* @memberof InviteLink * @memberof InviteLink
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -92,6 +92,7 @@ export interface InviteLink {
* Check if a given object implements the InviteLink interface. * Check if a given object implements the InviteLink interface.
*/ */
export function instanceOfInviteLink(value: object): boolean { export function instanceOfInviteLink(value: object): boolean {
if (!('id' in value)) return false;
if (!('uuid' in value)) return false; if (!('uuid' in value)) return false;
if (!('group' in value)) return false; if (!('group' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
@@ -109,7 +110,7 @@ export function InviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean)
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'uuid': json['uuid'], 'uuid': json['uuid'],
'email': json['email'] == null ? undefined : json['email'], 'email': json['email'] == null ? undefined : json['email'],
'group': GroupFromJSON(json['group']), 'group': GroupFromJSON(json['group']),
@@ -128,7 +129,6 @@ export function InviteLinkToJSON(value?: InviteLink | null): any {
} }
return { return {
'id': value['id'],
'email': value['email'], 'email': value['email'],
'group': GroupToJSON(value['group']), 'group': GroupToJSON(value['group']),
'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)), 'valid_until': value['validUntil'] == null ? undefined : ((value['validUntil']).toISOString().substring(0,10)),

View File

@@ -62,6 +62,12 @@ export interface InviteLinkRequest {
* @memberof InviteLinkRequest * @memberof InviteLinkRequest
*/ */
internalNote?: string; internalNote?: string;
/**
*
* @type {number}
* @memberof InviteLinkRequest
*/
id?: number;
} }
/** /**
@@ -88,6 +94,7 @@ export function InviteLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: b
'usedBy': json['used_by'] == null ? undefined : json['used_by'], 'usedBy': json['used_by'] == null ? undefined : json['used_by'],
'reusable': json['reusable'] == null ? undefined : json['reusable'], 'reusable': json['reusable'] == null ? undefined : json['reusable'],
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'], 'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -103,6 +110,7 @@ export function InviteLinkRequestToJSON(value?: InviteLinkRequest | null): any {
'used_by': value['usedBy'], 'used_by': value['usedBy'],
'reusable': value['reusable'], 'reusable': value['reusable'],
'internal_note': value['internalNote'], 'internal_note': value['internalNote'],
'id': value['id'],
}; };
} }

View File

@@ -58,7 +58,7 @@ export interface Keyword {
* @type {number} * @type {number}
* @memberof Keyword * @memberof Keyword
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -113,6 +113,7 @@ export interface Keyword {
* Check if a given object implements the Keyword interface. * Check if a given object implements the Keyword interface.
*/ */
export function instanceOfKeyword(value: object): boolean { export function instanceOfKeyword(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
if (!('label' in value)) return false; if (!('label' in value)) return false;
if (!('parent' in value)) return false; if (!('parent' in value)) return false;
@@ -133,7 +134,7 @@ export function KeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): K
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'], 'name': json['name'],
'label': json['label'], 'label': json['label'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
@@ -151,7 +152,6 @@ export function KeywordToJSON(value?: Keyword | null): any {
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
'description': value['description'], 'description': value['description'],
}; };

View File

@@ -24,7 +24,7 @@ export interface KeywordLabel {
* @type {number} * @type {number}
* @memberof KeywordLabel * @memberof KeywordLabel
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -37,6 +37,7 @@ export interface KeywordLabel {
* Check if a given object implements the KeywordLabel interface. * Check if a given object implements the KeywordLabel interface.
*/ */
export function instanceOfKeywordLabel(value: object): boolean { export function instanceOfKeywordLabel(value: object): boolean {
if (!('id' in value)) return false;
if (!('label' in value)) return false; if (!('label' in value)) return false;
return true; return true;
} }
@@ -51,7 +52,7 @@ export function KeywordLabelFromJSONTyped(json: any, ignoreDiscriminator: boolea
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'label': json['label'], 'label': json['label'],
}; };
} }
@@ -62,7 +63,6 @@ export function KeywordLabelToJSON(value?: KeywordLabel | null): any {
} }
return { return {
'id': value['id'],
}; };
} }

View File

@@ -65,6 +65,12 @@ export interface KeywordRequest {
* @memberof KeywordRequest * @memberof KeywordRequest
*/ */
description?: string; description?: string;
/**
*
* @type {number}
* @memberof KeywordRequest
*/
id?: number;
} }
/** /**
@@ -87,6 +93,7 @@ export function KeywordRequestFromJSONTyped(json: any, ignoreDiscriminator: bool
'name': json['name'], 'name': json['name'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -98,6 +105,7 @@ export function KeywordRequestToJSON(value?: KeywordRequest | null): any {
'name': value['name'], 'name': value['name'],
'description': value['description'], 'description': value['description'],
'id': value['id'],
}; };
} }

View File

@@ -43,7 +43,7 @@ export interface MealPlan {
* @type {number} * @type {number}
* @memberof MealPlan * @memberof MealPlan
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -128,6 +128,7 @@ export interface MealPlan {
* Check if a given object implements the MealPlan interface. * Check if a given object implements the MealPlan interface.
*/ */
export function instanceOfMealPlan(value: object): boolean { export function instanceOfMealPlan(value: object): boolean {
if (!('id' in value)) return false;
if (!('servings' in value)) return false; if (!('servings' in value)) return false;
if (!('noteMarkdown' in value)) return false; if (!('noteMarkdown' in value)) return false;
if (!('fromDate' in value)) return false; if (!('fromDate' in value)) return false;
@@ -149,7 +150,7 @@ export function MealPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean):
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'title': json['title'] == null ? undefined : json['title'], 'title': json['title'] == null ? undefined : json['title'],
'recipe': json['recipe'] == null ? undefined : RecipeOverviewFromJSON(json['recipe']), 'recipe': json['recipe'] == null ? undefined : RecipeOverviewFromJSON(json['recipe']),
'servings': json['servings'], 'servings': json['servings'],
@@ -172,7 +173,6 @@ export function MealPlanToJSON(value?: MealPlan | null): any {
} }
return { return {
'id': value['id'],
'title': value['title'], 'title': value['title'],
'recipe': RecipeOverviewToJSON(value['recipe']), 'recipe': RecipeOverviewToJSON(value['recipe']),
'servings': value['servings'], 'servings': value['servings'],

View File

@@ -86,6 +86,12 @@ export interface MealPlanRequest {
* @memberof MealPlanRequest * @memberof MealPlanRequest
*/ */
shared?: Array<UserRequest>; shared?: Array<UserRequest>;
/**
*
* @type {number}
* @memberof MealPlanRequest
*/
id?: number;
} }
/** /**
@@ -116,6 +122,7 @@ export function MealPlanRequestFromJSONTyped(json: any, ignoreDiscriminator: boo
'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])), 'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])),
'mealType': MealTypeRequestFromJSON(json['meal_type']), 'mealType': MealTypeRequestFromJSON(json['meal_type']),
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)), 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -133,6 +140,7 @@ export function MealPlanRequestToJSON(value?: MealPlanRequest | null): any {
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)), 'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)),
'meal_type': MealTypeRequestToJSON(value['mealType']), 'meal_type': MealTypeRequestToJSON(value['mealType']),
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)), 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
'id': value['id'],
}; };
} }

View File

@@ -24,7 +24,7 @@ export interface MealType {
* @type {number} * @type {number}
* @memberof MealType * @memberof MealType
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -61,6 +61,7 @@ export interface MealType {
* Check if a given object implements the MealType interface. * Check if a given object implements the MealType interface.
*/ */
export function instanceOfMealType(value: object): boolean { export function instanceOfMealType(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
if (!('createdBy' in value)) return false; if (!('createdBy' in value)) return false;
return true; return true;
@@ -76,7 +77,7 @@ export function MealTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean):
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'], 'name': json['name'],
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
'color': json['color'] == null ? undefined : json['color'], 'color': json['color'] == null ? undefined : json['color'],
@@ -91,7 +92,6 @@ export function MealTypeToJSON(value?: MealType | null): any {
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
'order': value['order'], 'order': value['order'],
'color': value['color'], 'color': value['color'],

View File

@@ -43,6 +43,12 @@ export interface MealTypeRequest {
* @memberof MealTypeRequest * @memberof MealTypeRequest
*/ */
_default?: boolean; _default?: boolean;
/**
*
* @type {number}
* @memberof MealTypeRequest
*/
id?: number;
} }
/** /**
@@ -67,6 +73,7 @@ export function MealTypeRequestFromJSONTyped(json: any, ignoreDiscriminator: boo
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
'color': json['color'] == null ? undefined : json['color'], 'color': json['color'] == null ? undefined : json['color'],
'_default': json['default'] == null ? undefined : json['default'], '_default': json['default'] == null ? undefined : json['default'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -80,6 +87,7 @@ export function MealTypeRequestToJSON(value?: MealTypeRequest | null): any {
'order': value['order'], 'order': value['order'],
'color': value['color'], 'color': value['color'],
'default': value['_default'], 'default': value['_default'],
'id': value['id'],
}; };
} }

View File

@@ -24,7 +24,7 @@ export interface NutritionInformation {
* @type {number} * @type {number}
* @memberof NutritionInformation * @memberof NutritionInformation
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -61,6 +61,7 @@ export interface NutritionInformation {
* Check if a given object implements the NutritionInformation interface. * Check if a given object implements the NutritionInformation interface.
*/ */
export function instanceOfNutritionInformation(value: object): boolean { export function instanceOfNutritionInformation(value: object): boolean {
if (!('id' in value)) return false;
if (!('carbohydrates' in value)) return false; if (!('carbohydrates' in value)) return false;
if (!('fats' in value)) return false; if (!('fats' in value)) return false;
if (!('proteins' in value)) return false; if (!('proteins' in value)) return false;
@@ -78,7 +79,7 @@ export function NutritionInformationFromJSONTyped(json: any, ignoreDiscriminator
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'carbohydrates': json['carbohydrates'], 'carbohydrates': json['carbohydrates'],
'fats': json['fats'], 'fats': json['fats'],
'proteins': json['proteins'], 'proteins': json['proteins'],
@@ -93,7 +94,6 @@ export function NutritionInformationToJSON(value?: NutritionInformation | null):
} }
return { return {
'id': value['id'],
'carbohydrates': value['carbohydrates'], 'carbohydrates': value['carbohydrates'],
'fats': value['fats'], 'fats': value['fats'],
'proteins': value['proteins'], 'proteins': value['proteins'],

View File

@@ -49,6 +49,12 @@ export interface NutritionInformationRequest {
* @memberof NutritionInformationRequest * @memberof NutritionInformationRequest
*/ */
source?: string; source?: string;
/**
*
* @type {number}
* @memberof NutritionInformationRequest
*/
id?: number;
} }
/** /**
@@ -77,6 +83,7 @@ export function NutritionInformationRequestFromJSONTyped(json: any, ignoreDiscri
'proteins': json['proteins'], 'proteins': json['proteins'],
'calories': json['calories'], 'calories': json['calories'],
'source': json['source'] == null ? undefined : json['source'], 'source': json['source'] == null ? undefined : json['source'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -91,6 +98,7 @@ export function NutritionInformationRequestToJSON(value?: NutritionInformationRe
'proteins': value['proteins'], 'proteins': value['proteins'],
'calories': value['calories'], 'calories': value['calories'],
'source': value['source'], 'source': value['source'],
'id': value['id'],
}; };
} }

View File

@@ -65,7 +65,7 @@ export interface OpenDataCategory {
* @type {number} * @type {number}
* @memberof OpenDataCategory * @memberof OpenDataCategory
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {OpenDataVersion} * @type {OpenDataVersion}
@@ -108,6 +108,7 @@ export interface OpenDataCategory {
* Check if a given object implements the OpenDataCategory interface. * Check if a given object implements the OpenDataCategory interface.
*/ */
export function instanceOfOpenDataCategory(value: object): boolean { export function instanceOfOpenDataCategory(value: object): boolean {
if (!('id' in value)) return false;
if (!('version' in value)) return false; if (!('version' in value)) return false;
if (!('slug' in value)) return false; if (!('slug' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
@@ -125,7 +126,7 @@ export function OpenDataCategoryFromJSONTyped(json: any, ignoreDiscriminator: bo
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'version': OpenDataVersionFromJSON(json['version']), 'version': OpenDataVersionFromJSON(json['version']),
'slug': json['slug'], 'slug': json['slug'],
'name': json['name'], 'name': json['name'],
@@ -141,7 +142,6 @@ export function OpenDataCategoryToJSON(value?: OpenDataCategory | null): any {
} }
return { return {
'id': value['id'],
'version': OpenDataVersionToJSON(value['version']), 'version': OpenDataVersionToJSON(value['version']),
'slug': value['slug'], 'slug': value['slug'],
'name': value['name'], 'name': value['name'],

View File

@@ -90,6 +90,12 @@ export interface OpenDataCategoryRequest {
* @memberof OpenDataCategoryRequest * @memberof OpenDataCategoryRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof OpenDataCategoryRequest
*/
id?: number;
} }
/** /**
@@ -117,6 +123,7 @@ export function OpenDataCategoryRequestFromJSONTyped(json: any, ignoreDiscrimina
'name': json['name'], 'name': json['name'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -131,6 +138,7 @@ export function OpenDataCategoryRequestToJSON(value?: OpenDataCategoryRequest |
'name': value['name'], 'name': value['name'],
'description': value['description'], 'description': value['description'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -43,7 +43,7 @@ export interface OpenDataConversion {
* @type {number} * @type {number}
* @memberof OpenDataConversion * @memberof OpenDataConversion
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {OpenDataVersion} * @type {OpenDataVersion}
@@ -110,6 +110,7 @@ export interface OpenDataConversion {
* Check if a given object implements the OpenDataConversion interface. * Check if a given object implements the OpenDataConversion interface.
*/ */
export function instanceOfOpenDataConversion(value: object): boolean { export function instanceOfOpenDataConversion(value: object): boolean {
if (!('id' in value)) return false;
if (!('version' in value)) return false; if (!('version' in value)) return false;
if (!('slug' in value)) return false; if (!('slug' in value)) return false;
if (!('food' in value)) return false; if (!('food' in value)) return false;
@@ -132,7 +133,7 @@ export function OpenDataConversionFromJSONTyped(json: any, ignoreDiscriminator:
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'version': OpenDataVersionFromJSON(json['version']), 'version': OpenDataVersionFromJSON(json['version']),
'slug': json['slug'], 'slug': json['slug'],
'food': OpenDataFoodFromJSON(json['food']), 'food': OpenDataFoodFromJSON(json['food']),
@@ -152,7 +153,6 @@ export function OpenDataConversionToJSON(value?: OpenDataConversion | null): any
} }
return { return {
'id': value['id'],
'version': OpenDataVersionToJSON(value['version']), 'version': OpenDataVersionToJSON(value['version']),
'slug': value['slug'], 'slug': value['slug'],
'food': OpenDataFoodToJSON(value['food']), 'food': OpenDataFoodToJSON(value['food']),

View File

@@ -92,6 +92,12 @@ export interface OpenDataConversionRequest {
* @memberof OpenDataConversionRequest * @memberof OpenDataConversionRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof OpenDataConversionRequest
*/
id?: number;
} }
/** /**
@@ -128,6 +134,7 @@ export function OpenDataConversionRequestFromJSONTyped(json: any, ignoreDiscrimi
'convertedUnit': OpenDataUnitRequestFromJSON(json['converted_unit']), 'convertedUnit': OpenDataUnitRequestFromJSON(json['converted_unit']),
'source': json['source'], 'source': json['source'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -146,6 +153,7 @@ export function OpenDataConversionRequestToJSON(value?: OpenDataConversionReques
'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']), 'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']),
'source': value['source'], 'source': value['source'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -83,7 +83,7 @@ export interface OpenDataFood {
* @type {number} * @type {number}
* @memberof OpenDataFood * @memberof OpenDataFood
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {OpenDataVersion} * @type {OpenDataVersion}
@@ -186,6 +186,7 @@ export interface OpenDataFood {
* Check if a given object implements the OpenDataFood interface. * Check if a given object implements the OpenDataFood interface.
*/ */
export function instanceOfOpenDataFood(value: object): boolean { export function instanceOfOpenDataFood(value: object): boolean {
if (!('id' in value)) return false;
if (!('version' in value)) return false; if (!('version' in value)) return false;
if (!('slug' in value)) return false; if (!('slug' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
@@ -208,7 +209,7 @@ export function OpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator: boolea
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'version': OpenDataVersionFromJSON(json['version']), 'version': OpenDataVersionFromJSON(json['version']),
'slug': json['slug'], 'slug': json['slug'],
'name': json['name'], 'name': json['name'],
@@ -234,7 +235,6 @@ export function OpenDataFoodToJSON(value?: OpenDataFood | null): any {
} }
return { return {
'id': value['id'],
'version': OpenDataVersionToJSON(value['version']), 'version': OpenDataVersionToJSON(value['version']),
'slug': value['slug'], 'slug': value['slug'],
'name': value['name'], 'name': value['name'],

View File

@@ -31,7 +31,7 @@ export interface OpenDataFoodProperty {
* @type {number} * @type {number}
* @memberof OpenDataFoodProperty * @memberof OpenDataFoodProperty
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {OpenDataProperty} * @type {OpenDataProperty}
@@ -50,6 +50,7 @@ export interface OpenDataFoodProperty {
* Check if a given object implements the OpenDataFoodProperty interface. * Check if a given object implements the OpenDataFoodProperty interface.
*/ */
export function instanceOfOpenDataFoodProperty(value: object): boolean { export function instanceOfOpenDataFoodProperty(value: object): boolean {
if (!('id' in value)) return false;
if (!('property' in value)) return false; if (!('property' in value)) return false;
if (!('propertyAmount' in value)) return false; if (!('propertyAmount' in value)) return false;
return true; return true;
@@ -65,7 +66,7 @@ export function OpenDataFoodPropertyFromJSONTyped(json: any, ignoreDiscriminator
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'property': OpenDataPropertyFromJSON(json['property']), 'property': OpenDataPropertyFromJSON(json['property']),
'propertyAmount': json['property_amount'], 'propertyAmount': json['property_amount'],
}; };
@@ -77,7 +78,6 @@ export function OpenDataFoodPropertyToJSON(value?: OpenDataFoodProperty | null):
} }
return { return {
'id': value['id'],
'property': OpenDataPropertyToJSON(value['property']), 'property': OpenDataPropertyToJSON(value['property']),
'property_amount': value['propertyAmount'], 'property_amount': value['propertyAmount'],
}; };

View File

@@ -38,6 +38,12 @@ export interface OpenDataFoodPropertyRequest {
* @memberof OpenDataFoodPropertyRequest * @memberof OpenDataFoodPropertyRequest
*/ */
propertyAmount: string; propertyAmount: string;
/**
*
* @type {number}
* @memberof OpenDataFoodPropertyRequest
*/
id?: number;
} }
/** /**
@@ -61,6 +67,7 @@ export function OpenDataFoodPropertyRequestFromJSONTyped(json: any, ignoreDiscri
'property': OpenDataPropertyRequestFromJSON(json['property']), 'property': OpenDataPropertyRequestFromJSON(json['property']),
'propertyAmount': json['property_amount'], 'propertyAmount': json['property_amount'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -72,6 +79,7 @@ export function OpenDataFoodPropertyRequestToJSON(value?: OpenDataFoodPropertyRe
'property': OpenDataPropertyRequestToJSON(value['property']), 'property': OpenDataPropertyRequestToJSON(value['property']),
'property_amount': value['propertyAmount'], 'property_amount': value['propertyAmount'],
'id': value['id'],
}; };
} }

View File

@@ -168,6 +168,12 @@ export interface OpenDataFoodRequest {
* @memberof OpenDataFoodRequest * @memberof OpenDataFoodRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof OpenDataFoodRequest
*/
id?: number;
} }
/** /**
@@ -210,6 +216,7 @@ export function OpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscriminator:
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'], 'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
'fdcId': json['fdc_id'], 'fdcId': json['fdc_id'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -234,6 +241,7 @@ export function OpenDataFoodRequestToJSON(value?: OpenDataFoodRequest | null): a
'properties_source': value['propertiesSource'], 'properties_source': value['propertiesSource'],
'fdc_id': value['fdcId'], 'fdc_id': value['fdcId'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -65,7 +65,7 @@ export interface OpenDataProperty {
* @type {number} * @type {number}
* @memberof OpenDataProperty * @memberof OpenDataProperty
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {OpenDataVersion} * @type {OpenDataVersion}
@@ -114,6 +114,7 @@ export interface OpenDataProperty {
* Check if a given object implements the OpenDataProperty interface. * Check if a given object implements the OpenDataProperty interface.
*/ */
export function instanceOfOpenDataProperty(value: object): boolean { export function instanceOfOpenDataProperty(value: object): boolean {
if (!('id' in value)) return false;
if (!('version' in value)) return false; if (!('version' in value)) return false;
if (!('slug' in value)) return false; if (!('slug' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
@@ -131,7 +132,7 @@ export function OpenDataPropertyFromJSONTyped(json: any, ignoreDiscriminator: bo
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'version': OpenDataVersionFromJSON(json['version']), 'version': OpenDataVersionFromJSON(json['version']),
'slug': json['slug'], 'slug': json['slug'],
'name': json['name'], 'name': json['name'],
@@ -148,7 +149,6 @@ export function OpenDataPropertyToJSON(value?: OpenDataProperty | null): any {
} }
return { return {
'id': value['id'],
'version': OpenDataVersionToJSON(value['version']), 'version': OpenDataVersionToJSON(value['version']),
'slug': value['slug'], 'slug': value['slug'],
'name': value['name'], 'name': value['name'],

View File

@@ -96,6 +96,12 @@ export interface OpenDataPropertyRequest {
* @memberof OpenDataPropertyRequest * @memberof OpenDataPropertyRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof OpenDataPropertyRequest
*/
id?: number;
} }
/** /**
@@ -124,6 +130,7 @@ export function OpenDataPropertyRequestFromJSONTyped(json: any, ignoreDiscrimina
'unit': json['unit'] == null ? undefined : json['unit'], 'unit': json['unit'] == null ? undefined : json['unit'],
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -139,6 +146,7 @@ export function OpenDataPropertyRequestToJSON(value?: OpenDataPropertyRequest |
'unit': value['unit'], 'unit': value['unit'],
'fdc_id': value['fdcId'], 'fdc_id': value['fdcId'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -37,7 +37,7 @@ export interface OpenDataStore {
* @type {number} * @type {number}
* @memberof OpenDataStore * @memberof OpenDataStore
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {OpenDataVersion} * @type {OpenDataVersion}
@@ -80,6 +80,7 @@ export interface OpenDataStore {
* Check if a given object implements the OpenDataStore interface. * Check if a given object implements the OpenDataStore interface.
*/ */
export function instanceOfOpenDataStore(value: object): boolean { export function instanceOfOpenDataStore(value: object): boolean {
if (!('id' in value)) return false;
if (!('version' in value)) return false; if (!('version' in value)) return false;
if (!('slug' in value)) return false; if (!('slug' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
@@ -98,7 +99,7 @@ export function OpenDataStoreFromJSONTyped(json: any, ignoreDiscriminator: boole
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'version': OpenDataVersionFromJSON(json['version']), 'version': OpenDataVersionFromJSON(json['version']),
'slug': json['slug'], 'slug': json['slug'],
'name': json['name'], 'name': json['name'],
@@ -114,7 +115,6 @@ export function OpenDataStoreToJSON(value?: OpenDataStore | null): any {
} }
return { return {
'id': value['id'],
'version': OpenDataVersionToJSON(value['version']), 'version': OpenDataVersionToJSON(value['version']),
'slug': value['slug'], 'slug': value['slug'],
'name': value['name'], 'name': value['name'],

View File

@@ -31,7 +31,7 @@ export interface OpenDataStoreCategory {
* @type {number} * @type {number}
* @memberof OpenDataStoreCategory * @memberof OpenDataStoreCategory
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {OpenDataCategory} * @type {OpenDataCategory}
@@ -56,6 +56,7 @@ export interface OpenDataStoreCategory {
* Check if a given object implements the OpenDataStoreCategory interface. * Check if a given object implements the OpenDataStoreCategory interface.
*/ */
export function instanceOfOpenDataStoreCategory(value: object): boolean { export function instanceOfOpenDataStoreCategory(value: object): boolean {
if (!('id' in value)) return false;
if (!('category' in value)) return false; if (!('category' in value)) return false;
if (!('store' in value)) return false; if (!('store' in value)) return false;
return true; return true;
@@ -71,7 +72,7 @@ export function OpenDataStoreCategoryFromJSONTyped(json: any, ignoreDiscriminato
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'category': OpenDataCategoryFromJSON(json['category']), 'category': OpenDataCategoryFromJSON(json['category']),
'store': json['store'], 'store': json['store'],
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
@@ -84,7 +85,6 @@ export function OpenDataStoreCategoryToJSON(value?: OpenDataStoreCategory | null
} }
return { return {
'id': value['id'],
'category': OpenDataCategoryToJSON(value['category']), 'category': OpenDataCategoryToJSON(value['category']),
'store': value['store'], 'store': value['store'],
'order': value['order'], 'order': value['order'],

View File

@@ -44,6 +44,12 @@ export interface OpenDataStoreCategoryRequest {
* @memberof OpenDataStoreCategoryRequest * @memberof OpenDataStoreCategoryRequest
*/ */
order?: number; order?: number;
/**
*
* @type {number}
* @memberof OpenDataStoreCategoryRequest
*/
id?: number;
} }
/** /**
@@ -68,6 +74,7 @@ export function OpenDataStoreCategoryRequestFromJSONTyped(json: any, ignoreDiscr
'category': OpenDataCategoryRequestFromJSON(json['category']), 'category': OpenDataCategoryRequestFromJSON(json['category']),
'store': json['store'], 'store': json['store'],
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -80,6 +87,7 @@ export function OpenDataStoreCategoryRequestToJSON(value?: OpenDataStoreCategory
'category': OpenDataCategoryRequestToJSON(value['category']), 'category': OpenDataCategoryRequestToJSON(value['category']),
'store': value['store'], 'store': value['store'],
'order': value['order'], 'order': value['order'],
'id': value['id'],
}; };
} }

View File

@@ -62,6 +62,12 @@ export interface OpenDataStoreRequest {
* @memberof OpenDataStoreRequest * @memberof OpenDataStoreRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof OpenDataStoreRequest
*/
id?: number;
} }
/** /**
@@ -90,6 +96,7 @@ export function OpenDataStoreRequestFromJSONTyped(json: any, ignoreDiscriminator
'name': json['name'], 'name': json['name'],
'categoryToStore': (json['category_to_store'] == null ? null : (json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryRequestFromJSON)), 'categoryToStore': (json['category_to_store'] == null ? null : (json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryRequestFromJSON)),
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -104,6 +111,7 @@ export function OpenDataStoreRequestToJSON(value?: OpenDataStoreRequest | null):
'name': value['name'], 'name': value['name'],
'category_to_store': (value['categoryToStore'] == null ? null : (value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryRequestToJSON)), 'category_to_store': (value['categoryToStore'] == null ? null : (value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryRequestToJSON)),
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -77,7 +77,7 @@ export interface OpenDataUnit {
* @type {number} * @type {number}
* @memberof OpenDataUnit * @memberof OpenDataUnit
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {OpenDataVersion} * @type {OpenDataVersion}
@@ -132,6 +132,7 @@ export interface OpenDataUnit {
* Check if a given object implements the OpenDataUnit interface. * Check if a given object implements the OpenDataUnit interface.
*/ */
export function instanceOfOpenDataUnit(value: object): boolean { export function instanceOfOpenDataUnit(value: object): boolean {
if (!('id' in value)) return false;
if (!('version' in value)) return false; if (!('version' in value)) return false;
if (!('slug' in value)) return false; if (!('slug' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
@@ -150,7 +151,7 @@ export function OpenDataUnitFromJSONTyped(json: any, ignoreDiscriminator: boolea
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'version': OpenDataVersionFromJSON(json['version']), 'version': OpenDataVersionFromJSON(json['version']),
'slug': json['slug'], 'slug': json['slug'],
'name': json['name'], 'name': json['name'],
@@ -168,7 +169,6 @@ export function OpenDataUnitToJSON(value?: OpenDataUnit | null): any {
} }
return { return {
'id': value['id'],
'version': OpenDataVersionToJSON(value['version']), 'version': OpenDataVersionToJSON(value['version']),
'slug': value['slug'], 'slug': value['slug'],
'name': value['name'], 'name': value['name'],

View File

@@ -114,6 +114,12 @@ export interface OpenDataUnitRequest {
* @memberof OpenDataUnitRequest * @memberof OpenDataUnitRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof OpenDataUnitRequest
*/
id?: number;
} }
/** /**
@@ -144,6 +150,7 @@ export function OpenDataUnitRequestFromJSONTyped(json: any, ignoreDiscriminator:
'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']), 'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']),
'type': OpenDataUnitTypeEnumFromJSON(json['type']), 'type': OpenDataUnitTypeEnumFromJSON(json['type']),
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -160,6 +167,7 @@ export function OpenDataUnitRequestToJSON(value?: OpenDataUnitRequest | null): a
'base_unit': BaseUnitEnumToJSON(value['baseUnit']), 'base_unit': BaseUnitEnumToJSON(value['baseUnit']),
'type': OpenDataUnitTypeEnumToJSON(value['type']), 'type': OpenDataUnitTypeEnumToJSON(value['type']),
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -58,7 +58,7 @@ export interface OpenDataVersion {
* @type {number} * @type {number}
* @memberof OpenDataVersion * @memberof OpenDataVersion
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -83,6 +83,7 @@ export interface OpenDataVersion {
* Check if a given object implements the OpenDataVersion interface. * Check if a given object implements the OpenDataVersion interface.
*/ */
export function instanceOfOpenDataVersion(value: object): boolean { export function instanceOfOpenDataVersion(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false; if (!('name' in value)) return false;
if (!('code' in value)) return false; if (!('code' in value)) return false;
return true; return true;
@@ -98,7 +99,7 @@ export function OpenDataVersionFromJSONTyped(json: any, ignoreDiscriminator: boo
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'name': json['name'], 'name': json['name'],
'code': json['code'], 'code': json['code'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
@@ -111,7 +112,6 @@ export function OpenDataVersionToJSON(value?: OpenDataVersion | null): any {
} }
return { return {
'id': value['id'],
'name': value['name'], 'name': value['name'],
'code': value['code'], 'code': value['code'],
'comment': value['comment'], 'comment': value['comment'],

View File

@@ -71,6 +71,12 @@ export interface OpenDataVersionRequest {
* @memberof OpenDataVersionRequest * @memberof OpenDataVersionRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof OpenDataVersionRequest
*/
id?: number;
} }
/** /**
@@ -95,6 +101,7 @@ export function OpenDataVersionRequestFromJSONTyped(json: any, ignoreDiscriminat
'name': json['name'], 'name': json['name'],
'code': json['code'], 'code': json['code'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -107,6 +114,7 @@ export function OpenDataVersionRequestToJSON(value?: OpenDataVersionRequest | nu
'name': value['name'], 'name': value['name'],
'code': value['code'], 'code': value['code'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -31,6 +31,12 @@ export interface PatchedAccessTokenRequest {
* @memberof PatchedAccessTokenRequest * @memberof PatchedAccessTokenRequest
*/ */
scope?: string; scope?: string;
/**
*
* @type {number}
* @memberof PatchedAccessTokenRequest
*/
id?: number;
} }
/** /**
@@ -52,6 +58,7 @@ export function PatchedAccessTokenRequestFromJSONTyped(json: any, ignoreDiscrimi
'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])),
'scope': json['scope'] == null ? undefined : json['scope'], 'scope': json['scope'] == null ? undefined : json['scope'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -63,6 +70,7 @@ export function PatchedAccessTokenRequestToJSON(value?: PatchedAccessTokenReques
'expires': value['expires'] == null ? undefined : ((value['expires']).toISOString()), 'expires': value['expires'] == null ? undefined : ((value['expires']).toISOString()),
'scope': value['scope'], 'scope': value['scope'],
'id': value['id'],
}; };
} }

View File

@@ -74,6 +74,12 @@ export interface PatchedAutomationRequest {
* @memberof PatchedAutomationRequest * @memberof PatchedAutomationRequest
*/ */
disabled?: boolean; disabled?: boolean;
/**
*
* @type {number}
* @memberof PatchedAutomationRequest
*/
id?: number;
} }
/** /**
@@ -101,6 +107,7 @@ export function PatchedAutomationRequestFromJSONTyped(json: any, ignoreDiscrimin
'param3': json['param_3'] == null ? undefined : json['param_3'], 'param3': json['param_3'] == null ? undefined : json['param_3'],
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
'disabled': json['disabled'] == null ? undefined : json['disabled'], 'disabled': json['disabled'] == null ? undefined : json['disabled'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -118,6 +125,7 @@ export function PatchedAutomationRequestToJSON(value?: PatchedAutomationRequest
'param_3': value['param3'], 'param_3': value['param3'],
'order': value['order'], 'order': value['order'],
'disabled': value['disabled'], 'disabled': value['disabled'],
'id': value['id'],
}; };
} }

View File

@@ -31,6 +31,12 @@ export interface PatchedBookmarkletImportRequest {
* @memberof PatchedBookmarkletImportRequest * @memberof PatchedBookmarkletImportRequest
*/ */
html?: string; html?: string;
/**
*
* @type {number}
* @memberof PatchedBookmarkletImportRequest
*/
id?: number;
} }
/** /**
@@ -52,6 +58,7 @@ export function PatchedBookmarkletImportRequestFromJSONTyped(json: any, ignoreDi
'url': json['url'] == null ? undefined : json['url'], 'url': json['url'] == null ? undefined : json['url'],
'html': json['html'] == null ? undefined : json['html'], 'html': json['html'] == null ? undefined : json['html'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -63,6 +70,7 @@ export function PatchedBookmarkletImportRequestToJSON(value?: PatchedBookmarklet
'url': value['url'], 'url': value['url'],
'html': value['html'], 'html': value['html'],
'id': value['id'],
}; };
} }

View File

@@ -67,6 +67,12 @@ export interface PatchedConnectorConfigConfigRequest {
* @memberof PatchedConnectorConfigConfigRequest * @memberof PatchedConnectorConfigConfigRequest
*/ */
onShoppingListEntryDeletedEnabled?: boolean; onShoppingListEntryDeletedEnabled?: boolean;
/**
*
* @type {number}
* @memberof PatchedConnectorConfigConfigRequest
*/
id?: number;
} }
/** /**
@@ -94,6 +100,7 @@ export function PatchedConnectorConfigConfigRequestFromJSONTyped(json: any, igno
'onShoppingListEntryCreatedEnabled': json['on_shopping_list_entry_created_enabled'] == null ? undefined : json['on_shopping_list_entry_created_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'], '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'], 'onShoppingListEntryDeletedEnabled': json['on_shopping_list_entry_deleted_enabled'] == null ? undefined : json['on_shopping_list_entry_deleted_enabled'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -111,6 +118,7 @@ export function PatchedConnectorConfigConfigRequestToJSON(value?: PatchedConnect
'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'], 'on_shopping_list_entry_created_enabled': value['onShoppingListEntryCreatedEnabled'],
'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'], 'on_shopping_list_entry_updated_enabled': value['onShoppingListEntryUpdatedEnabled'],
'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'], 'on_shopping_list_entry_deleted_enabled': value['onShoppingListEntryDeletedEnabled'],
'id': value['id'],
}; };
} }

View File

@@ -49,6 +49,12 @@ export interface PatchedCookLogRequest {
* @memberof PatchedCookLogRequest * @memberof PatchedCookLogRequest
*/ */
createdAt?: Date; createdAt?: Date;
/**
*
* @type {number}
* @memberof PatchedCookLogRequest
*/
id?: number;
} }
/** /**
@@ -73,6 +79,7 @@ export function PatchedCookLogRequestFromJSONTyped(json: any, ignoreDiscriminato
'rating': json['rating'] == null ? undefined : json['rating'], 'rating': json['rating'] == null ? undefined : json['rating'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -87,6 +94,7 @@ export function PatchedCookLogRequestToJSON(value?: PatchedCookLogRequest | null
'rating': value['rating'], 'rating': value['rating'],
'comment': value['comment'], 'comment': value['comment'],
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
'id': value['id'],
}; };
} }

View File

@@ -44,6 +44,12 @@ export interface PatchedCustomFilterRequest {
* @memberof PatchedCustomFilterRequest * @memberof PatchedCustomFilterRequest
*/ */
shared?: Array<UserRequest>; shared?: Array<UserRequest>;
/**
*
* @type {number}
* @memberof PatchedCustomFilterRequest
*/
id?: number;
} }
/** /**
@@ -66,6 +72,7 @@ export function PatchedCustomFilterRequestFromJSONTyped(json: any, ignoreDiscrim
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'search': json['search'] == null ? undefined : json['search'], 'search': json['search'] == null ? undefined : json['search'],
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)), 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -78,6 +85,7 @@ export function PatchedCustomFilterRequestToJSON(value?: PatchedCustomFilterRequ
'name': value['name'], 'name': value['name'],
'search': value['search'], 'search': value['search'],
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)), 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
'id': value['id'],
}; };
} }

View File

@@ -61,6 +61,12 @@ export interface PatchedExportLogRequest {
* @memberof PatchedExportLogRequest * @memberof PatchedExportLogRequest
*/ */
possiblyNotExpired?: boolean; possiblyNotExpired?: boolean;
/**
*
* @type {number}
* @memberof PatchedExportLogRequest
*/
id?: number;
} }
/** /**
@@ -87,6 +93,7 @@ export function PatchedExportLogRequestFromJSONTyped(json: any, ignoreDiscrimina
'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'], 'exportedRecipes': json['exported_recipes'] == null ? undefined : json['exported_recipes'],
'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'], 'cacheDuration': json['cache_duration'] == null ? undefined : json['cache_duration'],
'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'], 'possiblyNotExpired': json['possibly_not_expired'] == null ? undefined : json['possibly_not_expired'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -103,6 +110,7 @@ export function PatchedExportLogRequestToJSON(value?: PatchedExportLogRequest |
'exported_recipes': value['exportedRecipes'], 'exported_recipes': value['exportedRecipes'],
'cache_duration': value['cacheDuration'], 'cache_duration': value['cacheDuration'],
'possibly_not_expired': value['possiblyNotExpired'], 'possibly_not_expired': value['possiblyNotExpired'],
'id': value['id'],
}; };
} }

View File

@@ -198,6 +198,12 @@ export interface PatchedFoodRequest {
* @memberof PatchedFoodRequest * @memberof PatchedFoodRequest
*/ */
openDataSlug?: string; openDataSlug?: string;
/**
*
* @type {number}
* @memberof PatchedFoodRequest
*/
id?: number;
} }
/** /**
@@ -235,6 +241,7 @@ export function PatchedFoodRequestFromJSONTyped(json: any, ignoreDiscriminator:
'substituteChildren': json['substitute_children'] == null ? undefined : json['substitute_children'], '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)), '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'], 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -262,6 +269,7 @@ export function PatchedFoodRequestToJSON(value?: PatchedFoodRequest | null): any
'substitute_children': value['substituteChildren'], 'substitute_children': value['substituteChildren'],
'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)), 'child_inherit_fields': value['childInheritFields'] == null ? undefined : ((value['childInheritFields'] as Array<any>).map(FoodInheritFieldRequestToJSON)),
'open_data_slug': value['openDataSlug'], 'open_data_slug': value['openDataSlug'],
'id': value['id'],
}; };
} }

View File

@@ -49,6 +49,12 @@ export interface PatchedImportLogRequest {
* @memberof PatchedImportLogRequest * @memberof PatchedImportLogRequest
*/ */
importedRecipes?: number; importedRecipes?: number;
/**
*
* @type {number}
* @memberof PatchedImportLogRequest
*/
id?: number;
} }
/** /**
@@ -73,6 +79,7 @@ export function PatchedImportLogRequestFromJSONTyped(json: any, ignoreDiscrimina
'running': json['running'] == null ? undefined : json['running'], 'running': json['running'] == null ? undefined : json['running'],
'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'], 'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'],
'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'], 'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -87,6 +94,7 @@ export function PatchedImportLogRequestToJSON(value?: PatchedImportLogRequest |
'running': value['running'], 'running': value['running'],
'total_recipes': value['totalRecipes'], 'total_recipes': value['totalRecipes'],
'imported_recipes': value['importedRecipes'], 'imported_recipes': value['importedRecipes'],
'id': value['id'],
}; };
} }

View File

@@ -92,6 +92,12 @@ export interface PatchedIngredientRequest {
* @memberof PatchedIngredientRequest * @memberof PatchedIngredientRequest
*/ */
alwaysUsePluralFood?: boolean; alwaysUsePluralFood?: boolean;
/**
*
* @type {number}
* @memberof PatchedIngredientRequest
*/
id?: number;
} }
/** /**
@@ -121,6 +127,7 @@ export function PatchedIngredientRequestFromJSONTyped(json: any, ignoreDiscrimin
'originalText': json['original_text'] == null ? undefined : json['original_text'], 'originalText': json['original_text'] == null ? undefined : json['original_text'],
'alwaysUsePluralUnit': json['always_use_plural_unit'] == null ? undefined : json['always_use_plural_unit'], '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'], 'alwaysUsePluralFood': json['always_use_plural_food'] == null ? undefined : json['always_use_plural_food'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -140,6 +147,7 @@ export function PatchedIngredientRequestToJSON(value?: PatchedIngredientRequest
'original_text': value['originalText'], 'original_text': value['originalText'],
'always_use_plural_unit': value['alwaysUsePluralUnit'], 'always_use_plural_unit': value['alwaysUsePluralUnit'],
'always_use_plural_food': value['alwaysUsePluralFood'], 'always_use_plural_food': value['alwaysUsePluralFood'],
'id': value['id'],
}; };
} }

View File

@@ -62,6 +62,12 @@ export interface PatchedInviteLinkRequest {
* @memberof PatchedInviteLinkRequest * @memberof PatchedInviteLinkRequest
*/ */
internalNote?: string; internalNote?: string;
/**
*
* @type {number}
* @memberof PatchedInviteLinkRequest
*/
id?: number;
} }
/** /**
@@ -87,6 +93,7 @@ export function PatchedInviteLinkRequestFromJSONTyped(json: any, ignoreDiscrimin
'usedBy': json['used_by'] == null ? undefined : json['used_by'], 'usedBy': json['used_by'] == null ? undefined : json['used_by'],
'reusable': json['reusable'] == null ? undefined : json['reusable'], 'reusable': json['reusable'] == null ? undefined : json['reusable'],
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'], 'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -102,6 +109,7 @@ export function PatchedInviteLinkRequestToJSON(value?: PatchedInviteLinkRequest
'used_by': value['usedBy'], 'used_by': value['usedBy'],
'reusable': value['reusable'], 'reusable': value['reusable'],
'internal_note': value['internalNote'], 'internal_note': value['internalNote'],
'id': value['id'],
}; };
} }

View File

@@ -65,6 +65,12 @@ export interface PatchedKeywordRequest {
* @memberof PatchedKeywordRequest * @memberof PatchedKeywordRequest
*/ */
description?: string; description?: string;
/**
*
* @type {number}
* @memberof PatchedKeywordRequest
*/
id?: number;
} }
/** /**
@@ -86,6 +92,7 @@ export function PatchedKeywordRequestFromJSONTyped(json: any, ignoreDiscriminato
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -97,6 +104,7 @@ export function PatchedKeywordRequestToJSON(value?: PatchedKeywordRequest | null
'name': value['name'], 'name': value['name'],
'description': value['description'], 'description': value['description'],
'id': value['id'],
}; };
} }

View File

@@ -86,6 +86,12 @@ export interface PatchedMealPlanRequest {
* @memberof PatchedMealPlanRequest * @memberof PatchedMealPlanRequest
*/ */
shared?: Array<UserRequest>; shared?: Array<UserRequest>;
/**
*
* @type {number}
* @memberof PatchedMealPlanRequest
*/
id?: number;
} }
/** /**
@@ -113,6 +119,7 @@ export function PatchedMealPlanRequestFromJSONTyped(json: any, ignoreDiscriminat
'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])), 'toDate': json['to_date'] == null ? undefined : (new Date(json['to_date'])),
'mealType': json['meal_type'] == null ? undefined : MealTypeRequestFromJSON(json['meal_type']), 'mealType': json['meal_type'] == null ? undefined : MealTypeRequestFromJSON(json['meal_type']),
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)), 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -130,6 +137,7 @@ export function PatchedMealPlanRequestToJSON(value?: PatchedMealPlanRequest | nu
'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)), 'to_date': value['toDate'] == null ? undefined : ((value['toDate']).toISOString().substring(0,10)),
'meal_type': MealTypeRequestToJSON(value['mealType']), 'meal_type': MealTypeRequestToJSON(value['mealType']),
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)), 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
'id': value['id'],
}; };
} }

View File

@@ -43,6 +43,12 @@ export interface PatchedMealTypeRequest {
* @memberof PatchedMealTypeRequest * @memberof PatchedMealTypeRequest
*/ */
_default?: boolean; _default?: boolean;
/**
*
* @type {number}
* @memberof PatchedMealTypeRequest
*/
id?: number;
} }
/** /**
@@ -66,6 +72,7 @@ export function PatchedMealTypeRequestFromJSONTyped(json: any, ignoreDiscriminat
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
'color': json['color'] == null ? undefined : json['color'], 'color': json['color'] == null ? undefined : json['color'],
'_default': json['default'] == null ? undefined : json['default'], '_default': json['default'] == null ? undefined : json['default'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -79,6 +86,7 @@ export function PatchedMealTypeRequestToJSON(value?: PatchedMealTypeRequest | nu
'order': value['order'], 'order': value['order'],
'color': value['color'], 'color': value['color'],
'default': value['_default'], 'default': value['_default'],
'id': value['id'],
}; };
} }

View File

@@ -90,6 +90,12 @@ export interface PatchedOpenDataCategoryRequest {
* @memberof PatchedOpenDataCategoryRequest * @memberof PatchedOpenDataCategoryRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof PatchedOpenDataCategoryRequest
*/
id?: number;
} }
/** /**
@@ -114,6 +120,7 @@ export function PatchedOpenDataCategoryRequestFromJSONTyped(json: any, ignoreDis
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -128,6 +135,7 @@ export function PatchedOpenDataCategoryRequestToJSON(value?: PatchedOpenDataCate
'name': value['name'], 'name': value['name'],
'description': value['description'], 'description': value['description'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -92,6 +92,12 @@ export interface PatchedOpenDataConversionRequest {
* @memberof PatchedOpenDataConversionRequest * @memberof PatchedOpenDataConversionRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof PatchedOpenDataConversionRequest
*/
id?: number;
} }
/** /**
@@ -120,6 +126,7 @@ export function PatchedOpenDataConversionRequestFromJSONTyped(json: any, ignoreD
'convertedUnit': json['converted_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['converted_unit']), 'convertedUnit': json['converted_unit'] == null ? undefined : OpenDataUnitRequestFromJSON(json['converted_unit']),
'source': json['source'] == null ? undefined : json['source'], 'source': json['source'] == null ? undefined : json['source'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -138,6 +145,7 @@ export function PatchedOpenDataConversionRequestToJSON(value?: PatchedOpenDataCo
'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']), 'converted_unit': OpenDataUnitRequestToJSON(value['convertedUnit']),
'source': value['source'], 'source': value['source'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -168,6 +168,12 @@ export interface PatchedOpenDataFoodRequest {
* @memberof PatchedOpenDataFoodRequest * @memberof PatchedOpenDataFoodRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof PatchedOpenDataFoodRequest
*/
id?: number;
} }
/** /**
@@ -202,6 +208,7 @@ export function PatchedOpenDataFoodRequestFromJSONTyped(json: any, ignoreDiscrim
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'], 'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -226,6 +233,7 @@ export function PatchedOpenDataFoodRequestToJSON(value?: PatchedOpenDataFoodRequ
'properties_source': value['propertiesSource'], 'properties_source': value['propertiesSource'],
'fdc_id': value['fdcId'], 'fdc_id': value['fdcId'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -96,6 +96,12 @@ export interface PatchedOpenDataPropertyRequest {
* @memberof PatchedOpenDataPropertyRequest * @memberof PatchedOpenDataPropertyRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof PatchedOpenDataPropertyRequest
*/
id?: number;
} }
/** /**
@@ -121,6 +127,7 @@ export function PatchedOpenDataPropertyRequestFromJSONTyped(json: any, ignoreDis
'unit': json['unit'] == null ? undefined : json['unit'], 'unit': json['unit'] == null ? undefined : json['unit'],
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'], 'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -136,6 +143,7 @@ export function PatchedOpenDataPropertyRequestToJSON(value?: PatchedOpenDataProp
'unit': value['unit'], 'unit': value['unit'],
'fdc_id': value['fdcId'], 'fdc_id': value['fdcId'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -62,6 +62,12 @@ export interface PatchedOpenDataStoreRequest {
* @memberof PatchedOpenDataStoreRequest * @memberof PatchedOpenDataStoreRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof PatchedOpenDataStoreRequest
*/
id?: number;
} }
/** /**
@@ -86,6 +92,7 @@ export function PatchedOpenDataStoreRequestFromJSONTyped(json: any, ignoreDiscri
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'categoryToStore': json['category_to_store'] == null ? undefined : ((json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryRequestFromJSON)), 'categoryToStore': json['category_to_store'] == null ? undefined : ((json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryRequestFromJSON)),
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -100,6 +107,7 @@ export function PatchedOpenDataStoreRequestToJSON(value?: PatchedOpenDataStoreRe
'name': value['name'], 'name': value['name'],
'category_to_store': value['categoryToStore'] == null ? undefined : ((value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryRequestToJSON)), 'category_to_store': value['categoryToStore'] == null ? undefined : ((value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryRequestToJSON)),
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -114,6 +114,12 @@ export interface PatchedOpenDataUnitRequest {
* @memberof PatchedOpenDataUnitRequest * @memberof PatchedOpenDataUnitRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof PatchedOpenDataUnitRequest
*/
id?: number;
} }
/** /**
@@ -140,6 +146,7 @@ export function PatchedOpenDataUnitRequestFromJSONTyped(json: any, ignoreDiscrim
'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']), 'baseUnit': json['base_unit'] == null ? undefined : BaseUnitEnumFromJSON(json['base_unit']),
'type': json['type'] == null ? undefined : OpenDataUnitTypeEnumFromJSON(json['type']), 'type': json['type'] == null ? undefined : OpenDataUnitTypeEnumFromJSON(json['type']),
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -156,6 +163,7 @@ export function PatchedOpenDataUnitRequestToJSON(value?: PatchedOpenDataUnitRequ
'base_unit': BaseUnitEnumToJSON(value['baseUnit']), 'base_unit': BaseUnitEnumToJSON(value['baseUnit']),
'type': OpenDataUnitTypeEnumToJSON(value['type']), 'type': OpenDataUnitTypeEnumToJSON(value['type']),
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -71,6 +71,12 @@ export interface PatchedOpenDataVersionRequest {
* @memberof PatchedOpenDataVersionRequest * @memberof PatchedOpenDataVersionRequest
*/ */
comment?: string; comment?: string;
/**
*
* @type {number}
* @memberof PatchedOpenDataVersionRequest
*/
id?: number;
} }
/** /**
@@ -93,6 +99,7 @@ export function PatchedOpenDataVersionRequestFromJSONTyped(json: any, ignoreDisc
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'code': json['code'] == null ? undefined : json['code'], 'code': json['code'] == null ? undefined : json['code'],
'comment': json['comment'] == null ? undefined : json['comment'], 'comment': json['comment'] == null ? undefined : json['comment'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -105,6 +112,7 @@ export function PatchedOpenDataVersionRequestToJSON(value?: PatchedOpenDataVersi
'name': value['name'], 'name': value['name'],
'code': value['code'], 'code': value['code'],
'comment': value['comment'], 'comment': value['comment'],
'id': value['id'],
}; };
} }

View File

@@ -72,6 +72,12 @@ export interface PatchedPropertyRequest {
* @memberof PatchedPropertyRequest * @memberof PatchedPropertyRequest
*/ */
propertyType?: PropertyTypeRequest; propertyType?: PropertyTypeRequest;
/**
*
* @type {number}
* @memberof PatchedPropertyRequest
*/
id?: number;
} }
/** /**
@@ -93,6 +99,7 @@ export function PatchedPropertyRequestFromJSONTyped(json: any, ignoreDiscriminat
'propertyAmount': json['property_amount'] == null ? undefined : json['property_amount'], 'propertyAmount': json['property_amount'] == null ? undefined : json['property_amount'],
'propertyType': json['property_type'] == null ? undefined : PropertyTypeRequestFromJSON(json['property_type']), 'propertyType': json['property_type'] == null ? undefined : PropertyTypeRequestFromJSON(json['property_type']),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -104,6 +111,7 @@ export function PatchedPropertyRequestToJSON(value?: PatchedPropertyRequest | nu
'property_amount': value['propertyAmount'], 'property_amount': value['propertyAmount'],
'property_type': PropertyTypeRequestToJSON(value['propertyType']), 'property_type': PropertyTypeRequestToJSON(value['propertyType']),
'id': value['id'],
}; };
} }

View File

@@ -31,6 +31,12 @@ export interface PatchedRecipeBookEntryRequest {
* @memberof PatchedRecipeBookEntryRequest * @memberof PatchedRecipeBookEntryRequest
*/ */
recipe?: number; recipe?: number;
/**
*
* @type {number}
* @memberof PatchedRecipeBookEntryRequest
*/
id?: number;
} }
/** /**
@@ -52,6 +58,7 @@ export function PatchedRecipeBookEntryRequestFromJSONTyped(json: any, ignoreDisc
'book': json['book'] == null ? undefined : json['book'], 'book': json['book'] == null ? undefined : json['book'],
'recipe': json['recipe'] == null ? undefined : json['recipe'], 'recipe': json['recipe'] == null ? undefined : json['recipe'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -63,6 +70,7 @@ export function PatchedRecipeBookEntryRequestToJSON(value?: PatchedRecipeBookEnt
'book': value['book'], 'book': value['book'],
'recipe': value['recipe'], 'recipe': value['recipe'],
'id': value['id'],
}; };
} }

View File

@@ -62,6 +62,12 @@ export interface PatchedRecipeBookRequest {
* @memberof PatchedRecipeBookRequest * @memberof PatchedRecipeBookRequest
*/ */
order?: number; order?: number;
/**
*
* @type {number}
* @memberof PatchedRecipeBookRequest
*/
id?: number;
} }
/** /**
@@ -86,6 +92,7 @@ export function PatchedRecipeBookRequestFromJSONTyped(json: any, ignoreDiscrimin
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)), 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
'filter': json['filter'] == null ? undefined : CustomFilterRequestFromJSON(json['filter']), 'filter': json['filter'] == null ? undefined : CustomFilterRequestFromJSON(json['filter']),
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -100,6 +107,7 @@ export function PatchedRecipeBookRequestToJSON(value?: PatchedRecipeBookRequest
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)), 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
'filter': CustomFilterRequestToJSON(value['filter']), 'filter': CustomFilterRequestToJSON(value['filter']),
'order': value['order'], 'order': value['order'],
'id': value['id'],
}; };
} }

View File

@@ -146,6 +146,12 @@ export interface PatchedRecipeRequest {
* @memberof PatchedRecipeRequest * @memberof PatchedRecipeRequest
*/ */
shared?: Array<UserRequest>; shared?: Array<UserRequest>;
/**
*
* @type {number}
* @memberof PatchedRecipeRequest
*/
id?: number;
} }
/** /**
@@ -181,6 +187,7 @@ export function PatchedRecipeRequestFromJSONTyped(json: any, ignoreDiscriminator
'servingsText': json['servings_text'] == null ? undefined : json['servings_text'], 'servingsText': json['servings_text'] == null ? undefined : json['servings_text'],
'_private': json['private'] == null ? undefined : json['private'], '_private': json['private'] == null ? undefined : json['private'],
'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)), 'shared': json['shared'] == null ? undefined : ((json['shared'] as Array<any>).map(UserRequestFromJSON)),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -206,6 +213,7 @@ export function PatchedRecipeRequestToJSON(value?: PatchedRecipeRequest | null):
'servings_text': value['servingsText'], 'servings_text': value['servingsText'],
'private': value['_private'], 'private': value['_private'],
'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)), 'shared': value['shared'] == null ? undefined : ((value['shared'] as Array<any>).map(UserRequestToJSON)),
'id': value['id'],
}; };
} }

View File

@@ -80,6 +80,12 @@ export interface PatchedShoppingListEntryRequest {
* @memberof PatchedShoppingListEntryRequest * @memberof PatchedShoppingListEntryRequest
*/ */
delayUntil?: Date; delayUntil?: Date;
/**
*
* @type {number}
* @memberof PatchedShoppingListEntryRequest
*/
id?: number;
} }
/** /**
@@ -107,6 +113,7 @@ export function PatchedShoppingListEntryRequestFromJSONTyped(json: any, ignoreDi
'checked': json['checked'] == null ? undefined : json['checked'], 'checked': json['checked'] == null ? undefined : json['checked'],
'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])), 'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
'delayUntil': json['delay_until'] == null ? undefined : (new Date(json['delay_until'])), 'delayUntil': json['delay_until'] == null ? undefined : (new Date(json['delay_until'])),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -124,6 +131,7 @@ export function PatchedShoppingListEntryRequestToJSON(value?: PatchedShoppingLis
'checked': value['checked'], 'checked': value['checked'],
'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()), 'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()),
'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()), 'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()),
'id': value['id'],
}; };
} }

View File

@@ -37,6 +37,12 @@ export interface PatchedShoppingListRecipeRequest {
* @memberof PatchedShoppingListRecipeRequest * @memberof PatchedShoppingListRecipeRequest
*/ */
servings?: string; servings?: string;
/**
*
* @type {number}
* @memberof PatchedShoppingListRecipeRequest
*/
id?: number;
} }
/** /**
@@ -59,6 +65,7 @@ export function PatchedShoppingListRecipeRequestFromJSONTyped(json: any, ignoreD
'recipe': json['recipe'] == null ? undefined : json['recipe'], 'recipe': json['recipe'] == null ? undefined : json['recipe'],
'mealplan': json['mealplan'] == null ? undefined : json['mealplan'], 'mealplan': json['mealplan'] == null ? undefined : json['mealplan'],
'servings': json['servings'] == null ? undefined : json['servings'], 'servings': json['servings'] == null ? undefined : json['servings'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -71,6 +78,7 @@ export function PatchedShoppingListRecipeRequestToJSON(value?: PatchedShoppingLi
'recipe': value['recipe'], 'recipe': value['recipe'],
'mealplan': value['mealplan'], 'mealplan': value['mealplan'],
'servings': value['servings'], 'servings': value['servings'],
'id': value['id'],
}; };
} }

View File

@@ -140,6 +140,12 @@ export interface PatchedSpaceRequest {
* @memberof PatchedSpaceRequest * @memberof PatchedSpaceRequest
*/ */
logoColorSvg?: UserFileViewRequest; logoColorSvg?: UserFileViewRequest;
/**
*
* @type {number}
* @memberof PatchedSpaceRequest
*/
id?: number;
} }
/** /**
@@ -175,6 +181,7 @@ export function PatchedSpaceRequestFromJSONTyped(json: any, ignoreDiscriminator:
'logoColor192': json['logo_color_192'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_192']), 'logoColor192': json['logo_color_192'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_192']),
'logoColor512': json['logo_color_512'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_512']), 'logoColor512': json['logo_color_512'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_512']),
'logoColorSvg': json['logo_color_svg'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_svg']), 'logoColorSvg': json['logo_color_svg'] == null ? undefined : UserFileViewRequestFromJSON(json['logo_color_svg']),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -200,6 +207,7 @@ export function PatchedSpaceRequestToJSON(value?: PatchedSpaceRequest | null): a
'logo_color_192': UserFileViewRequestToJSON(value['logoColor192']), 'logo_color_192': UserFileViewRequestToJSON(value['logoColor192']),
'logo_color_512': UserFileViewRequestToJSON(value['logoColor512']), 'logo_color_512': UserFileViewRequestToJSON(value['logoColor512']),
'logo_color_svg': UserFileViewRequestToJSON(value['logoColorSvg']), 'logo_color_svg': UserFileViewRequestToJSON(value['logoColorSvg']),
'id': value['id'],
}; };
} }

View File

@@ -86,6 +86,12 @@ export interface PatchedStepRequest {
* @memberof PatchedStepRequest * @memberof PatchedStepRequest
*/ */
showIngredientsTable?: boolean; showIngredientsTable?: boolean;
/**
*
* @type {number}
* @memberof PatchedStepRequest
*/
id?: number;
} }
/** /**
@@ -114,6 +120,7 @@ export function PatchedStepRequestFromJSONTyped(json: any, ignoreDiscriminator:
'file': json['file'] == null ? undefined : UserFileViewRequestFromJSON(json['file']), 'file': json['file'] == null ? undefined : UserFileViewRequestFromJSON(json['file']),
'stepRecipe': json['step_recipe'] == null ? undefined : json['step_recipe'], 'stepRecipe': json['step_recipe'] == null ? undefined : json['step_recipe'],
'showIngredientsTable': json['show_ingredients_table'] == null ? undefined : json['show_ingredients_table'], 'showIngredientsTable': json['show_ingredients_table'] == null ? undefined : json['show_ingredients_table'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -132,6 +139,7 @@ export function PatchedStepRequestToJSON(value?: PatchedStepRequest | null): any
'file': UserFileViewRequestToJSON(value['file']), 'file': UserFileViewRequestToJSON(value['file']),
'step_recipe': value['stepRecipe'], 'step_recipe': value['stepRecipe'],
'show_ingredients_table': value['showIngredientsTable'], 'show_ingredients_table': value['showIngredientsTable'],
'id': value['id'],
}; };
} }

View File

@@ -56,6 +56,12 @@ export interface PatchedStorageRequest {
* @memberof PatchedStorageRequest * @memberof PatchedStorageRequest
*/ */
token?: string; token?: string;
/**
*
* @type {number}
* @memberof PatchedStorageRequest
*/
id?: number;
} }
/** /**
@@ -80,6 +86,7 @@ export function PatchedStorageRequestFromJSONTyped(json: any, ignoreDiscriminato
'username': json['username'] == null ? undefined : json['username'], 'username': json['username'] == null ? undefined : json['username'],
'password': json['password'] == null ? undefined : json['password'], 'password': json['password'] == null ? undefined : json['password'],
'token': json['token'] == null ? undefined : json['token'], 'token': json['token'] == null ? undefined : json['token'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -94,6 +101,7 @@ export function PatchedStorageRequestToJSON(value?: PatchedStorageRequest | null
'username': value['username'], 'username': value['username'],
'password': value['password'], 'password': value['password'],
'token': value['token'], 'token': value['token'],
'id': value['id'],
}; };
} }

View File

@@ -44,6 +44,12 @@ export interface PatchedSupermarketCategoryRelationRequest {
* @memberof PatchedSupermarketCategoryRelationRequest * @memberof PatchedSupermarketCategoryRelationRequest
*/ */
order?: number; order?: number;
/**
*
* @type {number}
* @memberof PatchedSupermarketCategoryRelationRequest
*/
id?: number;
} }
/** /**
@@ -66,6 +72,7 @@ export function PatchedSupermarketCategoryRelationRequestFromJSONTyped(json: any
'category': json['category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['category']), 'category': json['category'] == null ? undefined : SupermarketCategoryRequestFromJSON(json['category']),
'supermarket': json['supermarket'] == null ? undefined : json['supermarket'], 'supermarket': json['supermarket'] == null ? undefined : json['supermarket'],
'order': json['order'] == null ? undefined : json['order'], 'order': json['order'] == null ? undefined : json['order'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -78,6 +85,7 @@ export function PatchedSupermarketCategoryRelationRequestToJSON(value?: PatchedS
'category': SupermarketCategoryRequestToJSON(value['category']), 'category': SupermarketCategoryRequestToJSON(value['category']),
'supermarket': value['supermarket'], 'supermarket': value['supermarket'],
'order': value['order'], 'order': value['order'],
'id': value['id'],
}; };
} }

View File

@@ -65,6 +65,12 @@ export interface PatchedSupermarketCategoryRequest {
* @memberof PatchedSupermarketCategoryRequest * @memberof PatchedSupermarketCategoryRequest
*/ */
description?: string; description?: string;
/**
*
* @type {number}
* @memberof PatchedSupermarketCategoryRequest
*/
id?: number;
} }
/** /**
@@ -86,6 +92,7 @@ export function PatchedSupermarketCategoryRequestFromJSONTyped(json: any, ignore
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -97,6 +104,7 @@ export function PatchedSupermarketCategoryRequestToJSON(value?: PatchedSupermark
'name': value['name'], 'name': value['name'],
'description': value['description'], 'description': value['description'],
'id': value['id'],
}; };
} }

View File

@@ -71,6 +71,12 @@ export interface PatchedSupermarketRequest {
* @memberof PatchedSupermarketRequest * @memberof PatchedSupermarketRequest
*/ */
openDataSlug?: string; openDataSlug?: string;
/**
*
* @type {number}
* @memberof PatchedSupermarketRequest
*/
id?: number;
} }
/** /**
@@ -93,6 +99,7 @@ export function PatchedSupermarketRequestFromJSONTyped(json: any, ignoreDiscrimi
'name': json['name'] == null ? undefined : json['name'], 'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -105,6 +112,7 @@ export function PatchedSupermarketRequestToJSON(value?: PatchedSupermarketReques
'name': value['name'], 'name': value['name'],
'description': value['description'], 'description': value['description'],
'open_data_slug': value['openDataSlug'], 'open_data_slug': value['openDataSlug'],
'id': value['id'],
}; };
} }

View File

@@ -43,6 +43,12 @@ export interface PatchedSyncRequest {
* @memberof PatchedSyncRequest * @memberof PatchedSyncRequest
*/ */
lastChecked?: Date; lastChecked?: Date;
/**
*
* @type {number}
* @memberof PatchedSyncRequest
*/
id?: number;
} }
/** /**
@@ -66,6 +72,7 @@ export function PatchedSyncRequestFromJSONTyped(json: any, ignoreDiscriminator:
'path': json['path'] == null ? undefined : json['path'], 'path': json['path'] == null ? undefined : json['path'],
'active': json['active'] == null ? undefined : json['active'], 'active': json['active'] == null ? undefined : json['active'],
'lastChecked': json['last_checked'] == null ? undefined : (new Date(json['last_checked'])), 'lastChecked': json['last_checked'] == null ? undefined : (new Date(json['last_checked'])),
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -79,6 +86,7 @@ export function PatchedSyncRequestToJSON(value?: PatchedSyncRequest | null): any
'path': value['path'], 'path': value['path'],
'active': value['active'], 'active': value['active'],
'last_checked': value['lastChecked'] == null ? undefined : ((value['lastChecked'] as any).toISOString()), 'last_checked': value['lastChecked'] == null ? undefined : ((value['lastChecked'] as any).toISOString()),
'id': value['id'],
}; };
} }

View File

@@ -68,6 +68,12 @@ export interface PatchedUnitConversionRequest {
* @memberof PatchedUnitConversionRequest * @memberof PatchedUnitConversionRequest
*/ */
openDataSlug?: string; openDataSlug?: string;
/**
*
* @type {number}
* @memberof PatchedUnitConversionRequest
*/
id?: number;
} }
/** /**
@@ -93,6 +99,7 @@ export function PatchedUnitConversionRequestFromJSONTyped(json: any, ignoreDiscr
'convertedUnit': json['converted_unit'] == null ? undefined : UnitRequestFromJSON(json['converted_unit']), 'convertedUnit': json['converted_unit'] == null ? undefined : UnitRequestFromJSON(json['converted_unit']),
'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']), 'food': json['food'] == null ? undefined : FoodRequestFromJSON(json['food']),
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -108,6 +115,7 @@ export function PatchedUnitConversionRequestToJSON(value?: PatchedUnitConversion
'converted_unit': UnitRequestToJSON(value['convertedUnit']), 'converted_unit': UnitRequestToJSON(value['convertedUnit']),
'food': FoodRequestToJSON(value['food']), 'food': FoodRequestToJSON(value['food']),
'open_data_slug': value['openDataSlug'], 'open_data_slug': value['openDataSlug'],
'id': value['id'],
}; };
} }

View File

@@ -83,6 +83,12 @@ export interface PatchedUnitRequest {
* @memberof PatchedUnitRequest * @memberof PatchedUnitRequest
*/ */
openDataSlug?: string; openDataSlug?: string;
/**
*
* @type {number}
* @memberof PatchedUnitRequest
*/
id?: number;
} }
/** /**
@@ -107,6 +113,7 @@ export function PatchedUnitRequestFromJSONTyped(json: any, ignoreDiscriminator:
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
'baseUnit': json['base_unit'] == null ? undefined : json['base_unit'], 'baseUnit': json['base_unit'] == null ? undefined : json['base_unit'],
'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'], 'openDataSlug': json['open_data_slug'] == null ? undefined : json['open_data_slug'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -121,6 +128,7 @@ export function PatchedUnitRequestToJSON(value?: PatchedUnitRequest | null): any
'description': value['description'], 'description': value['description'],
'base_unit': value['baseUnit'], 'base_unit': value['baseUnit'],
'open_data_slug': value['openDataSlug'], 'open_data_slug': value['openDataSlug'],
'id': value['id'],
}; };
} }

View File

@@ -31,6 +31,12 @@ export interface PatchedUserRequest {
* @memberof PatchedUserRequest * @memberof PatchedUserRequest
*/ */
lastName?: string; lastName?: string;
/**
*
* @type {number}
* @memberof PatchedUserRequest
*/
id?: number;
} }
/** /**
@@ -52,6 +58,7 @@ export function PatchedUserRequestFromJSONTyped(json: any, ignoreDiscriminator:
'firstName': json['first_name'] == null ? undefined : json['first_name'], 'firstName': json['first_name'] == null ? undefined : json['first_name'],
'lastName': json['last_name'] == null ? undefined : json['last_name'], 'lastName': json['last_name'] == null ? undefined : json['last_name'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -63,6 +70,7 @@ export function PatchedUserRequestToJSON(value?: PatchedUserRequest | null): any
'first_name': value['firstName'], 'first_name': value['firstName'],
'last_name': value['lastName'], 'last_name': value['lastName'],
'id': value['id'],
}; };
} }

View File

@@ -44,6 +44,12 @@ export interface PatchedUserSpaceRequest {
* @memberof PatchedUserSpaceRequest * @memberof PatchedUserSpaceRequest
*/ */
internalNote?: string; internalNote?: string;
/**
*
* @type {number}
* @memberof PatchedUserSpaceRequest
*/
id?: number;
} }
/** /**
@@ -66,6 +72,7 @@ export function PatchedUserSpaceRequestFromJSONTyped(json: any, ignoreDiscrimina
'groups': json['groups'] == null ? undefined : ((json['groups'] as Array<any>).map(GroupRequestFromJSON)), 'groups': json['groups'] == null ? undefined : ((json['groups'] as Array<any>).map(GroupRequestFromJSON)),
'active': json['active'] == null ? undefined : json['active'], 'active': json['active'] == null ? undefined : json['active'],
'internalNote': json['internal_note'] == null ? undefined : json['internal_note'], 'internalNote': json['internal_note'] == null ? undefined : json['internal_note'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -78,6 +85,7 @@ export function PatchedUserSpaceRequestToJSON(value?: PatchedUserSpaceRequest |
'groups': value['groups'] == null ? undefined : ((value['groups'] as Array<any>).map(GroupRequestToJSON)), 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array<any>).map(GroupRequestToJSON)),
'active': value['active'], 'active': value['active'],
'internal_note': value['internalNote'], 'internal_note': value['internalNote'],
'id': value['id'],
}; };
} }

View File

@@ -25,6 +25,12 @@ export interface PatchedViewLogRequest {
* @memberof PatchedViewLogRequest * @memberof PatchedViewLogRequest
*/ */
recipe?: number; recipe?: number;
/**
*
* @type {number}
* @memberof PatchedViewLogRequest
*/
id?: number;
} }
/** /**
@@ -45,6 +51,7 @@ export function PatchedViewLogRequestFromJSONTyped(json: any, ignoreDiscriminato
return { return {
'recipe': json['recipe'] == null ? undefined : json['recipe'], 'recipe': json['recipe'] == null ? undefined : json['recipe'],
'id': json['id'] == null ? undefined : json['id'],
}; };
} }
@@ -55,6 +62,7 @@ export function PatchedViewLogRequestToJSON(value?: PatchedViewLogRequest | null
return { return {
'recipe': value['recipe'], 'recipe': value['recipe'],
'id': value['id'],
}; };
} }

View File

@@ -65,7 +65,7 @@ export interface Property {
* @type {number} * @type {number}
* @memberof Property * @memberof Property
*/ */
id?: number; readonly id: number;
/** /**
* *
* @type {string} * @type {string}
@@ -84,6 +84,7 @@ export interface Property {
* Check if a given object implements the Property interface. * Check if a given object implements the Property interface.
*/ */
export function instanceOfProperty(value: object): boolean { export function instanceOfProperty(value: object): boolean {
if (!('id' in value)) return false;
if (!('propertyAmount' in value)) return false; if (!('propertyAmount' in value)) return false;
if (!('propertyType' in value)) return false; if (!('propertyType' in value)) return false;
return true; return true;
@@ -99,7 +100,7 @@ export function PropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean):
} }
return { return {
'id': json['id'] == null ? undefined : json['id'], 'id': json['id'],
'propertyAmount': json['property_amount'], 'propertyAmount': json['property_amount'],
'propertyType': PropertyTypeFromJSON(json['property_type']), 'propertyType': PropertyTypeFromJSON(json['property_type']),
}; };
@@ -111,7 +112,6 @@ export function PropertyToJSON(value?: Property | null): any {
} }
return { return {
'id': value['id'],
'property_amount': value['propertyAmount'], 'property_amount': value['propertyAmount'],
'property_type': PropertyTypeToJSON(value['propertyType']), 'property_type': PropertyTypeToJSON(value['propertyType']),
}; };

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