/** * Manual protobuf encoder for Google Flights' tfs parameter. * * We hand-roll the encoding instead of using a protobuf library because the * .proto schema is tiny and fixed, and this avoids the heavy protobufjs * dependency at runtime. The wire format is standard protobuf. * * Reference: https://protobuf.dev/programming-guides/encoding/ */ export declare enum Seat { UNKNOWN_SEAT = 0, ECONOMY = 1, PREMIUM_ECONOMY = 2, BUSINESS = 3, FIRST = 4 } export declare enum Trip { UNKNOWN_TRIP = 0, ROUND_TRIP = 1, ONE_WAY = 2, MULTI_CITY = 3 } export declare enum Passenger { UNKNOWN_PASSENGER = 0, ADULT = 1, CHILD = 2, INFANT_IN_SEAT = 3, INFANT_ON_LAP = 4 } export interface FlightDataProto { date: string; from_airport: string; to_airport: string; max_stops?: number; airlines?: string[]; } export interface InfoProto { data: FlightDataProto[]; passengers: Passenger[]; seat: Seat; trip: Trip; } export declare function encodeInfo(info: InfoProto): Uint8Array; export declare function encodeItinerarySummary(flights: string, price: number, currency: string): Uint8Array; export interface DecodedItinerarySummary { flights: string; price: number; currency: string; } export declare function decodeItinerarySummary(base64: string): DecodedItinerarySummary; export declare function encodeSOCS(gws: string, locale: string, timestamp: number): Uint8Array;