@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
|
@@ -680,41 +680,71 @@ var ShopCart = /*#__PURE__*/function (_BaseCallClass3) {
|
|
|
680
680
|
|
|
681
681
|
return ShopCart;
|
|
682
682
|
}(BaseCallClass);
|
|
683
|
-
var
|
|
684
|
-
_inherits(
|
|
683
|
+
var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass4) {
|
|
684
|
+
_inherits(ShopAuthorization, _BaseCallClass4);
|
|
685
685
|
|
|
686
|
-
var _super4 = _createSuper(
|
|
686
|
+
var _super4 = _createSuper(ShopAuthorization);
|
|
687
687
|
|
|
688
|
-
function
|
|
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
|
-
|
|
723
|
+
_this5 = _super5.call(this, call);
|
|
694
724
|
|
|
695
|
-
_defineProperty(_assertThisInitialized(
|
|
725
|
+
_defineProperty(_assertThisInitialized(_this5), "serviceName", 'utils');
|
|
696
726
|
|
|
697
|
-
_defineProperty(_assertThisInitialized(
|
|
727
|
+
_defineProperty(_assertThisInitialized(_this5), "currency", void 0);
|
|
698
728
|
|
|
699
|
-
_defineProperty(_assertThisInitialized(
|
|
729
|
+
_defineProperty(_assertThisInitialized(_this5), "isAnonymousAndPurchaseDisabled", void 0);
|
|
700
730
|
|
|
701
|
-
_defineProperty(_assertThisInitialized(
|
|
731
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2B", void 0);
|
|
702
732
|
|
|
703
|
-
_defineProperty(_assertThisInitialized(
|
|
733
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2BAndPlatformIsNotOpened", void 0);
|
|
704
734
|
|
|
705
|
-
_defineProperty(_assertThisInitialized(
|
|
735
|
+
_defineProperty(_assertThisInitialized(_this5), "isIndexPage", void 0);
|
|
706
736
|
|
|
707
|
-
_defineProperty(_assertThisInitialized(
|
|
737
|
+
_defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabledOrAuthenticated", void 0);
|
|
708
738
|
|
|
709
|
-
_defineProperty(_assertThisInitialized(
|
|
739
|
+
_defineProperty(_assertThisInitialized(_this5), "routes", void 0);
|
|
710
740
|
|
|
711
|
-
|
|
712
|
-
getCategoryPath:
|
|
713
|
-
getManufacturerSearchUrl:
|
|
714
|
-
getProductUrl:
|
|
715
|
-
isExternalUrl:
|
|
741
|
+
_this5.routes = {
|
|
742
|
+
getCategoryPath: _this5.getCategoryPath,
|
|
743
|
+
getManufacturerSearchUrl: _this5.getManufacturerSearchUrl,
|
|
744
|
+
getProductUrl: _this5.getProductUrl,
|
|
745
|
+
isExternalUrl: _this5.isExternalUrl
|
|
716
746
|
};
|
|
717
|
-
return
|
|
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 (
|
|
745
|
-
_inherits(ShopConfig,
|
|
774
|
+
var ShopConfig = /*#__PURE__*/function (_BaseCallClass6) {
|
|
775
|
+
_inherits(ShopConfig, _BaseCallClass6);
|
|
746
776
|
|
|
747
|
-
var
|
|
777
|
+
var _super6 = _createSuper(ShopConfig);
|
|
748
778
|
|
|
749
779
|
function ShopConfig() {
|
|
750
|
-
var
|
|
780
|
+
var _this6;
|
|
751
781
|
|
|
752
782
|
_classCallCheck(this, ShopConfig);
|
|
753
783
|
|
|
754
|
-
for (var
|
|
755
|
-
args[
|
|
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
|
-
|
|
788
|
+
_this6 = _super6.call.apply(_super6, [this].concat(args));
|
|
759
789
|
|
|
760
|
-
_defineProperty(_assertThisInitialized(
|
|
790
|
+
_defineProperty(_assertThisInitialized(_this6), "serviceName", 'config');
|
|
761
791
|
|
|
762
|
-
_defineProperty(_assertThisInitialized(
|
|
792
|
+
_defineProperty(_assertThisInitialized(_this6), "accessMode", void 0);
|
|
763
793
|
|
|
764
|
-
_defineProperty(_assertThisInitialized(
|
|
794
|
+
_defineProperty(_assertThisInitialized(_this6), "isB2CRegistrationEnabled", void 0);
|
|
765
795
|
|
|
766
|
-
_defineProperty(_assertThisInitialized(
|
|
796
|
+
_defineProperty(_assertThisInitialized(_this6), "isCatalogOpened", void 0);
|
|
767
797
|
|
|
768
|
-
_defineProperty(_assertThisInitialized(
|
|
798
|
+
_defineProperty(_assertThisInitialized(_this6), "isGrossSelected", void 0);
|
|
769
799
|
|
|
770
|
-
_defineProperty(_assertThisInitialized(
|
|
800
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformClosed", void 0);
|
|
771
801
|
|
|
772
|
-
_defineProperty(_assertThisInitialized(
|
|
802
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformOpened", void 0);
|
|
773
803
|
|
|
774
|
-
_defineProperty(_assertThisInitialized(
|
|
804
|
+
_defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabled", void 0);
|
|
775
805
|
|
|
776
|
-
_defineProperty(_assertThisInitialized(
|
|
806
|
+
_defineProperty(_assertThisInitialized(_this6), "isRegistrationEnabled", void 0);
|
|
777
807
|
|
|
778
|
-
_defineProperty(_assertThisInitialized(
|
|
808
|
+
_defineProperty(_assertThisInitialized(_this6), "currency", void 0);
|
|
779
809
|
|
|
780
|
-
return
|
|
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))),
|