amadeus-ts
Version:
Node library for the Amadeus travel APIs Written in TypeScript
1,730 lines (1,668 loc) • 95.3 kB
text/typescript
import * as http from 'node:http';
import * as https from 'node:https';
import { OutgoingHttpHeaders, IncomingHttpHeaders, IncomingMessage } from 'http';
import { RequestOptions } from 'https';
import { OutgoingHttpHeaders as OutgoingHttpHeaders$1 } from 'http2';
type Verb = "GET" | "POST" | "PUT" | "DELETE";
interface IRequest {
host: string;
port: number;
ssl: boolean;
scheme: string;
verb: Verb;
path: string;
params: any;
queryPath: string;
bearerToken: string | null;
clientVersion: string;
languageVersion: string;
appId: string | null;
appVersion: string | null;
headers: OutgoingHttpHeaders;
}
declare class Request implements IRequest {
appId: string | null;
appVersion: string | null;
bearerToken: string | null;
clientVersion: string;
headers: OutgoingHttpHeaders$1;
host: string;
languageVersion: string;
params: any;
path: string;
port: number;
queryPath: string;
scheme: string;
ssl: boolean;
verb: Verb;
constructor(options: Omit<IRequest, "headers" | "scheme" | "queryPath">);
options(): RequestOptions;
body(): any;
private userAgent;
private fullQueryPath;
private addAuthorizationHeader;
private addContentTypeHeader;
private addHTTPOverrideHeader;
}
declare class Response<T = unknown, K = unknown> implements IResponse<T, K> {
headers: IncomingHttpHeaders;
statusCode: number | undefined;
body: string;
result: T | null;
data: K | null;
parsed: boolean;
request: Request;
private error;
constructor(http_response: IncomingMessage | Error, request: Request);
addChunk(chunk: string): void;
parse(): void;
success(): boolean;
private isJson;
returnResponseError(): ReturnedResponseError;
returnResponseSuccess(): ReturnedResponseSuccess<T, K>;
}
interface IResponse<T, K> {
headers: IncomingHttpHeaders;
statusCode: number | undefined;
body: string;
result: T | null;
data: K | null;
parsed: boolean;
request: Request;
}
type ReturnedResponseError<T = unknown, K = unknown> = Omit<Response<T, K>, "addChunk" | "parse" | "success" | "returnResponseError" | "returnResponseSuccess" | "error">;
type ReturnedResponseSuccess<T, K> = Omit<ReturnedResponseError<T, K>, "result" | "data" | "statusCode"> & {
statusCode: number;
result: T;
data: K;
};
declare class Client implements Options {
private accessToken;
version: string;
clientId: string;
clientSecret: string;
logger: Console;
logLevel: LogLevel;
hostname: Hostname;
host: string;
ssl: boolean;
port: number;
http: Network;
customAppId?: string;
customAppVersion?: string;
constructor(options?: Options);
get<T, K = unknown>(path: string, params?: object): Promise<ReturnedResponseSuccess<T, K>>;
post<T, K = unknown>(path: string, params?: object | string): Promise<ReturnedResponseSuccess<T, K>>;
delete<T, K>(path: string, params?: object): Promise<ReturnedResponseSuccess<T, K>>;
request<T, K>(verb: Verb, path: string, params?: object | string): Promise<ReturnedResponseSuccess<T, K>>;
unauthenticatedRequest<T, K>(verb: Verb, path: string, params?: object | string, bearerToken?: string | null): Promise<ReturnedResponseSuccess<T, K>>;
private execute;
private buildRequest;
private buildPromise;
log(request: Request): void;
debug(): boolean;
warn(): boolean;
}
type Issue = {
status?: number;
code?: number;
title?: string;
detail?: string;
source?: {
pointer?: string;
parameter?: string;
example?: string;
};
};
type CollectionMeta = {
count?: number;
oneWayCombinations?: OneWayCombinations;
};
type OneWayCombinations = {
originDestinationId?: string;
flightOfferIds?: string[];
}[];
type CollectionMetaLink = {
count?: number;
links?: CollectionLinks;
};
type CollectionLinks = {
self?: string;
next?: string;
previous?: string;
last?: string;
first?: string;
up?: string;
};
type LocationValue$2 = {
cityCode?: string;
countryCode?: string;
};
type LocationEntry = Record<string, LocationValue$2>;
type AircraftEntry = Record<string, string>;
type CurrencyEntry = Record<string, string>;
type CarrierEntry = Record<string, string>;
type FlightSegment = {
departure: FlightEndPoint;
arrival: FlightEndPoint;
carrierCode: string;
number: string;
aircraft: AircraftEquipment$1;
operating: OperatingFlight$1;
duration: string;
stops?: FlightStop[];
};
type FlightEndPoint = {
iataCode: string;
terminal?: string;
at: string;
};
type OriginalFlightStop = {
iataCode: string;
duration: string;
};
type FlightStop = OriginalFlightStop & {
arrivalAt: string;
departureAt: string;
};
type AircraftEquipment$1 = {
code: string;
};
type OperatingFlight$1 = {
carrierCode: string;
};
type CurrencyCode = "CAD" | "HKD" | "ISK" | "PHP" | "DKK" | "HUF" | "CZK" | "AUD" | "RON" | "SEK" | "IDR" | "INR" | "BRL" | "RUB" | "HRK" | "JPY" | "THB" | "EUR" | "CHF" | "SGD" | "PLN" | "BGN" | "TRY" | "CNY" | "NOK" | "NZD" | "ZAR" | "USD" | "MXN" | "ILS" | "GBP" | "KRW" | "MYR";
type Price$5 = {
currency: string;
total: string;
base: string;
fees: Fee$2[];
taxes?: Tax$3[];
refundableTaxes?: string;
};
type ExtendedPrice = {
margin?: string;
grandTotal?: string;
billingCurrency?: string;
additionalServices?: {
amount?: string;
type?: AdditionalServiceType;
}[];
} & Price$5;
type AdditionalServiceType = "CHECKED_BAGS" | "MEALS" | "SEATS" | "OTHER_SERVICES";
type Fee$2 = {
amount: string;
type: FeeType;
};
type FeeType = "TICKETING" | "FORM_OF_PAYMENT" | "SUPPLIER";
type Tax$3 = {
amount?: string;
code?: string;
};
type Co2Emission = {
weight?: number;
weightUnit?: string;
cabin?: TravelClass;
};
type TravelClass = "ECONOMY" | "PREMIUM_ECONOMY" | "BUSINESS" | "FIRST";
type DateTimeType = {
date: string;
time?: string;
};
type CarrierRestrictions = {
blacklistedInEUAllowed?: boolean;
excludedCarrierCodes?: string[];
includedCarrierCodes?: string[];
};
type ConnectionRestriction = {
maxNumberOfConnections?: number;
nonStopPreferred?: boolean;
airportChangeAllowed?: boolean;
technicalStopsAllowed?: boolean;
};
type CabinRestriction = {
cabin?: TravelClass;
originDestinationIds?: string[];
};
type FlightOffer = {
type: string;
id: string;
source: FlightOfferSource;
instantTicketingRequired: boolean;
disablePricing?: boolean;
nonHomogeneous: boolean;
oneWay: boolean;
paymentCardRequired?: boolean;
lastTicketingDate?: string;
lastTicketingDateTime?: string;
numberOfBookableSeats: number;
itineraries: {
duration: string;
segments: Segment$1[];
}[];
price: ExtendedPrice;
pricingOptions?: {
fareType?: PricingOptionsFareType;
includedCheckedBagsOnly?: boolean;
refundableFare?: boolean;
noRestrictionFare?: boolean;
noPenaltyFare?: boolean;
};
validatingAirlineCodes?: string[];
travelerPricings?: {
travelerId: string;
fareOption: TravelerPricingFareOption;
travelerType: TravelerType;
associatedAdultId?: string;
price?: Price$5;
fareDetailsBySegment: {
segmentId: string;
cabin?: TravelClass;
fareBasis?: string;
brandedFare?: string;
class?: string;
isAllotment?: boolean;
allotmentDetails?: AllotmentDetails;
sliceDiceIndicator?: SliceDiceIndicator;
includedCheckedBags?: BaggageAllowance;
additionalServices?: {
chargeableCheckedBags?: ChargeableCheckdBags;
chargeableSeat?: ChargeableSeat;
chargeableSeatNumber?: string;
otherServices?: ServiceName[];
};
}[];
}[];
fareRules?: FareRules;
};
type Segment$1 = {
id: string;
numberOfStops: number;
blacklistedInEU: boolean;
co2Emissions?: Co2Emission[];
} & FlightSegment;
type TravelerType = "ADULT" | "CHILD" | "SENIOR" | "YOUNG" | "HELD_INFANT" | "SEATED_INFANT" | "STUDENT";
type FlightOfferSource = "GDS";
type TravelerPricingFareOption = "STANDARD" | "INCLUSIVE_TOUR" | "SPANISH_MELILLA_RESIDENT" | "SPANISH_CEUTA_RESIDENT" | "SPANISH_CANARY_RESIDENT" | "SPANISH_BALEARIC_RESIDENT" | "AIR_FRANCE_METROPOLITAN_DISCOUNT_PASS" | "AIR_FRANCE_DOM_DISCOUNT_PASS" | "AIR_FRANCE_COMBINED_DISCOUNT_PASS" | "AIR_FRANCE_FAMILY" | "ADULT_WITH_COMPANION" | "COMPANION";
type SliceDiceIndicator = "LOCAL_AVAILABILITY" | "SUB_OD_AVAILABILITY_1" | "SUB_OD_AVAILABILITY_2";
type Dictionaries$3 = {
locations?: LocationEntry;
aircraft?: AircraftEntry;
currencies?: CurrencyEntry;
carriers?: CarrierEntry;
};
type AllotmentDetails = {
tourName?: string;
tourReference?: string;
};
type TravelerInfo = {
id: string;
travelerType: TravelerType;
associatedAdultId?: string;
};
type ChargeableCheckdBags = BaggageAllowance & {
id?: string;
};
type ChargeableSeat = {
id?: string;
number?: string;
};
type BaggageAllowance = {
quantity?: number;
weight?: number;
weightUnit?: string;
};
type ServiceName = "PRIORITY_BOARDING" | "AIRPORT_CHECKIN";
type PricingOptionsFareType = ("PUBLISHED" | "NEGOTIATED" | "CORPORATE")[];
type Stakeholder = {
id?: string;
dateOfBirth?: string;
gender?: StakeholderGender;
name?: Name$1;
documents?: IdentityDocument[];
};
type StakeholderGender = "MALE" | "FEMALE";
type IdentityDocument = Document & {
documentType?: DocumentType;
validityCountry?: string;
birthCountry?: string;
holder?: boolean;
};
type Document = {
number?: string;
issuanceDate?: string;
expiryDate?: string;
issuanceCountry?: string;
issuanceLocation?: string;
nationality?: string;
birthPlace?: string;
};
type DocumentType = "VISA" | "PASSPORT" | "IDENTITY_CARD" | "KNOWN_TRAVELER" | "REDRESS";
type EmergencyContact = {
addresseeName?: string;
countryCode?: string;
number?: string;
text?: string;
};
type LoyaltyProgram = {
programOwner?: string;
id?: string;
};
type Discount = {
subType?: DiscountType;
cityName?: string;
travelerType?: DiscountTravelerType;
cardNumber?: string;
certificateNumber?: string;
};
type DiscountType = "SPANISH_RESIDENT" | "AIR_FRANCE_DOMESTIC" | "AIR_FRANCE_COMBINED" | "AIR_FRANCE_METROPOLITAN";
type DiscountTravelerType = "SPANISH_CITIZEN" | "EUROPEAN_CITIZEN" | "GOVERNMENT_WORKER" | "MILITARY" | "MINOR_WITHOUT_ID";
type Name$1 = BaseName & {
secondLastName?: string;
};
type BaseName = {
firstName?: string;
lastName?: string;
middleName?: string;
};
type ElementaryPrice = {
amount?: string;
currencyCode?: CurrencyCode;
};
type Traveler = Stakeholder & {
emergencyContact?: EmergencyContact;
loyaltyPrograms?: LoyaltyProgram[];
discountEligibility?: Discount[];
contact?: Contact$2;
};
type Contact$2 = ContactDictionary & {
phones?: Phone[];
companyName?: string;
emailAddress?: string;
};
type ContactPurpose = "STANDARD" | "INVOICE" | "STANDARD_WITHOUT_TRANSMISSION";
type ContactDictionary = {
addresseeName?: Name$1;
address?: Address$5;
language?: string;
purpose?: ContactPurpose;
};
type Address$5 = {
lines?: string[];
postalCode?: string;
countryCode?: string;
cityName?: string;
stateName?: string;
postalBox?: string;
};
type Phone = {
deviceType?: PhoneDeviceType;
countryCallingCode?: string;
number?: string;
};
type PhoneDeviceType = "MOBILE" | "LANDLINE" | "FAX";
type Remarks = {
general?: GeneralRemark[];
airline?: AirlineRemark[];
};
type GeneralRemark = {
subType: GeneralRemarkType;
category?: string;
text: string;
travelerIds?: string[];
flightOfferIds?: string[];
};
type GeneralRemarkType = "GENERAL_MISCELLANEOUS" | "CONFIDENTIAL" | "INVOICE" | "QUALITY_CONTROL" | "BACKOFFICE" | "FULFILLMENT" | "ITINERARY" | "TICKETING_MISCELLANEOUS" | "TOUR_CODE";
type AirlineRemark = {
subType: AirlineRemarkType;
keyword?: string;
airlineCode: string;
text: string;
travelerIds?: string[];
flightOfferIds?: string[];
};
type AirlineRemarkType = "OTHER_SERVICE_INFORMATION" | "KEYWORD" | "OTHER_SERVICE" | "CLIENT_ID" | "ADVANCED_TICKET_TIME_LIMIT";
type TicketingAgreement = {
option?: TicketingAgreementOption;
delay?: string;
dateTime?: string;
segmentIds?: string[];
};
type TicketingAgreementOption = "CONFIRM" | "DELAY_TO_QUEUE" | "DELAY_TO_CANCEL";
type AssociatedRecordCommon = {
reference?: string;
creationDate?: string;
originSystemCode?: string;
};
type AssociatedRecord = AssociatedRecordCommon & {
flightOfferId?: string;
};
type FlightOrder$1 = {
type: "flight-order";
id?: string;
queuingOfficeId?: string;
ownerOfficeId?: string;
associatedRecords?: AssociatedRecord[];
flightOffers: FlightOffer[];
travelers?: Traveler[];
remarks?: Remarks;
formOfPayments?: FormOfPayment[];
ticketingAgreement?: TicketingAgreement;
automatedProcess?: AutomatedProcess[];
contacts?: Contact$2[];
tickets?: AirTravelDocument[];
formOfIdentifications?: FormOfIdentification[];
};
type FormOfIdentification = {
identificationType?: "DRIVERS_LICENSE" | "PASSPORT" | "NATIONAL_IDENTITY_CARD" | "BOOKING_CONFIRMATION" | "TICKET" | "OTHER_ID";
carrierCode?: string;
number?: string;
travelerIds?: string[];
flightOfferIds?: string[];
};
type AutomatedProcessCommon = {
code?: AutomatedProcessCode;
queue?: {
number?: string;
category?: string;
};
text?: string;
};
type AutomatedProcess = AutomatedProcessCommon & {
delay?: string;
officeId?: string;
dateTime?: string;
};
type AutomatedProcessCode = "IMMEDIATE" | "DELAYED" | "ERROR";
type FormOfPayment = {
b2bWallet?: B2BWallet;
creditCard?: CreditCard$1;
other?: OtherMethod;
};
type B2BWallet = {
cardId?: string;
cardUsageName?: string;
cardFriendlyName?: string;
reportingData?: {
name?: string;
value?: string;
}[];
virtualCreditCardDetails?: VirtualCreditCardDetails;
flightOfferIds?: string[];
};
type VirtualCreditCardDetails = CreditCardCommon & ElementaryPrice;
type CreditCard$1 = CreditCardCommon & {
securityCode?: string;
flightOfferIds?: string[];
};
type CreditCardCommon = {
brand?: CreditCardBrand;
holder?: string;
number?: string;
expiryDate?: string;
};
type CreditCardBrand = "VISA" | "AMERICAN_EXPRESS" | "MASTERCARD" | "VISA_ELECTRON" | "VISA_DEBIT" | "MASTERCARD_DEBIT" | "MAESTRO" | "DINERS" | "EASYPAY";
type OtherMethod = {
method?: OtherPaymentMethod;
flightOfferIds?: string[];
};
type OtherPaymentMethod = "ACCOUNT" | "CHECK" | "CASH" | "NONREFUNDABLE";
type AirTravelDocument = AirTravelDocumentCommon & {
travelerId?: string;
segmentIds?: string[];
};
type AirTravelDocumentCommon = {
documentType?: "ETICKET" | "PTICKET" | "EMD" | "MCO";
documentNumber?: string;
documentStatus?: "ISSUED" | "REFUNDED" | "VOID" | "ORIGINAL" | "EXCHANGED";
};
type FareRules = {
currency?: string;
rules?: TermAndCondition[];
};
type TermAndCondition = {
category?: "REFUND" | "EXCHANGE" | "REVALIDATION" | "REISSUE" | "REBOOK" | "CANCELLATION";
circumstances?: string;
notApplicable?: boolean;
maxPenaltyAmount?: string;
descriptions?: {
descriptionType?: string;
text?: string;
}[];
};
type PaymentBrand = "VISA" | "AMERICAN_EXPRESS" | "MASTERCARD" | "VISA_ELECTRON" | "VISA_DEBIT" | "MASTERCARD_DEBIT" | "MAESTRO" | "DINERS" | "MASTERCARD_IXARIS" | "VISA_IXARIS" | "MASTERCARD_AIRPLUS" | "UATP_AIRPLUS";
type Defaults$1 = {
departureDate?: string;
oneWay?: boolean;
duration?: string;
nonStop?: boolean;
maxPrice?: number;
viewBy?: "COUNTRY" | "DATE" | "DESTINATION" | "DURATION" | "WEEK";
};
type Links$4 = {
self?: string;
};
type Meta$7 = {
currency?: string;
links?: Links$4;
defaults?: Defaults$1;
};
type Distance$2 = {
value?: number;
unit?: "KM" | "MI";
};
type GeoCode = {
latitude?: number;
longitude?: number;
};
type Analytics$5 = {
flights?: Flights$2;
travelers?: Travelers$2;
};
type Flights$2 = {
score?: number;
};
type Travelers$2 = {
score?: number;
};
type Locations$1 = {
type?: string;
subtype?: string;
name?: string;
iataCode?: string;
geoCode?: {
latitude?: number;
longitude?: number;
};
address?: {
countryName?: string;
countryCode?: string;
stateCode?: string;
regionCode?: string;
};
timeZone?: {
offSet?: string;
referenceLocalDateTime?: string;
};
metrics?: {
relevance?: number;
};
};
type Amenities = "SWIMMING_POOL" | "SPA" | "FITNESS_CENTER" | "AIR_CONDITIONING" | "RESTAURANT" | "PARKING" | "PETS_ALLOWED" | "AIRPORT_SHUTTLE" | "BUSINESS_CENTER" | "DISABLED_FACILITIES" | "WIFI" | "MEETING_ROOMS" | "NO_KID_ALLOWED" | "TENNIS" | "GOLF" | "KITCHEN" | "ANIMAL_WATCHING" | "BABY_SITTING" | "BEACH" | "CASINO" | "JACUZZI" | "SAUNA" | "SOLARIUM" | "MASSAGE" | "VALET_PARKING" | "BAR" | "LOUNGE" | "KIDS_WELCOME" | "NO_PORN_FILMS" | "MINIBAR" | "TELEVISION" | "WI-FI_IN_ROOM" | "ROOM_SERVICE" | "GUARDED_PARKG" | "SERV_SPEC_MENU";
type QualifiedFreeText = {
text?: string;
lang?: string;
};
type HotelProductPaymentPolicy = {
creditCards?: string[];
methods?: ("CREDIT_CARD" | "CREDIT_CARD_AGENCY" | "CREDIT_CARD_TRAVELER" | "VCC_BILLBACK" | "VCC_B2B_WALLET" | "TRAVEL_AGENT_ID" | "AGENCY_ACCOUNT" | "CORPORATE_ID" | "CHECK" | "ADVANCE_DEPOSIT" | "COMPANY_ADDRESS" | "HOTEL_GUEST_ID" | "MISC_CHARGE_ORDER" | "DEFERED_PAYMENT" | "TRAVEL_AGENT_IMMEDIATE")[];
};
type HotelProductDepositPolicy = {
amount?: string;
deadline?: string;
description?: QualifiedFreeText;
acceptedPayments?: HotelProductPaymentPolicy;
};
type Airline$1 = {
type?: string;
iataCode?: string;
icaoCode?: string;
businessName?: string;
commonName?: string;
};
type ReferenceDataAirlinesParams = {
airlineCodes?: string;
};
type ReferenceDataAirlinesResult = {
warnings?: Issue[];
data: Airline$1[];
meta?: CollectionMetaLink;
};
type ReferenceDataAirlinesReturnedResponse = ReturnedResponseSuccess<ReferenceDataAirlinesResult, ReferenceDataAirlinesResult["data"]>;
declare class Airlines {
private client;
constructor(client: Client);
get(params: ReferenceDataAirlinesParams): Promise<ReferenceDataAirlinesReturnedResponse>;
}
type Location$8 = {
id?: string;
self?: Links$3;
type?: string;
subType?: "AIRPORT" | "CITY" | "POINT_OF_INTEREST" | "DISTRICT";
name?: string;
detailedName?: string;
timeZoneOffset?: string;
iataCode?: string;
geoCode?: GeoCode;
address?: Address$4;
distance?: Distance$2;
analytics?: Analytics$5;
relevance?: number;
category?: "SIGHTS" | "BEACH_PARK" | "HISTORICAL" | "NIGHTLIFE" | "RESTAURANT" | "SHOPPING";
tags?: string[];
rank?: string;
};
type Address$4 = {
cityName?: string;
cityCode?: string;
countryName?: string;
countryCode?: string;
stateCode?: string;
regionCode?: string;
};
type Links$3 = {
href: string;
methods?: ("GET" | "PUT" | "DELETE" | "POST" | "PATCH")[];
count?: number;
};
type ReferenceDataLocationsParams = {
subType: "AIRPORT" | "CITY" | "AIRPORT,CITY";
keyword: string;
countryCode?: string;
page?: {
limit?: number;
offset?: number;
};
sort?: "analytics.travelers.score";
view?: "FULL" | "LIGHT";
};
type ReferenceDataLocationsResult = {
meta?: CollectionMetaLink;
data: Location$8[];
};
type ReferenceDataLocationsReturnedResponse = ReturnedResponseSuccess<ReferenceDataLocationsResult, ReferenceDataLocationsResult["data"]>;
declare class Location$7 {
private client;
private locationId;
constructor(client: Client, locationId: string);
get(params?: Object): Promise<ReferenceDataLocationsReturnedResponse>;
}
type Location$6 = {
type?: string;
subType?: "AIRPORT" | "CITY" | "POINT_OF_INTEREST" | "DISTRICT";
name?: string;
detailedName?: string;
timeZoneOffset?: string;
iataCode?: string;
geoCode?: GeoCode;
address?: Address$3;
distance?: Distance$2;
analytics?: Analytics$5;
relevance?: number;
};
type Address$3 = {
cityName?: string;
cityCode?: string;
countryName?: string;
countryCode?: string;
stateCode?: string;
regionCode?: string;
};
type ReferenceDataLocationsAirportsParams = {
latitude: number;
longitude: number;
radius?: number;
page?: {
limit?: number;
offset?: number;
};
sort?: "relevance" | "distance" | "analytics.travelers.score" | "analytics.flights.score";
};
type ReferenceDataLocationsAirportsResult = {
meta?: CollectionMetaLink;
data: Location$6[];
};
type ReferenceDataLocationsAirportsReturnedResponse = ReturnedResponseSuccess<ReferenceDataLocationsAirportsResult, ReferenceDataLocationsAirportsResult["data"]>;
declare class Airports {
private client;
constructor(client: Client);
get(params: ReferenceDataLocationsAirportsParams): Promise<ReferenceDataLocationsAirportsReturnedResponse>;
}
type Location$5 = {
type?: string;
relationships?: {
id?: string;
type?: string;
href?: string;
}[];
} & {
subtype?: string;
name?: string;
iataCode?: string;
address?: {
postalCode?: string;
countryCode?: string;
stateCode?: string;
};
geoCode?: GeoCode;
};
type Meta$6 = {
count?: number;
links?: {
self?: string;
};
};
type ReferenceDataLocationsCitiesParams = {
countryCode?: string;
keyword: string;
max?: number;
include?: "Airports"[];
};
type ReferenceDataLocationsCitiesResult = {
meta?: Meta$6;
data: Location$5[];
warnings?: Issue[];
included?: {
airports?: Record<string, Location$5>;
};
};
type ReferenceDataLocationsCitiesReturnedResponse = ReturnedResponseSuccess<ReferenceDataLocationsCitiesResult, ReferenceDataLocationsCitiesResult["data"]>;
declare class Cities {
private client;
constructor(client: Client);
get(params: ReferenceDataLocationsCitiesParams): Promise<ReferenceDataLocationsCitiesReturnedResponse>;
}
type SubType = "HOTEL_LEISURE" | "HOTEL_GDS";
type ReferenceDataLocationsHotelParams = {
keyword: string;
subType: SubType | (string & {});
countryCode?: string;
lang?: string;
max?: number;
};
type ReferenceDataLocationsHotelResult = {
data: {
id: number;
type: string;
name: string;
iataCode: string;
hotelIds: string;
subType: SubType | (string & {});
address?: {
cityName: string;
stateCode?: string;
countryCode: string;
};
geoCode?: Required<GeoCode>;
relevance?: number;
}[];
};
type ReferenceDataLocationsHotelReturnedResponse = ReturnedResponseSuccess<ReferenceDataLocationsHotelResult, ReferenceDataLocationsHotelResult["data"]>;
declare class Hotel$2 {
private client;
constructor(client: Client);
get(params: ReferenceDataLocationsHotelParams): Promise<ReferenceDataLocationsHotelReturnedResponse>;
}
type Hotel$1 = ({
subtype?: string;
name?: string;
timeZoneName?: string;
iataCode?: string;
address?: {
countryCode?: string;
};
geoCode?: GeoCode;
} & {
hotelId?: string;
chainCode?: string;
name?: string;
} & object) & {
distance?: {
unit?: "NIGHT" | "PIXELS" | "KILOGRAMS" | "POUNDS" | "CENTIMETERS" | "INCHES" | "BITS_PER_PIXEL" | "KILOMETERS" | "MILES" | "BYTES" | "KILOBYTES";
value?: number;
displayValue?: string;
isUnlimited?: string;
};
last_update?: string;
};
type HotelScore = "BEDBANK" | "DIRECTCHAIN" | "ALL";
type ReferenceDataLocationsHotelsByHotelsParams = {
hotelIds: string;
};
type ReferenceDataLocationsHotelsByCityParams = {
cityCode: string;
radius?: number;
radiusUnit?: "MILE" | "KM";
chainCodes?: string;
amenities?: Amenities | (string & {});
ratings?: string;
hotelScore?: HotelScore;
};
type ReferenceDataLocationsHotelsByGeoCodeParams = {
latitude: number;
longitude: number;
radius?: number;
radiusUnit?: "MILE" | "KM";
chainCodes?: string;
amenities?: Amenities | (string & {});
ratings?: string;
hotelScore?: HotelScore;
};
type ReferenceDataLocationsHotelsResult = {
data: Hotel$1[];
meta?: CollectionMetaLink;
};
type ReferenceDataLocationsHotelsReturnedResponse = ReturnedResponseSuccess<ReferenceDataLocationsHotelsResult, ReferenceDataLocationsHotelsResult["data"]>;
declare class byCity {
private client;
constructor(client: Client);
get(params: ReferenceDataLocationsHotelsByCityParams): Promise<ReferenceDataLocationsHotelsReturnedResponse>;
}
declare class byGeocode {
private client;
constructor(client: Client);
get(params: ReferenceDataLocationsHotelsByGeoCodeParams): Promise<ReferenceDataLocationsHotelsReturnedResponse>;
}
declare class byHotels {
private client;
constructor(client: Client);
get(params: ReferenceDataLocationsHotelsByHotelsParams): Promise<ReferenceDataLocationsHotelsReturnedResponse>;
}
declare class Hotels {
private client;
byCity: byCity;
byGeocode: byGeocode;
byHotels: byHotels;
constructor(client: Client);
}
type Location$4 = {
id?: string;
self?: Links$2;
type?: string;
subType?: "AIRPORT" | "CITY" | "POINT_OF_INTEREST" | "DISTRICT";
name?: string;
geoCode?: GeoCode;
category?: "SIGHTS" | "BEACH_PARK" | "HISTORICAL" | "NIGHTLIFE" | "RESTAURANT" | "SHOPPING";
tags?: string[];
rank?: string;
};
type Links$2 = {
href?: string;
methods?: ("GET" | "PUT" | "DELETE" | "POST" | "PATCH")[];
};
type ReferenceDataLocationsPoisParams = {
latitude: number;
longitude: number;
radius?: number;
page?: {
limit?: number;
offset?: number;
};
categories?: "SIGHTS" | "NIGHTLIFE" | "RESTAURANT" | "SHOPPING" | (string & {});
};
type ReferenceDataLocationsPoisResult = {
meta?: CollectionMetaLink;
data: Location$4[];
};
type ReferenceDataLocationsPoisReturnedResponse = ReturnedResponseSuccess<ReferenceDataLocationsPoisResult, ReferenceDataLocationsPoisResult["data"]>;
type ReferenceDataLocationsPoisBySquareParams = {
north: number;
west: number;
south: number;
east: number;
page?: {
limit?: number;
offset?: number;
};
categories?: "SIGHTS" | "NIGHTLIFE" | "RESTAURANT" | "SHOPPING" | (string & {});
};
declare class BySquare$1 {
private client;
constructor(client: Client);
get(params: ReferenceDataLocationsPoisBySquareParams): Promise<ReferenceDataLocationsPoisReturnedResponse>;
}
declare class PointsOfInterest {
private client;
bySquare: BySquare$1;
constructor(client: Client);
get(params: ReferenceDataLocationsPoisParams): Promise<ReferenceDataLocationsPoisReturnedResponse>;
}
type ReferenceDataLocationsPoisPoiResult = {
meta?: CollectionMetaLink;
data: Location;
};
type ReferenceDataLocationsPoisPoiReturnedResponse = ReturnedResponseSuccess<ReferenceDataLocationsPoisPoiResult, ReferenceDataLocationsPoisPoiResult["data"]>;
declare class PointOfInterest {
private client;
private poiId;
constructor(client: Client, poiId: string);
get(): Promise<ReferenceDataLocationsPoisPoiReturnedResponse>;
}
declare class Locations {
private client;
airports: Airports;
cities: Cities;
hotel: Hotel$2;
hotels: Hotels;
pointsOfInterest: PointsOfInterest;
constructor(client: Client);
get(params: ReferenceDataLocationsParams): Promise<ReferenceDataLocationsReturnedResponse>;
pointOfInterest(poiId: string): PointOfInterest;
}
type Meta$5 = {
count?: number;
links?: {
self?: string;
};
};
type RecommendedLocation = {
subtype?: string;
name?: string;
iataCode?: string;
geoCode?: {
latitude?: number;
longitude?: number;
};
} & {
type?: string;
relevance?: number;
};
type RecommendedLocationsParams = {
cityCodes: string;
travelerCountryCode?: string;
destinationCountryCodes?: string;
};
type RecommendedLocationsResult = {
meta?: Meta$5;
data: RecommendedLocation[];
warnings?: Issue[];
};
type RecommendedLocationsReturnedResponse = ReturnedResponseSuccess<RecommendedLocationsResult, RecommendedLocationsResult["data"]>;
declare class RecommendedLocations {
private client;
constructor(client: Client);
get(params: RecommendedLocationsParams): Promise<RecommendedLocationsReturnedResponse>;
}
type CheckinLink = {
type: string;
id: string;
href: string;
channel: "Mobile" | "Web" | "All";
parameters?: Record<string, Parameter>;
};
type Parameter = {
description?: string;
type: string;
format?: string;
};
type ReferenceDataCheckinLinksParams = {
airlineCode: string;
language?: string;
};
type ReferenceDataCheckinLinksResult = {
warnings?: Issue[];
data: CheckinLink[];
meta?: CollectionMetaLink;
};
type ReferenceDataCheckinLinksReturnedResponse = ReturnedResponseSuccess<ReferenceDataCheckinLinksResult, ReferenceDataCheckinLinksResult["data"]>;
declare class CheckinLinks {
private client;
constructor(client: Client);
get(params: ReferenceDataCheckinLinksParams): Promise<ReferenceDataCheckinLinksReturnedResponse>;
}
declare class Urls {
private client;
checkinLinks: CheckinLinks;
constructor(client: Client);
}
declare class ReferenceData {
private client;
urls: Urls;
locations: Locations;
airlines: Airlines;
recommendedLocations: RecommendedLocations;
constructor(client: Client);
location(locationId: string): Location$7;
}
type Activity$1 = {
type?: "activity";
id?: string;
self?: Link$1;
name?: string;
shortDescription?: string;
description?: string;
geoCode?: GeoCode;
rating?: string;
price?: ElementaryPrice;
pictures?: string[];
bookingLink?: string;
minimumDuration?: string;
};
type Link$1 = {
href?: string;
methods?: ("GET" | "PUT" | "DELETE" | "POST" | "PATCH")[];
};
type ActivitiesParams = {
latitude: number;
longitude: number;
radius?: number;
};
type ActivitiesResult = {
meta?: CollectionMetaLink;
data: Activity$1[];
warnings?: Issue[];
};
type ActivitiesReturnedResponse = ReturnedResponseSuccess<ActivitiesResult, ActivitiesResult["data"]>;
type ActivitiesBySquareParams = {
north: number;
west: number;
south: number;
east: number;
};
declare class BySquare {
private client;
constructor(client: Client);
get(params: ActivitiesBySquareParams): Promise<ActivitiesReturnedResponse>;
}
declare class Activities {
private client;
bySquare: BySquare;
constructor(client: Client);
get(params: ActivitiesParams): Promise<ActivitiesReturnedResponse>;
}
type ActivityResult = {
meta?: CollectionMetaLink;
data: Activity$1;
warnings?: Issue[];
};
type ActivityReturnedResponse = ReturnedResponseSuccess<ActivityResult, ActivityResult["data"]>;
declare class Activity {
private client;
private activityId;
constructor(client: Client, activityId: string);
get(): Promise<ActivityReturnedResponse>;
}
type ExtendedOriginDestinationLight = OriginDestinationLight$1 & {
departureDateTime?: DateTimeType;
arrivalDateTime?: DateTimeType;
};
type OriginDestinationLight$1 = {
id?: string;
originLocationCode?: string;
destinationLocationCode?: string;
includedConnectionPoints?: string[];
excludedConnectionPoints?: string[];
};
type SearchCriteriaLight = {
excludeAllotments?: boolean;
flightFilters?: FlightFiltersLight;
};
type ExtendedSearchCriteria = SearchCriteriaLight & {
includeClosedContent?: boolean;
class?: string;
};
type FlightFiltersLight = {
carrierRestrictions?: CarrierRestrictions;
cabinRestrictions?: CabinRestriction[];
connectionRestriction?: Omit<ConnectionRestriction, "technicalStopsAllowed">;
};
type FlightAvailability = {
type: string;
id: string;
originDestinationId?: string;
source: FlightOfferSource;
instantTicketingRequired?: boolean;
paymentCardRequired?: boolean;
duration?: string;
segments: ExtendedSegment[];
};
type ExtendedSegment = {
closedStatus?: "CANCELLED" | "DEPARTED" | "NOT_AVAILABLE";
availabilityClasses?: AvailabilityClass[];
} & Segment$1;
type AvailabilityClass = {
numberOfBookableSeats?: number;
class?: string;
closedStatus?: "WAITLIST_OPEN" | "WAITLIST_CLOSED" | "ON_REQUEST";
tourAllotment?: TourAllotment;
};
type TourAllotment = AllotmentDetails & {
mode?: "FREE" | "FORCED";
remainingSeats?: number;
};
type CollectionMetaAvailSearch = {
count?: number;
};
type FlightAvailabilitiesParams = {
originDestinations: ExtendedOriginDestinationLight[];
travelers: TravelerInfo[];
sources: FlightOfferSource[];
searchCriteria?: ExtendedSearchCriteria;
};
type FlightAvailabilitiesResult = {
warnings?: Issue[];
meta?: CollectionMetaAvailSearch;
data: FlightAvailability[];
dictionaries?: Dictionaries$3;
};
type FlightAvailabilitiesReturnedResponse = ReturnedResponseSuccess<FlightAvailabilitiesResult, FlightAvailabilitiesResult["data"]>;
declare class FlightAvailabilities {
private client;
constructor(client: Client);
post(params: FlightAvailabilitiesParams): Promise<FlightAvailabilitiesReturnedResponse>;
}
declare class Availability {
private client;
flightAvailabilities: FlightAvailabilities;
constructor(client: Client);
}
type Price$4 = {
total?: string;
};
type LocationValue$1 = {
subType?: "AIRPORT" | "CITY";
detailedName?: string;
};
type LocationDictionary$1 = Record<string, LocationValue$1>;
type CurrencyDictionary$1 = Record<string, string>;
type FlightDate = {
type?: string;
origin?: string;
destination?: string;
departureDate?: string;
returnDate?: string;
price?: Price$4;
links?: {
flightDestinations?: string;
flightOffers?: string;
};
};
type Dictionaries$2 = {
currencies?: CurrencyDictionary$1;
locations?: LocationDictionary$1;
};
type FlightDatesParams = {
origin: string;
destination: string;
} & Defaults$1;
type FlightDatesResult = {
data: FlightDate[];
dictionaries?: Dictionaries$2;
meta?: Meta$7;
warnings?: Issue[];
};
type FlightDatesReturnedResponse = ReturnedResponseSuccess<FlightDatesResult, FlightDatesResult["data"]>;
declare class FlightDates {
private client;
constructor(client: Client);
get(params: FlightDatesParams): Promise<FlightDatesReturnedResponse>;
}
type Price$3 = {
total?: string;
};
type LocationValue = {
subType?: "AIRPORT" | "CITY";
detailedName?: string;
};
type LocationDictionary = Record<string, LocationValue>;
type CurrencyDictionary = Record<string, string>;
type FlightDestination = {
type?: string;
origin?: string;
destination?: string;
departureDate?: string;
returnDate?: string;
price?: Price$3;
links?: {
flightDates?: string;
flightOffers?: string;
};
};
type Dictionaries$1 = {
currencies?: CurrencyDictionary;
locations?: LocationDictionary;
};
type FlightDestinationsParams = {
origin: string;
} & Defaults$1;
type FlightDestinationsResult = {
data: FlightDestination[];
dictionaries?: Dictionaries$1;
meta?: Meta$7;
warnings?: Issue[];
};
type FlightDestinationsReturnedResponse = ReturnedResponseSuccess<FlightDestinationsResult, FlightDestinationsResult["data"]>;
declare class FlightDestinations {
private client;
constructor(client: Client);
get(params: FlightDestinationsParams): Promise<FlightDestinationsReturnedResponse>;
}
type UtilRequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
type OriginDestination = OriginDestinationLight & {
originRadius?: number;
alternativeOriginsCodes?: string[];
destinationRadius?: number;
alternativeDestinationsCodes?: string[];
departureDateTimeRange?: DateTimeRange;
arrivalDateTimeRange?: DateTimeRange;
};
type OriginDestinationLight = {
id?: string;
originLocationCode?: string;
destinationLocationCode?: string;
includedConnectionPoints?: string[];
excludedConnectionPoints?: string[];
};
type DateTimeRange = UtilRequiredKeys<DateTimeType, "date"> & {
dateWindow?: string;
timeWindow?: string;
};
type ExtendedTravelerInfo = UtilRequiredKeys<TravelerInfo, "id" | "travelerType">;
type SearchCriteria = {
excludeAllotments?: boolean;
addOneWayOffers?: boolean;
maxFlightOffers?: number;
maxPrice?: number;
allowAlternativeFareOptions?: boolean;
oneFlightOfferPerDay?: boolean;
additionalInformation?: {
chargeableCheckedBags?: boolean;
brandedFares?: boolean;
};
pricingOptions?: ExtendedPricingOptions;
flightFilters?: FlightFilters;
};
type ExtendedCabinRestriction = CabinRestriction & {
coverage?: Coverage;
};
type FlightFilters = {
crossBorderAllowed?: boolean;
moreOvernightsAllowed?: boolean;
returnToDepartureAirport?: boolean;
railSegmentAllowed?: boolean;
busSegmentAllowed?: boolean;
maxFlightTime?: number;
carrierRestrictions?: CarrierRestrictions;
cabinRestrictions?: ExtendedCabinRestriction[];
connectionRestriction?: ConnectionRestriction;
};
type ExtendedPricingOptions = {
includedCheckedBagsOnly?: boolean;
refundableFare?: boolean;
noRestrictionFare?: boolean;
noPenaltyFare?: boolean;
};
type Coverage = "MOST_SEGMENTS" | "AT_LEAST_ONE_SEGMENT" | "ALL_SEGMENTS";
type FlightOffersSearchPostParams = {
currencyCode?: CurrencyCode;
originDestinations: OriginDestination[];
travelers: ExtendedTravelerInfo[];
sources: FlightOfferSource[];
searchCriteria?: SearchCriteria;
};
type FlightOffersSearchPostResult = {
meta?: CollectionMeta;
warnings?: Issue[];
data: FlightOffer[];
dictionaries?: Dictionaries$3;
};
type FlightOffersSearchGetParams = {
originLocationCode: string;
destinationLocationCode: string;
departureDate: string;
returnDate?: string;
adults: number;
children?: number;
infants?: number;
travelClass?: TravelClass;
includedAirlineCodes?: string;
excludedAirlineCodes?: string;
nonStop?: boolean;
currencyCode?: CurrencyCode;
maxPrice?: number;
max?: number;
};
type FlightOffersSearchGetResult = {
meta?: CollectionMetaLink;
warnings?: Issue[];
data: FlightOffer[];
dictionaries?: Dictionaries$3;
};
type FlightOffersSearchGetReturnedResponse = Promise<ReturnedResponseSuccess<FlightOffersSearchGetResult, FlightOffersSearchGetResult["data"]>>;
type FlightOffersSearchPostReturnedResponse = Promise<ReturnedResponseSuccess<FlightOffersSearchPostResult, FlightOffersSearchPostResult["data"]>>;
declare class FlightOffersSearch {
private client;
constructor(client: Client);
get(params: FlightOffersSearchGetParams): FlightOffersSearchGetReturnedResponse;
post(params: FlightOffersSearchPostParams): FlightOffersSearchPostReturnedResponse;
}
type FlightOffersPredictionParams = FlightOffersSearchGetResult;
type FlightOffersPredictionResult = {
warnings?: Issue[];
meta?: CollectionMetaLink & {
oneWayCombinations?: OneWayCombinations;
};
data: FlightOffer[];
dictionaries?: Dictionaries$3;
};
type FlightOffersPredictionReturnedResponse = ReturnedResponseSuccess<FlightOffersPredictionResult, FlightOffersPredictionResult["data"]>;
declare class FlightChoicePrediction {
private client;
constructor(client: Client);
post(params: FlightOffersPredictionParams): Promise<FlightOffersPredictionReturnedResponse>;
}
type FlightOfferPricingIn = {
type: "flight-offers-pricing";
flightOffers: FlightOffer[];
payments?: {
brand?: PaymentBrand;
binNumber?: number;
flightOfferIds?: string[];
}[];
travelers?: Traveler[];
};
type FlightOfferPricingOut = {
type: string;
flightOffers: FlightOffer[];
bookingRequirements?: {
invoiceAddressRequired?: boolean;
mailingAddressRequired?: boolean;
emailAddressRequired?: boolean;
phoneCountryCodeRequired?: boolean;
mobilePhoneNumberRequired?: boolean;
phoneNumberRequired?: boolean;
postalCodeRequired?: boolean;
travelerRequirements?: {
travelerId?: string;
genderRequired?: boolean;
documentRequired?: boolean;
documentIssuanceCityRequired?: boolean;
dateOfBirthRequired?: boolean;
redressRequiredIfAny?: boolean;
airFranceDiscountRequired?: boolean;
spanishResidentDiscountRequired?: boolean;
residenceRequired?: boolean;
}[];
};
};
type CreditCardFee = {
brand?: PaymentBrand;
amount?: string;
currency?: string;
flightOfferId?: string;
};
type DetailedFareRules = {
fareBasis?: string;
name?: string;
fareNotes?: TermAndCondition;
segmentId?: string;
};
type Bags = BaggageAllowance & {
name?: string;
price?: ElementaryPrice;
bookableByItinerary?: boolean;
segmentIds?: string[];
travelerIds?: string[];
};
type OtherServices = {
name?: ServiceName;
price?: ElementaryPrice;
bookableByTraveler?: boolean;
bookableByItinerary?: boolean;
segmentIds?: string[];
travelerIds?: string[];
};
type FlightOffersPricingParams = {
data: FlightOfferPricingIn;
};
type FlightOffersPricingAdditionalParams = {
include?: string | string[];
forceClass?: boolean;
};
type FlightOffersPricingResult = {
data: FlightOfferPricingOut;
warnings?: Issue[];
included?: {
"credit-card-fees": Record<string, CreditCardFee>;
bags: Record<string, Bags>;
"other-services": Record<string, OtherServices>;
"detailed-fare-rules": Record<string, DetailedFareRules>;
};
dictionaries?: Dictionaries$3;
};
type FlightOffersPricingReturnedResponse = ReturnedResponseSuccess<FlightOffersPricingResult, FlightOffersPricingResult["data"]>;
declare class Pricing {
private client;
constructor(client: Client);
post(params: FlightOffersPricingParams, additionalParams?: FlightOffersPricingAdditionalParams): Promise<FlightOffersPricingReturnedResponse>;
}
type Payment$2 = {
brand?: PaymentBrand;
binNumber?: number;
flightOfferIds?: string[];
};
type FlightOfferUpsellIn = {
type: "flight-offers-upselling";
flightOffers: FlightOffer[];
payments?: Payment$2[];
};
type CollectionMetaUpsell = {
count?: number;
oneWayUpselledCombinations?: {
flightOfferId?: string;
upselledFlightOfferIds?: string[];
}[];
};
type FlightOffersUpsellingParams = {
data: FlightOfferUpsellIn;
};
type FlightOffersUpsellingResult = {
meta?: CollectionMetaUpsell;
warnings?: Issue[];
data: FlightOffer[];
dictionaries?: Dictionaries$3;
};
type FlightOffersUpsellingReturnedResponse = ReturnedResponseSuccess<FlightOffersUpsellingResult, FlightOffersUpsellingResult["data"]>;
declare class Upselling {
private client;
constructor(client: Client);
post(params: FlightOffersUpsellingParams): Promise<FlightOffersUpsellingReturnedResponse>;
}
declare class FlightOffers {
private client;
prediction: FlightChoicePrediction;
pricing: Pricing;
upselling: Upselling;
constructor(client: Client);
}
type HotelOffers = {
type?: "hotel-offers";
available?: boolean;
self?: string;
offers?: HotelOffer$1[];
hotel?: Hotel;
};
type Hotel = {
hotelId?: string;
chainCode?: string;
brandCode?: string;
dupeId?: string;
name?: string;
cityCode?: string;
};
type HotelOffer$1 = {
type?: Type;
id: string;
checkInDate?: string;
checkOutDate?: string;
roomQuantity?: string;
rateCode: string;
rateFamilyEstimated?: HotelProductRateFamily;
category?: string;
description?: QualifiedFreeText;
commission?: HotelProductCommission;
boardType?: BoardType;
room: HotelProductRoomDetails;
guests?: HotelProductGuests;
price: HotelProductHotelPrice;
policies?: HotelProductPolicyDetails;
self?: string;
};
type BoardType = "ROOM_ONLY" | "BREAKFAST" | "HALF_BOARD" | "FULL_BOARD" | "ALL_INCLUSIVE" | "BUFFET_BREAKFAST" | "CARIBBEAN_BREAKFAST" | "CONTINENTAL_BREAKFAST" | "ENGLISH_BREAKFAST" | "FULL_BREAKFAST" | "DINNER_BED_AND_BREAKFAST" | "LUNCH" | "DINNER" | "FAMILY_PLAN" | "AS_BROCHURED" | "SELF_CATERING" | "BERMUDA" | "AMERICAN" | "FAMILY_AMERICAN" | "MODIFIED";
type HotelProductCancellationPolicy = {
type?: CancellationType;
amount?: string;
numberOfNights?: number;
percentage?: string;
deadline?: string;
description?: QualifiedFreeText;
};
type HotelProductCheckInOutPolicy = {
checkIn?: string;
checkInDescription?: QualifiedFreeText;
checkOut?: string;
checkOutDescription?: QualifiedFreeText;
};
type HotelProductCommission = {
percentage?: string;
amount?: string;
description?: QualifiedFreeText;
};
type HotelProductEstimatedRoomType = {
category?: string;
beds?: number;
bedType?: string;
};
type HotelProductGuaranteePolicy = {
description?: QualifiedFreeText;
acceptedPayments?: HotelProductPaymentPolicy;
};
type HotelProductGuests = {
adults?: number;
childAges?: number[];
};
type HotelProductHoldPolicy = {
deadline: string;
};
type HotelProductHotelPrice = {
currency?: string;
sellingTotal?: string;
total?: string;
base?: string;
taxes?: Tax$2[];
markups?: Markup[];
variations?: HotelProductPriceVariations;
};
type HotelProductPolicyDetails = {
paymentType?: PaymentType;
guarantee?: HotelProductGuaranteePolicy;
deposit?: HotelProductDepositPolicy;
prepay?: HotelProductDepositPolicy;
holdTime?: HotelProductHoldPolicy;
cancellations?: HotelProductCancellationPolicy[];
checkInOut?: HotelProductCheckInOutPolicy;
};
type HotelProductPriceVariation = {
startDate: string;
endDate: string;
currency?: string;
sellingTotal?: string;
total?: string;
base?: string;
markups?: Markup[];
};
type HotelProductPriceVariations = {
average?: Price$2;
changes?: HotelProductPriceVariation[];
};
type HotelProductRateFamily = {
code?: string;
type?: string;
};
type HotelProductRoomDetails = {
type?: string;
typeEstimated?: HotelProductEstimatedRoomType;
description?: QualifiedFreeText;
};
type Markup = {
amount?: string;
};
type PaymentType = "GUARANTEE" | "DEPOSIT" | "PREPAY" | "HOLDTIME";
type Price$2 = {
currency?: string;
sellingTotal?: string;
total?: string;
base?: string;
markups?: Markup[];
};
type Tax$2 = {
amount?: string;
currency?: string;
code?: string;
percentage?: string;
included?: boolean;
description?: string;
pricingFrequency?: string;
pricingMode?: string;
};
type Type = "hotel-offer";
type CancellationType = "FULL_STAY";
type HotelOffersSearchParams = {
hotelIds: string;
adults?: number;
checkInDate?: string;
checkOutDate?: string;
countryOfResidence?: string;
priceRange?: string;
currencyCode?: CurrencyCode;
paymentPolicy?: "GUARANTEE" | "DEPOSIT" | "NONE";
boardType?: "ROOM_ONLY" | "BREAKFAST" | "HALF_BOARD" | "FULL_BOARD" | "ALL_INCLUSIVE";
includeClosed?: boolean;
bestRateOnly?: boolean;
lang?: string;
};
type HotelOffersSearchResult = {
data: HotelOffers[];
};
type HotelOffersSearchReturnedResponse = ReturnedResponseSuccess<HotelOffersSearchResult, HotelOffersSearchResult["data"]>;
type HotelOfferSearchParams = {
lang?: string;
};
type HotelOfferSearchResult = {
data: HotelOffers;
};
type HotelOfferSearchReturnedResponse = ReturnedResponseSuccess<HotelOfferSearchResult, HotelOfferSearchResult["data"]>;
declare class HotelOfferSearch {
private client;
private offerId;
constructor(client: Client, offerId: string);
get(params?: HotelOfferSearchParams): Promise<HotelOfferSearchReturnedResponse>;
}
declare class HotelOffersSearch {
private client;
constructor(client: Client);
get(params: HotelOffersSearchParams): Promise<HotelOffersSearchReturnedResponse>;
}
type OperatingFlight = {
carrierCode?: string;
number?: string;
suffix?: string;
};
type Price$1 = {
currency?: string;
total?: string;
base?: string;
fees?: Fee$2[];
taxes?: Tax$3[];
};
type SeatMap = {
type?: string;
id?: string;
self?: Link;
departure?: FlightEndPoint;
arrival?: FlightEndPoint;
carrierCode?: string;
number?: string;
operating?: OperatingFlight;
aircraft?: AircraftEquipment$1;
class?: string;
flightOfferId?: string;
segmentId?: string;
decks?: Deck[];
aircraftCabinAmenities?: AircraftCabinAmenities;
availableSeatsCounters?: AvailableSeatsCounter[];
};
type Deck = {
deckType?: "UPPER" | "MAIN" | "LOWER";
deckConfiguration?: DeckConfiguration;
facilities?: Facility