@nuskin/ns-product-lib 2.14.0 → 2.14.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
package/src/graph-ql/product.js
CHANGED
|
@@ -12,8 +12,7 @@ const {
|
|
|
12
12
|
} = require('./mappers');
|
|
13
13
|
|
|
14
14
|
const defaultPayload = {
|
|
15
|
-
operationName: "getProduct"
|
|
16
|
-
useContentSource: "CS"
|
|
15
|
+
operationName: "getProduct"
|
|
17
16
|
};
|
|
18
17
|
|
|
19
18
|
/**
|
|
@@ -92,8 +91,8 @@ function mapPrices(product, isKitBundle = false) {
|
|
|
92
91
|
const originalWholeSalePrice = mapOriginalPrice(product, true, isKitBundle) || 0;
|
|
93
92
|
|
|
94
93
|
//map subscription (ADR) prices
|
|
95
|
-
const retailSubscriptionPrice =
|
|
96
|
-
const wholesaleSubscriptionPrice =
|
|
94
|
+
const retailSubscriptionPrice = mapRetailSubscriptionPrice(product) || 0;
|
|
95
|
+
const wholesaleSubscriptionPrice = mapWholesaleSubscriptionPrice(product) || 0;
|
|
97
96
|
|
|
98
97
|
return {
|
|
99
98
|
originalPrice,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line max-len
|
|
4
|
-
const getProductByIdQuery = `query getProduct($id: String!, $market: String, $language: String, $
|
|
4
|
+
const getProductByIdQuery = `query getProduct($id: String!, $market: String, $language: String, $okta: String, $quantity: Int) {
|
|
5
5
|
productById(
|
|
6
6
|
id: $id
|
|
7
7
|
market: $market
|
|
8
8
|
language: $language
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
okta: $okta
|
|
11
11
|
quantity: $quantity
|
|
12
12
|
) {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line max-len
|
|
4
|
-
const getProductsByIdQuery = `query getProducts($id: String!, $market: String, $language: String,
|
|
4
|
+
const getProductsByIdQuery = `query getProducts($id: String!, $market: String, $language: String, $okta: String, quantity: Int) {
|
|
5
5
|
productsById(
|
|
6
6
|
id: $id
|
|
7
7
|
market: $market
|
|
8
8
|
language: $language
|
|
9
|
-
useContentSource: $useContentSource
|
|
10
9
|
okta: $okta
|
|
11
10
|
quantity: $quantity
|
|
12
11
|
) {
|