Files
recipe-app/backend/dist/inventory/inventory.controller.d.ts
T
Nils-Johan Gynther 969dafdbc6
Test Suite / test (24.15.0) (push) Has been cancelled
Refactor code structure for improved readability and maintainability
2026-05-06 07:37:59 +02:00

201 lines
6.1 KiB
TypeScript

import { CreateInventoryDto } from './dto/create-inventory.dto';
import { UpdateInventoryDto } from './dto/update-inventory.dto';
import { InventoryService } from './inventory.service';
import { ConsumeInventoryDto } from './dto/consume-inventory.dto';
export declare class InventoryController {
private readonly inventoryService;
constructor(inventoryService: InventoryService);
consume(id: number, body: ConsumeInventoryDto): Promise<{
product: {
category: string | null;
status: string;
name: string;
categoryId: number | null;
canonicalName: string | null;
id: number;
normalizedName: string;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
ownerId: number;
isPrivate: boolean;
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
quantity: import("@prisma/client/runtime/library").Decimal;
unit: string;
brand: string | null;
origin: string | null;
receiptName: string | null;
location: string | null;
purchaseDate: Date | null;
opened: boolean | null;
suitableFor: string | null;
bestBeforeDate: Date | null;
comment: string | null;
}>;
findConsumptionHistory(id: number): Promise<{
inventoryItem: {
unit: string;
};
id: number;
createdAt: Date;
comment: string | null;
amountUsed: import("@prisma/client/runtime/library").Decimal;
inventoryItemId: number;
}[]>;
findAll(location?: string, sort?: string): Promise<({
product: {
category: string | null;
status: string;
name: string;
categoryId: number | null;
canonicalName: string | null;
id: number;
normalizedName: string;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
ownerId: number;
isPrivate: boolean;
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
quantity: import("@prisma/client/runtime/library").Decimal;
unit: string;
brand: string | null;
origin: string | null;
receiptName: string | null;
location: string | null;
purchaseDate: Date | null;
opened: boolean | null;
suitableFor: string | null;
bestBeforeDate: Date | null;
comment: string | null;
})[]>;
findExpiring(): Promise<({
product: {
category: string | null;
status: string;
name: string;
categoryId: number | null;
canonicalName: string | null;
id: number;
normalizedName: string;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
ownerId: number;
isPrivate: boolean;
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
quantity: import("@prisma/client/runtime/library").Decimal;
unit: string;
brand: string | null;
origin: string | null;
receiptName: string | null;
location: string | null;
purchaseDate: Date | null;
opened: boolean | null;
suitableFor: string | null;
bestBeforeDate: Date | null;
comment: string | null;
})[]>;
create(body: CreateInventoryDto): Promise<{
product: {
category: string | null;
status: string;
name: string;
categoryId: number | null;
canonicalName: string | null;
id: number;
normalizedName: string;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
ownerId: number;
isPrivate: boolean;
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
quantity: import("@prisma/client/runtime/library").Decimal;
unit: string;
brand: string | null;
origin: string | null;
receiptName: string | null;
location: string | null;
purchaseDate: Date | null;
opened: boolean | null;
suitableFor: string | null;
bestBeforeDate: Date | null;
comment: string | null;
}>;
update(id: number, body: UpdateInventoryDto): Promise<{
product: {
category: string | null;
status: string;
name: string;
categoryId: number | null;
canonicalName: string | null;
id: number;
normalizedName: string;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
ownerId: number;
isPrivate: boolean;
};
} & {
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
quantity: import("@prisma/client/runtime/library").Decimal;
unit: string;
brand: string | null;
origin: string | null;
receiptName: string | null;
location: string | null;
purchaseDate: Date | null;
opened: boolean | null;
suitableFor: string | null;
bestBeforeDate: Date | null;
comment: string | null;
}>;
remove(id: number): Promise<{
id: number;
createdAt: Date;
updatedAt: Date;
productId: number;
quantity: import("@prisma/client/runtime/library").Decimal;
unit: string;
brand: string | null;
origin: string | null;
receiptName: string | null;
location: string | null;
purchaseDate: Date | null;
opened: boolean | null;
suitableFor: string | null;
bestBeforeDate: Date | null;
comment: string | null;
}>;
}