@vendit-dev/thirdparty-adapters 0.3.0 → 0.3.3

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.
@@ -70,7 +70,7 @@ var WingsApiController = /** @class */ (function () {
70
70
  this.callWingsApi = function (_a) {
71
71
  var route = _a.route, _b = _a.params, params = _b === void 0 ? {} : _b, auth = _a.auth;
72
72
  return __awaiter(_this, void 0, void 0, function () {
73
- var requestOptions, response;
73
+ var requestOptions, response, jsonResponse;
74
74
  return __generator(this, function (_c) {
75
75
  switch (_c.label) {
76
76
  case 0:
@@ -79,13 +79,17 @@ 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
- if (process.env.NODE_ENV === 'development') {
83
- console.log(requestOptions);
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();
88
- return [2 /*return*/, response.json()];
87
+ console.log(response);
88
+ return [4 /*yield*/, response.json()];
89
+ case 2:
90
+ jsonResponse = _c.sent();
91
+ console.log(jsonResponse);
92
+ return [2 /*return*/, jsonResponse];
89
93
  }
90
94
  });
91
95
  });
@@ -213,7 +217,7 @@ var WingsAdapter = /** @class */ (function () {
213
217
  response = _b.sent();
214
218
  resultData = response.resultData;
215
219
  if (!resultData) {
216
- throw new Error('FAILED_TO_CHECKIN');
220
+ throw new Error("FAILED_TO_CHECKIN_" + JSON.stringify(response));
217
221
  }
218
222
  return [2 /*return*/, resultData];
219
223
  case 4:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.3.0",
3
+ "version": "0.3.3",
4
4
  "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {