04b1fc3024
Test Suite / test (24.15.0) (push) Has been cancelled
- 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>
188 lines
6.6 KiB
TypeScript
188 lines
6.6 KiB
TypeScript
import { PrismaService } from '../prisma/prisma.service';
|
|
export declare class UsersService {
|
|
private readonly prisma;
|
|
constructor(prisma: PrismaService);
|
|
findByUsername(username: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
} | null, null, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
findById(id: number): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
} | null, null, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
create(data: {
|
|
username: string;
|
|
email: string;
|
|
passwordHash: string;
|
|
}): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
updateProfile(id: number, data: {
|
|
firstName?: string;
|
|
lastName?: string;
|
|
email?: string;
|
|
}): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
findAll(): import(".prisma/client").Prisma.PrismaPromise<{
|
|
id: number;
|
|
createdAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}[]>;
|
|
setRole(id: number, role: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
setPremium(id: number, isPremium: boolean): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
setRecipeSharing(id: number, canShareRecipes: boolean): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
setAiEngineEnabled(id: number, aiEngineEnabled: boolean): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
adminCreate(data: {
|
|
username: string;
|
|
email: string;
|
|
password: string;
|
|
role?: string;
|
|
}): Promise<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}>;
|
|
deleteUser(id: number): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
resetPassword(id: number): Promise<{
|
|
temporaryPassword: string;
|
|
}>;
|
|
updateEmail(id: number, email: string): import(".prisma/client").Prisma.Prisma__UserClient<{
|
|
id: number;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
username: string;
|
|
email: string;
|
|
firstName: string | null;
|
|
lastName: string | null;
|
|
passwordHash: string;
|
|
role: string;
|
|
isPremium: boolean;
|
|
canShareRecipes: boolean;
|
|
aiEngineEnabled: boolean;
|
|
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
|
|
}
|