Files
recipe-app/backend/dist/meal-plan/meal-plan.service.d.ts
T
Nils-Johan Gynther 04b1fc3024
Test Suite / test (24.15.0) (push) Has been cancelled
feat: add rematch functionality for recipe ingredients and enhance inventory management
- Added a new API path for rematching recipe ingredients in `api_paths.dart`.
- Implemented a manual product creation dialog in `inventory_screen.dart` to allow users to create new products directly.
- Integrated the rematch functionality in `recipe_repository.dart` to handle rematching of recipe ingredients.
- Updated the recipe detail screen to include a button for triggering the rematch process.
- Introduced a new `RecipeMatchingService` in the backend to handle ingredient matching logic.
- Added database migration to include `aiEngineEnabled` column in the User table.

Co-authored-by: Copilot <copilot@github.com>
2026-05-06 09:20:31 +02:00

84 lines
2.5 KiB
TypeScript

import { PrismaService } from '../prisma/prisma.service';
import { CreateMealPlanEntryDto } from './dto/create-meal-plan-entry.dto';
export declare class MealPlanService {
private readonly prisma;
constructor(prisma: PrismaService);
findByRange(userId: number, from: string, to: string): Promise<({
recipe: {
name: string;
id: number;
imageUrl: string | null;
servings: number | null;
ingredients: {
product: {
name: string;
id: number;
canonicalName: string | null;
} | null;
quantity: import("@prisma/client/runtime/library").Decimal | null;
unit: string | null;
note: string | null;
}[];
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
servings: number | null;
userId: number;
recipeId: number;
date: Date;
})[]>;
upsert(userId: number, dto: CreateMealPlanEntryDto): Promise<{
recipe: {
name: string;
id: number;
imageUrl: string | null;
servings: number | null;
ingredients: {
product: {
name: string;
id: number;
canonicalName: string | null;
} | null;
quantity: import("@prisma/client/runtime/library").Decimal | null;
unit: string | null;
note: string | null;
}[];
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
servings: number | null;
userId: number;
recipeId: number;
date: Date;
}>;
removeByDate(userId: number, date: string): Promise<{
id: number;
createdAt: Date;
updatedAt: Date;
servings: number | null;
userId: number;
recipeId: number;
date: Date;
}>;
private aggregateIngredients;
shoppingList(userId: number, from: string, to: string): Promise<{
productId: number;
name: string;
quantity: number;
unit: string;
}[]>;
inventoryCompare(userId: number, from: string, to: string): Promise<{
productId: number;
name: string;
required: number;
unit: string;
available: number;
missing: number;
status: "enough" | "missing" | "pantry";
}[]>;
}