Files
recipe-app/backend/dist/pantry/pantry.controller.d.ts
T
Nils-Johan Gynther a68a0ca86f
Test Suite / test (24.15.0) (push) Has been cancelled
feat: add unit mapping functionality
- Added new API path for unit mappings in `api_paths.dart`.
- Implemented `upsertUnitMapping` method in `ImportRepository` to handle unit mapping creation.
- Updated `ReceiptImportTab` to learn and save unit mappings during receipt import.
- Created DTO for unit mapping with validation in `create-unit-mapping.dto.ts`.
- Added SQL migration for `UnitMapping` table creation with necessary constraints.
2026-05-07 10:00:42 +02:00

69 lines
1.9 KiB
TypeScript

import { PantryService } from './pantry.service';
import { CreatePantryItemDto } from './dto/create-pantry-item.dto';
export declare class PantryController {
private readonly pantryService;
constructor(pantryService: PantryService);
findAll(user: {
userId: number;
}): import(".prisma/client").Prisma.PrismaPromise<({
product: {
name: string;
category: string | null;
status: string;
id: number;
categoryId: number | null;
normalizedName: string;
canonicalName: string | null;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
ownerId: number;
isPrivate: boolean;
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
location: string | null;
userId: number;
})[]>;
create(user: {
userId: number;
}, body: CreatePantryItemDto): Promise<{
product: {
name: string;
category: string | null;
status: string;
id: number;
categoryId: number | null;
normalizedName: string;
canonicalName: string | null;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
ownerId: number;
isPrivate: boolean;
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
location: string | null;
userId: number;
}>;
remove(user: {
userId: number;
}, id: number): Promise<{
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
location: string | null;
userId: number;
}>;
}