mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
shopping / meal plan improvements
This commit is contained in:
@@ -90,6 +90,12 @@ export interface PatchedShoppingListEntry {
|
||||
* @memberof PatchedShoppingListEntry
|
||||
*/
|
||||
checked?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedShoppingListEntry
|
||||
*/
|
||||
ingredient?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {ShoppingListRecipe}
|
||||
@@ -158,6 +164,7 @@ export function PatchedShoppingListEntryFromJSONTyped(json: any, ignoreDiscrimin
|
||||
'amount': json['amount'] == null ? undefined : json['amount'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'checked': json['checked'] == null ? undefined : json['checked'],
|
||||
'ingredient': json['ingredient'] == null ? undefined : json['ingredient'],
|
||||
'listRecipeData': json['list_recipe_data'] == null ? undefined : ShoppingListRecipeFromJSON(json['list_recipe_data']),
|
||||
'createdBy': json['created_by'] == null ? undefined : UserFromJSON(json['created_by']),
|
||||
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
||||
@@ -186,6 +193,7 @@ export function PatchedShoppingListEntryToJSONTyped(value?: Omit<PatchedShopping
|
||||
'amount': value['amount'],
|
||||
'order': value['order'],
|
||||
'checked': value['checked'],
|
||||
'ingredient': value['ingredient'],
|
||||
'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()),
|
||||
'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()),
|
||||
'mealplan_id': value['mealplanId'],
|
||||
|
||||
@@ -20,6 +20,13 @@ import {
|
||||
MealPlanToJSON,
|
||||
MealPlanToJSONTyped,
|
||||
} from './MealPlan';
|
||||
import type { User } from './User';
|
||||
import {
|
||||
UserFromJSON,
|
||||
UserFromJSONTyped,
|
||||
UserToJSON,
|
||||
UserToJSONTyped,
|
||||
} from './User';
|
||||
import type { RecipeOverview } from './RecipeOverview';
|
||||
import {
|
||||
RecipeOverviewFromJSON,
|
||||
@@ -76,6 +83,12 @@ export interface PatchedShoppingListRecipe {
|
||||
* @memberof PatchedShoppingListRecipe
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {User}
|
||||
* @memberof PatchedShoppingListRecipe
|
||||
*/
|
||||
readonly createdBy?: User;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,6 +115,7 @@ export function PatchedShoppingListRecipeFromJSONTyped(json: any, ignoreDiscrimi
|
||||
'mealplan': json['mealplan'] == null ? undefined : json['mealplan'],
|
||||
'mealPlanData': json['meal_plan_data'] == null ? undefined : MealPlanFromJSON(json['meal_plan_data']),
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'createdBy': json['created_by'] == null ? undefined : UserFromJSON(json['created_by']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -109,7 +123,7 @@ export function PatchedShoppingListRecipeToJSON(json: any): PatchedShoppingListR
|
||||
return PatchedShoppingListRecipeToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedShoppingListRecipeToJSONTyped(value?: Omit<PatchedShoppingListRecipe, 'recipe_data'|'meal_plan_data'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
export function PatchedShoppingListRecipeToJSONTyped(value?: Omit<PatchedShoppingListRecipe, 'recipe_data'|'meal_plan_data'|'created_by'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -90,6 +90,12 @@ export interface ShoppingListEntry {
|
||||
* @memberof ShoppingListEntry
|
||||
*/
|
||||
checked?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ShoppingListEntry
|
||||
*/
|
||||
ingredient?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {ShoppingListRecipe}
|
||||
@@ -164,6 +170,7 @@ export function ShoppingListEntryFromJSONTyped(json: any, ignoreDiscriminator: b
|
||||
'amount': json['amount'],
|
||||
'order': json['order'] == null ? undefined : json['order'],
|
||||
'checked': json['checked'] == null ? undefined : json['checked'],
|
||||
'ingredient': json['ingredient'] == null ? undefined : json['ingredient'],
|
||||
'listRecipeData': ShoppingListRecipeFromJSON(json['list_recipe_data']),
|
||||
'createdBy': UserFromJSON(json['created_by']),
|
||||
'createdAt': (new Date(json['created_at'])),
|
||||
@@ -192,6 +199,7 @@ export function ShoppingListEntryToJSONTyped(value?: Omit<ShoppingListEntry, 'li
|
||||
'amount': value['amount'],
|
||||
'order': value['order'],
|
||||
'checked': value['checked'],
|
||||
'ingredient': value['ingredient'],
|
||||
'completed_at': value['completedAt'] == null ? undefined : ((value['completedAt'] as any).toISOString()),
|
||||
'delay_until': value['delayUntil'] == null ? undefined : ((value['delayUntil'] as any).toISOString()),
|
||||
'mealplan_id': value['mealplanId'],
|
||||
|
||||
@@ -20,6 +20,13 @@ import {
|
||||
MealPlanToJSON,
|
||||
MealPlanToJSONTyped,
|
||||
} from './MealPlan';
|
||||
import type { User } from './User';
|
||||
import {
|
||||
UserFromJSON,
|
||||
UserFromJSONTyped,
|
||||
UserToJSON,
|
||||
UserToJSONTyped,
|
||||
} from './User';
|
||||
import type { RecipeOverview } from './RecipeOverview';
|
||||
import {
|
||||
RecipeOverviewFromJSON,
|
||||
@@ -76,6 +83,12 @@ export interface ShoppingListRecipe {
|
||||
* @memberof ShoppingListRecipe
|
||||
*/
|
||||
servings: number;
|
||||
/**
|
||||
*
|
||||
* @type {User}
|
||||
* @memberof ShoppingListRecipe
|
||||
*/
|
||||
readonly createdBy: User;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,6 +98,7 @@ export function instanceOfShoppingListRecipe(value: object): value is ShoppingLi
|
||||
if (!('recipeData' in value) || value['recipeData'] === undefined) return false;
|
||||
if (!('mealPlanData' in value) || value['mealPlanData'] === undefined) return false;
|
||||
if (!('servings' in value) || value['servings'] === undefined) return false;
|
||||
if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -105,6 +119,7 @@ export function ShoppingListRecipeFromJSONTyped(json: any, ignoreDiscriminator:
|
||||
'mealplan': json['mealplan'] == null ? undefined : json['mealplan'],
|
||||
'mealPlanData': MealPlanFromJSON(json['meal_plan_data']),
|
||||
'servings': json['servings'],
|
||||
'createdBy': UserFromJSON(json['created_by']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -112,7 +127,7 @@ export function ShoppingListRecipeToJSON(json: any): ShoppingListRecipe {
|
||||
return ShoppingListRecipeToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ShoppingListRecipeToJSONTyped(value?: Omit<ShoppingListRecipe, 'recipe_data'|'meal_plan_data'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
export function ShoppingListRecipeToJSONTyped(value?: Omit<ShoppingListRecipe, 'recipe_data'|'meal_plan_data'|'created_by'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user