@nuskin/ns-product-lib 2.5.0-cx24-2685.3 → 2.5.0-cx24-2931.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -14
- package/package.json +2 -1
- package/src/product.js +0 -4
- package/src/productData.js +15 -8
package/CHANGELOG.md
CHANGED
@@ -1,24 +1,21 @@
|
|
1
|
-
# [2.5.0-cx24-
|
1
|
+
# [2.5.0-cx24-2931.1.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.1...v2.5.0-cx24-2931.1.2) (2022-12-14)
|
2
2
|
|
3
3
|
|
4
|
-
###
|
5
|
-
|
6
|
-
* Added equinoxProductId for eqproductMapper and eqProductVariantMapper ([ec9db8d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/ec9db8d922f844b89457d680f170bf07a19a41e2))
|
7
|
-
|
8
|
-
# [2.5.0-cx24-2685.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2685.1...v2.5.0-cx24-2685.2) (2022-12-09)
|
9
|
-
|
10
|
-
|
11
|
-
### New
|
4
|
+
### Update
|
12
5
|
|
13
|
-
*
|
6
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([73acfe8](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/73acfe8c8aac29e11367f329889956b857460d72))
|
7
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([65c81f5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/65c81f5486712690f9cda8faf4e2264238009e82))
|
14
8
|
|
15
|
-
# [2.5.0-cx24-
|
9
|
+
# [2.5.0-cx24-2931.1.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-CX24.3.1...v2.5.0-cx24-2931.1.1) (2022-12-13)
|
16
10
|
|
17
11
|
|
18
|
-
###
|
12
|
+
### Update
|
19
13
|
|
20
|
-
*
|
21
|
-
*
|
14
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([e8931ac](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/e8931aca51591c59b401c4c386f23c8f7d4c5a90))
|
15
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([4a1949a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/4a1949a20213478994ff51e4b035f52271b7a840))
|
16
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([9a0c9cb](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9a0c9cb75a39cd1b77bd6272ac573d4f9b628975))
|
17
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([622c608](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/622c60867b07f0fccd316423cba1500a8470e9e2))
|
18
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([c276e62](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/c276e6223953cf72b791887274a5f11d218696e0))
|
22
19
|
|
23
20
|
# [2.5.0-CX24.3.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.4.2-CX24.2.1...v2.5.0-CX24.3.1) (2022-12-06)
|
24
21
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nuskin/ns-product-lib",
|
3
|
-
"version": "2.5.0-cx24-
|
3
|
+
"version": "2.5.0-cx24-2931.1.2",
|
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": {
|
@@ -31,6 +31,7 @@
|
|
31
31
|
"prettier": "1.19.1"
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
|
+
"@nuskin/configuration-sdk": "1.0.1",
|
34
35
|
"@nuskin/ns-common-lib": "1.4.5",
|
35
36
|
"@nuskin/ns-util": "3.107.0",
|
36
37
|
"axios": "0.27.2",
|
package/src/product.js
CHANGED
@@ -75,7 +75,6 @@ const Product = function(productData) {
|
|
75
75
|
//equinox inventory / stock label
|
76
76
|
//@example "IN STOCK"
|
77
77
|
this.inventory = "";
|
78
|
-
this.equinoxProductId = "";
|
79
78
|
|
80
79
|
this.setMarketAttributes = function(productStatus) {
|
81
80
|
if (productStatus.marketAttributes) {
|
@@ -533,7 +532,6 @@ const Product = function(productData) {
|
|
533
532
|
retData.restrictedMarkets = this.restrictedMarkets;
|
534
533
|
retData.addOns = this.addOns;
|
535
534
|
retData.inventory = this.inventory;
|
536
|
-
retData.equinoxProductId = this.equinoxProductId;
|
537
535
|
|
538
536
|
return retData;
|
539
537
|
};
|
@@ -673,8 +671,6 @@ const Product = function(productData) {
|
|
673
671
|
if (data.agelocme) {
|
674
672
|
this.agelocme = new Agelocme(data.agelocme);
|
675
673
|
}
|
676
|
-
|
677
|
-
this.equinoxProductId = data.equinoxProductId;
|
678
674
|
}
|
679
675
|
};
|
680
676
|
|
package/src/productData.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
"use strict";
|
2
|
+
const { getConfiguration } = require('@nuskin/configuration-sdk');
|
3
|
+
// import { ConfigService } from '@nuskin/ns-util';
|
2
4
|
const axios = require("axios");
|
3
5
|
const contentstack = require('./contentstack/contentstack');
|
4
6
|
const Product = require("./product");
|
@@ -15,10 +17,16 @@ const ProductData = {
|
|
15
17
|
const localeMarket = `${locale}_${market}`;
|
16
18
|
|
17
19
|
if (isEquinoxEnabled) {
|
18
|
-
const
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
const config = getConfiguration({
|
21
|
+
configMapNames: ['Equinox_Markets'],
|
22
|
+
country: market,
|
23
|
+
environment: 'test',
|
24
|
+
clientId: '735b1eb810304bba966af0891ab54053'
|
25
|
+
});
|
26
|
+
console.log(config);
|
27
|
+
|
28
|
+
if (config !== null) {
|
29
|
+
// return await this.getProductFromEquinox(skus, localeMarket, store_id);
|
22
30
|
}
|
23
31
|
}
|
24
32
|
|
@@ -198,8 +206,7 @@ const ProductData = {
|
|
198
206
|
"earn": true
|
199
207
|
},
|
200
208
|
"restrictedMarkets": [],
|
201
|
-
"addOns": []
|
202
|
-
"equinoxProductId": eqVariant.identifier
|
209
|
+
"addOns": []
|
203
210
|
};
|
204
211
|
},
|
205
212
|
|
@@ -357,8 +364,8 @@ const ProductData = {
|
|
357
364
|
},
|
358
365
|
"restrictedMarkets": [],
|
359
366
|
"addOns": [],
|
360
|
-
"inventory": data.sku[count].inventory || ""
|
361
|
-
|
367
|
+
"inventory": data.sku[count].inventory || "" //inventory label
|
368
|
+
|
362
369
|
};
|
363
370
|
let newProduct = new Product(prod);
|
364
371
|
return newProduct
|