@one-commerce/sdk-backoffice-vue3 1.19.2-alpha.0 → 1.19.4

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.
@@ -159,6 +159,8 @@ class AddToCartContext extends ContextCallClass {
159
159
  _defineProperty$3(this, "cartId", void 0);
160
160
 
161
161
  _defineProperty$3(this, "warehouses", void 0);
162
+
163
+ _defineProperty$3(this, "meta", void 0);
162
164
  }
163
165
 
164
166
  closePlugin() {
@@ -221,14 +223,6 @@ class BackofficeTenant extends BaseCallClass {
221
223
  _defineProperty$2(this, "currency", void 0);
222
224
  }
223
225
 
224
- }
225
- class BackofficeOrderpath extends BaseCallClass {
226
- constructor(...args) {
227
- super(...args);
228
-
229
- _defineProperty$2(this, "serviceName", 'orderpath');
230
- }
231
-
232
226
  }
233
227
  class BackofficeLayout extends BaseCallClass {
234
228
  constructor(...args) {
@@ -336,7 +330,11 @@ class Sdk extends Events {
336
330
  }
337
331
 
338
332
  initializeContextClass() {
339
- return new this.contextClass(this.callFunction.bind(this));
333
+ if (this.contextClass) {
334
+ return new this.contextClass(this.callFunction.bind(this));
335
+ }
336
+
337
+ return {};
340
338
  }
341
339
 
342
340
  initializeServiceGetters() {
@@ -469,10 +467,15 @@ class Sdk extends Events {
469
467
  method: fun,
470
468
  payload: payload
471
469
  });
472
- return new Promise(resolve => {
470
+ return new Promise((resolve, reject) => {
473
471
  const onChannelMessage = response => {
474
472
  if (response.callId === callId) {
475
473
  this.channel.unsubscribe(main.Message.METHOD_RESULT, onChannelMessage);
474
+
475
+ if (response !== null && response !== void 0 && response.isException) {
476
+ return reject(response.result);
477
+ }
478
+
476
479
  return resolve(response.result);
477
480
  }
478
481
  };
@@ -502,7 +505,6 @@ class BackofficeSdk extends Sdk {
502
505
  hash: '',
503
506
  query: {}
504
507
  },
505
- orderpath: new BackofficeOrderpath(this.callFunction.bind(this)),
506
508
  catalog: new BackofficeCatalog(this.callFunction.bind(this)),
507
509
  user: new BackofficeUser(this.callFunction.bind(this)),
508
510
  tenant: new BackofficeTenant(this.callFunction.bind(this)),
@@ -547,7 +549,6 @@ var index = {
547
549
  obj.tenant.update(payload);
548
550
  obj.layout.update(payload);
549
551
  obj.catalog.update(payload);
550
- obj.orderpath.update(payload);
551
552
  obj.authorization.update(payload);
552
553
  obj.customer.update(payload);
553
554
  obj.plugin.update(payload);