@vendit-dev/thirdparty-adapters 0.7.9 → 0.7.11

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.
@@ -1,5 +1,5 @@
1
- import { UserServiceGrpcCaller } from '@vendit-dev/utility-modules';
2
- import { AmanoHttpResponse, DeletePreDiscountInfoInput, DeletePreDiscountInfoResponse, FeeCarSearchInput, GetFeeCarSearchResponse, GetPreDiscountListInfoResponse, InsertPreDiscountInfoInput, InsertPreDiscountInfoResponse, PreDiscountListInfoInput, UpdatePreDiscountInfoInput, UpdatePreDiscountInfoResponse } from '../types/amanoKorea';
1
+ import type { UserServiceGrpcCaller } from '@vendit-dev/utility-modules';
2
+ import type { AmanoHttpResponse, DeletePreDiscountInfoInput, DeletePreDiscountInfoResponse, FeeCarSearchInput, GetFeeCarSearchResponse, GetPreDiscountListInfoResponse, InsertPreDiscountInfoInput, InsertPreDiscountInfoResponse, PreDiscountListInfoInput, UpdatePreDiscountInfoInput, UpdatePreDiscountInfoResponse } from '../types/amanoKorea';
3
3
  import MutexLock from '../utils/mutex';
4
4
  type VenditAmanoKoreaAuthInfo = {
5
5
  scope: string;
@@ -163,10 +163,7 @@ var AmanoKoreaAdapter = /** @class */ (function () {
163
163
  return __generator(this, function (_b) {
164
164
  switch (_b.label) {
165
165
  case 0:
166
- console.log('callAPI', this.authorization);
167
- _b.label = 1;
168
- case 1:
169
- _b.trys.push([1, 4, , 5]);
166
+ _b.trys.push([0, 3, , 4]);
170
167
  return [4 /*yield*/, (0, node_fetch_1.default)("".concat(this.API_HOST, ":").concat(this.API_PORT, "/interop/").concat(directory), {
171
168
  method: 'POST',
172
169
  headers: {
@@ -175,18 +172,17 @@ var AmanoKoreaAdapter = /** @class */ (function () {
175
172
  },
176
173
  body: JSON.stringify(__assign({}, resources)),
177
174
  })];
178
- case 2:
175
+ case 1:
179
176
  fetchResult = _b.sent();
180
- console.log('fetchResult', fetchResult);
181
177
  return [4 /*yield*/, (fetchResult === null || fetchResult === void 0 ? void 0 : fetchResult.json())];
182
- case 3:
178
+ case 2:
183
179
  fetchResultJson = _b.sent();
184
180
  return [2 /*return*/, fetchResultJson];
185
- case 4:
181
+ case 3:
186
182
  err_2 = _b.sent();
187
183
  console.error('err', err_2);
188
184
  return [2 /*return*/, err_2];
189
- case 5: return [2 /*return*/];
185
+ case 4: return [2 /*return*/];
190
186
  }
191
187
  });
192
188
  });
@@ -159,6 +159,10 @@ var formattedPaxCountText = function (roomInformation, genderDivision) {
159
159
  exports.formattedPaxCountText = formattedPaxCountText;
160
160
  function formatPhoneNumber(text) {
161
161
  var onlyNumberText = text === null || text === void 0 ? void 0 : text.replace(/[^0-9]/g, '');
162
+ var safeNumberRegex = /^050{1}[0-9]{9}$/;
163
+ if (safeNumberRegex.test(onlyNumberText || '')) {
164
+ return onlyNumberText;
165
+ }
162
166
  return onlyNumberText ? "010".concat(onlyNumberText.slice(-8)) : '';
163
167
  }
164
168
  var makePaymentInfo = function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.7.9",
3
+ "version": "0.7.11",
4
4
  "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {