|
@@ -1,41 +1,41 @@
|
|
|
-export interface IIngredient {
|
|
|
|
|
|
|
+export interface Ingredient {
|
|
|
name: string,
|
|
name: string,
|
|
|
quantity: number,
|
|
quantity: number,
|
|
|
unit: string,
|
|
unit: string,
|
|
|
_original: string,
|
|
_original: string,
|
|
|
- suggestions?: ISuggestion[]
|
|
|
|
|
|
|
+ suggestions?: Suggestion[]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export interface ISubRecipe {
|
|
|
|
|
|
|
+export interface SubRecipe {
|
|
|
name: string,
|
|
name: string,
|
|
|
- ingredients: IIngredient[]
|
|
|
|
|
|
|
+ ingredients: Ingredient[]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export interface IAuthor {
|
|
|
|
|
|
|
+export interface Author {
|
|
|
name: string,
|
|
name: string,
|
|
|
website: string,
|
|
website: string,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export interface IDetails {
|
|
|
|
|
|
|
+export interface Details {
|
|
|
url?: string,
|
|
url?: string,
|
|
|
preparationTime: string,
|
|
preparationTime: string,
|
|
|
cookingTime: string,
|
|
cookingTime: string,
|
|
|
servings: number
|
|
servings: number
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export const _ingredient: IIngredient = {
|
|
|
|
|
|
|
+export const _ingredient: Ingredient = {
|
|
|
name: '',
|
|
name: '',
|
|
|
quantity: 0,
|
|
quantity: 0,
|
|
|
unit: '',
|
|
unit: '',
|
|
|
_original: ''
|
|
_original: ''
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-export const _subRecipe: ISubRecipe = {
|
|
|
|
|
|
|
+export const _subRecipe: SubRecipe = {
|
|
|
name: '',
|
|
name: '',
|
|
|
ingredients: [_ingredient]
|
|
ingredients: [_ingredient]
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-export const _recipe: IRecipe = {
|
|
|
|
|
|
|
+export const _recipe: Recipe = {
|
|
|
_id: '',
|
|
_id: '',
|
|
|
author: {
|
|
author: {
|
|
|
name: '',
|
|
name: '',
|
|
@@ -54,7 +54,7 @@ export const _recipe: IRecipe = {
|
|
|
tags: []
|
|
tags: []
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export interface IEquivalences {
|
|
|
|
|
|
|
+export interface Equivalences {
|
|
|
cup?: number,
|
|
cup?: number,
|
|
|
tbsp?: number,
|
|
tbsp?: number,
|
|
|
tsp?: number,
|
|
tsp?: number,
|
|
@@ -65,13 +65,13 @@ export interface IEquivalences {
|
|
|
lb?: number,
|
|
lb?: number,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export interface ISuggestion {
|
|
|
|
|
|
|
+export interface Suggestion {
|
|
|
_id?: string,
|
|
_id?: string,
|
|
|
name: string,
|
|
name: string,
|
|
|
variants?: string[],
|
|
variants?: string[],
|
|
|
- equivalences: IEquivalences,
|
|
|
|
|
- prefferedUnit: keyof IEquivalences,
|
|
|
|
|
- referenceUnit: keyof IEquivalences,
|
|
|
|
|
|
|
+ equivalences: Equivalences,
|
|
|
|
|
+ prefferedUnit: keyof Equivalences,
|
|
|
|
|
+ referenceUnit: keyof Equivalences,
|
|
|
translation?: {
|
|
translation?: {
|
|
|
english?: string,
|
|
english?: string,
|
|
|
dutch?: string,
|
|
dutch?: string,
|
|
@@ -79,11 +79,11 @@ export interface ISuggestion {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export default interface IRecipe {
|
|
|
|
|
|
|
+export default interface Recipe {
|
|
|
_id: string,
|
|
_id: string,
|
|
|
- author: IAuthor,
|
|
|
|
|
- details: IDetails,
|
|
|
|
|
- ingredients: ISubRecipe[],
|
|
|
|
|
|
|
+ author: Author,
|
|
|
|
|
+ details: Details,
|
|
|
|
|
+ ingredients: SubRecipe[],
|
|
|
instructions: string[],
|
|
instructions: string[],
|
|
|
name: string,
|
|
name: string,
|
|
|
summary: string,
|
|
summary: string,
|