@nuskin/ns-product-lib 1.4.2-cx15-4839.1 → 1.4.3

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,24 @@
1
+ ## [1.4.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.4.2...v1.4.3) (2022-05-03)
2
+
3
+
4
+ ### Fix
5
+
6
+ * not_sold_seperately status appended to productStatus model (#CX12-3738) ([9a503a4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9a503a4f74a31e172a2f6f1a1bcd989c4045742b)), closes [#CX12-3738](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX12-3738)
7
+
8
+ ## [1.4.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.4.1...v1.4.2) (2022-04-07)
9
+
10
+
11
+ ### Fix
12
+
13
+ * added support for restrictedMarkets and addOns fields to product data response (#CX15-4839) ([f517624](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/f51762470ac4571fc9dbada887107fe685558d68)), closes [#CX15-4839](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX15-4839)
14
+
15
+ ## [1.4.2-cx15-4839.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.4.2-cx15-4839.1...v1.4.2-cx15-4839.2) (2022-04-07)
16
+
17
+
18
+ ### Fix
19
+
20
+ * made restrictedMarkets default to [] (#CX15-4839) ([110db9d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/110db9d30a38727ff42931b840c9325380638b4c)), closes [#CX15-4839](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX15-4839)
21
+
1
22
  ## [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
23
 
3
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "1.4.2-cx15-4839.1",
3
+ "version": "1.4.3",
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
@@ -16,6 +16,7 @@ const Product = function(productData) {
16
16
  this.childSkus = [];
17
17
  this.custTypes = [];
18
18
  this.addOns = [];
19
+ this.restrictedMarkets = [];
19
20
  this.productCarouselImages = [];
20
21
  this.locallyProduced = false;
21
22
 
@@ -623,6 +624,7 @@ const Product = function(productData) {
623
624
  this.searchScore = productData.searchScore ? productData.searchScore : 0;
624
625
  this.marketAttributes = productData.marketAttributes;
625
626
  this.addOns = productData.addOns || [];
627
+ this.restrictedMarkets = productData.restrictedMarkets || [];
626
628
 
627
629
  if (data.priceType) {
628
630
  this.addPricing(data.priceType, data.price);
@@ -6,14 +6,17 @@ const ProductStatus = {
6
6
  ReleasedForSale: "RELEASED_FOR_SALE",
7
7
  NotFound: "NOT_FOUND",
8
8
  StopStatus: "STOP_STATUS",
9
+ // note - we're keeping the incorrect spelling of 'seperately' instead 'separately'
10
+ NotSoldSeperately: "NOT_SOLD_SEPERATELY",
9
11
 
10
- //properties allows you do do something like ProductStatus.properties['DISCONTINUED'].code to get the status code
12
+ // properties allows you do do something like ProductStatus.properties['DISCONTINUED'].code to get the status code
11
13
  properties: {
12
14
  DISCONTINUED: { stringKey: "discontinued", code: 2 },
13
15
  NOT_RELEASED_FOR_SALE: { stringKey: "notReleasedForSale", code: 9 },
14
16
  RELEASED_FOR_SALE: { stringKey: "", code: 10 },
15
17
  STOP_STATUS: { stringKey: "stopStatus", code: 5 },
16
- NOT_FOUND: { stringKey: "", code: 0 }
18
+ NOT_FOUND: { stringKey: "", code: 0 },
19
+ NOT_SOLD_SEPERATELY: {stringKey: "notSoldSeperately", code: 4 }
17
20
  }
18
21
  };
19
22