mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
importer stuff
This commit is contained in:
@@ -13,13 +13,13 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { AutomationTypeEnum } from './AutomationTypeEnum';
|
||||
import type { TypeEnum } from './TypeEnum';
|
||||
import {
|
||||
AutomationTypeEnumFromJSON,
|
||||
AutomationTypeEnumFromJSONTyped,
|
||||
AutomationTypeEnumToJSON,
|
||||
AutomationTypeEnumToJSONTyped,
|
||||
} from './AutomationTypeEnum';
|
||||
TypeEnumFromJSON,
|
||||
TypeEnumFromJSONTyped,
|
||||
TypeEnumToJSON,
|
||||
TypeEnumToJSONTyped,
|
||||
} from './TypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -35,10 +35,10 @@ export interface Automation {
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {AutomationTypeEnum}
|
||||
* @type {TypeEnum}
|
||||
* @memberof Automation
|
||||
*/
|
||||
type: AutomationTypeEnum;
|
||||
type: TypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -111,7 +111,7 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'type': AutomationTypeEnumFromJSON(json['type']),
|
||||
'type': TypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
@@ -135,7 +135,7 @@ export function AutomationToJSONTyped(value?: Omit<Automation, 'created_by'> | n
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'type': AutomationTypeEnumToJSON(value['type']),
|
||||
'type': TypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { AutomationTypeEnum } from './AutomationTypeEnum';
|
||||
import type { TypeEnum } from './TypeEnum';
|
||||
import {
|
||||
AutomationTypeEnumFromJSON,
|
||||
AutomationTypeEnumFromJSONTyped,
|
||||
AutomationTypeEnumToJSON,
|
||||
AutomationTypeEnumToJSONTyped,
|
||||
} from './AutomationTypeEnum';
|
||||
TypeEnumFromJSON,
|
||||
TypeEnumFromJSONTyped,
|
||||
TypeEnumToJSON,
|
||||
TypeEnumToJSONTyped,
|
||||
} from './TypeEnum';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -35,10 +35,10 @@ export interface PatchedAutomation {
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {AutomationTypeEnum}
|
||||
* @type {TypeEnum}
|
||||
* @memberof PatchedAutomation
|
||||
*/
|
||||
type?: AutomationTypeEnum;
|
||||
type?: TypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -109,7 +109,7 @@ export function PatchedAutomationFromJSONTyped(json: any, ignoreDiscriminator: b
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'type': json['type'] == null ? undefined : AutomationTypeEnumFromJSON(json['type']),
|
||||
'type': json['type'] == null ? undefined : TypeEnumFromJSON(json['type']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'param1': json['param_1'] == null ? undefined : json['param_1'],
|
||||
@@ -133,7 +133,7 @@ export function PatchedAutomationToJSONTyped(value?: Omit<PatchedAutomation, 'cr
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'type': AutomationTypeEnumToJSON(value['type']),
|
||||
'type': TypeEnumToJSON(value['type']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'param_1': value['param1'],
|
||||
|
||||
@@ -100,7 +100,7 @@ export interface SourceImportRecipe {
|
||||
* @type {string}
|
||||
* @memberof SourceImportRecipe
|
||||
*/
|
||||
image: string;
|
||||
imageUrl: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<SourceImportKeyword>}
|
||||
@@ -128,7 +128,7 @@ export function instanceOfSourceImportRecipe(value: object): value is SourceImpo
|
||||
if (!('servingsText' in value) || value['servingsText'] === undefined) return false;
|
||||
if (!('workingTime' in value) || value['workingTime'] === undefined) return false;
|
||||
if (!('waitingTime' in value) || value['waitingTime'] === undefined) return false;
|
||||
if (!('image' in value) || value['image'] === undefined) return false;
|
||||
if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false;
|
||||
if (!('keywords' in value) || value['keywords'] === undefined) return false;
|
||||
if (!('properties' in value) || value['properties'] === undefined) return false;
|
||||
return true;
|
||||
@@ -153,7 +153,7 @@ export function SourceImportRecipeFromJSONTyped(json: any, ignoreDiscriminator:
|
||||
'servingsText': json['servings_text'],
|
||||
'workingTime': json['working_time'],
|
||||
'waitingTime': json['waiting_time'],
|
||||
'image': json['image'],
|
||||
'imageUrl': json['image_url'],
|
||||
'keywords': ((json['keywords'] as Array<any>).map(SourceImportKeywordFromJSON)),
|
||||
'properties': ((json['properties'] as Array<any>).map(SourceImportPropertyFromJSON)),
|
||||
};
|
||||
@@ -179,7 +179,7 @@ export function SourceImportRecipeToJSONTyped(value?: SourceImportRecipe | null,
|
||||
'servings_text': value['servingsText'],
|
||||
'working_time': value['workingTime'],
|
||||
'waiting_time': value['waitingTime'],
|
||||
'image': value['image'],
|
||||
'image_url': value['imageUrl'],
|
||||
'keywords': ((value['keywords'] as Array<any>).map(SourceImportKeywordToJSON)),
|
||||
'properties': ((value['properties'] as Array<any>).map(SourceImportPropertyToJSON)),
|
||||
};
|
||||
|
||||
70
vue3/src/openapi/models/TypeEnum.ts
Normal file
70
vue3/src/openapi/models/TypeEnum.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* * `FOOD_ALIAS` - Food Alias
|
||||
* * `UNIT_ALIAS` - Unit Alias
|
||||
* * `KEYWORD_ALIAS` - Keyword Alias
|
||||
* * `DESCRIPTION_REPLACE` - Description Replace
|
||||
* * `INSTRUCTION_REPLACE` - Instruction Replace
|
||||
* * `NEVER_UNIT` - Never Unit
|
||||
* * `TRANSPOSE_WORDS` - Transpose Words
|
||||
* * `FOOD_REPLACE` - Food Replace
|
||||
* * `UNIT_REPLACE` - Unit Replace
|
||||
* * `NAME_REPLACE` - Name Replace
|
||||
* @export
|
||||
*/
|
||||
export const TypeEnum = {
|
||||
FoodAlias: 'FOOD_ALIAS',
|
||||
UnitAlias: 'UNIT_ALIAS',
|
||||
KeywordAlias: 'KEYWORD_ALIAS',
|
||||
DescriptionReplace: 'DESCRIPTION_REPLACE',
|
||||
InstructionReplace: 'INSTRUCTION_REPLACE',
|
||||
NeverUnit: 'NEVER_UNIT',
|
||||
TransposeWords: 'TRANSPOSE_WORDS',
|
||||
FoodReplace: 'FOOD_REPLACE',
|
||||
UnitReplace: 'UNIT_REPLACE',
|
||||
NameReplace: 'NAME_REPLACE'
|
||||
} as const;
|
||||
export type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum];
|
||||
|
||||
|
||||
export function instanceOfTypeEnum(value: any): boolean {
|
||||
for (const key in TypeEnum) {
|
||||
if (Object.prototype.hasOwnProperty.call(TypeEnum, key)) {
|
||||
if (TypeEnum[key as keyof typeof TypeEnum] === value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function TypeEnumFromJSON(json: any): TypeEnum {
|
||||
return TypeEnumFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function TypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): TypeEnum {
|
||||
return json as TypeEnum;
|
||||
}
|
||||
|
||||
export function TypeEnumToJSON(value?: TypeEnum | null): any {
|
||||
return value as any;
|
||||
}
|
||||
|
||||
export function TypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): TypeEnum {
|
||||
return value as TypeEnum;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ export * from './AccessToken';
|
||||
export * from './AuthToken';
|
||||
export * from './AutoMealPlan';
|
||||
export * from './Automation';
|
||||
export * from './AutomationTypeEnum';
|
||||
export * from './BaseUnitEnum';
|
||||
export * from './BookmarkletImport';
|
||||
export * from './BookmarkletImportList';
|
||||
export * from './ConnectorConfigConfig';
|
||||
@@ -31,16 +29,6 @@ export * from './MealPlan';
|
||||
export * from './MealType';
|
||||
export * from './MethodEnum';
|
||||
export * from './NutritionInformation';
|
||||
export * from './OpenDataCategory';
|
||||
export * from './OpenDataConversion';
|
||||
export * from './OpenDataFood';
|
||||
export * from './OpenDataFoodProperty';
|
||||
export * from './OpenDataProperty';
|
||||
export * from './OpenDataStore';
|
||||
export * from './OpenDataStoreCategory';
|
||||
export * from './OpenDataUnit';
|
||||
export * from './OpenDataUnitTypeEnum';
|
||||
export * from './OpenDataVersion';
|
||||
export * from './PaginatedAutomationList';
|
||||
export * from './PaginatedBookmarkletImportListList';
|
||||
export * from './PaginatedCookLogList';
|
||||
@@ -87,13 +75,6 @@ export * from './PatchedInviteLink';
|
||||
export * from './PatchedKeyword';
|
||||
export * from './PatchedMealPlan';
|
||||
export * from './PatchedMealType';
|
||||
export * from './PatchedOpenDataCategory';
|
||||
export * from './PatchedOpenDataConversion';
|
||||
export * from './PatchedOpenDataFood';
|
||||
export * from './PatchedOpenDataProperty';
|
||||
export * from './PatchedOpenDataStore';
|
||||
export * from './PatchedOpenDataUnit';
|
||||
export * from './PatchedOpenDataVersion';
|
||||
export * from './PatchedProperty';
|
||||
export * from './PatchedPropertyType';
|
||||
export * from './PatchedRecipe';
|
||||
@@ -151,6 +132,7 @@ export * from './SupermarketCategoryRelation';
|
||||
export * from './Sync';
|
||||
export * from './SyncLog';
|
||||
export * from './ThemeEnum';
|
||||
export * from './TypeEnum';
|
||||
export * from './Unit';
|
||||
export * from './UnitConversion';
|
||||
export * from './User';
|
||||
|
||||
Reference in New Issue
Block a user