whitelabel-db 1.4.4 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -31,5 +31,5 @@ export { LoyaltyProgram } from './models/LoyaltyProgram';
31
31
  export { LoyaltyProgramTier } from './models/LoyaltyProgramTier';
32
32
  export { BookingLoyaltyRecord } from './models/BookingLoyaltyRecord';
33
33
  export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, CancelBooking, } from './libs/liteapi';
34
- export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, BookedRoomV3, OccupancyV3, GuestV3, GuestBookingV3, PromoCodeRequest, PromoCodeResponse, EsimplyPackage, Addon, AddonResponse, GetHotelRequestV3, HotelDataV3, HotelImageV3, CheckinCheckoutTimesV3, LocationV3, FacilityV3, RoomV3, BedTypeV3, RoomAmenityV3, RoomPhotoV3, PolicyV3, AccessibilityV3, AccessibilityAttributesV3, AccessibilityDisabilitiesV3, AccessibilityDisabilityScoresV3, SentimentAnalysisV3, SentimentCategoryV3, SemanticSearchRequestV3, SemanticSearchHotelV3, ConversationalHotelRequestV3, ConversationalHotelResponseV3, InitiatePaymentIntentV3, FinalizePaymentRequestV3, FinalizePaymentResponseV3, } from './libs/liteapiv3';
34
+ export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, CancelBookingRequestV3, BookedRoomV3, OccupancyV3, GuestV3, GuestBookingV3, PromoCodeRequest, PromoCodeResponse, EsimplyPackage, Addon, AddonResponse, GetHotelRequestV3, HotelDataV3, HotelImageV3, CheckinCheckoutTimesV3, LocationV3, FacilityV3, RoomV3, BedTypeV3, RoomAmenityV3, RoomPhotoV3, PolicyV3, AccessibilityV3, AccessibilityAttributesV3, AccessibilityDisabilitiesV3, AccessibilityDisabilityScoresV3, SentimentAnalysisV3, SentimentCategoryV3, SemanticSearchRequestV3, SemanticSearchHotelV3, ConversationalHotelRequestV3, ConversationalHotelResponseV3, InitiatePaymentIntentV3, FinalizePaymentRequestV3, FinalizePaymentResponseV3, } from './libs/liteapiv3';
35
35
  export { LiteApiUser, LiteApiUserRequest } from './libs/liteapiuser';
@@ -13,6 +13,7 @@ export interface HotelsRequestV3 {
13
13
  guestNationality: string;
14
14
  rm?: boolean;
15
15
  trackingId?: string;
16
+ sessionId?: string;
16
17
  }
17
18
  export interface AvailabilityResultV3 {
18
19
  hotelId: string;
@@ -113,6 +114,7 @@ export interface PrebookRateRequestV3 {
113
114
  useOwnSecretKey?: boolean;
114
115
  };
115
116
  trackingId?: string;
117
+ sessionId?: string;
116
118
  voucherCode?: string;
117
119
  addons: Addon[];
118
120
  clientReference?: string;
@@ -190,6 +192,7 @@ export interface CheckoutRequestV3 {
190
192
  holder: UserV3;
191
193
  guests: GuestsRequestV3[];
192
194
  trackingId?: string;
195
+ sessionId?: string;
193
196
  }
194
197
  export interface BookedRoomV3 {
195
198
  roomType: {
@@ -292,6 +295,10 @@ export interface BookingConfirmationV3 {
292
295
  prebookId: string;
293
296
  transactionId: string;
294
297
  }
298
+ export interface CancelBookingRequestV3 {
299
+ trackingId?: string;
300
+ sessionId?: string;
301
+ }
295
302
  export interface CancelBookingV3 {
296
303
  bookingId: string;
297
304
  status: string;
@@ -306,7 +313,7 @@ export interface InitiatePaymentIntentV3 {
306
313
  currency: string;
307
314
  transactionId: string;
308
315
  }
309
- export type FinalizePaymentRequestV3 = {
316
+ export type FinalizePaymentRequestV3 = ({
310
317
  method: 'CREDIT';
311
318
  } | {
312
319
  method: 'THIRD_PARTY';
@@ -314,6 +321,9 @@ export type FinalizePaymentRequestV3 = {
314
321
  } | {
315
322
  method: 'TRANSACTION_ID';
316
323
  transactionId: string;
324
+ }) & {
325
+ trackingId?: string;
326
+ sessionId?: string;
317
327
  };
318
328
  export interface FinalizePaymentResponseV3 {
319
329
  bookingId: string;
@@ -642,8 +652,11 @@ export declare class LiteApiClientV3 {
642
652
  getHotelsFullRate(options: HotelsRequestV3): Promise<FullRateAvailabilityResultV3[]>;
643
653
  preBookedHotelRate(options: PrebookRateRequestV3): Promise<PrebookRateV3>;
644
654
  bookHotelRate(options: CheckoutRequestV3): Promise<BookingInfoV3>;
645
- cancelBooking(bookingId: string): Promise<CancelBookingV3>;
646
- initiatePaymentIntent(bookingId: string): Promise<InitiatePaymentIntentV3>;
655
+ cancelBooking(bookingId: string, options?: CancelBookingRequestV3): Promise<CancelBookingV3>;
656
+ initiatePaymentIntent(bookingId: string, options?: {
657
+ trackingId?: string;
658
+ sessionId?: string;
659
+ }): Promise<InitiatePaymentIntentV3>;
647
660
  finalizePayment(bookingId: string, data: FinalizePaymentRequestV3): Promise<FinalizePaymentResponseV3>;
648
661
  getBooking(bookingId: string, key?: string): Promise<BookingInfoV3>;
649
662
  getPrebook(prebookId: string, key?: string): Promise<PrebookRateV3>;
@@ -106,11 +106,12 @@ class LiteApiClientV3 {
106
106
  })).data.data;
107
107
  });
108
108
  }
109
- cancelBooking(bookingId) {
109
+ cancelBooking(bookingId, options) {
110
110
  return __awaiter(this, void 0, void 0, function* () {
111
111
  return (yield (0, axios_1.default)({
112
112
  method: 'put',
113
113
  url: `${this.bookingBaseUrl}/v3.0/bookings/${bookingId}`,
114
+ data: options,
114
115
  headers: {
115
116
  'X-API-Key': this.apiKey,
116
117
  'content-type': 'application/json',
@@ -118,11 +119,12 @@ class LiteApiClientV3 {
118
119
  })).data.data;
119
120
  });
120
121
  }
121
- initiatePaymentIntent(bookingId) {
122
+ initiatePaymentIntent(bookingId, options) {
122
123
  return __awaiter(this, void 0, void 0, function* () {
123
124
  return (yield (0, axios_1.default)({
124
125
  method: 'post',
125
126
  url: `${this.bookingBaseUrl}/v3.0/bookings/${bookingId}/payments/initiate`,
127
+ data: options,
126
128
  headers: {
127
129
  'X-API-Key': this.apiKey,
128
130
  'content-type': 'application/json',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whitelabel-db",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",