054a19ed7c
feat: add AI categorization for products and enhance user management - Integrated AI service for category suggestions in receipt import and product management. - Added premium subscription feature for users with corresponding API endpoints. - Implemented admin interface for managing pending product suggestions. - Enhanced user management to include premium status and corresponding UI updates. - Updated database schema to support new fields for premium status and product status.
17 lines
536 B
TypeScript
17 lines
536 B
TypeScript
import type { CategorySuggestion } from '../../ai/ai.service';
|
|
|
|
export interface ParsedReceiptItem {
|
|
rawName: string;
|
|
quantity: number;
|
|
unit: string;
|
|
price?: number | null;
|
|
// alias-match: säker, användaren slipper bekräfta
|
|
matchedProductId?: number;
|
|
matchedProductName?: string;
|
|
// ordbaserad match: förslag, kräver bekräftelse
|
|
suggestedProductId?: number;
|
|
suggestedProductName?: string;
|
|
// AI-kategorisuggestion för ej matchade varor (premium)
|
|
categorySuggestion?: CategorySuggestion;
|
|
}
|