@vendit-dev/thirdparty-adapters 0.2.6 → 0.3.2
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;
|
|
@@ -79,9 +79,8 @@ var WingsApiController = /** @class */ (function () {
|
|
|
79
79
|
headers: __assign(__assign({}, WINGS_COMMON_REQUEST_HEADERS), auth.headers),
|
|
80
80
|
body: JSON.stringify(__assign(__assign(__assign({}, auth.params), WINGS_COMMON_REQUEST_PARAMS), params)),
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
82
|
+
console.log(this.URI + "/" + this.CONTEXT + "/" + route);
|
|
83
|
+
console.log(requestOptions);
|
|
85
84
|
return [4 /*yield*/, node_fetch_1.default(this.URI + "/" + this.CONTEXT + "/" + route, requestOptions)];
|
|
86
85
|
case 1:
|
|
87
86
|
response = _c.sent();
|
|
@@ -186,7 +185,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
186
185
|
});
|
|
187
186
|
};
|
|
188
187
|
this.checkInReservation = function (_a) {
|
|
189
|
-
var accommodationId = _a.accommodationId, reservationNumber = _a.reservationNumber, sequenceNumber = _a.sequenceNumber, startDate = _a.startDate, endDate = _a.endDate;
|
|
188
|
+
var accommodationId = _a.accommodationId, reservationNumber = _a.reservationNumber, sequenceNumber = _a.sequenceNumber, startDate = _a.startDate, endDate = _a.endDate, carNumber = _a.carNumber;
|
|
190
189
|
return __awaiter(_this, void 0, void 0, function () {
|
|
191
190
|
var authInfo, response, resultData, err_2;
|
|
192
191
|
return __generator(this, function (_b) {
|
|
@@ -202,6 +201,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
202
201
|
auth: WingsAdapter.authFromCredentials(authInfo.credential),
|
|
203
202
|
params: {
|
|
204
203
|
RSVN_NO: reservationNumber,
|
|
204
|
+
CAR_NO: carNumber,
|
|
205
205
|
RSVN_SEQ_NO: sequenceNumber,
|
|
206
206
|
ARRV_DATE: startDate,
|
|
207
207
|
DEPT_DATE: endDate,
|
|
@@ -212,7 +212,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
212
212
|
response = _b.sent();
|
|
213
213
|
resultData = response.resultData;
|
|
214
214
|
if (!resultData) {
|
|
215
|
-
throw new Error(
|
|
215
|
+
throw new Error("FAILED_TO_CHECKIN_" + JSON.stringify(response));
|
|
216
216
|
}
|
|
217
217
|
return [2 /*return*/, resultData];
|
|
218
218
|
case 4:
|
|
@@ -469,7 +469,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
469
469
|
});
|
|
470
470
|
};
|
|
471
471
|
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;
|
|
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, carNumber = _a.carNumber;
|
|
473
473
|
return __awaiter(_this, void 0, void 0, function () {
|
|
474
474
|
var authInfo, response, resultData, err_9;
|
|
475
475
|
return __generator(this, function (_b) {
|
|
@@ -492,6 +492,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
492
492
|
SALES_DATE: salesDate,
|
|
493
493
|
ADULT_CNT: adultCount,
|
|
494
494
|
CHILD_CNT: childCount,
|
|
495
|
+
CAR_NO: carNumber,
|
|
495
496
|
INHS_GEST_NAME: guestName,
|
|
496
497
|
BSNS_CODE: authInfo.credential.BSNS_CODE,
|
|
497
498
|
},
|
|
@@ -512,7 +513,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
512
513
|
});
|
|
513
514
|
};
|
|
514
515
|
this.getCheckOutInfo = function (_a) {
|
|
515
|
-
var accommodationId = _a.accommodationId, folioNumber = _a.folioNumber;
|
|
516
|
+
var accommodationId = _a.accommodationId, folioNumber = _a.folioNumber, roomKey = _a.roomKey;
|
|
516
517
|
return __awaiter(_this, void 0, void 0, function () {
|
|
517
518
|
var authInfo, response, resultData, err_10;
|
|
518
519
|
return __generator(this, function (_b) {
|
|
@@ -526,9 +527,7 @@ var WingsAdapter = /** @class */ (function () {
|
|
|
526
527
|
return [4 /*yield*/, apiController.callWingsApi({
|
|
527
528
|
route: 'ki03/kioskCheckOutInfo',
|
|
528
529
|
auth: WingsAdapter.authFromCredentials(authInfo.credential),
|
|
529
|
-
params: {
|
|
530
|
-
FOLIO_NO: folioNumber,
|
|
531
|
-
},
|
|
530
|
+
params: __assign(__assign({}, (folioNumber && { FOLIO_NO: folioNumber })), (roomKey && { ROOM_KEY: roomKey })),
|
|
532
531
|
})];
|
|
533
532
|
case 3:
|
|
534
533
|
response = _b.sent();
|