whitelabel-db 1.1.20 → 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.
- package/dist/libs/liteapi.d.ts +13 -0
- package/dist/libs/liteapiv3.d.ts +31 -7
- package/dist/libs/liteapiv3.js +12 -0
- package/package.json +1 -1
package/dist/libs/liteapi.d.ts
CHANGED
|
@@ -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;
|
package/dist/libs/liteapiv3.d.ts
CHANGED
|
@@ -98,7 +98,13 @@ export interface PrebookRateRequestV3 {
|
|
|
98
98
|
usePaymentSdk?: boolean;
|
|
99
99
|
trackingId?: string;
|
|
100
100
|
voucherCode?: string;
|
|
101
|
-
|
|
101
|
+
ancillaryVouchers?: {
|
|
102
|
+
ancillary: string;
|
|
103
|
+
value: number;
|
|
104
|
+
currency: string;
|
|
105
|
+
convertedValue: number;
|
|
106
|
+
convertedCurrency: string;
|
|
107
|
+
}[];
|
|
102
108
|
}
|
|
103
109
|
export interface PrebookRateV3 {
|
|
104
110
|
prebookId: string;
|
|
@@ -121,12 +127,14 @@ export interface PrebookRateV3 {
|
|
|
121
127
|
voucherCode: string;
|
|
122
128
|
voucherTotalAmount: number;
|
|
123
129
|
isPackageRate: boolean;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
ancillaryVouchersRequest?: {
|
|
131
|
+
ancillary: string;
|
|
132
|
+
value: number;
|
|
133
|
+
currency: string;
|
|
134
|
+
convertedValue: number;
|
|
135
|
+
convertedCurrency: string;
|
|
136
|
+
}[];
|
|
137
|
+
ancillariesTotalAmount?: number;
|
|
130
138
|
}
|
|
131
139
|
export interface GuestInfoV3 {
|
|
132
140
|
guestFirstName: string;
|
|
@@ -166,6 +174,8 @@ export interface BookedRoomV3 {
|
|
|
166
174
|
maxOccupancy: number;
|
|
167
175
|
retailRate: RetailRateV3;
|
|
168
176
|
};
|
|
177
|
+
firstName: string;
|
|
178
|
+
lastName: string;
|
|
169
179
|
}
|
|
170
180
|
export interface BookingInfoV3 {
|
|
171
181
|
bookingId: string;
|
|
@@ -199,6 +209,19 @@ export interface BookingInfoV3 {
|
|
|
199
209
|
uberVoucherCode: string;
|
|
200
210
|
uberVoucherCurrency: string;
|
|
201
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
|
+
};
|
|
202
225
|
}
|
|
203
226
|
export interface BookingConfirmationV3 {
|
|
204
227
|
prebookId: string;
|
|
@@ -276,6 +299,7 @@ export declare class LiteApiClientV3 {
|
|
|
276
299
|
preBookedHotelRate(options: PrebookRateRequestV3): Promise<PrebookRateV3>;
|
|
277
300
|
bookHotelRate(options: CheckoutRequestV3): Promise<BookingInfoV3>;
|
|
278
301
|
cancelBooking(bookingId: string): Promise<CancelBookingV3>;
|
|
302
|
+
getBooking(bookingId: string): Promise<BookingInfoV3>;
|
|
279
303
|
getGuests(): Promise<GuestV3[]>;
|
|
280
304
|
getGuest(guestId: number): Promise<GuestV3>;
|
|
281
305
|
getGuestBookings(guestId: number): Promise<GuestBookingV3[]>;
|
package/dist/libs/liteapiv3.js
CHANGED
|
@@ -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)({
|