@one-commerce/sdk-core 1.15.0 → 1.17.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.
- package/lib/bundles/bundle.esm.js +99 -38
- 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 +99 -38
- 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/backofficeServices.js +33 -1
- package/lib/cjs/backofficeServices.js.map +1 -1
- package/lib/cjs/index.js +3 -1
- 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/backofficeServices.js +14 -0
- package/lib/esm/backofficeServices.js.map +1 -1
- package/lib/esm/index.js +5 -3
- 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/backofficeServices.d.ts +6 -0
- package/lib/types/backofficeServices.d.ts.map +1 -1
- package/lib/types/index.d.ts +6 -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
|
@@ -490,6 +490,35 @@ var BackofficeCustomer = /*#__PURE__*/function (_BaseCallClass7) {
|
|
|
490
490
|
|
|
491
491
|
return _createClass(BackofficeCustomer);
|
|
492
492
|
}(BaseCallClass);
|
|
493
|
+
var BackofficePlugin = /*#__PURE__*/function (_BaseCallClass8) {
|
|
494
|
+
_inherits(BackofficePlugin, _BaseCallClass8);
|
|
495
|
+
|
|
496
|
+
var _super8 = _createSuper(BackofficePlugin);
|
|
497
|
+
|
|
498
|
+
function BackofficePlugin() {
|
|
499
|
+
var _this8;
|
|
500
|
+
|
|
501
|
+
_classCallCheck(this, BackofficePlugin);
|
|
502
|
+
|
|
503
|
+
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
504
|
+
args[_key8] = arguments[_key8];
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
_this8 = _super8.call.apply(_super8, [this].concat(args));
|
|
508
|
+
|
|
509
|
+
_defineProperty(_assertThisInitialized(_this8), "serviceName", 'plugin');
|
|
510
|
+
|
|
511
|
+
_defineProperty(_assertThisInitialized(_this8), "id", void 0);
|
|
512
|
+
|
|
513
|
+
_defineProperty(_assertThisInitialized(_this8), "srcUrl", void 0);
|
|
514
|
+
|
|
515
|
+
_defineProperty(_assertThisInitialized(_this8), "name", void 0);
|
|
516
|
+
|
|
517
|
+
return _this8;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
return _createClass(BackofficePlugin);
|
|
521
|
+
}(BaseCallClass);
|
|
493
522
|
|
|
494
523
|
var Events = /*#__PURE__*/function () {
|
|
495
524
|
function Events() {
|
|
@@ -651,41 +680,71 @@ var ShopCart = /*#__PURE__*/function (_BaseCallClass3) {
|
|
|
651
680
|
|
|
652
681
|
return ShopCart;
|
|
653
682
|
}(BaseCallClass);
|
|
654
|
-
var
|
|
655
|
-
_inherits(
|
|
683
|
+
var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass4) {
|
|
684
|
+
_inherits(ShopAuthorization, _BaseCallClass4);
|
|
656
685
|
|
|
657
|
-
var _super4 = _createSuper(
|
|
686
|
+
var _super4 = _createSuper(ShopAuthorization);
|
|
658
687
|
|
|
659
|
-
function
|
|
688
|
+
function ShopAuthorization() {
|
|
660
689
|
var _this4;
|
|
661
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
|
+
|
|
662
721
|
_classCallCheck(this, ShopUtils);
|
|
663
722
|
|
|
664
|
-
|
|
723
|
+
_this5 = _super5.call(this, call);
|
|
665
724
|
|
|
666
|
-
_defineProperty(_assertThisInitialized(
|
|
725
|
+
_defineProperty(_assertThisInitialized(_this5), "serviceName", 'utils');
|
|
667
726
|
|
|
668
|
-
_defineProperty(_assertThisInitialized(
|
|
727
|
+
_defineProperty(_assertThisInitialized(_this5), "currency", void 0);
|
|
669
728
|
|
|
670
|
-
_defineProperty(_assertThisInitialized(
|
|
729
|
+
_defineProperty(_assertThisInitialized(_this5), "isAnonymousAndPurchaseDisabled", void 0);
|
|
671
730
|
|
|
672
|
-
_defineProperty(_assertThisInitialized(
|
|
731
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2B", void 0);
|
|
673
732
|
|
|
674
|
-
_defineProperty(_assertThisInitialized(
|
|
733
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2BAndPlatformIsNotOpened", void 0);
|
|
675
734
|
|
|
676
|
-
_defineProperty(_assertThisInitialized(
|
|
735
|
+
_defineProperty(_assertThisInitialized(_this5), "isIndexPage", void 0);
|
|
677
736
|
|
|
678
|
-
_defineProperty(_assertThisInitialized(
|
|
737
|
+
_defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabledOrAuthenticated", void 0);
|
|
679
738
|
|
|
680
|
-
_defineProperty(_assertThisInitialized(
|
|
739
|
+
_defineProperty(_assertThisInitialized(_this5), "routes", void 0);
|
|
681
740
|
|
|
682
|
-
|
|
683
|
-
getCategoryPath:
|
|
684
|
-
getManufacturerSearchUrl:
|
|
685
|
-
getProductUrl:
|
|
686
|
-
isExternalUrl:
|
|
741
|
+
_this5.routes = {
|
|
742
|
+
getCategoryPath: _this5.getCategoryPath,
|
|
743
|
+
getManufacturerSearchUrl: _this5.getManufacturerSearchUrl,
|
|
744
|
+
getProductUrl: _this5.getProductUrl,
|
|
745
|
+
isExternalUrl: _this5.isExternalUrl
|
|
687
746
|
};
|
|
688
|
-
return
|
|
747
|
+
return _this5;
|
|
689
748
|
}
|
|
690
749
|
|
|
691
750
|
_createClass(ShopUtils, [{
|
|
@@ -712,43 +771,43 @@ var ShopUtils = /*#__PURE__*/function (_BaseCallClass4) {
|
|
|
712
771
|
|
|
713
772
|
return ShopUtils;
|
|
714
773
|
}(BaseCallClass);
|
|
715
|
-
var ShopConfig = /*#__PURE__*/function (
|
|
716
|
-
_inherits(ShopConfig,
|
|
774
|
+
var ShopConfig = /*#__PURE__*/function (_BaseCallClass6) {
|
|
775
|
+
_inherits(ShopConfig, _BaseCallClass6);
|
|
717
776
|
|
|
718
|
-
var
|
|
777
|
+
var _super6 = _createSuper(ShopConfig);
|
|
719
778
|
|
|
720
779
|
function ShopConfig() {
|
|
721
|
-
var
|
|
780
|
+
var _this6;
|
|
722
781
|
|
|
723
782
|
_classCallCheck(this, ShopConfig);
|
|
724
783
|
|
|
725
|
-
for (var
|
|
726
|
-
args[
|
|
784
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
785
|
+
args[_key5] = arguments[_key5];
|
|
727
786
|
}
|
|
728
787
|
|
|
729
|
-
|
|
788
|
+
_this6 = _super6.call.apply(_super6, [this].concat(args));
|
|
730
789
|
|
|
731
|
-
_defineProperty(_assertThisInitialized(
|
|
790
|
+
_defineProperty(_assertThisInitialized(_this6), "serviceName", 'config');
|
|
732
791
|
|
|
733
|
-
_defineProperty(_assertThisInitialized(
|
|
792
|
+
_defineProperty(_assertThisInitialized(_this6), "accessMode", void 0);
|
|
734
793
|
|
|
735
|
-
_defineProperty(_assertThisInitialized(
|
|
794
|
+
_defineProperty(_assertThisInitialized(_this6), "isB2CRegistrationEnabled", void 0);
|
|
736
795
|
|
|
737
|
-
_defineProperty(_assertThisInitialized(
|
|
796
|
+
_defineProperty(_assertThisInitialized(_this6), "isCatalogOpened", void 0);
|
|
738
797
|
|
|
739
|
-
_defineProperty(_assertThisInitialized(
|
|
798
|
+
_defineProperty(_assertThisInitialized(_this6), "isGrossSelected", void 0);
|
|
740
799
|
|
|
741
|
-
_defineProperty(_assertThisInitialized(
|
|
800
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformClosed", void 0);
|
|
742
801
|
|
|
743
|
-
_defineProperty(_assertThisInitialized(
|
|
802
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformOpened", void 0);
|
|
744
803
|
|
|
745
|
-
_defineProperty(_assertThisInitialized(
|
|
804
|
+
_defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabled", void 0);
|
|
746
805
|
|
|
747
|
-
_defineProperty(_assertThisInitialized(
|
|
806
|
+
_defineProperty(_assertThisInitialized(_this6), "isRegistrationEnabled", void 0);
|
|
748
807
|
|
|
749
|
-
_defineProperty(_assertThisInitialized(
|
|
808
|
+
_defineProperty(_assertThisInitialized(_this6), "currency", void 0);
|
|
750
809
|
|
|
751
|
-
return
|
|
810
|
+
return _this6;
|
|
752
811
|
}
|
|
753
812
|
|
|
754
813
|
return _createClass(ShopConfig);
|
|
@@ -1012,7 +1071,8 @@ var BackofficeSdk = /*#__PURE__*/function (_Sdk) {
|
|
|
1012
1071
|
tenant: new BackofficeTenant(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1013
1072
|
layout: new BackofficeLayout(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1014
1073
|
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1015
|
-
customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
1074
|
+
customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1075
|
+
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
1016
1076
|
});
|
|
1017
1077
|
|
|
1018
1078
|
return _this5;
|
|
@@ -1041,6 +1101,7 @@ var ShopSdk = /*#__PURE__*/function (_Sdk2) {
|
|
|
1041
1101
|
hash: '',
|
|
1042
1102
|
query: {}
|
|
1043
1103
|
},
|
|
1104
|
+
authorization: new ShopAuthorization(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1044
1105
|
cart: new ShopCart(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1045
1106
|
catalog: new ShopCatalog(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1046
1107
|
account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|