whitelabel-db 1.1.12 → 1.1.13

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
@@ -11,5 +11,5 @@ export { HotelTranslation } from './models/HotelTranslation';
11
11
  export { Guest } from './models/Guest';
12
12
  export { HotelAccessibility } from './models/HotelAccessibility';
13
13
  export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, CancelBooking, } from './libs/liteapi';
14
- export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, BookedRoomV3, OccupancyV3, } from './libs/liteapiv3';
14
+ export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, BookedRoomV3, OccupancyV3, GuestV3, GuestBookingV3, } from './libs/liteapiv3';
15
15
  export { LiteApiUser, LiteApiUserRequest } from './libs/liteapiuser';
@@ -201,6 +201,29 @@ export interface CancelBookingV3 {
201
201
  refund_amount: number;
202
202
  currency: string;
203
203
  }
204
+ export interface GuestV3 {
205
+ id: number;
206
+ email: string;
207
+ firstName: string;
208
+ lastName: string;
209
+ phoneNumber: string;
210
+ points: number;
211
+ bookings: string[];
212
+ createdAt: string;
213
+ updatedAt: string;
214
+ deletedAt: string;
215
+ }
216
+ export interface GuestBookingV3 {
217
+ id: number;
218
+ guestID: number;
219
+ bookingID: string;
220
+ points: number;
221
+ cashbackRateUsed: number;
222
+ expirationDate: string;
223
+ createdAt: string;
224
+ updatedAt: string;
225
+ deletedAt: string;
226
+ }
204
227
  export declare class LiteApiClientV3 {
205
228
  private apiKey;
206
229
  private baseUrl;
@@ -212,4 +235,7 @@ export declare class LiteApiClientV3 {
212
235
  preBookedHotelRate(options: PrebookRateRequestV3): Promise<PrebookRateV3>;
213
236
  bookHotelRate(options: CheckoutRequestV3): Promise<BookingInfoV3>;
214
237
  cancelBooking(bookingId: string): Promise<CancelBookingV3>;
238
+ getGuests(): Promise<GuestV3[]>;
239
+ getGuest(guestId: number): Promise<GuestV3>;
240
+ getGuestBookings(guestId: number): Promise<GuestBookingV3[]>;
215
241
  }
@@ -96,5 +96,35 @@ class LiteApiClientV3 {
96
96
  })).data.data;
97
97
  });
98
98
  }
99
+ getGuests() {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ return (yield (0, axios_1.default)({
102
+ url: `${this.baseUrl}/v3.0/guests`,
103
+ headers: {
104
+ 'X-API-Key': this.apiKey,
105
+ },
106
+ })).data.data;
107
+ });
108
+ }
109
+ getGuest(guestId) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ return (yield (0, axios_1.default)({
112
+ url: `${this.baseUrl}/v3.0/guests/${guestId}`,
113
+ headers: {
114
+ 'X-API-Key': this.apiKey,
115
+ },
116
+ })).data.data;
117
+ });
118
+ }
119
+ getGuestBookings(guestId) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ return (yield (0, axios_1.default)({
122
+ url: `${this.baseUrl}/v3.0/guests/${guestId}/bookings`,
123
+ headers: {
124
+ 'X-API-Key': this.apiKey,
125
+ },
126
+ })).data.data;
127
+ });
128
+ }
99
129
  }
100
130
  exports.LiteApiClientV3 = LiteApiClientV3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whitelabel-db",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",