mirror of
https://github.com/mblanke/holiday-travel-app.git
synced 2026-03-01 13:30:20 -05:00
44 lines
1002 B
TypeScript
44 lines
1002 B
TypeScript
export type TravelPreferences = {
|
|
beach?: number; // 0-10 rating
|
|
pool?: number;
|
|
golf?: number;
|
|
spa?: number;
|
|
food?: number;
|
|
nightlife?: number;
|
|
shopping?: number;
|
|
culture?: number;
|
|
outdoor?: number;
|
|
family?: number;
|
|
};
|
|
|
|
export type SearchCriteria = {
|
|
origin: string;
|
|
destinations: string[];
|
|
startDate: string; // YYYY-MM-DD
|
|
endDate: string; // YYYY-MM-DD
|
|
tripLengthMin: number;
|
|
tripLengthMax: number;
|
|
budget?: number | null;
|
|
currency?: string;
|
|
nonStopOnly?: boolean;
|
|
sources?: string[]; // which providers to include
|
|
preferences?: TravelPreferences; // feature importance ratings
|
|
};
|
|
|
|
export type Deal = {
|
|
id: string;
|
|
title: string;
|
|
source: string;
|
|
link: string;
|
|
price?: number | null;
|
|
currency?: string | null;
|
|
startDate?: string | null;
|
|
endDate?: string | null;
|
|
nights?: number | null;
|
|
destination?: string | null;
|
|
origin?: string | null;
|
|
stops?: number | null;
|
|
meta?: Record<string, any>;
|
|
score?: number;
|
|
};
|