@vendit-dev/thirdparty-adapters 0.6.0 → 0.7.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.
@@ -84,7 +84,7 @@ var AmanoKoreaAdapter = /** @class */ (function () {
84
84
  this.getAccommodationAuthInfo = function (_a) {
85
85
  var accommodationId = _a.accommodationId;
86
86
  return __awaiter(_this, void 0, void 0, function () {
87
- var existingAuth, parsedCredential, _b, authorization, apiHost, lotAreaNo, discCodeNo, lockId, lockHash, newAuth, parsedCredential, err_1;
87
+ var existingAuth, parsedCredential, _b, authorization, apiHost, lotAreaNo, discCodeNo, apiPort, lockId, lockHash, newAuth, parsedCredential, err_1;
88
88
  return __generator(this, function (_c) {
89
89
  switch (_c.label) {
90
90
  case 0: return [4 /*yield*/, this.redis.get(AmanoKoreaAdapter.indexAccommodation({ accommodationId: accommodationId }))];
@@ -93,13 +93,14 @@ var AmanoKoreaAdapter = /** @class */ (function () {
93
93
  if (existingAuth) {
94
94
  parsedCredential = this.parseJSONSafe(existingAuth);
95
95
  if (parsedCredential === null || parsedCredential === void 0 ? void 0 : parsedCredential.credential) {
96
- _b = this.parseJSONSafe(parsedCredential.credential), authorization = _b.authorization, apiHost = _b.apiHost, lotAreaNo = _b.lotAreaNo, discCodeNo = _b.discCodeNo;
96
+ _b = this.parseJSONSafe(parsedCredential.credential), authorization = _b.authorization, apiHost = _b.apiHost, lotAreaNo = _b.lotAreaNo, discCodeNo = _b.discCodeNo, apiPort = _b.apiPort;
97
97
  this.setAuthorization({
98
98
  authorization: authorization,
99
99
  });
100
100
  this.lotAreaNo = lotAreaNo;
101
101
  this.discCodeNo = discCodeNo;
102
102
  this.API_HOST = apiHost;
103
+ this.API_PORT = apiPort;
103
104
  }
104
105
  return [2 /*return*/, this.parseJSONSafe(existingAuth)];
105
106
  }
@@ -100,7 +100,7 @@ var NiceParkThirdParty = /** @class */ (function () {
100
100
  _a.label = 1;
101
101
  case 1:
102
102
  _a.trys.push([1, 3, , 4]);
103
- return [4 /*yield*/, this.sequelize.query("exec sp_External_Link_Discount '".concat(vehicleNumber, "', '1', '").concat(minutes, "', '").concat(this.configuration.placeCode || '000001'))];
103
+ return [4 /*yield*/, this.sequelize.query("exec sp_External_Link_Discount '".concat(vehicleNumber, "', '1', '").concat(minutes, "', '").concat(this.configuration.placeCode || '000001', ";"))];
104
104
  case 2:
105
105
  result = _a.sent();
106
106
  console.log('NiceParkThirdParty#registerParkingDiscount result: ', result);
@@ -128,10 +128,11 @@ var NiceParkThirdParty = /** @class */ (function () {
128
128
  _a.label = 1;
129
129
  case 1:
130
130
  _a.trys.push([1, 3, , 4]);
131
- return [4 /*yield*/, this.sequelize.query("exec sp_External_Link_RegRegular_CODEIN '".concat(vehicleNumber, "', '").concat(fromDateString, "', '").concat(toDateString, "', '', '', ,'', ,'', '', '0', '").concat(this.configuration.groupCode, "'"))];
131
+ return [4 /*yield*/, this.sequelize.query("exec sp_External_Link_RegRegular_CODEIN '".concat(vehicleNumber, "', '").concat(fromDateString, "', '").concat(toDateString, "', '', '', '', '', '', '0', '").concat(this.configuration.groupCode, "';"))];
132
132
  case 2:
133
133
  result = _a.sent();
134
134
  console.log('NiceParkThirdParty#registerParkingDiscount result: ', result);
135
+ console.log("Car#".concat(vehicleNumber, " has been registered from ").concat(fromDateString, ", to ").concat(toDateString, " with group code ").concat(this.configuration.groupCode));
135
136
  return [2 /*return*/, result[0].result === '1'];
136
137
  case 3:
137
138
  err_3 = _a.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {