@one-commerce/sdk-core 1.14.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 +127 -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 +127 -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 +63 -1
- package/lib/cjs/backofficeServices.js.map +1 -1
- package/lib/cjs/index.js +4 -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 +26 -0
- package/lib/esm/backofficeServices.js.map +1 -1
- package/lib/esm/index.js +6 -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 +11 -0
- package/lib/types/backofficeServices.d.ts.map +1 -1
- package/lib/types/index.d.ts +8 -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
|
@@ -469,6 +469,62 @@
|
|
|
469
469
|
|
|
470
470
|
return BackofficeAuthorization;
|
|
471
471
|
}(BaseCallClass);
|
|
472
|
+
var BackofficeCustomer = /*#__PURE__*/function (_BaseCallClass7) {
|
|
473
|
+
_inherits(BackofficeCustomer, _BaseCallClass7);
|
|
474
|
+
|
|
475
|
+
var _super7 = _createSuper(BackofficeCustomer);
|
|
476
|
+
|
|
477
|
+
function BackofficeCustomer() {
|
|
478
|
+
var _this7;
|
|
479
|
+
|
|
480
|
+
_classCallCheck(this, BackofficeCustomer);
|
|
481
|
+
|
|
482
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
483
|
+
args[_key7] = arguments[_key7];
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
_this7 = _super7.call.apply(_super7, [this].concat(args));
|
|
487
|
+
|
|
488
|
+
_defineProperty(_assertThisInitialized(_this7), "serviceName", 'customer');
|
|
489
|
+
|
|
490
|
+
_defineProperty(_assertThisInitialized(_this7), "id", void 0);
|
|
491
|
+
|
|
492
|
+
_defineProperty(_assertThisInitialized(_this7), "name", void 0);
|
|
493
|
+
|
|
494
|
+
return _this7;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
return _createClass(BackofficeCustomer);
|
|
498
|
+
}(BaseCallClass);
|
|
499
|
+
var BackofficePlugin = /*#__PURE__*/function (_BaseCallClass8) {
|
|
500
|
+
_inherits(BackofficePlugin, _BaseCallClass8);
|
|
501
|
+
|
|
502
|
+
var _super8 = _createSuper(BackofficePlugin);
|
|
503
|
+
|
|
504
|
+
function BackofficePlugin() {
|
|
505
|
+
var _this8;
|
|
506
|
+
|
|
507
|
+
_classCallCheck(this, BackofficePlugin);
|
|
508
|
+
|
|
509
|
+
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
510
|
+
args[_key8] = arguments[_key8];
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
_this8 = _super8.call.apply(_super8, [this].concat(args));
|
|
514
|
+
|
|
515
|
+
_defineProperty(_assertThisInitialized(_this8), "serviceName", 'plugin');
|
|
516
|
+
|
|
517
|
+
_defineProperty(_assertThisInitialized(_this8), "id", void 0);
|
|
518
|
+
|
|
519
|
+
_defineProperty(_assertThisInitialized(_this8), "srcUrl", void 0);
|
|
520
|
+
|
|
521
|
+
_defineProperty(_assertThisInitialized(_this8), "name", void 0);
|
|
522
|
+
|
|
523
|
+
return _this8;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
return _createClass(BackofficePlugin);
|
|
527
|
+
}(BaseCallClass);
|
|
472
528
|
|
|
473
529
|
var Events = /*#__PURE__*/function () {
|
|
474
530
|
function Events() {
|
|
@@ -630,41 +686,71 @@
|
|
|
630
686
|
|
|
631
687
|
return ShopCart;
|
|
632
688
|
}(BaseCallClass);
|
|
633
|
-
var
|
|
634
|
-
_inherits(
|
|
689
|
+
var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass4) {
|
|
690
|
+
_inherits(ShopAuthorization, _BaseCallClass4);
|
|
635
691
|
|
|
636
|
-
var _super4 = _createSuper(
|
|
692
|
+
var _super4 = _createSuper(ShopAuthorization);
|
|
637
693
|
|
|
638
|
-
function
|
|
694
|
+
function ShopAuthorization() {
|
|
639
695
|
var _this4;
|
|
640
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
|
+
|
|
641
727
|
_classCallCheck(this, ShopUtils);
|
|
642
728
|
|
|
643
|
-
|
|
729
|
+
_this5 = _super5.call(this, call);
|
|
644
730
|
|
|
645
|
-
_defineProperty(_assertThisInitialized(
|
|
731
|
+
_defineProperty(_assertThisInitialized(_this5), "serviceName", 'utils');
|
|
646
732
|
|
|
647
|
-
_defineProperty(_assertThisInitialized(
|
|
733
|
+
_defineProperty(_assertThisInitialized(_this5), "currency", void 0);
|
|
648
734
|
|
|
649
|
-
_defineProperty(_assertThisInitialized(
|
|
735
|
+
_defineProperty(_assertThisInitialized(_this5), "isAnonymousAndPurchaseDisabled", void 0);
|
|
650
736
|
|
|
651
|
-
_defineProperty(_assertThisInitialized(
|
|
737
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2B", void 0);
|
|
652
738
|
|
|
653
|
-
_defineProperty(_assertThisInitialized(
|
|
739
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2BAndPlatformIsNotOpened", void 0);
|
|
654
740
|
|
|
655
|
-
_defineProperty(_assertThisInitialized(
|
|
741
|
+
_defineProperty(_assertThisInitialized(_this5), "isIndexPage", void 0);
|
|
656
742
|
|
|
657
|
-
_defineProperty(_assertThisInitialized(
|
|
743
|
+
_defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabledOrAuthenticated", void 0);
|
|
658
744
|
|
|
659
|
-
_defineProperty(_assertThisInitialized(
|
|
745
|
+
_defineProperty(_assertThisInitialized(_this5), "routes", void 0);
|
|
660
746
|
|
|
661
|
-
|
|
662
|
-
getCategoryPath:
|
|
663
|
-
getManufacturerSearchUrl:
|
|
664
|
-
getProductUrl:
|
|
665
|
-
isExternalUrl:
|
|
747
|
+
_this5.routes = {
|
|
748
|
+
getCategoryPath: _this5.getCategoryPath,
|
|
749
|
+
getManufacturerSearchUrl: _this5.getManufacturerSearchUrl,
|
|
750
|
+
getProductUrl: _this5.getProductUrl,
|
|
751
|
+
isExternalUrl: _this5.isExternalUrl
|
|
666
752
|
};
|
|
667
|
-
return
|
|
753
|
+
return _this5;
|
|
668
754
|
}
|
|
669
755
|
|
|
670
756
|
_createClass(ShopUtils, [{
|
|
@@ -691,43 +777,43 @@
|
|
|
691
777
|
|
|
692
778
|
return ShopUtils;
|
|
693
779
|
}(BaseCallClass);
|
|
694
|
-
var ShopConfig = /*#__PURE__*/function (
|
|
695
|
-
_inherits(ShopConfig,
|
|
780
|
+
var ShopConfig = /*#__PURE__*/function (_BaseCallClass6) {
|
|
781
|
+
_inherits(ShopConfig, _BaseCallClass6);
|
|
696
782
|
|
|
697
|
-
var
|
|
783
|
+
var _super6 = _createSuper(ShopConfig);
|
|
698
784
|
|
|
699
785
|
function ShopConfig() {
|
|
700
|
-
var
|
|
786
|
+
var _this6;
|
|
701
787
|
|
|
702
788
|
_classCallCheck(this, ShopConfig);
|
|
703
789
|
|
|
704
|
-
for (var
|
|
705
|
-
args[
|
|
790
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
791
|
+
args[_key5] = arguments[_key5];
|
|
706
792
|
}
|
|
707
793
|
|
|
708
|
-
|
|
794
|
+
_this6 = _super6.call.apply(_super6, [this].concat(args));
|
|
709
795
|
|
|
710
|
-
_defineProperty(_assertThisInitialized(
|
|
796
|
+
_defineProperty(_assertThisInitialized(_this6), "serviceName", 'config');
|
|
711
797
|
|
|
712
|
-
_defineProperty(_assertThisInitialized(
|
|
798
|
+
_defineProperty(_assertThisInitialized(_this6), "accessMode", void 0);
|
|
713
799
|
|
|
714
|
-
_defineProperty(_assertThisInitialized(
|
|
800
|
+
_defineProperty(_assertThisInitialized(_this6), "isB2CRegistrationEnabled", void 0);
|
|
715
801
|
|
|
716
|
-
_defineProperty(_assertThisInitialized(
|
|
802
|
+
_defineProperty(_assertThisInitialized(_this6), "isCatalogOpened", void 0);
|
|
717
803
|
|
|
718
|
-
_defineProperty(_assertThisInitialized(
|
|
804
|
+
_defineProperty(_assertThisInitialized(_this6), "isGrossSelected", void 0);
|
|
719
805
|
|
|
720
|
-
_defineProperty(_assertThisInitialized(
|
|
806
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformClosed", void 0);
|
|
721
807
|
|
|
722
|
-
_defineProperty(_assertThisInitialized(
|
|
808
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformOpened", void 0);
|
|
723
809
|
|
|
724
|
-
_defineProperty(_assertThisInitialized(
|
|
810
|
+
_defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabled", void 0);
|
|
725
811
|
|
|
726
|
-
_defineProperty(_assertThisInitialized(
|
|
812
|
+
_defineProperty(_assertThisInitialized(_this6), "isRegistrationEnabled", void 0);
|
|
727
813
|
|
|
728
|
-
_defineProperty(_assertThisInitialized(
|
|
814
|
+
_defineProperty(_assertThisInitialized(_this6), "currency", void 0);
|
|
729
815
|
|
|
730
|
-
return
|
|
816
|
+
return _this6;
|
|
731
817
|
}
|
|
732
818
|
|
|
733
819
|
return _createClass(ShopConfig);
|
|
@@ -990,7 +1076,9 @@
|
|
|
990
1076
|
user: new BackofficeUser(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
991
1077
|
tenant: new BackofficeTenant(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
992
1078
|
layout: new BackofficeLayout(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
993
|
-
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
1079
|
+
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1080
|
+
customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1081
|
+
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
994
1082
|
});
|
|
995
1083
|
|
|
996
1084
|
return _this5;
|
|
@@ -1019,6 +1107,7 @@
|
|
|
1019
1107
|
hash: '',
|
|
1020
1108
|
query: {}
|
|
1021
1109
|
},
|
|
1110
|
+
authorization: new ShopAuthorization(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1022
1111
|
cart: new ShopCart(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1023
1112
|
catalog: new ShopCatalog(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1024
1113
|
account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|