import Big from 'big.js'; import { Tour, Generic, FlightDetail, Order, PriceRules, Customer, PriceRule, v2_PrivateTour, v2_GroupTour } from './types'; import { NDC_OfferPriceRes1 } from './custom'; export declare type Item = { [P in keyof Order['products'][0]['items'][0]]?: Order['products'][0]['items'][0][P]; }; export declare type Product = { [P in keyof Pick>]?: Order['products'][0][P]; } & { items: Item[]; }; export declare type ComputeResult = { product?: Product; error?: string; total?: string; }; export declare type FlightFormValue = { od1_id: string; od2_id?: string; pricing_id: string; ptc_adt: number; ptc_cnn?: number; ptc_inf?: number; prime_workflow?: boolean; search_id?: string; seats?: { traveler_ref: string; row_number: string; column_id: string; offer_item_id: string; }[]; services?: { traveler_ref: string; offer_item_id: string; quantity: number; }[]; }; export declare type FlightChangeFormValue = { od1_id: string; od2_id?: string; pricing_id: string; product_source_ref: string; seats?: { traveler_ref: string; row_number: string; column_id: string; offer_item_id: string; }[]; }; export declare type FlightChangeServiceFormValue = { product_source: string; product_source_ref: string; services?: { traveler_ref: string; offer_item_id: string; quantity: number; }[]; seats?: { segment_id: string; traveler_ref: string; row_number: string; column_id: string; offer_item_id: string; }[]; }; export declare type TourFormValue = { tour_id?: string; rooms?: { adult: number; child_with_bed?: number; child_no_bed?: number; infant?: number; }[]; option_id?: string; departure_date?: string; tour_addons?: { id: string; option_id: string; }[]; generic_addons?: { id: string; options: { id: string; quantity: string | number; }[]; }[]; }; export declare type GlobaltixFormValue = { id: number; quantity: number; fromResellerId: number | null; visitDate?: string; questionList?: { id: number; answer: string; }[]; }; export declare type LegacyHotelFormValue = { room_id: string; price_code: string; params: { hotelId: string; checkInDate: string; duration: number | string; adults: number | string; children: number | string; }; }; export declare type HotelbedsFormValue = { sourceMarket?: string; stay: { checkIn: string; checkOut: string; shiftDays: number | string; }; occupancies: { rooms: number; adults: number; children: number; paxes: { type: string; age: number; }[]; }[]; hotels: { hotel: number[]; }; destinationCode?: string; rateKey?: string; hotelCode?: string; }; export declare type HotelbedsQuery = HotelbedsFormValue & { rateKey: string; hotelCode?: string; destionationCode?: string; }; export declare type HotelbedsStaticData = { code: number; }; export declare const decodePriceCode: { SGL: string; TWN: string; TRP: string; QUAD: string; CWB: string; CNB: string; CHT: string; INF: string; }; export declare function computeBookableTimeLeft(tour: { stop_booking_days_before: number; stop_booking_time: string; utc_offset: string; }, iso_date: string, currentTs?: number): number; export declare function newDateLocal(a1?: string | number, a2?: number, a3?: number): Date; export declare function computeTour(tour: Tour, tourFormValue: TourFormValue): ComputeResult; export declare type LegacyHotelForm = { hotelId: string; checkInDate: string; duration: number; adults: number; children: number; }; export declare function computeGeneric(generic: Generic, params: { generic_id: string; option_id: string; quantity: number; from_date?: string; from_time?: string; }): ComputeResult; export declare type HotelbedsRoomRate = { rateKey: string; rateClass: string; rateType: string; net: string; travelcloud_price: string; allotment: number; rateCommentId: string; paymentType: string; packaging: boolean; boardCode: string; boardName: string; rooms: number; adults: number; children: number; cancellationPolicies: { amount: string; from: string; }[]; }; export declare type HotelbedsRoom = { code: string; name: string; rates: HotelbedsRoomRate[]; }; export declare type HotelbedsBookingForm = { holder: { name: string; surname: string; }; rooms: { rateKey: string; paxes: { roomId: string | number; type: string; name: string; }[]; }[]; }; export declare type HotelbedsAvailability = { code: number; name: string; categoryCode: string; categoryName: string; destinationCode: string; destinationName: string; zoneCode: number; zoneName: string; latitude: string; longitude: string; rooms: HotelbedsRoom[]; }; export declare type HotelbedsCheckRateResponse = HotelbedsAvailability & { checkOut: string; checkIn: string; }; export declare type OutboundFormValue = { tourCode: string; landOnly: string; roomList: { roomNo: number; adults: number; children: number; childrenNoBed: number; infants: number; }[]; }; export declare type OutboundPriceCheck = { "tourCode": string; "landOnly": string; "numAdultSingle": number; "numAdultTwin": number; "numAdultTriple": number; "numAdultQuad": number; "numChildWithoutBed": number; "numChildHalfTwin": number; "numChildWithBed": number; "numInfant": number; "singleFare": number; "twinFare": number; "tripleFare": number; "quadFare": number; "childWithoutBedFare": number; "childHalfTwinFare": number; "childWithBedFare": number; "infantFare": number; "groundSingleFare": number; "groundTwinFare": number; "groundTripleFare": number; "groundQuadFare": number; "groundChildWithoutBedFare": number; "groundChildHalfTwinFare": number; "groundChildWithBedFare": number; "groundInfantFare": number; "airportTaxPerAdultPax": number; "airportTaxPerChildPax": number; "totalFare": number; }; export declare type OutboundTour = { "tourCode": string; "briefDescription": string; "description1": string; "description2": string; "departureDate": string; "returnDate": string; "capacity": number; "minPax": number; "noOfTourLeader": number; "paymentDueDate": string; "mainAirline": string; "remark1": string; "remark2": string; "remark3": string; "departureMeetTime": number; "priceCode": string; "singleFare": number; "twinFare": number; "tripleFare": number; "quadFare": number; "childWithoutBedFare": number; "childHalfTwinFare": number; "childWithBedFare": number; "infantFare": number; "groundSingleFare": number; "groundTwinFare": number; "groundTripleFare": number; "groundQuadFare": number; "groundChildWithoutBedFare": number; "groundChildHalfTwinFare": number; "groundChildWithBedFare": number; "groundInfantFare": number; "airportTaxPerAdultPax": number; "airportTaxPerChildPax": number; "discountCode": string; "singleFareSurcharge": number; "twinFareSurcharge": number; "tripleFareSurcharge": number; "quadFareSurcharge": number; "infantFareSurcharge": number; "childWithoutBedFareSurcharge": number; "childHalfTwinFareSurCharge": number; "childWithBedFareSurcharge": number; "groundSingleFareSurcharge": number; "groundTwinFareSurcharge": number; "groundTripleFareSurcharge": number; "groundQuadFareSurcharge": number; "groundInfantFareSurcharge": number; "groundChildWithoutBedFareSurcharge": number; "groundChildHalfTwinFareSurcharge": number; "groundChildWithBedFareSurcharge": number; "adultDiscountAmount": number; "childDiscountAmount": number; "priceRemark1": string; "priceRemark2": string; "tourClosed": string; "balanceSeat": number; }; export declare type OutboundDepositRule = { "Price Code": string; "Deposit/PAX": number; }; export declare function computeOutbound(data: { tourMaster: OutboundTour; priceCheck: OutboundPriceCheck; depositRules: OutboundDepositRule[]; }, bookingForm: OutboundFormValue): ComputeResult; export declare function computeHotelbeds(data: { static: any; checkrates: HotelbedsCheckRateResponse; }, bookingForm: HotelbedsBookingForm): ComputeResult; export declare function computeGlobaltix(item: any, form: GlobaltixFormValue): ComputeResult; export declare function isAdjustmentEffective(adjustment: v2_PrivateTour['adjustment_travel_dates'][0], date: string): boolean; export declare type AnyTourFormValue = { adult: number; child: number; adult2?: number; child2?: number; adult3?: number; child3?: number; adult4?: number; child4?: number; adult5?: number; child5?: number; child_no_bed?: number; tour_id: string; departure_date: string; extension?: number; addon_values?: { [key: string]: number; }; }; export declare enum TourType { PrivateTour = 0, GroupTour = 1 } export declare function computeAnyTour(anyTour: v2_PrivateTour | v2_GroupTour, bookingForm: AnyTourFormValue, tourType: TourType, now?: number): ComputeResult; declare type FlightsSummary = { origin: { code: string; }; origin_datetime: string; destination: { code: string; }; destination_datetime: string; }; export declare function getFlightsSummary(segment: FlightDetail['od1']['segments'][0]): FlightsSummary; export declare function computeFlight(flight: FlightDetail, form: FlightFormValue, offerPriceRes?: NDC_OfferPriceRes1): { error: string; total?: undefined; product?: undefined; } | { total: any; product: any; error?: undefined; }; export declare function computeFlightChangeServices(flight: FlightDetail, form: FlightChangeServiceFormValue, offerPriceRes?: NDC_OfferPriceRes1): { error: string; total?: undefined; product?: undefined; } | { total: any; product: any; error?: undefined; }; export declare function computeFlightChange(changeFlight: FlightDetail, form: FlightChangeFormValue): { error: string; total?: undefined; product?: undefined; } | { total: any; product: any; error?: undefined; }; export declare function tcParseInt(x: string | number): number; export declare function bigZeroIfInvalid(x: any): Big; export declare function filterPriceRulesWithCheckoutCode(checkoutCode: string, priceRules: PriceRules, bcryptCache: { [key: string]: boolean; }, customer: Customer): PriceRules; declare type AnyPriceRules = PriceRules | v2_PrivateTour["price_rules"]; declare type PriceRuleWithEval = PriceRule & { _fail_reason?: string[]; _checkout_code_passed?: boolean; _adjustment?: string; }; declare type MinOrder = { checkout_code: string; limit_code?: string; limit_discount?: string; products: (Product & { _price_rules: any; _price_rules_combined_eval: PriceRuleWithEval[]; })[]; }; export declare function computePriceRules(order: MinOrder, priceRules: AnyPriceRules, bcryptCache: { [key: string]: boolean; }, customer: Customer, limits?: { all?: { [key: string]: string; }; customer?: { [key: string]: string; }; }, now?: Date): MinOrder; export declare function computeLegacyHotel(details: any, checkout: LegacyHotelFormValue): { error: string; product?: undefined; } | { product: any; error?: undefined; }; export {};