whitelabel-db 1.0.25 → 1.0.26

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
@@ -6,4 +6,4 @@ export { Hotel } from './models/Hotel';
6
6
  export { User } from './models/User';
7
7
  export { Project } from './models/Project';
8
8
  export { Booking } from './models/Booking';
9
- export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, } from './libs/liteapi';
9
+ export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, CancelBooking, } from './libs/liteapi';
@@ -142,6 +142,13 @@ export interface BookingConfirmation {
142
142
  prebookId: string;
143
143
  transactionId: string;
144
144
  }
145
+ export interface CancelBooking {
146
+ bookingId: string;
147
+ status: string;
148
+ cancellation_fee: number;
149
+ refund_amount: number;
150
+ currency: string;
151
+ }
145
152
  export declare class LiteApiClient {
146
153
  private apiKey;
147
154
  constructor(apiKey: string);
@@ -150,4 +157,5 @@ export declare class LiteApiClient {
150
157
  getHotelsFullRate(options: HotelsRequest): Promise<FullRateAvailabilityResult[]>;
151
158
  preBookedHotelRate(options: PrebookRateRequest): Promise<PrebookRate>;
152
159
  bookHotelRate(options: CheckoutRequest): Promise<BookingInfo>;
160
+ cancelBooking(bookingId: string): Promise<CancelBooking>;
153
161
  }
@@ -77,5 +77,17 @@ class LiteApiClient {
77
77
  })).data.data;
78
78
  });
79
79
  }
80
+ cancelBooking(bookingId) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ return (yield (0, axios_1.default)({
83
+ method: 'put',
84
+ url: `${baseUrl}/v2.0/bookings/${bookingId}`,
85
+ headers: {
86
+ 'X-API-Key': this.apiKey,
87
+ 'content-type': 'application/json',
88
+ },
89
+ })).data.data;
90
+ });
91
+ }
80
92
  }
81
93
  exports.LiteApiClient = LiteApiClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whitelabel-db",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",