@nuskin/ns-product-lib 2.19.8 → 2.19.9-td-924.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.19.8",
3
+ "version": "2.19.9-td-924.1.1",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -20,10 +20,10 @@
20
20
  "homepage": "https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/blob/master/README.md",
21
21
  "devDependencies": {
22
22
  "@nuskin/configuration-sdk": "3.0.0",
23
- "@nuskin/ns-common-lib": "1.4.7",
24
- "@nuskin/ns-util": "4.5.4",
25
- "@nuskin/product-lib": "2.2.1",
26
- "axios": "1.6.7",
23
+ "@nuskin/ns-common-lib": "1.4.8",
24
+ "@nuskin/ns-util": "4.7.2",
25
+ "@nuskin/product-lib": "2.3.2-td-924.1.1",
26
+ "axios": "1.8.3",
27
27
  "axios-mock-adapter": "1.21.2",
28
28
  "eslint": "^8.56.0",
29
29
  "eslint-config-google": "^0.14.0",
@@ -39,7 +39,7 @@
39
39
  "@nuskin/configuration-sdk": "3.x",
40
40
  "@nuskin/ns-common-lib": "1.x",
41
41
  "@nuskin/ns-util": "4.x",
42
- "axios": "1.6.7"
42
+ "axios": "1.8.3"
43
43
  },
44
44
  "dependencies": {
45
45
  "qs": "6.11.0"
package/src/product.js CHANGED
@@ -321,7 +321,7 @@ const Product = function (productData) {
321
321
  this.globalProductID = productStatus.globalProductID;
322
322
  this.status = productStatus.status;
323
323
  this.availableQuantity = productStatus.availableQuantity;
324
- this.maxQuantity = productStatus.maxQuantity || 999;
324
+ this.maxQuantity = typeof(productStatus.maxQuantity) === 'number' ? productStatus.maxQuantity : 999;
325
325
  this.locallyProduced = productStatus.locallyProduced || false;
326
326
  if (productStatus.backordered) {
327
327
  this.backOrderDate = productStatus.backorderedAvailableDate;
@@ -74,7 +74,8 @@ const ProductData = {
74
74
 
75
75
  const filter = skuFilter.join(" OR ")
76
76
 
77
- const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
77
+ // const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
78
+ const url = `https://apis.test.nuskin.com/storefront/catalogs/search/`
78
79
  const href = `${url}?filter='\\\\''${encodeURI(filter)}'\\''`;
79
80
  axios.interceptors.response.use((res) => res, productNotFoundInterceptor);
80
81
  const response = await axios.request({