@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.
- package/lib/bundles/bundle.esm.js +68 -37
- package/lib/bundles/bundle.esm.js.map +1 -1
- package/lib/bundles/bundle.esm.min.js +1 -1
- package/lib/bundles/bundle.esm.min.js.map +1 -1
- package/lib/bundles/bundle.umd.js +68 -37
- package/lib/bundles/bundle.umd.js.map +1 -1
- package/lib/bundles/bundle.umd.min.js +1 -1
- package/lib/bundles/bundle.umd.min.js.map +1 -1
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/shopServices.js +71 -38
- package/lib/cjs/shopServices.js.map +1 -1
- package/lib/esm/index.js +3 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/shopServices.js +12 -0
- package/lib/esm/shopServices.js.map +1 -1
- package/lib/types/index.d.ts +4 -2
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shopServices.d.ts +30 -0
- package/lib/types/shopServices.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -686,41 +686,71 @@
|
|
|
686
686
|
|
|
687
687
|
return ShopCart;
|
|
688
688
|
}(BaseCallClass);
|
|
689
|
-
var
|
|
690
|
-
_inherits(
|
|
689
|
+
var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass4) {
|
|
690
|
+
_inherits(ShopAuthorization, _BaseCallClass4);
|
|
691
691
|
|
|
692
|
-
var _super4 = _createSuper(
|
|
692
|
+
var _super4 = _createSuper(ShopAuthorization);
|
|
693
693
|
|
|
694
|
-
function
|
|
694
|
+
function ShopAuthorization() {
|
|
695
695
|
var _this4;
|
|
696
696
|
|
|
697
|
+
_classCallCheck(this, ShopAuthorization);
|
|
698
|
+
|
|
699
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
700
|
+
args[_key4] = arguments[_key4];
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
_this4 = _super4.call.apply(_super4, [this].concat(args));
|
|
704
|
+
|
|
705
|
+
_defineProperty(_assertThisInitialized(_this4), "serviceName", 'authorization');
|
|
706
|
+
|
|
707
|
+
return _this4;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
_createClass(ShopAuthorization, [{
|
|
711
|
+
key: "getAuthToken",
|
|
712
|
+
value: function getAuthToken() {
|
|
713
|
+
return this.call('getAuthToken');
|
|
714
|
+
}
|
|
715
|
+
}]);
|
|
716
|
+
|
|
717
|
+
return ShopAuthorization;
|
|
718
|
+
}(BaseCallClass);
|
|
719
|
+
var ShopUtils = /*#__PURE__*/function (_BaseCallClass5) {
|
|
720
|
+
_inherits(ShopUtils, _BaseCallClass5);
|
|
721
|
+
|
|
722
|
+
var _super5 = _createSuper(ShopUtils);
|
|
723
|
+
|
|
724
|
+
function ShopUtils(call) {
|
|
725
|
+
var _this5;
|
|
726
|
+
|
|
697
727
|
_classCallCheck(this, ShopUtils);
|
|
698
728
|
|
|
699
|
-
|
|
729
|
+
_this5 = _super5.call(this, call);
|
|
700
730
|
|
|
701
|
-
_defineProperty(_assertThisInitialized(
|
|
731
|
+
_defineProperty(_assertThisInitialized(_this5), "serviceName", 'utils');
|
|
702
732
|
|
|
703
|
-
_defineProperty(_assertThisInitialized(
|
|
733
|
+
_defineProperty(_assertThisInitialized(_this5), "currency", void 0);
|
|
704
734
|
|
|
705
|
-
_defineProperty(_assertThisInitialized(
|
|
735
|
+
_defineProperty(_assertThisInitialized(_this5), "isAnonymousAndPurchaseDisabled", void 0);
|
|
706
736
|
|
|
707
|
-
_defineProperty(_assertThisInitialized(
|
|
737
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2B", void 0);
|
|
708
738
|
|
|
709
|
-
_defineProperty(_assertThisInitialized(
|
|
739
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2BAndPlatformIsNotOpened", void 0);
|
|
710
740
|
|
|
711
|
-
_defineProperty(_assertThisInitialized(
|
|
741
|
+
_defineProperty(_assertThisInitialized(_this5), "isIndexPage", void 0);
|
|
712
742
|
|
|
713
|
-
_defineProperty(_assertThisInitialized(
|
|
743
|
+
_defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabledOrAuthenticated", void 0);
|
|
714
744
|
|
|
715
|
-
_defineProperty(_assertThisInitialized(
|
|
745
|
+
_defineProperty(_assertThisInitialized(_this5), "routes", void 0);
|
|
716
746
|
|
|
717
|
-
|
|
718
|
-
getCategoryPath:
|
|
719
|
-
getManufacturerSearchUrl:
|
|
720
|
-
getProductUrl:
|
|
721
|
-
isExternalUrl:
|
|
747
|
+
_this5.routes = {
|
|
748
|
+
getCategoryPath: _this5.getCategoryPath,
|
|
749
|
+
getManufacturerSearchUrl: _this5.getManufacturerSearchUrl,
|
|
750
|
+
getProductUrl: _this5.getProductUrl,
|
|
751
|
+
isExternalUrl: _this5.isExternalUrl
|
|
722
752
|
};
|
|
723
|
-
return
|
|
753
|
+
return _this5;
|
|
724
754
|
}
|
|
725
755
|
|
|
726
756
|
_createClass(ShopUtils, [{
|
|
@@ -747,43 +777,43 @@
|
|
|
747
777
|
|
|
748
778
|
return ShopUtils;
|
|
749
779
|
}(BaseCallClass);
|
|
750
|
-
var ShopConfig = /*#__PURE__*/function (
|
|
751
|
-
_inherits(ShopConfig,
|
|
780
|
+
var ShopConfig = /*#__PURE__*/function (_BaseCallClass6) {
|
|
781
|
+
_inherits(ShopConfig, _BaseCallClass6);
|
|
752
782
|
|
|
753
|
-
var
|
|
783
|
+
var _super6 = _createSuper(ShopConfig);
|
|
754
784
|
|
|
755
785
|
function ShopConfig() {
|
|
756
|
-
var
|
|
786
|
+
var _this6;
|
|
757
787
|
|
|
758
788
|
_classCallCheck(this, ShopConfig);
|
|
759
789
|
|
|
760
|
-
for (var
|
|
761
|
-
args[
|
|
790
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
791
|
+
args[_key5] = arguments[_key5];
|
|
762
792
|
}
|
|
763
793
|
|
|
764
|
-
|
|
794
|
+
_this6 = _super6.call.apply(_super6, [this].concat(args));
|
|
765
795
|
|
|
766
|
-
_defineProperty(_assertThisInitialized(
|
|
796
|
+
_defineProperty(_assertThisInitialized(_this6), "serviceName", 'config');
|
|
767
797
|
|
|
768
|
-
_defineProperty(_assertThisInitialized(
|
|
798
|
+
_defineProperty(_assertThisInitialized(_this6), "accessMode", void 0);
|
|
769
799
|
|
|
770
|
-
_defineProperty(_assertThisInitialized(
|
|
800
|
+
_defineProperty(_assertThisInitialized(_this6), "isB2CRegistrationEnabled", void 0);
|
|
771
801
|
|
|
772
|
-
_defineProperty(_assertThisInitialized(
|
|
802
|
+
_defineProperty(_assertThisInitialized(_this6), "isCatalogOpened", void 0);
|
|
773
803
|
|
|
774
|
-
_defineProperty(_assertThisInitialized(
|
|
804
|
+
_defineProperty(_assertThisInitialized(_this6), "isGrossSelected", void 0);
|
|
775
805
|
|
|
776
|
-
_defineProperty(_assertThisInitialized(
|
|
806
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformClosed", void 0);
|
|
777
807
|
|
|
778
|
-
_defineProperty(_assertThisInitialized(
|
|
808
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformOpened", void 0);
|
|
779
809
|
|
|
780
|
-
_defineProperty(_assertThisInitialized(
|
|
810
|
+
_defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabled", void 0);
|
|
781
811
|
|
|
782
|
-
_defineProperty(_assertThisInitialized(
|
|
812
|
+
_defineProperty(_assertThisInitialized(_this6), "isRegistrationEnabled", void 0);
|
|
783
813
|
|
|
784
|
-
_defineProperty(_assertThisInitialized(
|
|
814
|
+
_defineProperty(_assertThisInitialized(_this6), "currency", void 0);
|
|
785
815
|
|
|
786
|
-
return
|
|
816
|
+
return _this6;
|
|
787
817
|
}
|
|
788
818
|
|
|
789
819
|
return _createClass(ShopConfig);
|
|
@@ -1077,6 +1107,7 @@
|
|
|
1077
1107
|
hash: '',
|
|
1078
1108
|
query: {}
|
|
1079
1109
|
},
|
|
1110
|
+
authorization: new ShopAuthorization(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1080
1111
|
cart: new ShopCart(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1081
1112
|
catalog: new ShopCatalog(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1082
1113
|
account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|