mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
283 lines
8.6 KiB
TypeScript
283 lines
8.6 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Tandoor
|
|
* Tandoor API Docs
|
|
*
|
|
* The version of the OpenAPI document: 0.0.0
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
import { mapValues } from '../runtime';
|
|
import type { FoodInheritField } from './FoodInheritField';
|
|
import {
|
|
FoodInheritFieldFromJSON,
|
|
FoodInheritFieldFromJSONTyped,
|
|
FoodInheritFieldToJSON,
|
|
} from './FoodInheritField';
|
|
import type { SpaceNavTextColorEnum } from './SpaceNavTextColorEnum';
|
|
import {
|
|
SpaceNavTextColorEnumFromJSON,
|
|
SpaceNavTextColorEnumFromJSONTyped,
|
|
SpaceNavTextColorEnumToJSON,
|
|
} from './SpaceNavTextColorEnum';
|
|
import type { SpaceThemeEnum } from './SpaceThemeEnum';
|
|
import {
|
|
SpaceThemeEnumFromJSON,
|
|
SpaceThemeEnumFromJSONTyped,
|
|
SpaceThemeEnumToJSON,
|
|
} from './SpaceThemeEnum';
|
|
import type { UserFileView } from './UserFileView';
|
|
import {
|
|
UserFileViewFromJSON,
|
|
UserFileViewFromJSONTyped,
|
|
UserFileViewToJSON,
|
|
} from './UserFileView';
|
|
|
|
/**
|
|
* Adds nested create feature
|
|
* @export
|
|
* @interface PatchedSpace
|
|
*/
|
|
export interface PatchedSpace {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
name?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly createdBy?: number;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly createdAt?: Date;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
message?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly maxRecipes?: number;
|
|
/**
|
|
* Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload.
|
|
* @type {number}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly maxFileStorageMb?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly maxUsers?: number;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly allowSharing?: boolean;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly demo?: boolean;
|
|
/**
|
|
*
|
|
* @type {Array<FoodInheritField>}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
foodInherit?: Array<FoodInheritField>;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly userCount?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly recipeCount?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
readonly fileSizeMb?: number;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
image?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
navLogo?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {SpaceThemeEnum}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
spaceTheme?: SpaceThemeEnum;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
customSpaceTheme?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
navBgColor?: string;
|
|
/**
|
|
*
|
|
* @type {SpaceNavTextColorEnum}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
navTextColor?: SpaceNavTextColorEnum;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
logoColor32?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
logoColor128?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
logoColor144?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
logoColor180?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
logoColor192?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
logoColor512?: UserFileView;
|
|
/**
|
|
*
|
|
* @type {UserFileView}
|
|
* @memberof PatchedSpace
|
|
*/
|
|
logoColorSvg?: UserFileView;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the PatchedSpace interface.
|
|
*/
|
|
export function instanceOfPatchedSpace(value: object): boolean {
|
|
return true;
|
|
}
|
|
|
|
export function PatchedSpaceFromJSON(json: any): PatchedSpace {
|
|
return PatchedSpaceFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function PatchedSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedSpace {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'] == null ? undefined : json['id'],
|
|
'name': json['name'] == null ? undefined : json['name'],
|
|
'createdBy': json['created_by'] == null ? undefined : json['created_by'],
|
|
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
'message': json['message'] == null ? undefined : json['message'],
|
|
'maxRecipes': json['max_recipes'] == null ? undefined : json['max_recipes'],
|
|
'maxFileStorageMb': json['max_file_storage_mb'] == null ? undefined : json['max_file_storage_mb'],
|
|
'maxUsers': json['max_users'] == null ? undefined : json['max_users'],
|
|
'allowSharing': json['allow_sharing'] == null ? undefined : json['allow_sharing'],
|
|
'demo': json['demo'] == null ? undefined : json['demo'],
|
|
'foodInherit': json['food_inherit'] == null ? undefined : ((json['food_inherit'] as Array<any>).map(FoodInheritFieldFromJSON)),
|
|
'userCount': json['user_count'] == null ? undefined : json['user_count'],
|
|
'recipeCount': json['recipe_count'] == null ? undefined : json['recipe_count'],
|
|
'fileSizeMb': json['file_size_mb'] == null ? undefined : json['file_size_mb'],
|
|
'image': json['image'] == null ? undefined : UserFileViewFromJSON(json['image']),
|
|
'navLogo': json['nav_logo'] == null ? undefined : UserFileViewFromJSON(json['nav_logo']),
|
|
'spaceTheme': json['space_theme'] == null ? undefined : SpaceThemeEnumFromJSON(json['space_theme']),
|
|
'customSpaceTheme': json['custom_space_theme'] == null ? undefined : UserFileViewFromJSON(json['custom_space_theme']),
|
|
'navBgColor': json['nav_bg_color'] == null ? undefined : json['nav_bg_color'],
|
|
'navTextColor': json['nav_text_color'] == null ? undefined : SpaceNavTextColorEnumFromJSON(json['nav_text_color']),
|
|
'logoColor32': json['logo_color_32'] == null ? undefined : UserFileViewFromJSON(json['logo_color_32']),
|
|
'logoColor128': json['logo_color_128'] == null ? undefined : UserFileViewFromJSON(json['logo_color_128']),
|
|
'logoColor144': json['logo_color_144'] == null ? undefined : UserFileViewFromJSON(json['logo_color_144']),
|
|
'logoColor180': json['logo_color_180'] == null ? undefined : UserFileViewFromJSON(json['logo_color_180']),
|
|
'logoColor192': json['logo_color_192'] == null ? undefined : UserFileViewFromJSON(json['logo_color_192']),
|
|
'logoColor512': json['logo_color_512'] == null ? undefined : UserFileViewFromJSON(json['logo_color_512']),
|
|
'logoColorSvg': json['logo_color_svg'] == null ? undefined : UserFileViewFromJSON(json['logo_color_svg']),
|
|
};
|
|
}
|
|
|
|
export function PatchedSpaceToJSON(value?: Omit<PatchedSpace, 'id'|'created_by'|'created_at'|'max_recipes'|'max_file_storage_mb'|'max_users'|'allow_sharing'|'demo'|'user_count'|'recipe_count'|'file_size_mb'> | null): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
return {
|
|
|
|
'name': value['name'],
|
|
'message': value['message'],
|
|
'food_inherit': value['foodInherit'] == null ? undefined : ((value['foodInherit'] as Array<any>).map(FoodInheritFieldToJSON)),
|
|
'image': UserFileViewToJSON(value['image']),
|
|
'nav_logo': UserFileViewToJSON(value['navLogo']),
|
|
'space_theme': SpaceThemeEnumToJSON(value['spaceTheme']),
|
|
'custom_space_theme': UserFileViewToJSON(value['customSpaceTheme']),
|
|
'nav_bg_color': value['navBgColor'],
|
|
'nav_text_color': SpaceNavTextColorEnumToJSON(value['navTextColor']),
|
|
'logo_color_32': UserFileViewToJSON(value['logoColor32']),
|
|
'logo_color_128': UserFileViewToJSON(value['logoColor128']),
|
|
'logo_color_144': UserFileViewToJSON(value['logoColor144']),
|
|
'logo_color_180': UserFileViewToJSON(value['logoColor180']),
|
|
'logo_color_192': UserFileViewToJSON(value['logoColor192']),
|
|
'logo_color_512': UserFileViewToJSON(value['logoColor512']),
|
|
'logo_color_svg': UserFileViewToJSON(value['logoColorSvg']),
|
|
};
|
|
}
|
|
|