export interface IFee { type: FeeTypeEnum; group: FeeGroupEnum; value: number; } export interface ITrip { from: string; to: string; departureDate: string; arrivalDate: string; carrier: string; flightNumber: string; aircraft: string | null; duration: number; layover: number; stops: number; cabin: string; } export interface ITripFull extends ITrip { flightTime?: number; fromCountry: string; toCountry: string; } export interface ILuggagePrice { weight: number | null; prices: number[]; } export interface ILuggage { carryOn: ILuggagePrice; checked: ILuggagePrice; } export interface IMilesLuggage { carryOn: ILuggagePrice; checked: ILuggagePrice; } export interface IFlight { airline: string; from: string; to: string; flightNumber: string; airlinePricePerAdult: number | null; airlinePricePerChild: number | null; airlinePricePerInfant: number | null; airlinePriceTotal: number | null; milesPerAdult: number | null; milesPerChild: number | null; milesPerInfant: number | null; milesTotal: number | null; cabin: string; carrier: string; duration: number; departureDate: string; arrivalDate: string; fromCountry: string; toCountry: string; direction: string; stops: number; tripType: string; familyCode: string; availableIn: AvailableInEnum; airlineTarget: string; providerMiles: string; flightId: string; fees: IFee[]; trips: ITrip[]; luggage: ILuggage; milesLuggage: IMilesLuggage; } export interface IFlightArray extends Array {} export type FeeTypeEnum = 'BOARDING_TAX' | 'CONVENIENCE_FEE'; export const FEE_TYPES = { BOARDING_TAX: 'BOARDING_TAX' as FeeTypeEnum, CONVENIENCE_FEE: 'CONVENIENCE_FEE' as FeeTypeEnum, }; export type FeeGroupEnum = 'milhas' | 'price'; export const FEE_GROUPS = { MILHAS: 'milhas' as FeeGroupEnum, PRICE: 'price' as FeeGroupEnum, }; export type AvailableInEnum = 'miles' | 'price' | 'both'; export const AVAILABLE_IN = { MILES: 'miles' as AvailableInEnum, PRICE: 'price' as AvailableInEnum, BOTH: 'both' as AvailableInEnum, };