@one-commerce/sdk-core 1.16.0 → 1.18.0-alpha.0

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.
@@ -525,6 +525,52 @@
525
525
 
526
526
  return _createClass(BackofficePlugin);
527
527
  }(BaseCallClass);
528
+ var BackofficeAddToCartContext = /*#__PURE__*/function (_BaseCallClass9) {
529
+ _inherits(BackofficeAddToCartContext, _BaseCallClass9);
530
+
531
+ var _super9 = _createSuper(BackofficeAddToCartContext);
532
+
533
+ function BackofficeAddToCartContext() {
534
+ var _this9;
535
+
536
+ _classCallCheck(this, BackofficeAddToCartContext);
537
+
538
+ for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
539
+ args[_key9] = arguments[_key9];
540
+ }
541
+
542
+ _this9 = _super9.call.apply(_super9, [this].concat(args));
543
+
544
+ _defineProperty(_assertThisInitialized(_this9), "serviceName", 'addToCartContext');
545
+
546
+ _defineProperty(_assertThisInitialized(_this9), "productId", void 0);
547
+
548
+ _defineProperty(_assertThisInitialized(_this9), "cartId", void 0);
549
+
550
+ _defineProperty(_assertThisInitialized(_this9), "warehouses", void 0);
551
+
552
+ return _this9;
553
+ }
554
+
555
+ _createClass(BackofficeAddToCartContext, [{
556
+ key: "closePlugin",
557
+ value: function closePlugin() {
558
+ this.call('closePlugin');
559
+ }
560
+ }, {
561
+ key: "closePluginAndAddToCart",
562
+ value: function closePluginAndAddToCart() {
563
+ this.call('closePluginAndAddToCart');
564
+ }
565
+ }, {
566
+ key: "closePluginAndRefreshCart",
567
+ value: function closePluginAndRefreshCart() {
568
+ this.call('closePluginAndRefreshCart');
569
+ }
570
+ }]);
571
+
572
+ return BackofficeAddToCartContext;
573
+ }(BaseCallClass);
528
574
 
529
575
  var Events = /*#__PURE__*/function () {
530
576
  function Events() {
@@ -686,41 +732,71 @@
686
732
 
687
733
  return ShopCart;
688
734
  }(BaseCallClass);
689
- var ShopUtils = /*#__PURE__*/function (_BaseCallClass4) {
690
- _inherits(ShopUtils, _BaseCallClass4);
735
+ var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass4) {
736
+ _inherits(ShopAuthorization, _BaseCallClass4);
691
737
 
692
- var _super4 = _createSuper(ShopUtils);
738
+ var _super4 = _createSuper(ShopAuthorization);
693
739
 
694
- function ShopUtils(call) {
740
+ function ShopAuthorization() {
695
741
  var _this4;
696
742
 
743
+ _classCallCheck(this, ShopAuthorization);
744
+
745
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
746
+ args[_key4] = arguments[_key4];
747
+ }
748
+
749
+ _this4 = _super4.call.apply(_super4, [this].concat(args));
750
+
751
+ _defineProperty(_assertThisInitialized(_this4), "serviceName", 'authorization');
752
+
753
+ return _this4;
754
+ }
755
+
756
+ _createClass(ShopAuthorization, [{
757
+ key: "getAuthToken",
758
+ value: function getAuthToken() {
759
+ return this.call('getAuthToken');
760
+ }
761
+ }]);
762
+
763
+ return ShopAuthorization;
764
+ }(BaseCallClass);
765
+ var ShopUtils = /*#__PURE__*/function (_BaseCallClass5) {
766
+ _inherits(ShopUtils, _BaseCallClass5);
767
+
768
+ var _super5 = _createSuper(ShopUtils);
769
+
770
+ function ShopUtils(call) {
771
+ var _this5;
772
+
697
773
  _classCallCheck(this, ShopUtils);
698
774
 
699
- _this4 = _super4.call(this, call);
775
+ _this5 = _super5.call(this, call);
700
776
 
701
- _defineProperty(_assertThisInitialized(_this4), "serviceName", 'utils');
777
+ _defineProperty(_assertThisInitialized(_this5), "serviceName", 'utils');
702
778
 
703
- _defineProperty(_assertThisInitialized(_this4), "currency", void 0);
779
+ _defineProperty(_assertThisInitialized(_this5), "currency", void 0);
704
780
 
705
- _defineProperty(_assertThisInitialized(_this4), "isAnonymousAndPurchaseDisabled", void 0);
781
+ _defineProperty(_assertThisInitialized(_this5), "isAnonymousAndPurchaseDisabled", void 0);
706
782
 
707
- _defineProperty(_assertThisInitialized(_this4), "isB2B", void 0);
783
+ _defineProperty(_assertThisInitialized(_this5), "isB2B", void 0);
708
784
 
709
- _defineProperty(_assertThisInitialized(_this4), "isB2BAndPlatformIsNotOpened", void 0);
785
+ _defineProperty(_assertThisInitialized(_this5), "isB2BAndPlatformIsNotOpened", void 0);
710
786
 
711
- _defineProperty(_assertThisInitialized(_this4), "isIndexPage", void 0);
787
+ _defineProperty(_assertThisInitialized(_this5), "isIndexPage", void 0);
712
788
 
713
- _defineProperty(_assertThisInitialized(_this4), "isPurchaseEnabledOrAuthenticated", void 0);
789
+ _defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabledOrAuthenticated", void 0);
714
790
 
715
- _defineProperty(_assertThisInitialized(_this4), "routes", void 0);
791
+ _defineProperty(_assertThisInitialized(_this5), "routes", void 0);
716
792
 
717
- _this4.routes = {
718
- getCategoryPath: _this4.getCategoryPath,
719
- getManufacturerSearchUrl: _this4.getManufacturerSearchUrl,
720
- getProductUrl: _this4.getProductUrl,
721
- isExternalUrl: _this4.isExternalUrl
793
+ _this5.routes = {
794
+ getCategoryPath: _this5.getCategoryPath,
795
+ getManufacturerSearchUrl: _this5.getManufacturerSearchUrl,
796
+ getProductUrl: _this5.getProductUrl,
797
+ isExternalUrl: _this5.isExternalUrl
722
798
  };
723
- return _this4;
799
+ return _this5;
724
800
  }
725
801
 
726
802
  _createClass(ShopUtils, [{
@@ -747,43 +823,43 @@
747
823
 
748
824
  return ShopUtils;
749
825
  }(BaseCallClass);
750
- var ShopConfig = /*#__PURE__*/function (_BaseCallClass5) {
751
- _inherits(ShopConfig, _BaseCallClass5);
826
+ var ShopConfig = /*#__PURE__*/function (_BaseCallClass6) {
827
+ _inherits(ShopConfig, _BaseCallClass6);
752
828
 
753
- var _super5 = _createSuper(ShopConfig);
829
+ var _super6 = _createSuper(ShopConfig);
754
830
 
755
831
  function ShopConfig() {
756
- var _this5;
832
+ var _this6;
757
833
 
758
834
  _classCallCheck(this, ShopConfig);
759
835
 
760
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
761
- args[_key4] = arguments[_key4];
836
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
837
+ args[_key5] = arguments[_key5];
762
838
  }
763
839
 
764
- _this5 = _super5.call.apply(_super5, [this].concat(args));
840
+ _this6 = _super6.call.apply(_super6, [this].concat(args));
765
841
 
766
- _defineProperty(_assertThisInitialized(_this5), "serviceName", 'config');
842
+ _defineProperty(_assertThisInitialized(_this6), "serviceName", 'config');
767
843
 
768
- _defineProperty(_assertThisInitialized(_this5), "accessMode", void 0);
844
+ _defineProperty(_assertThisInitialized(_this6), "accessMode", void 0);
769
845
 
770
- _defineProperty(_assertThisInitialized(_this5), "isB2CRegistrationEnabled", void 0);
846
+ _defineProperty(_assertThisInitialized(_this6), "isB2CRegistrationEnabled", void 0);
771
847
 
772
- _defineProperty(_assertThisInitialized(_this5), "isCatalogOpened", void 0);
848
+ _defineProperty(_assertThisInitialized(_this6), "isCatalogOpened", void 0);
773
849
 
774
- _defineProperty(_assertThisInitialized(_this5), "isGrossSelected", void 0);
850
+ _defineProperty(_assertThisInitialized(_this6), "isGrossSelected", void 0);
775
851
 
776
- _defineProperty(_assertThisInitialized(_this5), "isPlatformClosed", void 0);
852
+ _defineProperty(_assertThisInitialized(_this6), "isPlatformClosed", void 0);
777
853
 
778
- _defineProperty(_assertThisInitialized(_this5), "isPlatformOpened", void 0);
854
+ _defineProperty(_assertThisInitialized(_this6), "isPlatformOpened", void 0);
779
855
 
780
- _defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabled", void 0);
856
+ _defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabled", void 0);
781
857
 
782
- _defineProperty(_assertThisInitialized(_this5), "isRegistrationEnabled", void 0);
858
+ _defineProperty(_assertThisInitialized(_this6), "isRegistrationEnabled", void 0);
783
859
 
784
- _defineProperty(_assertThisInitialized(_this5), "currency", void 0);
860
+ _defineProperty(_assertThisInitialized(_this6), "currency", void 0);
785
861
 
786
- return _this5;
862
+ return _this6;
787
863
  }
788
864
 
789
865
  return _createClass(ShopConfig);
@@ -1048,7 +1124,8 @@
1048
1124
  layout: new BackofficeLayout(_this5.callFunction.bind(_assertThisInitialized(_this5))),
1049
1125
  authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
1050
1126
  customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
1051
- plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5)))
1127
+ plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5))),
1128
+ addToCartContext: new BackofficeAddToCartContext(_this5.callFunction.bind(_assertThisInitialized(_this5)))
1052
1129
  });
1053
1130
 
1054
1131
  return _this5;
@@ -1077,6 +1154,7 @@
1077
1154
  hash: '',
1078
1155
  query: {}
1079
1156
  },
1157
+ authorization: new ShopAuthorization(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1080
1158
  cart: new ShopCart(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1081
1159
  catalog: new ShopCatalog(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1082
1160
  account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),