@nuskin/ns-product-lib 2.7.0-cx24-3682.26 → 2.7.0-cx24-3702.5
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 +19 -150
- package/package.json +2 -2
- package/src/equinox-helpers/childSKU.js +1 -1
- package/src/equinox-helpers/index.js +31 -173
- package/src/product.js +69 -82
- package/src/productData.js +43 -43
- package/src/equinox-helpers/interceptors/index.js +0 -5
- package/src/equinox-helpers/interceptors/productNotFound.js +0 -72
- package/src/equinox-helpers/mappers/identifier.js +0 -13
- package/src/equinox-helpers/mappers/index.js +0 -13
- package/src/equinox-helpers/mappers/inventoryProperties.js +0 -173
- package/src/equinox-helpers/mappers/properties.js +0 -169
- package/src/equinox-helpers/mappers/variant.js +0 -51
- package/src/equinox-helpers/mappers/variantProperties.js +0 -273
- package/src/equinox-helpers/models/index.js +0 -5
- package/src/equinox-helpers/models/productNotFound.js +0 -48
package/CHANGELOG.md
CHANGED
@@ -1,189 +1,58 @@
|
|
1
|
-
# [2.7.0-cx24-
|
1
|
+
# [2.7.0-cx24-3702.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3702.4...v2.7.0-cx24-3702.5) (2023-03-31)
|
2
2
|
|
3
3
|
|
4
4
|
### New
|
5
5
|
|
6
|
-
*
|
7
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([317d001](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/317d00129641d7422370b6c76f01c1a0459c9f2f)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
6
|
+
* adding properties variable to equinox product data ([4794f41](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/4794f4126a67f5b4ea43f78f5f9e2267dc530426))
|
8
7
|
|
9
|
-
# [2.7.0-cx24-
|
8
|
+
# [2.7.0-cx24-3702.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3702.3...v2.7.0-cx24-3702.4) (2023-03-30)
|
10
9
|
|
11
10
|
|
12
11
|
### New
|
13
12
|
|
14
|
-
*
|
13
|
+
* adding properties variable to equinox product data ([1293d75](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1293d750536b8ef094d3eff9c1d609e9f74ca4b2))
|
15
14
|
|
16
|
-
# [2.7.0-cx24-
|
15
|
+
# [2.7.0-cx24-3702.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3702.2...v2.7.0-cx24-3702.3) (2023-03-28)
|
17
16
|
|
18
17
|
|
19
18
|
### New
|
20
19
|
|
21
|
-
*
|
20
|
+
* adding properties variable to equinox product data ([7f33e91](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/7f33e916199d495b7c51d35d4acd7f1024feb781))
|
22
21
|
|
23
|
-
# [2.7.0-cx24-
|
22
|
+
# [2.7.0-cx24-3702.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3702.1...v2.7.0-cx24-3702.2) (2023-03-25)
|
24
23
|
|
25
24
|
|
26
25
|
### New
|
27
26
|
|
28
|
-
*
|
27
|
+
* adding properties variable to equinox product data ([46e2c7e](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/46e2c7e4b5727d02ae31ccd62ec32ed73bdb6bc7))
|
29
28
|
|
30
|
-
# [2.7.0-cx24-
|
29
|
+
# [2.7.0-cx24-3702.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.2...v2.7.0-cx24-3702.1) (2023-03-25)
|
31
30
|
|
32
31
|
|
33
32
|
### New
|
34
33
|
|
35
|
-
*
|
34
|
+
* adding properties variable to equinox product data ([3a4971b](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/3a4971bc3620ac848c0ba6c541bf6906b09169fd))
|
36
35
|
|
37
|
-
|
36
|
+
## [2.6.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1...v2.6.2) (2023-03-24)
|
38
37
|
|
39
38
|
|
40
|
-
###
|
41
|
-
|
42
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([d32293e](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d32293e08920313b2598e6be21d66c7377713d9e)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
43
|
-
|
44
|
-
# [2.7.0-cx24-3682.20](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.19...v2.7.0-cx24-3682.20) (2023-03-28)
|
45
|
-
|
46
|
-
|
47
|
-
### New
|
48
|
-
|
49
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([d008a2e](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d008a2e625131f66f7f2ea5ed428c0ec4cb28e8b)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
50
|
-
|
51
|
-
# [2.7.0-cx24-3682.19](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.18...v2.7.0-cx24-3682.19) (2023-03-28)
|
52
|
-
|
53
|
-
|
54
|
-
### New
|
55
|
-
|
56
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([3adb17f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/3adb17f779126224b3d1264738b128bbbd1428aa)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
57
|
-
|
58
|
-
# [2.7.0-cx24-3682.18](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.17...v2.7.0-cx24-3682.18) (2023-03-28)
|
59
|
-
|
60
|
-
|
61
|
-
### New
|
62
|
-
|
63
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([9d1d1dc](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9d1d1dcb2562468a4fcc0419fab0055db1ee5ffd)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
64
|
-
|
65
|
-
# [2.7.0-cx24-3682.17](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.16...v2.7.0-cx24-3682.17) (2023-03-28)
|
66
|
-
|
67
|
-
|
68
|
-
### New
|
69
|
-
|
70
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([10a5c8b](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/10a5c8b908558131cee494d67f12ff5125aa444a)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
71
|
-
|
72
|
-
# [2.7.0-cx24-3682.16](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.15...v2.7.0-cx24-3682.16) (2023-03-28)
|
73
|
-
|
74
|
-
|
75
|
-
### New
|
76
|
-
|
77
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([5115f90](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/5115f9098e73373bc13088a91f0c3fd37f5b3498)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
78
|
-
|
79
|
-
# [2.7.0-cx24-3682.15](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.14...v2.7.0-cx24-3682.15) (2023-03-28)
|
80
|
-
|
81
|
-
|
82
|
-
### New
|
83
|
-
|
84
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([e461718](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/e4617184a156b4c3827c084aca68506fe18df072)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
85
|
-
|
86
|
-
# [2.7.0-cx24-3682.14](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.13...v2.7.0-cx24-3682.14) (2023-03-28)
|
87
|
-
|
88
|
-
|
89
|
-
### New
|
90
|
-
|
91
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([aae3544](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/aae35440a744d4740a680471f57c7350fc6b9714)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
92
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([6124e9b](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/6124e9b4fa30f976dbe52ea88c2fcb588b2187cf)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
93
|
-
|
94
|
-
# [2.7.0-cx24-3682.13](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.12...v2.7.0-cx24-3682.13) (2023-03-27)
|
95
|
-
|
96
|
-
|
97
|
-
### New
|
98
|
-
|
99
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([daa2a72](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/daa2a72a71914c8730826ca2048b30614f7da83a)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
100
|
-
|
101
|
-
# [2.7.0-cx24-3682.12](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.11...v2.7.0-cx24-3682.12) (2023-03-27)
|
102
|
-
|
103
|
-
|
104
|
-
### New
|
105
|
-
|
106
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([5e90c00](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/5e90c0053045c6a27847264b0112f6033189e421)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
107
|
-
|
108
|
-
# [2.7.0-cx24-3682.11](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.10...v2.7.0-cx24-3682.11) (2023-03-27)
|
109
|
-
|
110
|
-
|
111
|
-
### New
|
112
|
-
|
113
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([140f1f0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/140f1f06c14b940851481ab8d4111728e760caad)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
114
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([a9c1b38](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a9c1b380ecb1e98a496be4628f6e4e4f32ff2a98)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
115
|
-
|
116
|
-
# [2.7.0-cx24-3682.10](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.9...v2.7.0-cx24-3682.10) (2023-03-27)
|
117
|
-
|
118
|
-
|
119
|
-
### New
|
120
|
-
|
121
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([249f3b7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/249f3b79b30a774c45e90886f01d8bd4d4874b4b)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
122
|
-
|
123
|
-
# [2.7.0-cx24-3682.9](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.8...v2.7.0-cx24-3682.9) (2023-03-26)
|
124
|
-
|
125
|
-
|
126
|
-
### New
|
127
|
-
|
128
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([66c977b](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/66c977b3114e0cd7517d6eaa19174b0a3a13d1ed)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
129
|
-
|
130
|
-
# [2.7.0-cx24-3682.8](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.7...v2.7.0-cx24-3682.8) (2023-03-26)
|
131
|
-
|
132
|
-
|
133
|
-
### New
|
134
|
-
|
135
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([3d69bbe](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/3d69bbe486f13f4ae2a9fe4c07f53c4d27932177)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
136
|
-
|
137
|
-
# [2.7.0-cx24-3682.7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.6...v2.7.0-cx24-3682.7) (2023-03-25)
|
138
|
-
|
139
|
-
|
140
|
-
### New
|
141
|
-
|
142
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([a8f0331](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a8f0331970ed4631ceba029d48e246b83627a046)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
143
|
-
|
144
|
-
# [2.7.0-cx24-3682.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.5...v2.7.0-cx24-3682.6) (2023-03-25)
|
145
|
-
|
146
|
-
|
147
|
-
### New
|
148
|
-
|
149
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([13f2b76](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/13f2b76990dd2e4f4226367332212dcc7bd19977)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
150
|
-
|
151
|
-
# [2.7.0-cx24-3682.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.4...v2.7.0-cx24-3682.5) (2023-03-25)
|
152
|
-
|
153
|
-
|
154
|
-
### New
|
155
|
-
|
156
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([588161d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/588161d54fa2e97f6bee2fe33523f3f1bdcb1ed2)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
157
|
-
|
158
|
-
# [2.7.0-cx24-3682.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.3...v2.7.0-cx24-3682.4) (2023-03-24)
|
159
|
-
|
160
|
-
|
161
|
-
### New
|
162
|
-
|
163
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([f55854a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/f55854ad4abb17dbd373fe5e36a38deb2bb8fc53)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
164
|
-
|
165
|
-
# [2.7.0-cx24-3682.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0-cx24-3682.2...v2.7.0-cx24-3682.3) (2023-03-24)
|
166
|
-
|
167
|
-
|
168
|
-
### New
|
39
|
+
### Fix
|
169
40
|
|
170
|
-
*
|
41
|
+
* Fix drop down variants Cx24 3377 ([262328e](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/262328e617b87d6dbf44b1393fdffaa10d8de13d))
|
171
42
|
|
172
|
-
# [2.7.0-cx24-
|
43
|
+
# [2.7.0-cx24-337703.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.2-cx24-337703.1...v2.7.0-cx24-337703.1) (2023-03-22)
|
173
44
|
|
174
45
|
|
175
|
-
###
|
46
|
+
### Update
|
176
47
|
|
177
|
-
*
|
178
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([b86a1d2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/b86a1d2610892564c643bd851d873e507efedd49)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
179
|
-
* MySite product cards show blank data when users have setup AEM Base SKU's(55) in Admin #CX24-3682 ([60d61cc](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/60d61ccd38e9b971b7ac53cf4224a9897a63fef4)), closes [#CX24-3682](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3682)
|
48
|
+
* Merge CX24-3563 changes to CX24-337703 ([9e6ca40](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9e6ca40c35252c24394351275a234e9847f70bfc))
|
180
49
|
|
181
|
-
|
50
|
+
## [2.6.2-cx24-337703.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.1...v2.6.2-cx24-337703.1) (2023-03-22)
|
182
51
|
|
183
52
|
|
184
|
-
###
|
53
|
+
### Fix
|
185
54
|
|
186
|
-
*
|
55
|
+
* Show dropdown for variants ([85cdf69](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/85cdf69cc2bbf6700ec5c9bcacc7222cf2ddf674))
|
187
56
|
|
188
57
|
## [2.6.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0...v2.6.1) (2023-03-16)
|
189
58
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nuskin/ns-product-lib",
|
3
|
-
"version": "2.7.0-cx24-
|
3
|
+
"version": "2.7.0-cx24-3702.5",
|
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": {
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"dependencies": {
|
34
34
|
"@nuskin/configuration-sdk": "2.2.3",
|
35
35
|
"@nuskin/ns-common-lib": "1.4.5",
|
36
|
-
"@nuskin/ns-util": "4.2.
|
36
|
+
"@nuskin/ns-util": "4.2.7",
|
37
37
|
"axios": "0.27.2",
|
38
38
|
"qs": "6.11.0"
|
39
39
|
},
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* childSKU maps a product variant. Used mainly in subscription.
|
3
3
|
*
|
4
4
|
* @param {import('.').KitSKUQuantity[]} kits
|
5
|
-
* @param {import('.').
|
5
|
+
* @param {import('.').EquinoxProduct} product
|
6
6
|
*/
|
7
7
|
function childSKU(kits, product) {
|
8
8
|
const sku = product.sku.filter(sku => sku.default)[0];
|
@@ -4,9 +4,7 @@
|
|
4
4
|
* @type {object}
|
5
5
|
* @property {ProductChildSku[]} childSkus
|
6
6
|
* @property {Inventory} [inventoryProperties]
|
7
|
-
|
8
|
-
|
9
|
-
/**
|
7
|
+
*
|
10
8
|
* @typedef ProductChildSku
|
11
9
|
* @type {object}
|
12
10
|
* @property {string} productId
|
@@ -15,183 +13,43 @@
|
|
15
13
|
* @property {number} skuQuantity
|
16
14
|
* @property {string} availableChannels
|
17
15
|
* @property {Inventory} [inventory]
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
*
|
17
|
+
* ---
|
18
|
+
*
|
19
|
+
* @description This model represents a product within an Equinox response.
|
20
|
+
* @typedef EquinoxProduct
|
21
|
+
* @type {object}
|
22
|
+
* @property {string} identifier
|
23
|
+
* @property {EquinoxProductSKU[]} sku
|
24
|
+
* @property {"kit"|"bundle"} [type]
|
25
|
+
*
|
26
|
+
* @typedef EquinoxProductSKU
|
27
|
+
* @type {object}
|
28
|
+
* @property {boolean} default
|
29
|
+
* For multi-variant products, this indicates that this is the searched SKU
|
30
|
+
* when using catalogs/search endpoint.
|
31
|
+
* @property {string} identifier
|
32
|
+
* @property {Inventory} inventoryProperties
|
33
|
+
* @property {EquinoxProductProperties} properties
|
34
|
+
*
|
35
|
+
* @typedef EquinoxProductProperties
|
36
|
+
* @type {object}
|
37
|
+
* @property {string} availableChannels
|
38
|
+
*
|
39
|
+
* ---
|
40
|
+
*
|
21
41
|
* Types common to Product model and Equinox Product model
|
42
|
+
*
|
22
43
|
* @typedef Inventory
|
23
44
|
* @type {object}
|
24
45
|
* @property {number} atpQty
|
25
46
|
* @property {boolean} backOrdered
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
* @description This model represents the error response.
|
30
|
-
* @typedef EquinoxErrorResponse
|
31
|
-
* @type {object}
|
32
|
-
* @property {string} code e.g., SFOSER002
|
33
|
-
* @property {string} message e.g., No Results Found dot Search Term null
|
34
|
-
* @property {number} timestamp e.g., 1679715447962
|
35
|
-
*/
|
36
|
-
|
37
|
-
/**
|
38
|
-
* @description This model represents the response.
|
39
|
-
* @typedef EquinoxResponse
|
40
|
-
* @type {object}
|
41
|
-
* @property {EquinoxNormalProduct[]} product
|
42
|
-
*/
|
43
|
-
|
44
|
-
/**
|
45
|
-
* @description EquinoxNormalProduct represents an equinox Normal product type.
|
46
|
-
* @typedef EquinoxNormalProduct
|
47
|
-
* @type {object}
|
48
|
-
* @property {string} identifier e.g., Normal - "blt8b757df6dcaa199c" | Kit - "02001076"
|
49
|
-
* @property {EquinoxProductProperties} properties
|
50
|
-
* @property {EquinoxProductVariant[]} sku or varaints - available only when product is a normal product.
|
51
|
-
* @property {boolean} [exists] indicates whethere the SKU exists or not (HTTP 404) e.g., false
|
52
|
-
*/
|
53
|
-
|
54
|
-
/**
|
55
|
-
* @description EquinoxKitProduct represents an equinox Kit product type.
|
56
|
-
* @typedef EquinoxKitProduct
|
57
|
-
* @type {object}
|
58
|
-
* @property {"kit"|"bundle"} [type] available only when product is type of kit.
|
59
|
-
*/
|
60
|
-
|
61
|
-
/**
|
62
|
-
* @typedef {(
|
63
|
-
* EquinoxProductCommonProperties & EquinoxNormalProductProperties
|
64
|
-
* )} EquinoxProductProperties
|
65
|
-
*/
|
66
|
-
|
67
|
-
/**
|
68
|
-
* @description These are the properties unique to Normal product type.
|
69
|
-
* @typedef EquinoxNormalProductProperties
|
70
|
-
* @type {object}
|
71
|
-
* @property {string} [ingredients]
|
72
|
-
* @property {string} [benefits]
|
73
|
-
* @property {string} [usage]
|
74
|
-
* @property {string} [resources]
|
75
|
-
* @property {string} [scanQualifiedCount] e.g., "0"
|
76
|
-
* @property {string} [status] e.g., "active"
|
77
|
-
* @property {string} [size] e.g., "30 mL / 1 fl.oz"
|
78
|
-
* @property {string} [productDetailsDescription] e.g., "[]"
|
79
|
-
*/
|
80
|
-
|
81
|
-
/**
|
82
|
-
* @description These are the properties unique to Kit product type.
|
83
|
-
* @typedef EquinoxKitProductProperties
|
84
|
-
* @type {object}
|
85
|
-
* @property {string} [skukits] e.g., "02002145~1,02002146~1,02002147~1,02002148~1,02002142~1,02002143~1"
|
86
|
-
* @property {string} [productStatus] e.g., "Sellable"
|
87
|
-
* @property {string} [availableChannels] e.g., "subscription,arsPhone,kiosk,mobile,web"
|
88
|
-
* @property {string} [market] e.g., "CA"
|
89
|
-
*/
|
90
|
-
|
91
|
-
/**
|
92
|
-
* @description These are the common properties between Normal and Kit product types
|
93
|
-
* @typedef EquinoxProductCommonProperties
|
94
|
-
* @type {object}
|
95
|
-
* @property {string} [name] e.g., "180° Cell Renewal Fluid"
|
96
|
-
* @property {string} [imageURL] e.g., "https://nuskin.com/content/dam/global/...ule-refreshed.jpg"
|
97
|
-
* @property {string} [description] e.g., "180° Ampoule"
|
98
|
-
* @property {string} [customerTypes] e.g., "BrandAffiliate,Preferred,Retail"
|
99
|
-
* @property {string} [division] e.g., "Nu Skin"
|
100
|
-
*/
|
101
|
-
|
102
|
-
/**
|
103
|
-
* @typedef EquinoxProductVariant
|
104
|
-
* @type {object}
|
105
|
-
* @property {string} [identifier] e.g., "02002145"
|
106
|
-
* @property {string} [inventory] e.g., "IN STOCK"
|
107
|
-
* @property {EquinoxProductVariantProperties} [properties]
|
108
|
-
* @property {any[]} [promotion] e.g., ???
|
109
|
-
* @property {EquinoxProductPriceFacets} [priceFacets]
|
110
|
-
* @property {EquinoxProductInventoryProperties} [inventoryProperties]
|
111
|
-
* @property {EquinxProductTotalValue} [totalValue]
|
112
|
-
* @property {boolean} [default] For multi-variant products, this indicates that this is the searched SKU
|
113
|
-
* when using catalogs/search endpoint.
|
114
|
-
*/
|
115
|
-
|
116
|
-
/**
|
117
|
-
* @description This does not contain the full list of properties from the response.
|
118
|
-
* @typedef EquinoxProductVariantProperties
|
119
|
-
* @type {object}
|
120
|
-
* @property {string} [availableChannels] e.g., "subscription,arsPhone,kiosk,mobile,web"
|
121
|
-
* @property {string} [imageURL] e.g., "https://nuskin.com/cont...21/ca-180-Ampoule-refreshed.jpg"
|
122
|
-
* @property {string} [name] e.g., "180° Cell Renewal Fluid"
|
123
|
-
* @property {string} [market] e.g., "CA"
|
124
|
-
* @property {string} [description] e.g., "180° Ampoule"
|
125
|
-
* @property {string} [ingredients]
|
126
|
-
* @property {string} [benefits]
|
127
|
-
* @property {string} [usage]
|
128
|
-
* @property {string} [resources]
|
129
|
-
* @property {string} [scanQualifiedCount] e.g., "0"
|
130
|
-
* @property {string} [customerTypes] e.g., "BrandAffiliate,Preferred,Retail"
|
131
|
-
* @property {string} [division] e.g., "Nu Skin"
|
132
|
-
* @property {string} [status] e.g., "active"
|
133
|
-
* @property {string} [size] e.g., "30 mL / 1 fl.oz"
|
134
|
-
* @property {string} [globalProductId]
|
135
|
-
* @property {string} [excludeFromSearch]
|
136
|
-
* @property {string} [chargeShipping]
|
137
|
-
* @property {string} [title]
|
138
|
-
* @property {string} [productStatus] e.g., "Sellable"
|
139
|
-
* @property {string} [variantLabel]
|
140
|
-
* @property {string} [isExclusive] e.g., "false" - Why is this a string??
|
141
|
-
*/
|
142
|
-
|
143
|
-
/**
|
144
|
-
* @description Why are properties not camelCase and type of string instead of number? Super weird!
|
145
|
-
* @typedef EquinoxProductPriceFacets
|
146
|
-
* @type {object}
|
147
|
-
* @property {string} CV e.g., "76.0"
|
148
|
-
* @property {string} Regular Price e.g., "76.0"
|
149
|
-
* @property {string} PV e.g., "54.15"
|
150
|
-
* @property {string} Wholesale Price e.g., "88.0"
|
151
|
-
* @property {string} SB e.g., "4.25"
|
152
|
-
*/
|
153
|
-
|
154
|
-
/**
|
155
|
-
* @description
|
156
|
-
* @typedef EquinoxProductInventoryProperties
|
157
|
-
* @type {object}
|
158
|
-
* @property {boolean} [available] e.g., true
|
159
|
-
* @property {boolean} [lowStock] e.g., false
|
160
|
-
* @property {string} [binName] e.g., "1046_CA01"
|
161
|
-
* @property {boolean} [backOrdered] e.g., false
|
162
|
-
* @property {number} [expectedBackOrderAvailabilityDate] e.g., 0
|
163
|
-
* @property {boolean} [preOrdered] e.g., false
|
164
|
-
* @property {number} [expectedPreOrderAvailabilityDate] e.g., 0
|
165
|
-
* @property {number} [atpQty] e.g., 49882
|
166
|
-
* @property {number} [preOrderedQty] e.g., 0
|
167
|
-
* @property {number} [backOrderedQty] e.g., 0
|
168
|
-
* @property {number|null} [lowStockThreshold] e.g., null
|
169
|
-
* @property {number|null} [outOfStockThreshold] e.g., null
|
170
|
-
*/
|
171
|
-
|
172
|
-
/**
|
173
|
-
* @description
|
174
|
-
* @typedef EquinxProductTotalValue
|
175
|
-
* @type {object}
|
176
|
-
* @property {number} priceAfterDiscount e.g., 2
|
177
|
-
* @property {number} originalPrice e.g., 2
|
178
|
-
* @property {number} totaldiscount e.g., 0
|
179
|
-
* @property {{
|
180
|
-
* CV: { CV: number },
|
181
|
-
* "Regular Price": {
|
182
|
-
* "Regular Price": number
|
183
|
-
* },
|
184
|
-
* PV: { PV: number },
|
185
|
-
* "Wholesale Price": {
|
186
|
-
* "Wholesale Price": number
|
187
|
-
* },
|
188
|
-
* SB: { SB: number },
|
189
|
-
* }} priceFacets
|
190
|
-
*/
|
191
|
-
|
192
|
-
/**
|
47
|
+
*
|
48
|
+
* ---
|
49
|
+
*
|
193
50
|
* Standalone types. These are types not related to Product
|
194
51
|
* and Equinox Product models.
|
52
|
+
*
|
195
53
|
* @typedef KitSKUQuantity
|
196
54
|
* @type {object}
|
197
55
|
* @property {string} sku
|