@nuskin/ns-product-lib 1.4.1 → 1.4.2-cx15-4839.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.4.2-cx15-4839.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.4.1...v1.4.2-cx15-4839.1) (2022-04-07)
2
+
3
+
4
+ ### Fix
5
+
6
+ * added support for restrictedMarkets and addOns fields to product data response (#CX15-4839) ([43c0346](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/43c03462950d655aa1dab096143b2e1d909bc6f6)), closes [#CX15-4839](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX15-4839)
7
+
1
8
  ## [1.4.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.4.0...v1.4.1) (2022-03-31)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "1.4.1",
3
+ "version": "1.4.2-cx15-4839.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": {
package/src/product.js CHANGED
@@ -514,6 +514,8 @@ const Product = function(productData) {
514
514
  retData.searchScore = this.searchScore;
515
515
  retData.isExclusive = this.isExclusive;
516
516
  retData.marketAttributes = this.marketAttributes;
517
+ retData.restrictedMarkets = this.restrictedMarkets;
518
+ retData.addOns = this.addOns;
517
519
 
518
520
  return retData;
519
521
  };
@@ -51,6 +51,10 @@ const ProductContentMapper = {
51
51
  if (restrictedMarkets) {
52
52
  product.restrictedMarkets = restrictedMarkets;
53
53
  }
54
+
55
+ if (marketData.addOns) {
56
+ product.addOns = marketData.addOns;
57
+ }
54
58
  }
55
59
 
56
60
  // set product values