@elasticpath/js-sdk 8.1.0 → 8.2.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/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 = "8.1.0";
533
+ var version = "8.2.0";
534
534
 
535
535
  var LocalStorageFactory = /*#__PURE__*/function () {
536
536
  function LocalStorageFactory() {
@@ -1810,9 +1810,26 @@ var PCMCustomRelationshipEndpoint = /*#__PURE__*/function () {
1810
1810
  this.endpoint = 'custom-relationships';
1811
1811
  }
1812
1812
  _createClass(PCMCustomRelationshipEndpoint, [{
1813
+ key: "Limit",
1814
+ value: function Limit(value) {
1815
+ this.limit = value;
1816
+ return this;
1817
+ }
1818
+ }, {
1819
+ key: "Offset",
1820
+ value: function Offset(value) {
1821
+ this.offset = value;
1822
+ return this;
1823
+ }
1824
+ }, {
1813
1825
  key: "All",
1814
1826
  value: function All(productId) {
1815
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint), 'GET');
1827
+ var limit = this.limit,
1828
+ offset = this.offset;
1829
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint), {
1830
+ limit: limit,
1831
+ offset: offset
1832
+ }), 'GET');
1816
1833
  }
1817
1834
  }, {
1818
1835
  key: "AttachCustomRelationship",
@@ -1837,12 +1854,22 @@ var PCMCustomRelationshipEndpoint = /*#__PURE__*/function () {
1837
1854
  }, {
1838
1855
  key: "GetProductsForCustomRelationship",
1839
1856
  value: function GetProductsForCustomRelationship(productId, customRelationshipSlug) {
1840
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug, "/products"), 'GET');
1857
+ var limit = this.limit,
1858
+ offset = this.offset;
1859
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug, "/products"), {
1860
+ limit: limit,
1861
+ offset: offset
1862
+ }), 'GET');
1841
1863
  }
1842
1864
  }, {
1843
1865
  key: "GetProductIdsForCustomRelationship",
1844
1866
  value: function GetProductIdsForCustomRelationship(productId, customRelationshipSlug) {
1845
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug), 'GET');
1867
+ var limit = this.limit,
1868
+ offset = this.offset;
1869
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug), {
1870
+ limit: limit,
1871
+ offset: offset
1872
+ }), 'GET');
1846
1873
  }
1847
1874
  }]);
1848
1875
  return PCMCustomRelationshipEndpoint;
package/dist/index.d.ts CHANGED
@@ -821,6 +821,10 @@ interface PcmCustomRelationshipEndpoint {
821
821
  */
822
822
  All(productId: string): Promise<CustomRelationshipsListResponse>
823
823
 
824
+ Limit(value: number): PcmCustomRelationshipEndpoint
825
+
826
+ Offset(value: number): PcmCustomRelationshipEndpoint
827
+
824
828
  /**
825
829
  * Attach a custom relationship to a product
826
830
  * @param productId
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 = "8.1.0";
522
+ var version = "8.2.0";
523
523
 
524
524
  var LocalStorageFactory = /*#__PURE__*/function () {
525
525
  function LocalStorageFactory() {
@@ -1799,9 +1799,26 @@ var PCMCustomRelationshipEndpoint = /*#__PURE__*/function () {
1799
1799
  this.endpoint = 'custom-relationships';
1800
1800
  }
1801
1801
  _createClass(PCMCustomRelationshipEndpoint, [{
1802
+ key: "Limit",
1803
+ value: function Limit(value) {
1804
+ this.limit = value;
1805
+ return this;
1806
+ }
1807
+ }, {
1808
+ key: "Offset",
1809
+ value: function Offset(value) {
1810
+ this.offset = value;
1811
+ return this;
1812
+ }
1813
+ }, {
1802
1814
  key: "All",
1803
1815
  value: function All(productId) {
1804
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint), 'GET');
1816
+ var limit = this.limit,
1817
+ offset = this.offset;
1818
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint), {
1819
+ limit: limit,
1820
+ offset: offset
1821
+ }), 'GET');
1805
1822
  }
1806
1823
  }, {
1807
1824
  key: "AttachCustomRelationship",
@@ -1826,12 +1843,22 @@ var PCMCustomRelationshipEndpoint = /*#__PURE__*/function () {
1826
1843
  }, {
1827
1844
  key: "GetProductsForCustomRelationship",
1828
1845
  value: function GetProductsForCustomRelationship(productId, customRelationshipSlug) {
1829
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug, "/products"), 'GET');
1846
+ var limit = this.limit,
1847
+ offset = this.offset;
1848
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug, "/products"), {
1849
+ limit: limit,
1850
+ offset: offset
1851
+ }), 'GET');
1830
1852
  }
1831
1853
  }, {
1832
1854
  key: "GetProductIdsForCustomRelationship",
1833
1855
  value: function GetProductIdsForCustomRelationship(productId, customRelationshipSlug) {
1834
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug), 'GET');
1856
+ var limit = this.limit,
1857
+ offset = this.offset;
1858
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug), {
1859
+ limit: limit,
1860
+ offset: offset
1861
+ }), 'GET');
1835
1862
  }
1836
1863
  }]);
1837
1864
  return PCMCustomRelationshipEndpoint;
package/dist/index.js CHANGED
@@ -1085,7 +1085,7 @@
1085
1085
  globalThis.Response = browserPonyfill.exports.Response;
1086
1086
  }
1087
1087
 
1088
- var version = "8.1.0";
1088
+ var version = "8.2.0";
1089
1089
 
1090
1090
  var LocalStorageFactory = /*#__PURE__*/function () {
1091
1091
  function LocalStorageFactory() {
@@ -2967,9 +2967,26 @@
2967
2967
  this.endpoint = 'custom-relationships';
2968
2968
  }
2969
2969
  _createClass(PCMCustomRelationshipEndpoint, [{
2970
+ key: "Limit",
2971
+ value: function Limit(value) {
2972
+ this.limit = value;
2973
+ return this;
2974
+ }
2975
+ }, {
2976
+ key: "Offset",
2977
+ value: function Offset(value) {
2978
+ this.offset = value;
2979
+ return this;
2980
+ }
2981
+ }, {
2970
2982
  key: "All",
2971
2983
  value: function All(productId) {
2972
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint), 'GET');
2984
+ var limit = this.limit,
2985
+ offset = this.offset;
2986
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint), {
2987
+ limit: limit,
2988
+ offset: offset
2989
+ }), 'GET');
2973
2990
  }
2974
2991
  }, {
2975
2992
  key: "AttachCustomRelationship",
@@ -2994,12 +3011,22 @@
2994
3011
  }, {
2995
3012
  key: "GetProductsForCustomRelationship",
2996
3013
  value: function GetProductsForCustomRelationship(productId, customRelationshipSlug) {
2997
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug, "/products"), 'GET');
3014
+ var limit = this.limit,
3015
+ offset = this.offset;
3016
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug, "/products"), {
3017
+ limit: limit,
3018
+ offset: offset
3019
+ }), 'GET');
2998
3020
  }
2999
3021
  }, {
3000
3022
  key: "GetProductIdsForCustomRelationship",
3001
3023
  value: function GetProductIdsForCustomRelationship(productId, customRelationshipSlug) {
3002
- return this.request.send("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug), 'GET');
3024
+ var limit = this.limit,
3025
+ offset = this.offset;
3026
+ return this.request.send(buildURL("products/".concat(productId, "/").concat(this.endpoint, "/").concat(customRelationshipSlug), {
3027
+ limit: limit,
3028
+ offset: offset
3029
+ }), 'GET');
3003
3030
  }
3004
3031
  }]);
3005
3032
  return PCMCustomRelationshipEndpoint;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elasticpath/js-sdk",
3
3
  "description": "SDK for the Elastic Path eCommerce API",
4
- "version": "8.1.0",
4
+ "version": "8.2.0",
5
5
  "homepage": "https://github.com/elasticpath/js-sdk",
6
6
  "author": "Elastic Path (https://elasticpath.com/)",
7
7
  "files": [