whitelabel-db 1.1.21 → 1.1.22

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.
@@ -156,6 +156,19 @@ export interface BookingInfo {
156
156
  amount: number;
157
157
  type: string;
158
158
  };
159
+ formattedCancellationPolicies?: {
160
+ policies: {
161
+ message: string;
162
+ highlight: boolean;
163
+ cancelTimeFrame: {
164
+ start: string;
165
+ end: string;
166
+ amount: number;
167
+ type?: string;
168
+ };
169
+ }[];
170
+ hasFreeCancellation: boolean;
171
+ };
159
172
  }
160
173
  export interface BookingConfirmation {
161
174
  prebookId: string;
@@ -174,6 +174,8 @@ export interface BookedRoomV3 {
174
174
  maxOccupancy: number;
175
175
  retailRate: RetailRateV3;
176
176
  };
177
+ firstName: string;
178
+ lastName: string;
177
179
  }
178
180
  export interface BookingInfoV3 {
179
181
  bookingId: string;
@@ -207,6 +209,19 @@ export interface BookingInfoV3 {
207
209
  uberVoucherCode: string;
208
210
  uberVoucherCurrency: string;
209
211
  uberVoucherExpiryDate: string;
212
+ formattedCancellationPolicies?: {
213
+ policies: {
214
+ message: string;
215
+ highlight: boolean;
216
+ cancelTimeFrame: {
217
+ start: string;
218
+ end: string;
219
+ amount: number;
220
+ type?: string;
221
+ };
222
+ }[];
223
+ hasFreeCancellation: boolean;
224
+ };
210
225
  }
211
226
  export interface BookingConfirmationV3 {
212
227
  prebookId: string;
@@ -284,6 +299,7 @@ export declare class LiteApiClientV3 {
284
299
  preBookedHotelRate(options: PrebookRateRequestV3): Promise<PrebookRateV3>;
285
300
  bookHotelRate(options: CheckoutRequestV3): Promise<BookingInfoV3>;
286
301
  cancelBooking(bookingId: string): Promise<CancelBookingV3>;
302
+ getBooking(bookingId: string): Promise<BookingInfoV3>;
287
303
  getGuests(): Promise<GuestV3[]>;
288
304
  getGuest(guestId: number): Promise<GuestV3>;
289
305
  getGuestBookings(guestId: number): Promise<GuestBookingV3[]>;
@@ -99,6 +99,18 @@ class LiteApiClientV3 {
99
99
  })).data.data;
100
100
  });
101
101
  }
102
+ getBooking(bookingId) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ return (yield (0, axios_1.default)({
105
+ method: 'get',
106
+ url: `${this.bookingBaseUrl}/v3.0/bookings/${bookingId}`,
107
+ headers: {
108
+ 'X-API-Key': this.apiKey,
109
+ 'content-type': 'application/json',
110
+ },
111
+ })).data.data;
112
+ });
113
+ }
102
114
  getGuests() {
103
115
  return __awaiter(this, void 0, void 0, function* () {
104
116
  return (yield (0, axios_1.default)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whitelabel-db",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",