export type FlyerImportMatchVia = 'alias' | 'exact' | 'token' | 'none';

export type FlyerImportItem = {
  flyerItemId: number | null;
  rawName: string;
  normalizedName: string;
  brand: string | null;
  category: string | null;
  categoryId: number | null;
  price: number | null;
  priceUnit: string | null;
  comparisonPrice: number | null;
  comparisonUnit: string | null;
  weight: string | null;
  bundleWeight: string | null;
  isBundle: boolean;
  bundleItems: string[];
  offerText: string | null;
  isOffer: boolean;
  offerLimitText: string | null;
  parseConfidence: number;
  parseReasons: string[];
  matchedProductId: number | null;
  matchedProductName: string | null;
  matchedVia: FlyerImportMatchVia;
  matchConfidence: number;
  matchReasons: string[];
};

export type FlyerImportResponse = {
  sessionId: number | null;
  retailer: 'willys';
  parserVersion: 'v1';
  sourceAvailable: boolean;
  sourceFileName: string | null;
  sourceMimeType: string | null;
  sourceFileSize: number | null;
  items: FlyerImportItem[];
  warnings: string[];
};
