@elasticpath/js-sdk 15.0.0 → 15.1.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/dist/index.cjs.js +28 -10
- package/dist/index.d.ts +7 -0
- package/dist/index.esm.js +28 -10
- package/dist/index.js +28 -10
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -530,7 +530,7 @@ if (!globalThis.fetch) {
|
|
|
530
530
|
globalThis.Response = fetch$1.Response;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
var version = "15.
|
|
533
|
+
var version = "15.1.1";
|
|
534
534
|
|
|
535
535
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
536
536
|
function LocalStorageFactory() {
|
|
@@ -4696,10 +4696,8 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4696
4696
|
function MultiLocationInventories(endpoint) {
|
|
4697
4697
|
_classCallCheck(this, MultiLocationInventories);
|
|
4698
4698
|
var config = _objectSpread2({}, endpoint);
|
|
4699
|
-
config.headers =
|
|
4700
|
-
|
|
4701
|
-
});
|
|
4702
|
-
this.request = new RequestFactory(endpoint);
|
|
4699
|
+
config.headers['ep-inventories-multi-location'] = true;
|
|
4700
|
+
this.request = new RequestFactory(config);
|
|
4703
4701
|
this.Locations = new InventoryLocationsEndpoint(config);
|
|
4704
4702
|
this.endpoint = 'inventories';
|
|
4705
4703
|
}
|
|
@@ -5444,6 +5442,26 @@ var Products = /*#__PURE__*/function (_ShopperCatalogProduc) {
|
|
|
5444
5442
|
includes: includes
|
|
5445
5443
|
}), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
5446
5444
|
}
|
|
5445
|
+
}, {
|
|
5446
|
+
key: "GetRelatedProducts",
|
|
5447
|
+
value: function GetRelatedProducts(_ref15) {
|
|
5448
|
+
var productId = _ref15.productId,
|
|
5449
|
+
customRelationshipSlug = _ref15.customRelationshipSlug,
|
|
5450
|
+
_ref15$token = _ref15.token,
|
|
5451
|
+
token = _ref15$token === void 0 ? null : _ref15$token,
|
|
5452
|
+
_ref15$additionalHead = _ref15.additionalHeaders,
|
|
5453
|
+
additionalHeaders = _ref15$additionalHead === void 0 ? null : _ref15$additionalHead;
|
|
5454
|
+
var limit = this.limit,
|
|
5455
|
+
offset = this.offset,
|
|
5456
|
+
filter = this.filter,
|
|
5457
|
+
includes = this.includes;
|
|
5458
|
+
return this.request.send(buildURL("catalog/".concat(this.endpoint, "/").concat(productId, "/relationships/").concat(customRelationshipSlug, "/products"), {
|
|
5459
|
+
limit: limit,
|
|
5460
|
+
offset: offset,
|
|
5461
|
+
filter: filter,
|
|
5462
|
+
includes: includes
|
|
5463
|
+
}), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
5464
|
+
}
|
|
5447
5465
|
}]);
|
|
5448
5466
|
return Products;
|
|
5449
5467
|
}(ShopperCatalogProductsQuery);
|
|
@@ -5468,11 +5486,11 @@ var ShopperCatalogEndpoint = /*#__PURE__*/function (_ShopperCatalogQuery4) {
|
|
|
5468
5486
|
_createClass(ShopperCatalogEndpoint, [{
|
|
5469
5487
|
key: "Get",
|
|
5470
5488
|
value: function Get() {
|
|
5471
|
-
var
|
|
5472
|
-
|
|
5473
|
-
token =
|
|
5474
|
-
|
|
5475
|
-
additionalHeaders =
|
|
5489
|
+
var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
5490
|
+
_ref16$token = _ref16.token,
|
|
5491
|
+
token = _ref16$token === void 0 ? null : _ref16$token,
|
|
5492
|
+
_ref16$additionalHead = _ref16.additionalHeaders,
|
|
5493
|
+
additionalHeaders = _ref16$additionalHead === void 0 ? null : _ref16$additionalHead;
|
|
5476
5494
|
this.call = this.request.send("".concat(this.endpoint), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
5477
5495
|
return this.call;
|
|
5478
5496
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5637,6 +5637,13 @@ interface ShopperCatalogProductsEndpoint
|
|
|
5637
5637
|
token?: string
|
|
5638
5638
|
additionalHeaders?: ShopperCatalogAdditionalHeaders
|
|
5639
5639
|
}): Promise<ShopperCatalogResourcePage<ProductResponse>>
|
|
5640
|
+
|
|
5641
|
+
GetRelatedProducts(options: {
|
|
5642
|
+
productId: string
|
|
5643
|
+
customRelationshipSlug: string
|
|
5644
|
+
token?: string
|
|
5645
|
+
additionalHeaders?: ShopperCatalogAdditionalHeaders
|
|
5646
|
+
}): Promise<ShopperCatalogResourcePage<ProductResponse>>
|
|
5640
5647
|
}
|
|
5641
5648
|
|
|
5642
5649
|
interface NodesShopperCatalogEndpoint
|
package/dist/index.esm.js
CHANGED
|
@@ -519,7 +519,7 @@ if (!globalThis.fetch) {
|
|
|
519
519
|
globalThis.Response = Response;
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
var version = "15.
|
|
522
|
+
var version = "15.1.1";
|
|
523
523
|
|
|
524
524
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
525
525
|
function LocalStorageFactory() {
|
|
@@ -4685,10 +4685,8 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4685
4685
|
function MultiLocationInventories(endpoint) {
|
|
4686
4686
|
_classCallCheck(this, MultiLocationInventories);
|
|
4687
4687
|
var config = _objectSpread2({}, endpoint);
|
|
4688
|
-
config.headers =
|
|
4689
|
-
|
|
4690
|
-
});
|
|
4691
|
-
this.request = new RequestFactory(endpoint);
|
|
4688
|
+
config.headers['ep-inventories-multi-location'] = true;
|
|
4689
|
+
this.request = new RequestFactory(config);
|
|
4692
4690
|
this.Locations = new InventoryLocationsEndpoint(config);
|
|
4693
4691
|
this.endpoint = 'inventories';
|
|
4694
4692
|
}
|
|
@@ -5433,6 +5431,26 @@ var Products = /*#__PURE__*/function (_ShopperCatalogProduc) {
|
|
|
5433
5431
|
includes: includes
|
|
5434
5432
|
}), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
5435
5433
|
}
|
|
5434
|
+
}, {
|
|
5435
|
+
key: "GetRelatedProducts",
|
|
5436
|
+
value: function GetRelatedProducts(_ref15) {
|
|
5437
|
+
var productId = _ref15.productId,
|
|
5438
|
+
customRelationshipSlug = _ref15.customRelationshipSlug,
|
|
5439
|
+
_ref15$token = _ref15.token,
|
|
5440
|
+
token = _ref15$token === void 0 ? null : _ref15$token,
|
|
5441
|
+
_ref15$additionalHead = _ref15.additionalHeaders,
|
|
5442
|
+
additionalHeaders = _ref15$additionalHead === void 0 ? null : _ref15$additionalHead;
|
|
5443
|
+
var limit = this.limit,
|
|
5444
|
+
offset = this.offset,
|
|
5445
|
+
filter = this.filter,
|
|
5446
|
+
includes = this.includes;
|
|
5447
|
+
return this.request.send(buildURL("catalog/".concat(this.endpoint, "/").concat(productId, "/relationships/").concat(customRelationshipSlug, "/products"), {
|
|
5448
|
+
limit: limit,
|
|
5449
|
+
offset: offset,
|
|
5450
|
+
filter: filter,
|
|
5451
|
+
includes: includes
|
|
5452
|
+
}), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
5453
|
+
}
|
|
5436
5454
|
}]);
|
|
5437
5455
|
return Products;
|
|
5438
5456
|
}(ShopperCatalogProductsQuery);
|
|
@@ -5457,11 +5475,11 @@ var ShopperCatalogEndpoint = /*#__PURE__*/function (_ShopperCatalogQuery4) {
|
|
|
5457
5475
|
_createClass(ShopperCatalogEndpoint, [{
|
|
5458
5476
|
key: "Get",
|
|
5459
5477
|
value: function Get() {
|
|
5460
|
-
var
|
|
5461
|
-
|
|
5462
|
-
token =
|
|
5463
|
-
|
|
5464
|
-
additionalHeaders =
|
|
5478
|
+
var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
5479
|
+
_ref16$token = _ref16.token,
|
|
5480
|
+
token = _ref16$token === void 0 ? null : _ref16$token,
|
|
5481
|
+
_ref16$additionalHead = _ref16.additionalHeaders,
|
|
5482
|
+
additionalHeaders = _ref16$additionalHead === void 0 ? null : _ref16$additionalHead;
|
|
5465
5483
|
this.call = this.request.send("".concat(this.endpoint), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
5466
5484
|
return this.call;
|
|
5467
5485
|
}
|
package/dist/index.js
CHANGED
|
@@ -1085,7 +1085,7 @@
|
|
|
1085
1085
|
globalThis.Response = browserPonyfill.exports.Response;
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
|
-
var version = "15.
|
|
1088
|
+
var version = "15.1.1";
|
|
1089
1089
|
|
|
1090
1090
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
1091
1091
|
function LocalStorageFactory() {
|
|
@@ -5857,10 +5857,8 @@
|
|
|
5857
5857
|
function MultiLocationInventories(endpoint) {
|
|
5858
5858
|
_classCallCheck(this, MultiLocationInventories);
|
|
5859
5859
|
var config = _objectSpread2({}, endpoint);
|
|
5860
|
-
config.headers =
|
|
5861
|
-
|
|
5862
|
-
});
|
|
5863
|
-
this.request = new RequestFactory(endpoint);
|
|
5860
|
+
config.headers['ep-inventories-multi-location'] = true;
|
|
5861
|
+
this.request = new RequestFactory(config);
|
|
5864
5862
|
this.Locations = new InventoryLocationsEndpoint(config);
|
|
5865
5863
|
this.endpoint = 'inventories';
|
|
5866
5864
|
}
|
|
@@ -6605,6 +6603,26 @@
|
|
|
6605
6603
|
includes: includes
|
|
6606
6604
|
}), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
6607
6605
|
}
|
|
6606
|
+
}, {
|
|
6607
|
+
key: "GetRelatedProducts",
|
|
6608
|
+
value: function GetRelatedProducts(_ref15) {
|
|
6609
|
+
var productId = _ref15.productId,
|
|
6610
|
+
customRelationshipSlug = _ref15.customRelationshipSlug,
|
|
6611
|
+
_ref15$token = _ref15.token,
|
|
6612
|
+
token = _ref15$token === void 0 ? null : _ref15$token,
|
|
6613
|
+
_ref15$additionalHead = _ref15.additionalHeaders,
|
|
6614
|
+
additionalHeaders = _ref15$additionalHead === void 0 ? null : _ref15$additionalHead;
|
|
6615
|
+
var limit = this.limit,
|
|
6616
|
+
offset = this.offset,
|
|
6617
|
+
filter = this.filter,
|
|
6618
|
+
includes = this.includes;
|
|
6619
|
+
return this.request.send(buildURL("catalog/".concat(this.endpoint, "/").concat(productId, "/relationships/").concat(customRelationshipSlug, "/products"), {
|
|
6620
|
+
limit: limit,
|
|
6621
|
+
offset: offset,
|
|
6622
|
+
filter: filter,
|
|
6623
|
+
includes: includes
|
|
6624
|
+
}), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
6625
|
+
}
|
|
6608
6626
|
}]);
|
|
6609
6627
|
return Products;
|
|
6610
6628
|
}(ShopperCatalogProductsQuery);
|
|
@@ -6629,11 +6647,11 @@
|
|
|
6629
6647
|
_createClass(ShopperCatalogEndpoint, [{
|
|
6630
6648
|
key: "Get",
|
|
6631
6649
|
value: function Get() {
|
|
6632
|
-
var
|
|
6633
|
-
|
|
6634
|
-
token =
|
|
6635
|
-
|
|
6636
|
-
additionalHeaders =
|
|
6650
|
+
var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
6651
|
+
_ref16$token = _ref16.token,
|
|
6652
|
+
token = _ref16$token === void 0 ? null : _ref16$token,
|
|
6653
|
+
_ref16$additionalHead = _ref16.additionalHeaders,
|
|
6654
|
+
additionalHeaders = _ref16$additionalHead === void 0 ? null : _ref16$additionalHead;
|
|
6637
6655
|
this.call = this.request.send("".concat(this.endpoint), 'GET', undefined, token, undefined, false, undefined, additionalHeaders);
|
|
6638
6656
|
return this.call;
|
|
6639
6657
|
}
|
package/package.json
CHANGED