@one-commerce/sdk-core 1.19.8 → 1.19.9-UNITYONE-12860.1

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.
Files changed (37) hide show
  1. package/lib/bundles/bundle.esm.js +116 -4
  2. package/lib/bundles/bundle.esm.js.map +1 -1
  3. package/lib/bundles/bundle.esm.min.js +1 -1
  4. package/lib/bundles/bundle.esm.min.js.map +1 -1
  5. package/lib/bundles/bundle.umd.js +116 -4
  6. package/lib/bundles/bundle.umd.js.map +1 -1
  7. package/lib/bundles/bundle.umd.min.js +1 -1
  8. package/lib/bundles/bundle.umd.min.js.map +1 -1
  9. package/lib/cjs/backoffice/context.js +65 -3
  10. package/lib/cjs/backoffice/context.js.map +1 -1
  11. package/lib/cjs/backoffice/services.js +41 -3
  12. package/lib/cjs/backoffice/services.js.map +1 -1
  13. package/lib/cjs/events.js.map +1 -1
  14. package/lib/cjs/index.js +6 -3
  15. package/lib/cjs/index.js.map +1 -1
  16. package/lib/cjs/shop/services.js +70 -3
  17. package/lib/cjs/shop/services.js.map +1 -1
  18. package/lib/cjs/utils.js.map +1 -1
  19. package/lib/esm/backoffice/context.js +40 -0
  20. package/lib/esm/backoffice/context.js.map +1 -1
  21. package/lib/esm/backoffice/services.js +16 -0
  22. package/lib/esm/backoffice/services.js.map +1 -1
  23. package/lib/esm/events.js.map +1 -1
  24. package/lib/esm/index.js +6 -3
  25. package/lib/esm/index.js.map +1 -1
  26. package/lib/esm/shop/services.js +30 -0
  27. package/lib/esm/shop/services.js.map +1 -1
  28. package/lib/esm/utils.js.map +1 -1
  29. package/lib/types/backoffice/context.d.ts +19 -2
  30. package/lib/types/backoffice/context.d.ts.map +1 -1
  31. package/lib/types/backoffice/services.d.ts +10 -1
  32. package/lib/types/backoffice/services.d.ts.map +1 -1
  33. package/lib/types/index.d.ts +8 -2
  34. package/lib/types/index.d.ts.map +1 -1
  35. package/lib/types/shop/services.d.ts +12 -0
  36. package/lib/types/shop/services.d.ts.map +1 -1
  37. package/package.json +7 -6
@@ -57,17 +57,18 @@ function _inherits(subClass, superClass) {
57
57
  }
58
58
 
59
59
  function _getPrototypeOf(o) {
60
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
60
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
61
61
  return o.__proto__ || Object.getPrototypeOf(o);
62
62
  };
63
63
  return _getPrototypeOf(o);
64
64
  }
65
65
 
66
66
  function _setPrototypeOf(o, p) {
67
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
67
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
68
68
  o.__proto__ = p;
69
69
  return o;
70
70
  };
71
+
71
72
  return _setPrototypeOf(o, p);
72
73
  }
73
74
 
@@ -217,7 +218,11 @@ Object.defineProperty(api, "__esModule", { value: true });
217
218
  (function (exports) {
218
219
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
219
220
  if (k2 === undefined) k2 = k;
220
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
221
+ var desc = Object.getOwnPropertyDescriptor(m, k);
222
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
223
+ desc = { enumerable: true, get: function() { return m[k]; } };
224
+ }
225
+ Object.defineProperty(o, k2, desc);
221
226
  }) : (function(o, m, k, k2) {
222
227
  if (k2 === undefined) k2 = k;
223
228
  o[k2] = m[k];
@@ -333,10 +338,18 @@ var AddToCartContext = /*#__PURE__*/function (_ContextCallClass) {
333
338
 
334
339
  _defineProperty(_assertThisInitialized(_this2), "cartId", void 0);
335
340
 
341
+ _defineProperty(_assertThisInitialized(_this2), "offerId", void 0);
342
+
336
343
  _defineProperty(_assertThisInitialized(_this2), "warehouses", void 0);
337
344
 
345
+ _defineProperty(_assertThisInitialized(_this2), "warehouseId", void 0);
346
+
338
347
  _defineProperty(_assertThisInitialized(_this2), "meta", void 0);
339
348
 
349
+ _defineProperty(_assertThisInitialized(_this2), "pluginProductLines", void 0);
350
+
351
+ _defineProperty(_assertThisInitialized(_this2), "productLines", void 0);
352
+
340
353
  return _this2;
341
354
  }
342
355
 
@@ -566,6 +579,41 @@ var BackofficePlugin = /*#__PURE__*/function (_BaseCallClass7) {
566
579
 
567
580
  return _createClass(BackofficePlugin);
568
581
  }(BaseCallClass);
582
+ var BackofficeOrderpath = /*#__PURE__*/function (_BaseCallClass8) {
583
+ _inherits(BackofficeOrderpath, _BaseCallClass8);
584
+
585
+ var _super8 = _createSuper(BackofficeOrderpath);
586
+
587
+ function BackofficeOrderpath() {
588
+ var _this8;
589
+
590
+ _classCallCheck(this, BackofficeOrderpath);
591
+
592
+ for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
593
+ args[_key8] = arguments[_key8];
594
+ }
595
+
596
+ _this8 = _super8.call.apply(_super8, [this].concat(args));
597
+
598
+ _defineProperty(_assertThisInitialized(_this8), "serviceName", 'orderpath');
599
+
600
+ return _this8;
601
+ }
602
+
603
+ _createClass(BackofficeOrderpath, [{
604
+ key: "fetchCart",
605
+ value: function fetchCart(id) {
606
+ return this.call('fetchCart', id);
607
+ }
608
+ }, {
609
+ key: "fetchOffer",
610
+ value: function fetchOffer(id) {
611
+ return this.call('fetchOffer', id);
612
+ }
613
+ }]);
614
+
615
+ return BackofficeOrderpath;
616
+ }(BaseCallClass);
569
617
 
570
618
  var Events = /*#__PURE__*/function () {
571
619
  function Events() {
@@ -835,6 +883,11 @@ var ShopUtils = /*#__PURE__*/function (_BaseCallClass6) {
835
883
  }
836
884
 
837
885
  _createClass(ShopUtils, [{
886
+ key: "notify",
887
+ value: function notify(options) {
888
+ return this.call('notify', options);
889
+ }
890
+ }, {
838
891
  key: "getCategoryPath",
839
892
  value: function getCategoryPath(id) {
840
893
  return this.call('getCategoryPath', id);
@@ -899,6 +952,62 @@ var ShopConfig = /*#__PURE__*/function (_BaseCallClass7) {
899
952
 
900
953
  return _createClass(ShopConfig);
901
954
  }(BaseCallClass);
955
+ var ShopTenant = /*#__PURE__*/function (_BaseCallClass8) {
956
+ _inherits(ShopTenant, _BaseCallClass8);
957
+
958
+ var _super8 = _createSuper(ShopTenant);
959
+
960
+ function ShopTenant() {
961
+ var _this8;
962
+
963
+ _classCallCheck(this, ShopTenant);
964
+
965
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
966
+ args[_key7] = arguments[_key7];
967
+ }
968
+
969
+ _this8 = _super8.call.apply(_super8, [this].concat(args));
970
+
971
+ _defineProperty(_assertThisInitialized(_this8), "serviceName", 'tenant');
972
+
973
+ _defineProperty(_assertThisInitialized(_this8), "tenantKey", void 0);
974
+
975
+ _defineProperty(_assertThisInitialized(_this8), "language", void 0);
976
+
977
+ return _this8;
978
+ }
979
+
980
+ return _createClass(ShopTenant);
981
+ }(BaseCallClass);
982
+ var ShopPlugin = /*#__PURE__*/function (_BaseCallClass9) {
983
+ _inherits(ShopPlugin, _BaseCallClass9);
984
+
985
+ var _super9 = _createSuper(ShopPlugin);
986
+
987
+ function ShopPlugin() {
988
+ var _this9;
989
+
990
+ _classCallCheck(this, ShopPlugin);
991
+
992
+ for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
993
+ args[_key8] = arguments[_key8];
994
+ }
995
+
996
+ _this9 = _super9.call.apply(_super9, [this].concat(args));
997
+
998
+ _defineProperty(_assertThisInitialized(_this9), "serviceName", 'plugin');
999
+
1000
+ _defineProperty(_assertThisInitialized(_this9), "id", void 0);
1001
+
1002
+ _defineProperty(_assertThisInitialized(_this9), "srcUrl", void 0);
1003
+
1004
+ _defineProperty(_assertThisInitialized(_this9), "name", void 0);
1005
+
1006
+ return _this9;
1007
+ }
1008
+
1009
+ return _createClass(ShopPlugin);
1010
+ }(BaseCallClass);
902
1011
 
903
1012
  var SdkInternalEvents;
904
1013
 
@@ -1175,6 +1284,7 @@ var BackofficeSdk = /*#__PURE__*/function (_Sdk) {
1175
1284
  authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
1176
1285
  customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
1177
1286
  plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5))),
1287
+ orderpath: new BackofficeOrderpath(_this5.callFunction.bind(_assertThisInitialized(_this5))),
1178
1288
  context: _this5.initializeContextClass()
1179
1289
  });
1180
1290
 
@@ -1210,7 +1320,9 @@ var ShopSdk = /*#__PURE__*/function (_Sdk2) {
1210
1320
  account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1211
1321
  utils: new ShopUtils(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1212
1322
  config: new ShopConfig(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1213
- wishlist: new ShopWishlist(_this6.callFunction.bind(_assertThisInitialized(_this6)))
1323
+ tenant: new ShopTenant(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1324
+ wishlist: new ShopWishlist(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1325
+ plugin: new ShopPlugin(_this6.callFunction.bind(_assertThisInitialized(_this6)))
1214
1326
  });
1215
1327
 
1216
1328
  return _this6;