@vendit-dev/thirdparty-adapters 0.4.0-beta.4 → 0.4.0-beta.6

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.
@@ -13,6 +13,7 @@ declare type VenditAmanoKoreaAuthInfo = {
13
13
  };
14
14
  export default class AmanoKoreaAdapter {
15
15
  API_HOST: string;
16
+ API_PORT: number;
16
17
  authenticator: UserServiceGrpcCaller;
17
18
  redis: any;
18
19
  PROVIDER_KEY: string;
@@ -56,6 +56,7 @@ var AmanoKoreaAdapter = /** @class */ (function () {
56
56
  function AmanoKoreaAdapter(_a) {
57
57
  var _this = this;
58
58
  var authenticator = _a.authenticator, redis = _a.redis;
59
+ this.API_PORT = 9948;
59
60
  this.PROVIDER_KEY = 'AmanoKorea';
60
61
  // base64
61
62
  this.authorization = '';
@@ -153,7 +154,7 @@ var AmanoKoreaAdapter = /** @class */ (function () {
153
154
  };
154
155
  this.setAuthorization = function (_a) {
155
156
  var authorization = _a.authorization;
156
- _this.authorization = "Basic " + authorization;
157
+ _this.authorization = authorization;
157
158
  };
158
159
  this.callAPI = function (_a) {
159
160
  var directory = _a.directory, resources = _a.resources;
@@ -162,8 +163,11 @@ var AmanoKoreaAdapter = /** @class */ (function () {
162
163
  return __generator(this, function (_b) {
163
164
  switch (_b.label) {
164
165
  case 0:
165
- _b.trys.push([0, 3, , 4]);
166
- return [4 /*yield*/, node_fetch_1.default(this.API_HOST + "/interop/" + directory, {
166
+ console.log('callAPI', this.authorization);
167
+ _b.label = 1;
168
+ case 1:
169
+ _b.trys.push([1, 4, , 5]);
170
+ return [4 /*yield*/, node_fetch_1.default(this.API_HOST + ":" + this.API_PORT + "/interop/" + directory, {
167
171
  method: 'POST',
168
172
  headers: {
169
173
  'Content-Type': 'application/json',
@@ -171,19 +175,19 @@ var AmanoKoreaAdapter = /** @class */ (function () {
171
175
  },
172
176
  body: JSON.stringify(__assign({}, resources)),
173
177
  })];
174
- case 1:
178
+ case 2:
175
179
  fetchResult = _b.sent();
176
180
  console.log('fetchResult', fetchResult);
177
181
  return [4 /*yield*/, (fetchResult === null || fetchResult === void 0 ? void 0 : fetchResult.json())];
178
- case 2:
182
+ case 3:
179
183
  fetchResultJson = _b.sent();
180
184
  data = fetchResultJson.data;
181
185
  return [2 /*return*/, data];
182
- case 3:
186
+ case 4:
183
187
  err_2 = _b.sent();
184
188
  console.error('err', err_2);
185
189
  return [2 /*return*/, err_2];
186
- case 4: return [2 /*return*/];
190
+ case 5: return [2 /*return*/];
187
191
  }
188
192
  });
189
193
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.4.0-beta.4",
3
+ "version": "0.4.0-beta.6",
4
4
  "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {