import type { Airline } from "./airline"; export interface FlightBundle { id: string; legs: FlightLeg[]; tiles: Tile[]; // TODO: the tiles have to make sense with the legs, not sure how to do this yet } export interface FlightLeg { id: string; flightNumber: string; originAirportId: string; destinationAirportId: string; departTime: string; // YYYY-MM-DDTHH:MM:SSZ arrivalTime: string; // YYYY-MM-DDTHH:MM:SSZ airline: Airline; operatedBy: string; aircraft: string; } export type RefundPolicy = "free" | "fee" | "no"; export type ChangePolicy = "free" | "fee" | "no"; export type FareOption = { id: string; name: string; priceInUSD: number; // TODO: price as an object with base, fees, taxes, etc refundPolicy: RefundPolicy; changePolicy: ChangePolicy; checkedBagsIncluded: number; hasMealService: boolean; features: string[]; }; export type Tile = { id: string; title: string; isMixedCabin: boolean; isFreeCheckedBag: boolean; fareOptions: FareOption[]; } | null;