@one-commerce/sdk-core 1.16.0 → 1.17.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.
@@ -680,41 +680,71 @@ var ShopCart = /*#__PURE__*/function (_BaseCallClass3) {
680
680
 
681
681
  return ShopCart;
682
682
  }(BaseCallClass);
683
- var ShopUtils = /*#__PURE__*/function (_BaseCallClass4) {
684
- _inherits(ShopUtils, _BaseCallClass4);
683
+ var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass4) {
684
+ _inherits(ShopAuthorization, _BaseCallClass4);
685
685
 
686
- var _super4 = _createSuper(ShopUtils);
686
+ var _super4 = _createSuper(ShopAuthorization);
687
687
 
688
- function ShopUtils(call) {
688
+ function ShopAuthorization() {
689
689
  var _this4;
690
690
 
691
+ _classCallCheck(this, ShopAuthorization);
692
+
693
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
694
+ args[_key4] = arguments[_key4];
695
+ }
696
+
697
+ _this4 = _super4.call.apply(_super4, [this].concat(args));
698
+
699
+ _defineProperty(_assertThisInitialized(_this4), "serviceName", 'authorization');
700
+
701
+ return _this4;
702
+ }
703
+
704
+ _createClass(ShopAuthorization, [{
705
+ key: "getAuthToken",
706
+ value: function getAuthToken() {
707
+ return this.call('getAuthToken');
708
+ }
709
+ }]);
710
+
711
+ return ShopAuthorization;
712
+ }(BaseCallClass);
713
+ var ShopUtils = /*#__PURE__*/function (_BaseCallClass5) {
714
+ _inherits(ShopUtils, _BaseCallClass5);
715
+
716
+ var _super5 = _createSuper(ShopUtils);
717
+
718
+ function ShopUtils(call) {
719
+ var _this5;
720
+
691
721
  _classCallCheck(this, ShopUtils);
692
722
 
693
- _this4 = _super4.call(this, call);
723
+ _this5 = _super5.call(this, call);
694
724
 
695
- _defineProperty(_assertThisInitialized(_this4), "serviceName", 'utils');
725
+ _defineProperty(_assertThisInitialized(_this5), "serviceName", 'utils');
696
726
 
697
- _defineProperty(_assertThisInitialized(_this4), "currency", void 0);
727
+ _defineProperty(_assertThisInitialized(_this5), "currency", void 0);
698
728
 
699
- _defineProperty(_assertThisInitialized(_this4), "isAnonymousAndPurchaseDisabled", void 0);
729
+ _defineProperty(_assertThisInitialized(_this5), "isAnonymousAndPurchaseDisabled", void 0);
700
730
 
701
- _defineProperty(_assertThisInitialized(_this4), "isB2B", void 0);
731
+ _defineProperty(_assertThisInitialized(_this5), "isB2B", void 0);
702
732
 
703
- _defineProperty(_assertThisInitialized(_this4), "isB2BAndPlatformIsNotOpened", void 0);
733
+ _defineProperty(_assertThisInitialized(_this5), "isB2BAndPlatformIsNotOpened", void 0);
704
734
 
705
- _defineProperty(_assertThisInitialized(_this4), "isIndexPage", void 0);
735
+ _defineProperty(_assertThisInitialized(_this5), "isIndexPage", void 0);
706
736
 
707
- _defineProperty(_assertThisInitialized(_this4), "isPurchaseEnabledOrAuthenticated", void 0);
737
+ _defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabledOrAuthenticated", void 0);
708
738
 
709
- _defineProperty(_assertThisInitialized(_this4), "routes", void 0);
739
+ _defineProperty(_assertThisInitialized(_this5), "routes", void 0);
710
740
 
711
- _this4.routes = {
712
- getCategoryPath: _this4.getCategoryPath,
713
- getManufacturerSearchUrl: _this4.getManufacturerSearchUrl,
714
- getProductUrl: _this4.getProductUrl,
715
- isExternalUrl: _this4.isExternalUrl
741
+ _this5.routes = {
742
+ getCategoryPath: _this5.getCategoryPath,
743
+ getManufacturerSearchUrl: _this5.getManufacturerSearchUrl,
744
+ getProductUrl: _this5.getProductUrl,
745
+ isExternalUrl: _this5.isExternalUrl
716
746
  };
717
- return _this4;
747
+ return _this5;
718
748
  }
719
749
 
720
750
  _createClass(ShopUtils, [{
@@ -741,43 +771,43 @@ var ShopUtils = /*#__PURE__*/function (_BaseCallClass4) {
741
771
 
742
772
  return ShopUtils;
743
773
  }(BaseCallClass);
744
- var ShopConfig = /*#__PURE__*/function (_BaseCallClass5) {
745
- _inherits(ShopConfig, _BaseCallClass5);
774
+ var ShopConfig = /*#__PURE__*/function (_BaseCallClass6) {
775
+ _inherits(ShopConfig, _BaseCallClass6);
746
776
 
747
- var _super5 = _createSuper(ShopConfig);
777
+ var _super6 = _createSuper(ShopConfig);
748
778
 
749
779
  function ShopConfig() {
750
- var _this5;
780
+ var _this6;
751
781
 
752
782
  _classCallCheck(this, ShopConfig);
753
783
 
754
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
755
- args[_key4] = arguments[_key4];
784
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
785
+ args[_key5] = arguments[_key5];
756
786
  }
757
787
 
758
- _this5 = _super5.call.apply(_super5, [this].concat(args));
788
+ _this6 = _super6.call.apply(_super6, [this].concat(args));
759
789
 
760
- _defineProperty(_assertThisInitialized(_this5), "serviceName", 'config');
790
+ _defineProperty(_assertThisInitialized(_this6), "serviceName", 'config');
761
791
 
762
- _defineProperty(_assertThisInitialized(_this5), "accessMode", void 0);
792
+ _defineProperty(_assertThisInitialized(_this6), "accessMode", void 0);
763
793
 
764
- _defineProperty(_assertThisInitialized(_this5), "isB2CRegistrationEnabled", void 0);
794
+ _defineProperty(_assertThisInitialized(_this6), "isB2CRegistrationEnabled", void 0);
765
795
 
766
- _defineProperty(_assertThisInitialized(_this5), "isCatalogOpened", void 0);
796
+ _defineProperty(_assertThisInitialized(_this6), "isCatalogOpened", void 0);
767
797
 
768
- _defineProperty(_assertThisInitialized(_this5), "isGrossSelected", void 0);
798
+ _defineProperty(_assertThisInitialized(_this6), "isGrossSelected", void 0);
769
799
 
770
- _defineProperty(_assertThisInitialized(_this5), "isPlatformClosed", void 0);
800
+ _defineProperty(_assertThisInitialized(_this6), "isPlatformClosed", void 0);
771
801
 
772
- _defineProperty(_assertThisInitialized(_this5), "isPlatformOpened", void 0);
802
+ _defineProperty(_assertThisInitialized(_this6), "isPlatformOpened", void 0);
773
803
 
774
- _defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabled", void 0);
804
+ _defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabled", void 0);
775
805
 
776
- _defineProperty(_assertThisInitialized(_this5), "isRegistrationEnabled", void 0);
806
+ _defineProperty(_assertThisInitialized(_this6), "isRegistrationEnabled", void 0);
777
807
 
778
- _defineProperty(_assertThisInitialized(_this5), "currency", void 0);
808
+ _defineProperty(_assertThisInitialized(_this6), "currency", void 0);
779
809
 
780
- return _this5;
810
+ return _this6;
781
811
  }
782
812
 
783
813
  return _createClass(ShopConfig);
@@ -1071,6 +1101,7 @@ var ShopSdk = /*#__PURE__*/function (_Sdk2) {
1071
1101
  hash: '',
1072
1102
  query: {}
1073
1103
  },
1104
+ authorization: new ShopAuthorization(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1074
1105
  cart: new ShopCart(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1075
1106
  catalog: new ShopCatalog(_this6.callFunction.bind(_assertThisInitialized(_this6))),
1076
1107
  account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),