@vendit-dev/thirdparty-adapters 0.2.5 → 0.3.1
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.
|
@@ -75,12 +75,13 @@ export default class WingsAdapter {
|
|
|
75
75
|
getHotelInformation: ({ accommodationId }: {
|
|
76
76
|
accommodationId: string;
|
|
77
77
|
}) => Promise<any>;
|
|
78
|
-
checkInReservation: ({ accommodationId, reservationNumber, sequenceNumber, startDate, endDate, }: {
|
|
78
|
+
checkInReservation: ({ accommodationId, reservationNumber, sequenceNumber, startDate, endDate, carNumber, }: {
|
|
79
79
|
accommodationId: string;
|
|
80
80
|
reservationNumber: string;
|
|
81
81
|
sequenceNumber: string;
|
|
82
82
|
startDate: string;
|
|
83
83
|
endDate: string;
|
|
84
|
+
carNumber: string;
|
|
84
85
|
}) => Promise<any>;
|
|
85
86
|
cancelCheckInReservation: ({ accommodationId, folioNumber }: {
|
|
86
87
|
accommodationId: string;
|
|
@@ -123,7 +124,7 @@ export default class WingsAdapter {
|
|
|
123
124
|
walkinInfo: any;
|
|
124
125
|
roomInfo: [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown];
|
|
125
126
|
} | null>;
|
|
126
|
-
processWalkIn: ({ accommodationId, roomTypeCode, startDate, endDate, nights, salesDate, guestName, adultCount, childCount, dailyRoomFees, }: {
|
|
127
|
+
processWalkIn: ({ accommodationId, roomTypeCode, startDate, endDate, nights, salesDate, guestName, adultCount, childCount, dailyRoomFees, carNumber, }: {
|
|
127
128
|
accommodationId: string;
|
|
128
129
|
roomTypeCode: string;
|
|
129
130
|
startDate: string;
|
|
@@ -134,10 +135,12 @@ export default class WingsAdapter {
|
|
|
134
135
|
adultCount: number;
|
|
135
136
|
childCount: number;
|
|
136
137
|
dailyRoomFees: Array<string>;
|
|
138
|
+
carNumber: string;
|
|
137
139
|
}) => Promise<any>;
|
|
138
|
-
getCheckOutInfo: ({ accommodationId, folioNumber, }: {
|
|
140
|
+
getCheckOutInfo: ({ accommodationId, folioNumber, roomKey, }: {
|
|
139
141
|
accommodationId: string;
|
|
140
142
|
folioNumber: string;
|
|
143
|
+
roomKey: string;
|
|
141
144
|
}) => Promise<any>;
|
|
142
145
|
processCheckOut: ({ accommodationId, folioNumber, }: {
|
|
143
146
|
accommodationId: string;
|
|
@@ -186,7 +186,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
186
186
|
});
|
|
187
187
|
};
|
|
188
188
|
this.checkInReservation = function (_a) {
|
|
189
|
-
var accommodationId = _a.accommodationId, reservationNumber = _a.reservationNumber, sequenceNumber = _a.sequenceNumber, startDate = _a.startDate, endDate = _a.endDate;
|
|
189
|
+
var accommodationId = _a.accommodationId, reservationNumber = _a.reservationNumber, sequenceNumber = _a.sequenceNumber, startDate = _a.startDate, endDate = _a.endDate, carNumber = _a.carNumber;
|
|
190
190
|
return __awaiter(_this, void 0, void 0, function () {
|
|
191
191
|
var authInfo, response, resultData, err_2;
|
|
192
192
|
return __generator(this, function (_b) {
|
|
@@ -202,6 +202,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
202
202
|
auth: WingsAdapter.authFromCredentials(authInfo.credential),
|
|
203
203
|
params: {
|
|
204
204
|
RSVN_NO: reservationNumber,
|
|
205
|
+
CAR_NO: carNumber,
|
|
205
206
|
RSVN_SEQ_NO: sequenceNumber,
|
|
206
207
|
ARRV_DATE: startDate,
|
|
207
208
|
DEPT_DATE: endDate,
|
|
@@ -212,7 +213,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
212
213
|
response = _b.sent();
|
|
213
214
|
resultData = response.resultData;
|
|
214
215
|
if (!resultData) {
|
|
215
|
-
throw new Error(
|
|
216
|
+
throw new Error("FAILED_TO_CHECKIN_" + JSON.stringify(response));
|
|
216
217
|
}
|
|
217
218
|
return [2 /*return*/, resultData];
|
|
218
219
|
case 4:
|
|
@@ -469,7 +470,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
469
470
|
});
|
|
470
471
|
};
|
|
471
472
|
this.processWalkIn = function (_a) {
|
|
472
|
-
var accommodationId = _a.accommodationId, roomTypeCode = _a.roomTypeCode, startDate = _a.startDate, endDate = _a.endDate, nights = _a.nights, salesDate = _a.salesDate, guestName = _a.guestName, adultCount = _a.adultCount, childCount = _a.childCount, dailyRoomFees = _a.dailyRoomFees;
|
|
473
|
+
var accommodationId = _a.accommodationId, roomTypeCode = _a.roomTypeCode, startDate = _a.startDate, endDate = _a.endDate, nights = _a.nights, salesDate = _a.salesDate, guestName = _a.guestName, adultCount = _a.adultCount, childCount = _a.childCount, dailyRoomFees = _a.dailyRoomFees, carNumber = _a.carNumber;
|
|
473
474
|
return __awaiter(_this, void 0, void 0, function () {
|
|
474
475
|
var authInfo, response, resultData, err_9;
|
|
475
476
|
return __generator(this, function (_b) {
|
|
@@ -492,6 +493,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
492
493
|
SALES_DATE: salesDate,
|
|
493
494
|
ADULT_CNT: adultCount,
|
|
494
495
|
CHILD_CNT: childCount,
|
|
496
|
+
CAR_NO: carNumber,
|
|
495
497
|
INHS_GEST_NAME: guestName,
|
|
496
498
|
BSNS_CODE: authInfo.credential.BSNS_CODE,
|
|
497
499
|
},
|
|
@@ -512,7 +514,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
512
514
|
});
|
|
513
515
|
};
|
|
514
516
|
this.getCheckOutInfo = function (_a) {
|
|
515
|
-
var accommodationId = _a.accommodationId, folioNumber = _a.folioNumber;
|
|
517
|
+
var accommodationId = _a.accommodationId, folioNumber = _a.folioNumber, roomKey = _a.roomKey;
|
|
516
518
|
return __awaiter(_this, void 0, void 0, function () {
|
|
517
519
|
var authInfo, response, resultData, err_10;
|
|
518
520
|
return __generator(this, function (_b) {
|
|
@@ -526,9 +528,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
526
528
|
return [4 /*yield*/, apiController.callWingsApi({
|
|
527
529
|
route: 'ki03/kioskCheckOutInfo',
|
|
528
530
|
auth: WingsAdapter.authFromCredentials(authInfo.credential),
|
|
529
|
-
params: {
|
|
530
|
-
FOLIO_NO: folioNumber,
|
|
531
|
-
},
|
|
531
|
+
params: __assign(__assign({}, (folioNumber && { FOLIO_NO: folioNumber })), (roomKey && { ROOM_KEY: roomKey })),
|
|
532
532
|
})];
|
|
533
533
|
case 3:
|
|
534
534
|
response = _b.sent();
|
|
@@ -177,7 +177,6 @@ var SmartAccessAdapter = /** @class */ (function () {
|
|
|
177
177
|
case 0: return [4 /*yield*/, this.getAccommodationAuthInfo({ accommodationId: accommodationId })];
|
|
178
178
|
case 1:
|
|
179
179
|
authInfo = _a.sent();
|
|
180
|
-
console.log(authInfo);
|
|
181
180
|
return [2 /*return*/, authInfo.accessToken];
|
|
182
181
|
}
|
|
183
182
|
});
|