← back to Wine Finder Next
src/types/wine.ts
54 lines
/**
* Wine Arbitrage Finder - Type Definitions
* Tracks wine listings across auctions and retail to find arbitrage opportunities
*/
export type ProviderType = "auction" | "retail";
export interface WineBase {
id: string;
name: string;
vintage?: number;
region?: string;
appellation?: string;
rating?: number;
}
export interface ListingPrice {
amount: number;
currency: string;
}
export interface WineListing extends WineBase {
provider: ProviderType;
providerName: string;
currentPrice: ListingPrice;
url: string;
imageUrl?: string;
availability?: string;
bidCount?: number;
closingDate?: string;
lastUpdated: string;
}
export interface PriceHistoryPoint {
timestamp: string;
price: number;
source: string;
}
export interface ArbitrageOpportunity {
wine: WineBase;
retailListing: WineListing;
auctionListing: WineListing;
spread: number;
spreadPercentage: number;
}
export interface BestDeal {
listing: WineListing;
savings: number;
discount: number;
description: string;
}