@vendit-dev/thirdparty-adapters 0.7.11 → 0.7.12

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.
@@ -185,29 +185,23 @@ var TlLincoln = /** @class */ (function () {
185
185
  var _this = this;
186
186
  return __generator(this, function (_a) {
187
187
  refinedDatas = input.map(this.refineUpdateStockData.bind(this));
188
- refinedDatas.map(function (refinedData) { return __awaiter(_this, void 0, void 0, function () {
189
- var _this = this;
190
- return __generator(this, function (_a) {
191
- (0, tl_lincoln_helper_1.withAsyncBandwidth)(refinedData, (function (data) { return __awaiter(_this, void 0, void 0, function () {
192
- var result, _a, errorDescription, failureReason;
193
- return __generator(this, function (_b) {
194
- switch (_b.label) {
195
- case 0: return [4 /*yield*/, this.netStockAdjustmentService(data)];
196
- case 1:
197
- result = _b.sent();
198
- if (!result['S:Envelope']['S:Body']['ns2:executeResponse'].return.commonResponse.isSuccess) {
199
- _a = result['S:Envelope']['S:Body']['ns2:executeResponse'].return.commonResponse, errorDescription = _a.errorDescription, failureReason = _a.failureReason;
200
- throw new externalChannelManager_type_1.ExternalChannelManagerError({
201
- message: "Failed to update RoomType stocks - ".concat(errorDescription, ": ").concat(failureReason),
202
- code: failureReason,
203
- description: "".concat(errorDescription, ": ").concat(JSON.stringify(data)),
204
- });
205
- }
206
- return [2 /*return*/, result === null || result === void 0 ? void 0 : result['S:Envelope']['S:Body']['ns2:executeResponse'].return.commonResponse.isSuccess];
188
+ refinedDatas.flat().map(function (refinedData) { return __awaiter(_this, void 0, void 0, function () {
189
+ var result, _a, errorDescription, failureReason;
190
+ return __generator(this, function (_b) {
191
+ switch (_b.label) {
192
+ case 0: return [4 /*yield*/, this.netStockAdjustmentService(refinedData)];
193
+ case 1:
194
+ result = _b.sent();
195
+ if (!result['S:Envelope']['S:Body']['ns2:executeResponse'].return.commonResponse.isSuccess) {
196
+ _a = result['S:Envelope']['S:Body']['ns2:executeResponse'].return.commonResponse, errorDescription = _a.errorDescription, failureReason = _a.failureReason;
197
+ throw new externalChannelManager_type_1.ExternalChannelManagerError({
198
+ message: "Failed to update RoomType stocks - ".concat(errorDescription, ": ").concat(failureReason),
199
+ code: failureReason,
200
+ description: "".concat(errorDescription, ": ").concat(JSON.stringify(refinedData)),
201
+ });
207
202
  }
208
- });
209
- }); }));
210
- return [2 /*return*/];
203
+ return [2 /*return*/, result === null || result === void 0 ? void 0 : result['S:Envelope']['S:Body']['ns2:executeResponse'].return.commonResponse.isSuccess];
204
+ }
211
205
  });
212
206
  }); });
213
207
  return [2 /*return*/, true];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.7.11",
3
+ "version": "0.7.12",
4
4
  "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {