@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
|
@@ -463,6 +463,62 @@ var BackofficeAuthorization = /*#__PURE__*/function (_BaseCallClass6) {
|
|
|
463
463
|
|
|
464
464
|
return BackofficeAuthorization;
|
|
465
465
|
}(BaseCallClass);
|
|
466
|
+
var BackofficeCustomer = /*#__PURE__*/function (_BaseCallClass7) {
|
|
467
|
+
_inherits(BackofficeCustomer, _BaseCallClass7);
|
|
468
|
+
|
|
469
|
+
var _super7 = _createSuper(BackofficeCustomer);
|
|
470
|
+
|
|
471
|
+
function BackofficeCustomer() {
|
|
472
|
+
var _this7;
|
|
473
|
+
|
|
474
|
+
_classCallCheck(this, BackofficeCustomer);
|
|
475
|
+
|
|
476
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
477
|
+
args[_key7] = arguments[_key7];
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
_this7 = _super7.call.apply(_super7, [this].concat(args));
|
|
481
|
+
|
|
482
|
+
_defineProperty(_assertThisInitialized(_this7), "serviceName", 'customer');
|
|
483
|
+
|
|
484
|
+
_defineProperty(_assertThisInitialized(_this7), "id", void 0);
|
|
485
|
+
|
|
486
|
+
_defineProperty(_assertThisInitialized(_this7), "name", void 0);
|
|
487
|
+
|
|
488
|
+
return _this7;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
return _createClass(BackofficeCustomer);
|
|
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);
|
|
466
522
|
|
|
467
523
|
var Events = /*#__PURE__*/function () {
|
|
468
524
|
function Events() {
|
|
@@ -624,41 +680,71 @@ var ShopCart = /*#__PURE__*/function (_BaseCallClass3) {
|
|
|
624
680
|
|
|
625
681
|
return ShopCart;
|
|
626
682
|
}(BaseCallClass);
|
|
627
|
-
var
|
|
628
|
-
_inherits(
|
|
683
|
+
var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass4) {
|
|
684
|
+
_inherits(ShopAuthorization, _BaseCallClass4);
|
|
629
685
|
|
|
630
|
-
var _super4 = _createSuper(
|
|
686
|
+
var _super4 = _createSuper(ShopAuthorization);
|
|
631
687
|
|
|
632
|
-
function
|
|
688
|
+
function ShopAuthorization() {
|
|
633
689
|
var _this4;
|
|
634
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
|
+
|
|
635
721
|
_classCallCheck(this, ShopUtils);
|
|
636
722
|
|
|
637
|
-
|
|
723
|
+
_this5 = _super5.call(this, call);
|
|
638
724
|
|
|
639
|
-
_defineProperty(_assertThisInitialized(
|
|
725
|
+
_defineProperty(_assertThisInitialized(_this5), "serviceName", 'utils');
|
|
640
726
|
|
|
641
|
-
_defineProperty(_assertThisInitialized(
|
|
727
|
+
_defineProperty(_assertThisInitialized(_this5), "currency", void 0);
|
|
642
728
|
|
|
643
|
-
_defineProperty(_assertThisInitialized(
|
|
729
|
+
_defineProperty(_assertThisInitialized(_this5), "isAnonymousAndPurchaseDisabled", void 0);
|
|
644
730
|
|
|
645
|
-
_defineProperty(_assertThisInitialized(
|
|
731
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2B", void 0);
|
|
646
732
|
|
|
647
|
-
_defineProperty(_assertThisInitialized(
|
|
733
|
+
_defineProperty(_assertThisInitialized(_this5), "isB2BAndPlatformIsNotOpened", void 0);
|
|
648
734
|
|
|
649
|
-
_defineProperty(_assertThisInitialized(
|
|
735
|
+
_defineProperty(_assertThisInitialized(_this5), "isIndexPage", void 0);
|
|
650
736
|
|
|
651
|
-
_defineProperty(_assertThisInitialized(
|
|
737
|
+
_defineProperty(_assertThisInitialized(_this5), "isPurchaseEnabledOrAuthenticated", void 0);
|
|
652
738
|
|
|
653
|
-
_defineProperty(_assertThisInitialized(
|
|
739
|
+
_defineProperty(_assertThisInitialized(_this5), "routes", void 0);
|
|
654
740
|
|
|
655
|
-
|
|
656
|
-
getCategoryPath:
|
|
657
|
-
getManufacturerSearchUrl:
|
|
658
|
-
getProductUrl:
|
|
659
|
-
isExternalUrl:
|
|
741
|
+
_this5.routes = {
|
|
742
|
+
getCategoryPath: _this5.getCategoryPath,
|
|
743
|
+
getManufacturerSearchUrl: _this5.getManufacturerSearchUrl,
|
|
744
|
+
getProductUrl: _this5.getProductUrl,
|
|
745
|
+
isExternalUrl: _this5.isExternalUrl
|
|
660
746
|
};
|
|
661
|
-
return
|
|
747
|
+
return _this5;
|
|
662
748
|
}
|
|
663
749
|
|
|
664
750
|
_createClass(ShopUtils, [{
|
|
@@ -685,43 +771,43 @@ var ShopUtils = /*#__PURE__*/function (_BaseCallClass4) {
|
|
|
685
771
|
|
|
686
772
|
return ShopUtils;
|
|
687
773
|
}(BaseCallClass);
|
|
688
|
-
var ShopConfig = /*#__PURE__*/function (
|
|
689
|
-
_inherits(ShopConfig,
|
|
774
|
+
var ShopConfig = /*#__PURE__*/function (_BaseCallClass6) {
|
|
775
|
+
_inherits(ShopConfig, _BaseCallClass6);
|
|
690
776
|
|
|
691
|
-
var
|
|
777
|
+
var _super6 = _createSuper(ShopConfig);
|
|
692
778
|
|
|
693
779
|
function ShopConfig() {
|
|
694
|
-
var
|
|
780
|
+
var _this6;
|
|
695
781
|
|
|
696
782
|
_classCallCheck(this, ShopConfig);
|
|
697
783
|
|
|
698
|
-
for (var
|
|
699
|
-
args[
|
|
784
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
785
|
+
args[_key5] = arguments[_key5];
|
|
700
786
|
}
|
|
701
787
|
|
|
702
|
-
|
|
788
|
+
_this6 = _super6.call.apply(_super6, [this].concat(args));
|
|
703
789
|
|
|
704
|
-
_defineProperty(_assertThisInitialized(
|
|
790
|
+
_defineProperty(_assertThisInitialized(_this6), "serviceName", 'config');
|
|
705
791
|
|
|
706
|
-
_defineProperty(_assertThisInitialized(
|
|
792
|
+
_defineProperty(_assertThisInitialized(_this6), "accessMode", void 0);
|
|
707
793
|
|
|
708
|
-
_defineProperty(_assertThisInitialized(
|
|
794
|
+
_defineProperty(_assertThisInitialized(_this6), "isB2CRegistrationEnabled", void 0);
|
|
709
795
|
|
|
710
|
-
_defineProperty(_assertThisInitialized(
|
|
796
|
+
_defineProperty(_assertThisInitialized(_this6), "isCatalogOpened", void 0);
|
|
711
797
|
|
|
712
|
-
_defineProperty(_assertThisInitialized(
|
|
798
|
+
_defineProperty(_assertThisInitialized(_this6), "isGrossSelected", void 0);
|
|
713
799
|
|
|
714
|
-
_defineProperty(_assertThisInitialized(
|
|
800
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformClosed", void 0);
|
|
715
801
|
|
|
716
|
-
_defineProperty(_assertThisInitialized(
|
|
802
|
+
_defineProperty(_assertThisInitialized(_this6), "isPlatformOpened", void 0);
|
|
717
803
|
|
|
718
|
-
_defineProperty(_assertThisInitialized(
|
|
804
|
+
_defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabled", void 0);
|
|
719
805
|
|
|
720
|
-
_defineProperty(_assertThisInitialized(
|
|
806
|
+
_defineProperty(_assertThisInitialized(_this6), "isRegistrationEnabled", void 0);
|
|
721
807
|
|
|
722
|
-
_defineProperty(_assertThisInitialized(
|
|
808
|
+
_defineProperty(_assertThisInitialized(_this6), "currency", void 0);
|
|
723
809
|
|
|
724
|
-
return
|
|
810
|
+
return _this6;
|
|
725
811
|
}
|
|
726
812
|
|
|
727
813
|
return _createClass(ShopConfig);
|
|
@@ -984,7 +1070,9 @@ var BackofficeSdk = /*#__PURE__*/function (_Sdk) {
|
|
|
984
1070
|
user: new BackofficeUser(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
985
1071
|
tenant: new BackofficeTenant(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
986
1072
|
layout: new BackofficeLayout(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
987
|
-
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
1073
|
+
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1074
|
+
customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1075
|
+
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
988
1076
|
});
|
|
989
1077
|
|
|
990
1078
|
return _this5;
|
|
@@ -1013,6 +1101,7 @@ var ShopSdk = /*#__PURE__*/function (_Sdk2) {
|
|
|
1013
1101
|
hash: '',
|
|
1014
1102
|
query: {}
|
|
1015
1103
|
},
|
|
1104
|
+
authorization: new ShopAuthorization(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1016
1105
|
cart: new ShopCart(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1017
1106
|
catalog: new ShopCatalog(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1018
1107
|
account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|