@shopgate/pwa-common-commerce 7.34.0-beta.1 → 7.34.0-beta.2

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.
Files changed (106) hide show
  1. package/filter/actions/helpers/buildRequestFilters.d.ts +9 -0
  2. package/filter/actions/helpers/buildRequestFilters.d.ts.map +1 -0
  3. package/filter/constants/Pipelines.d.ts +2 -0
  4. package/filter/constants/Pipelines.d.ts.map +1 -0
  5. package/filter/selectors/index.d.ts +42 -0
  6. package/filter/selectors/index.d.ts.map +1 -0
  7. package/package.json +3 -3
  8. package/product/constants/Pipelines.d.ts +13 -0
  9. package/product/constants/Pipelines.d.ts.map +1 -0
  10. package/product/constants/index.d.ts +67 -0
  11. package/product/constants/index.d.ts.map +1 -0
  12. package/product/helpers/index.d.ts +5 -0
  13. package/product/helpers/index.d.ts.map +1 -0
  14. package/product/selectors/product.d.ts +513 -0
  15. package/product/selectors/product.d.ts.map +1 -0
  16. package/reviews/action-creators/errorProductReviews.d.ts +19 -0
  17. package/reviews/action-creators/errorProductReviews.d.ts.map +1 -0
  18. package/reviews/action-creators/errorProductReviews.js +5 -4
  19. package/reviews/action-creators/errorReviews.d.ts +19 -0
  20. package/reviews/action-creators/errorReviews.d.ts.map +1 -0
  21. package/reviews/action-creators/errorReviews.js +5 -4
  22. package/reviews/action-creators/receiveProductReviews.d.ts +25 -0
  23. package/reviews/action-creators/receiveProductReviews.d.ts.map +1 -0
  24. package/reviews/action-creators/receiveProductReviews.js +10 -7
  25. package/reviews/action-creators/receiveReviewVote.d.ts +18 -0
  26. package/reviews/action-creators/receiveReviewVote.d.ts.map +1 -0
  27. package/reviews/action-creators/receiveReviewVote.js +15 -0
  28. package/reviews/action-creators/receiveReviews.d.ts +29 -0
  29. package/reviews/action-creators/receiveReviews.d.ts.map +1 -0
  30. package/reviews/action-creators/receiveReviews.js +13 -8
  31. package/reviews/action-creators/requestProductReviews.d.ts +21 -0
  32. package/reviews/action-creators/requestProductReviews.d.ts.map +1 -0
  33. package/reviews/action-creators/requestProductReviews.js +6 -5
  34. package/reviews/action-creators/requestReviews.d.ts +19 -0
  35. package/reviews/action-creators/requestReviews.d.ts.map +1 -0
  36. package/reviews/action-creators/requestReviews.js +5 -4
  37. package/reviews/action-creators/reviewSettings.d.ts +31 -0
  38. package/reviews/action-creators/reviewSettings.d.ts.map +1 -0
  39. package/reviews/action-creators/reviewSettings.js +28 -0
  40. package/reviews/actions/fetchProductReviewSettings.d.ts +5 -0
  41. package/reviews/actions/fetchProductReviewSettings.d.ts.map +1 -0
  42. package/reviews/actions/fetchProductReviewSettings.js +25 -0
  43. package/reviews/actions/fetchProductReviews.d.ts +17 -0
  44. package/reviews/actions/fetchProductReviews.d.ts.map +1 -0
  45. package/reviews/actions/fetchProductReviews.js +17 -9
  46. package/reviews/actions/fetchReviews.d.ts +22 -0
  47. package/reviews/actions/fetchReviews.d.ts.map +1 -0
  48. package/reviews/actions/fetchReviews.js +48 -14
  49. package/reviews/actions/submitReviewVote.d.ts +15 -0
  50. package/reviews/actions/submitReviewVote.d.ts.map +1 -0
  51. package/reviews/actions/submitReviewVote.js +46 -0
  52. package/reviews/constants/Pipelines.d.ts +7 -0
  53. package/reviews/constants/Pipelines.d.ts.map +1 -0
  54. package/reviews/constants/Pipelines.js +3 -1
  55. package/reviews/constants/index.d.ts +47 -0
  56. package/reviews/constants/index.d.ts.map +1 -0
  57. package/reviews/constants/index.js +43 -1
  58. package/reviews/helpers/filters.d.ts +16 -0
  59. package/reviews/helpers/filters.d.ts.map +1 -0
  60. package/reviews/helpers/filters.js +36 -0
  61. package/reviews/helpers/summary.d.ts +8 -0
  62. package/reviews/helpers/summary.d.ts.map +1 -0
  63. package/reviews/helpers/summary.js +55 -0
  64. package/reviews/index.js +1 -0
  65. package/reviews/reducers/index.js +5 -1
  66. package/reviews/reducers/ownReviewVotes.d.ts +13 -0
  67. package/reviews/reducers/ownReviewVotes.d.ts.map +1 -0
  68. package/reviews/reducers/ownReviewVotes.js +23 -0
  69. package/reviews/reducers/reviewSettings.d.ts +13 -0
  70. package/reviews/reducers/reviewSettings.d.ts.map +1 -0
  71. package/reviews/reducers/reviewSettings.js +33 -0
  72. package/reviews/reducers/reviewSummariesByProductId.d.ts +18 -0
  73. package/reviews/reducers/reviewSummariesByProductId.d.ts.map +1 -0
  74. package/reviews/reducers/reviewSummariesByProductId.js +27 -0
  75. package/reviews/reducers/reviewsByHash.d.ts +25 -0
  76. package/reviews/reducers/reviewsByHash.d.ts.map +1 -0
  77. package/reviews/reducers/reviewsByHash.js +70 -27
  78. package/reviews/reducers/reviewsById.d.ts +20 -0
  79. package/reviews/reducers/reviewsById.d.ts.map +1 -0
  80. package/reviews/reducers/reviewsById.js +23 -7
  81. package/reviews/reducers/reviewsByProductId.d.ts +23 -0
  82. package/reviews/reducers/reviewsByProductId.d.ts.map +1 -0
  83. package/reviews/reducers/reviewsByProductId.js +38 -23
  84. package/reviews/selectors/index.d.ts +278 -0
  85. package/reviews/selectors/index.d.ts.map +1 -0
  86. package/reviews/selectors/index.js +167 -56
  87. package/reviews/selectors/ownReviewVotes.d.ts +9 -0
  88. package/reviews/selectors/ownReviewVotes.d.ts.map +1 -0
  89. package/reviews/selectors/ownReviewVotes.js +7 -0
  90. package/reviews/selectors/reviewSettings.d.ts +63 -0
  91. package/reviews/selectors/reviewSettings.d.ts.map +1 -0
  92. package/reviews/selectors/reviewSettings.js +40 -0
  93. package/reviews/selectors/reviewSummary.d.ts +18 -0
  94. package/reviews/selectors/reviewSummary.d.ts.map +1 -0
  95. package/reviews/selectors/reviewSummary.js +45 -0
  96. package/reviews/streams/index.js +19 -1
  97. package/reviews/subscriptions/index.js +14 -1
  98. package/reviews/types/reviewSettings.d.ts +31 -0
  99. package/reviews/types/reviewSettings.d.ts.map +1 -0
  100. package/reviews/types/reviewSettings.js +1 -0
  101. package/reviews/types/reviewSummary.d.ts +16 -0
  102. package/reviews/types/reviewSummary.d.ts.map +1 -0
  103. package/reviews/types/reviewSummary.js +1 -0
  104. package/reviews/types/reviews.d.ts +190 -0
  105. package/reviews/types/reviews.d.ts.map +1 -0
  106. package/reviews/types/reviews.js +1 -0
@@ -0,0 +1,513 @@
1
+ export function getProductState(state: Object): Object;
2
+ /**
3
+ * Selects all products from the store.
4
+ * @deprecated Also exists within @shopgate/engage/product/selectors/product
5
+ * @param {Object} state The current application state.
6
+ * @return {Object} The collection of products.
7
+ */
8
+ export const getProducts: ((state: Object) => any) & import("reselect").OutputSelectorFields<(args_0: Object) => any, {
9
+ clearCache: () => void;
10
+ }> & {
11
+ clearCache: () => void;
12
+ };
13
+ /**
14
+ * Selects the product shipping state.
15
+ * @param {Object} state The current application state.
16
+ * @param {Object} props The component props.
17
+ * @return {Object} The product shipping state.
18
+ */
19
+ export const getProductShippingState: ((state: Object) => any) & import("reselect").OutputSelectorFields<(args_0: Object) => any, {
20
+ clearCache: () => void;
21
+ }> & {
22
+ clearCache: () => void;
23
+ };
24
+ /**
25
+ * Selects the product description state.
26
+ * @param {Object} state The current application state.
27
+ * @param {Object} props The component props.
28
+ * @return {Object} The product description state.
29
+ */
30
+ export const getProductDescriptionState: ((state: Object) => any) & import("reselect").OutputSelectorFields<(args_0: Object) => any, {
31
+ clearCache: () => void;
32
+ }> & {
33
+ clearCache: () => void;
34
+ };
35
+ /**
36
+ * Selects the product properties state.
37
+ * @deprecated Also exists within @shopgate/engage/product/selectors/product
38
+ * @param {Object} state The current application state.
39
+ * @param {Object} props The component props.
40
+ * @return {Object} The product properties state.
41
+ */
42
+ export const getProductPropertiesState: ((state: Object) => any) & import("reselect").OutputSelectorFields<(args_0: Object) => any, {
43
+ clearCache: () => void;
44
+ }> & {
45
+ clearCache: () => void;
46
+ };
47
+ /**
48
+ * Selects the product images state.
49
+ * @param {Object} state The current application state.
50
+ * @param {Object} props The component props.
51
+ * @return {Object} The product images state.
52
+ */
53
+ export const getProductImagesState: ((state: Object) => any) & import("reselect").OutputSelectorFields<(args_0: Object) => any, {
54
+ clearCache: () => void;
55
+ }> & {
56
+ clearCache: () => void;
57
+ };
58
+ /**
59
+ * Selects the product variants state.
60
+ * @param {Object} state The current application state.
61
+ * @param {Object} props The component props.
62
+ * @return {Object} The product variants state.
63
+ */
64
+ export const getProductVariantsState: ((state: Object) => any) & import("reselect").OutputSelectorFields<(args_0: Object) => any, {
65
+ clearCache: () => void;
66
+ }> & {
67
+ clearCache: () => void;
68
+ };
69
+ /**
70
+ * Retrieves a product by id from state. Different to getProduct() which returns the product
71
+ * entity data if available, this selector returns the pure state entry for a given productId.
72
+ * So the expires and the isFetching property is processable.
73
+ * @deprecated Also exists within @shopgate/engage/product/selectors/product
74
+ * @param {Object} state The current application state.
75
+ * @param {Object} props The component props.
76
+ * @return {Object|null} The dedicated product.
77
+ */
78
+ export const getProductById: ((state: any, ...params: any[]) => any) & import("reselect").OutputSelectorFields<(...args: readonly unknown[]) => any, {
79
+ clearCache: () => void;
80
+ }> & {
81
+ clearCache: () => void;
82
+ };
83
+ /**
84
+ * @deprecated Also exists within @shopgate/engage/product/selectors/product
85
+ */
86
+ export const getProductDataById: ((state: any, ...params: any[]) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
87
+ clearCache: () => void;
88
+ }> & {
89
+ clearCache: () => void;
90
+ };
91
+ export function getProductId(state: Object, props?: Object): string | null;
92
+ export function getVariantProductId(state: Object, props: Object): string | null;
93
+ export function isVariantSelected(state: Object, props: Object): boolean;
94
+ /**
95
+ * Retrieves the product data for the passed productId from the store.
96
+ * @deprecated Also exists within @shopgate/engage/product/selectors/product
97
+ * @param {Object} state The current application state.
98
+ * @param {Object} props The component props.
99
+ * @return {Object} The current product.
100
+ */
101
+ export const getProduct: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
102
+ clearCache: () => void;
103
+ }> & {
104
+ clearCache: () => void;
105
+ };
106
+ /**
107
+ * Retrieves the product name.
108
+ * @param {Object} state The current application state.
109
+ * @param {Object} props The component props.
110
+ * @return {string|null}
111
+ */
112
+ export const getProductName: ((state: any, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
113
+ clearCache: () => void;
114
+ }> & {
115
+ clearCache: () => void;
116
+ };
117
+ /**
118
+ * Retrieves the product long name.
119
+ * @param {Object} state The current application state.
120
+ * @param {Object} props The component props.
121
+ * @return {string|null}
122
+ */
123
+ export const getProductLongName: ((state: any, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
124
+ clearCache: () => void;
125
+ }> & {
126
+ clearCache: () => void;
127
+ };
128
+ /**
129
+ * Retrieves the product rating.
130
+ * @param {Object} state The current application state.
131
+ * @param {Object} props The component props.
132
+ * @return {Object|null}
133
+ */
134
+ export const getProductRating: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
135
+ clearCache: () => void;
136
+ }> & {
137
+ clearCache: () => void;
138
+ };
139
+ /**
140
+ * Retrieves the product manufacturer.
141
+ * @param {Object} state The current application state.
142
+ * @param {Object} props The component props.
143
+ * @return {string|null}
144
+ */
145
+ export const getProductManufacturer: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
146
+ clearCache: () => void;
147
+ }> & {
148
+ clearCache: () => void;
149
+ };
150
+ /**
151
+ * Retrieves the product stock information.
152
+ * @param {Object} state The current application state.
153
+ * @param {Object} props The component props.
154
+ * @return {Object|null}
155
+ */
156
+ export const getProductStock: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
157
+ clearCache: () => void;
158
+ }> & {
159
+ clearCache: () => void;
160
+ };
161
+ /**
162
+ * Retrieves the product availability.
163
+ * @param {Object} state The current application state.
164
+ * @param {Object} props The component props.
165
+ * @return {Object|null}
166
+ */
167
+ export const getProductAvailability: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
168
+ clearCache: () => void;
169
+ }> & {
170
+ clearCache: () => void;
171
+ };
172
+ /**
173
+ * Retrieves the product flags.
174
+ * @param {Object} state The current application state.
175
+ * @param {Object} props The component props.
176
+ * @return {Object|null}
177
+ */
178
+ export const getProductFlags: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
179
+ clearCache: () => void;
180
+ }> & {
181
+ clearCache: () => void;
182
+ };
183
+ /**
184
+ * Retrieves the product price object.
185
+ * @param {Object} state The current application state.
186
+ * @param {Object} props The component props.
187
+ * @return {string}
188
+ */
189
+ export const getProductPriceData: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
190
+ clearCache: () => void;
191
+ }> & {
192
+ clearCache: () => void;
193
+ };
194
+ /**
195
+ * Retrieves the product currency.
196
+ * @param {Object} state The current application state.
197
+ * @param {Object} props The component props.
198
+ * @todo Move to the price selectors
199
+ * @return {string|null}
200
+ */
201
+ export const getProductCurrency: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
202
+ clearCache: () => void;
203
+ }> & {
204
+ clearCache: () => void;
205
+ };
206
+ /**
207
+ * Retrieves the product discount.
208
+ * @param {Object} state The current application state.
209
+ * @param {Object} props The component props.
210
+ * @return {string|null}
211
+ */
212
+ export const getProductDiscount: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
213
+ clearCache: () => void;
214
+ }> & {
215
+ clearCache: () => void;
216
+ };
217
+ /**
218
+ * Retrieves the unit price from a product.
219
+ * @param {Object} state The current application state.
220
+ * @param {Object} props The component props.
221
+ * @todo Move to the price selectors
222
+ * @return {number|null}
223
+ */
224
+ export const getProductUnitPrice: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
225
+ clearCache: () => void;
226
+ }> & {
227
+ clearCache: () => void;
228
+ };
229
+ /**
230
+ * Determines if a product has variants.
231
+ * @param {Object} state The current application state.
232
+ * @param {Object} props The component props.
233
+ * @return {boolean}
234
+ */
235
+ export const hasProductVariants: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
236
+ clearCache: () => void;
237
+ }> & {
238
+ clearCache: () => void;
239
+ };
240
+ /**
241
+ * Determines if a product has variety (variants, options).
242
+ * This product can not be added to a cart. Selecting of variety should be done on PDP
243
+ * @param {Object} state The current application state.
244
+ * @param {Object} props The component props.
245
+ * @return {boolean}
246
+ */
247
+ export const hasProductVariety: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
248
+ clearCache: () => void;
249
+ }> & {
250
+ clearCache: () => void;
251
+ };
252
+ /**
253
+ * Determines if a product is a base product.
254
+ * @param {Object} state The current application state.
255
+ * @param {Object} props The component props.
256
+ * @todo Check if returning null is correct.
257
+ * @return {boolean|null}
258
+ */
259
+ export const isBaseProduct: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
260
+ clearCache: () => void;
261
+ }> & {
262
+ clearCache: () => void;
263
+ };
264
+ /**
265
+ * Determines a baseProductId for the products which are referenced within the props.
266
+ * When a variantId is passed, the selector will return the id of the related base product.
267
+ * @deprecated Also exists within @shopgate/engage/product/selectors/product
268
+ * @param {Object} state The current application state.
269
+ * @param {Object} props The component props.
270
+ * @return {string|null}
271
+ */
272
+ export const getBaseProductId: ((state: any, ...params: any[]) => any) & import("reselect").OutputSelectorFields<(...args: readonly unknown[]) => any, {
273
+ clearCache: () => void;
274
+ }> & {
275
+ clearCache: () => void;
276
+ };
277
+ /**
278
+ * Retrieves the base product data for the passed productId from the store.
279
+ * @deprecated Also exists within @shopgate/engage/product/selectors/product
280
+ * @param {Object} state The current application state.
281
+ * @returns {Object|null} The current product.
282
+ */
283
+ export const getBaseProduct: ((state: any) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
284
+ clearCache: () => void;
285
+ }> & {
286
+ clearCache: () => void;
287
+ };
288
+ /**
289
+ * Determines if a base product has variants.
290
+ * @param {Object} state The current application state.
291
+ * @param {Object} props The component props.
292
+ * @return {boolean}
293
+ */
294
+ export const hasBaseProductVariants: ((state: any) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
295
+ clearCache: () => void;
296
+ }> & {
297
+ clearCache: () => void;
298
+ };
299
+ /**
300
+ * Retrieves the metadata for the given product.
301
+ * @param {Object} state The current application state.
302
+ * @return {Object|null}
303
+ */
304
+ export const getProductMetadata: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
305
+ clearCache: () => void;
306
+ }> & {
307
+ clearCache: () => void;
308
+ };
309
+ /**
310
+ * Retrieves the metadata for the given product.
311
+ * @param {Object} state The current application state.
312
+ * @return {Object|null}
313
+ */
314
+ export const getBaseProductMetadata: ((state: any) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
315
+ clearCache: () => void;
316
+ }> & {
317
+ clearCache: () => void;
318
+ };
319
+ /**
320
+ * Retrieves the shipping data for the given product.
321
+ * @param {Object} state The current application state.
322
+ * @param {Object} props The component props.
323
+ * @return {Object|null}
324
+ */
325
+ export const getProductShipping: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
326
+ clearCache: () => void;
327
+ }> & {
328
+ clearCache: () => void;
329
+ };
330
+ export const getProductPropertiesUnfiltered: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
331
+ clearCache: () => void;
332
+ }> & {
333
+ clearCache: () => void;
334
+ };
335
+ /**
336
+ * Retrieves the properties for the given product.
337
+ * @param {Object} state The current application state.
338
+ * @param {Object} props The component props.
339
+ * @return {Object|null}
340
+ */
341
+ export const getProductProperties: ((state: Object, props?: Object | undefined) => any[] | null) & import("reselect").OutputSelectorFields<(...args: any) => any[] | null, {
342
+ clearCache: () => void;
343
+ }> & {
344
+ clearCache: () => void;
345
+ };
346
+ /**
347
+ * Retrieves the description for the given product.
348
+ * @param {Object} state The current application state.
349
+ * @param {Object} props The component props.
350
+ * @return {string|null}
351
+ */
352
+ export const getProductDescription: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
353
+ clearCache: () => void;
354
+ }> & {
355
+ clearCache: () => void;
356
+ };
357
+ /**
358
+ * Retrieves the images for the given product. If the props contain a variantId, and the related
359
+ * product does not have images, the selector tries to pick images from its base product.
360
+ * @param {Object} state The current application state.
361
+ * @param {Object} props The component props.
362
+ * @return {Array|null}
363
+ */
364
+ export const getProductImages: ((state: any, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
365
+ clearCache: () => void;
366
+ }> & {
367
+ clearCache: () => void;
368
+ };
369
+ export const getFeaturedImage: ((state: any, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
370
+ clearCache: () => void;
371
+ }> & {
372
+ clearCache: () => void;
373
+ };
374
+ /**
375
+ * Retrieves the product variant data.
376
+ * @param {Object} state The current application state.
377
+ * @param {Object} props The component props.
378
+ * @return {Object|null}
379
+ */
380
+ export const getProductVariants: ((state: any) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
381
+ clearCache: () => void;
382
+ }> & {
383
+ clearCache: () => void;
384
+ };
385
+ /**
386
+ * Retrieves a product for the selected variant id from the store.
387
+ * @param {Object} state The current application state.
388
+ * @param {Object} props The component props.
389
+ * @returns {Object|null} The selected variant or null if none is selected
390
+ */
391
+ export const getSelectedVariant: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
392
+ clearCache: () => void;
393
+ }> & {
394
+ clearCache: () => void;
395
+ };
396
+ /**
397
+ * Determines if a product is orderable.
398
+ * @param {Object} state The current application state.
399
+ * @param {Object} props The component props.
400
+ * @return {boolean}
401
+ */
402
+ export const isProductOrderable: ((state: Object, props?: Object | undefined) => boolean) & import("reselect").OutputSelectorFields<(...args: any) => boolean, {
403
+ clearCache: () => void;
404
+ }> & {
405
+ clearCache: () => void;
406
+ };
407
+ /**
408
+ * Retrieves the product id of a variant product. When no variantId is passed within
409
+ * the props, the selector will return NULL.
410
+ * @param {Object} state The current application state.
411
+ * @param {Object} props The component props.
412
+ * @return {string|null}
413
+ */
414
+ export const getVariantId: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
415
+ clearCache: () => void;
416
+ }> & {
417
+ clearCache: () => void;
418
+ };
419
+ /**
420
+ * Retrieves an availability object for a passed set of variant characteristics.
421
+ * @param {Object} state The current application state.
422
+ * @param {Object} props The component props.
423
+ * @return {Object|null}
424
+ */
425
+ export const getVariantAvailabilityByCharacteristics: ((state: any, ...params: any[]) => any) & import("reselect").OutputSelectorFields<(...args: readonly unknown[]) => any, {
426
+ clearCache: () => void;
427
+ }> & {
428
+ clearCache: () => void;
429
+ };
430
+ /**
431
+ * Creates a selector that determines fulfillment params for product requests
432
+ */
433
+ export const getFulfillmentParams: ((state: any, ...params: any[]) => any) & import("reselect").OutputSelectorFields<(...args: readonly unknown[]) => any, {
434
+ clearCache: () => void;
435
+ }> & {
436
+ clearCache: () => void;
437
+ };
438
+ /**
439
+ * Retrieves the generated result hash for a category id or search phrase.
440
+ * @param {Object} state The current application state.
441
+ * @param {Object} props The component props.
442
+ * @returns {string|null} The result hash.
443
+ */
444
+ export const getResultHash: ((state: any, ...params: any[]) => string | null) & import("reselect").OutputSelectorFields<(...args: readonly unknown[]) => string | null, {
445
+ clearCache: () => void;
446
+ }> & {
447
+ clearCache: () => void;
448
+ };
449
+ /**
450
+ * Retrieves the result by hash.
451
+ * @param {Object} state The application state.
452
+ * @param {Object} props The component props.
453
+ * @returns {Object} The result.
454
+ */
455
+ export const getResultByHash: ((state: any) => any) & import("reselect").OutputSelectorFields<(args_0: Object, args_1: string | null) => any, {
456
+ clearCache: () => void;
457
+ }> & {
458
+ clearCache: () => void;
459
+ };
460
+ export function getPopulatedProductsResult(state: Object, props: Object, hash: string, result: Object): Object;
461
+ /**
462
+ * Retrieves the populated product result.
463
+ * @param {Object} state The application state.
464
+ * @param {Object} props The component props.
465
+ * @returns {Object} The product result.
466
+ */
467
+ export const getProductsResult: ((state: any, ...params: any[]) => Object) & import("reselect").OutputSelectorFields<(...args: readonly unknown[]) => Object, {
468
+ clearCache: () => void;
469
+ }> & {
470
+ clearCache: () => void;
471
+ };
472
+ export function makeGetProductResultByCustomHash(hash: string): Function;
473
+ /**
474
+ * Selector mappings for PWA < 6.0
475
+ * @deprecated
476
+ */
477
+ export const getCurrentProduct: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
478
+ clearCache: () => void;
479
+ }> & {
480
+ clearCache: () => void;
481
+ };
482
+ export function getCurrentProductId(state: Object, props?: Object): string | null;
483
+ export const getCurrentBaseProductId: ((state: any, ...params: any[]) => any) & import("reselect").OutputSelectorFields<(...args: readonly unknown[]) => any, {
484
+ clearCache: () => void;
485
+ }> & {
486
+ clearCache: () => void;
487
+ };
488
+ export const getCurrentBaseProduct: ((state: any) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
489
+ clearCache: () => void;
490
+ }> & {
491
+ clearCache: () => void;
492
+ };
493
+ export const getCurrentProductStock: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
494
+ clearCache: () => void;
495
+ }> & {
496
+ clearCache: () => void;
497
+ };
498
+ export const getProductStockInfo: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
499
+ clearCache: () => void;
500
+ }> & {
501
+ clearCache: () => void;
502
+ };
503
+ export const getProductBasePrice: ((state: Object, props?: Object | undefined) => any) & import("reselect").OutputSelectorFields<(...args: any) => any, {
504
+ clearCache: () => void;
505
+ }> & {
506
+ clearCache: () => void;
507
+ };
508
+ export const isOrderable: ((state: Object, props?: Object | undefined) => boolean) & import("reselect").OutputSelectorFields<(...args: any) => boolean, {
509
+ clearCache: () => void;
510
+ }> & {
511
+ clearCache: () => void;
512
+ };
513
+ //# sourceMappingURL=product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../product/selectors/product.js"],"names":[],"mappings":"AAuBO,uCAHI,MAAM,GACL,MAAM,CAE0D;AAE5E;;;;;GAKG;AACH;;;;EAGE;AAEF;;;;;GAKG;AACH;;;;EAGE;AAEF;;;;;GAKG;AACH;;;;EAGE;AAEF;;;;;;GAMG;AACH;;;;EAGE;AAEF;;;;;GAKG;AACH;;;;EAGE;AAEF;;;;;GAKG;AACH;;;;EAGE;AAEF;;;;;;;;GAQG;AACH;;;;EAeE;AAEF;;GAEG;AACH;;;;EAGE;AAUK,oCAJI,MAAM,UACN,MAAM,GACL,MAAM,GAAC,IAAI,CAuBtB;AAQM,2CAJI,MAAM,SACN,MAAM,GACJ,MAAM,GAAC,IAAI,CAevB;AAQM,yCAJI,MAAM,SACN,MAAM,GACJ,OAAO,CAEkE;AAEtF;;;;;;GAMG;AACH;;;;EAOE;AAEF;;;;;GAKG;AACH;;;;EAcE;AAEF;;;;;GAKG;AACH;;;;EAkBE;AAEF;;;;;GAKG;AACH;;;;EASE;AAEF;;;;;GAKG;AACH;;;;EASE;AAEF;;;;;GAKG;AACH;;;;EASE;AAEF;;;;;GAKG;AACH;;;;EASE;AAEF;;;;;GAKG;AACH;;;;EASE;AAEF;;;;;GAKG;AACH;;;;EASE;AAEF;;;;;;GAMG;AACH;;;;EASE;AAEF;;;;;GAKG;AACH;;;;EASE;AAEF;;;;;;GAMG;AACH;;;;EASE;AAEF;;;;;GAKG;AACH;;;;EASE;AAEF;;;;;;GAMG;AACH;;;;EASE;AAEF;;;;;;GAMG;AACH;;;;EAcE;AAEF;;;;;;;GAOG;AACH;;;;EAkBE;AAEF;;;;;GAKG;AACH;;;;EAYE;AAEF;;;;;GAKG;AACH;;;;EAWE;AAEF;;;;GAIG;AACH;;;;EASE;AAEF;;;;GAIG;AACH;;;;EASE;AAEF;;;;;GAKG;AACH;;;;EAYE;AAEF;;;;EAWE;AAEF;;;;;GAKG;AACH;;;;EAYE;AAEF;;;;;GAKG;AACH;;;;EAYE;AAEF;;;;;;GAMG;AACH;;;;EAuBE;AAEF;;;;EAuBE;AAEF;;;;;GAKG;AACH;;;;EAYE;AAEF;;;;;GAKG;AACH;;;;EAUE;AAEF;;;;;GAKG;AACH;;;;EAGE;AAEF;;;;;;GAMG;AACH;;;;EAWE;AAEF;;;;;GAKG;AACH;;;;EAiBE;AAEF;;GAEG;AACH;;;;EAYE;AAEF;;;;;GAKG;AACH;;;;EA8BE;AAEF;;;;;GAKG;AACH;;;;EAYE;AAUK,kDANI,MAAM,SACN,MAAM,QACN,MAAM,UACN,MAAM,GACL,MAAM,CA2BjB;AAED;;;;;GAKG;AACH;;;;EAME;AAQK,uDAHI,MAAM,YAqChB;AAED;;;GAGG;AACH;;;;EAA4C;AAtzBrC,2CAJI,MAAM,UACN,MAAM,GACL,MAAM,GAAC,IAAI,CAuBtB;AAmyBD;;;;EAAwD;AACxD;;;;EAAoD;AACpD;;;;EAAsD;AACtD;;;;EAAmD;AACnD;;;;EAAuD;AACvD;;;;EAA8C"}
@@ -0,0 +1,19 @@
1
+ import { ERROR_PRODUCT_REVIEWS } from '../constants';
2
+ import type { ReviewsRequestMeta } from '../types/reviews';
3
+ /**
4
+ * Dispatches the ERROR_PRODUCT_REVIEWS action.
5
+ * @param productId The ID of the product
6
+ * @param meta Request metadata.
7
+ * @returns The ERROR_PRODUCT_REVIEWS action
8
+ */
9
+ declare const errorProductReviews: (productId: string, meta?: ReviewsRequestMeta) => {
10
+ type: typeof ERROR_PRODUCT_REVIEWS;
11
+ productId: string;
12
+ requestId?: number;
13
+ offset?: number;
14
+ sort?: string;
15
+ filters?: import("../types/reviews").ReviewListFilters;
16
+ };
17
+ export type ErrorProductReviewsAction = ReturnType<typeof errorProductReviews>;
18
+ export default errorProductReviews;
19
+ //# sourceMappingURL=errorProductReviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorProductReviews.d.ts","sourceRoot":"","sources":["../../../reviews/action-creators/errorProductReviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,GAAI,WAAW,MAAM,EAAE,OAAM,kBAAuB;UAE5C,OAAO,qBAAqB;;;;;;CAE3D,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE/E,eAAe,mBAAmB,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import { ERROR_PRODUCT_REVIEWS } from "../constants";
2
-
3
2
  /**
4
3
  * Dispatches the ERROR_PRODUCT_REVIEWS action.
5
- * @param {string} productId The ID of the product
6
- * @returns {Object} The ERROR_PRODUCT_REVIEWS action
4
+ * @param productId The ID of the product
5
+ * @param meta Request metadata.
6
+ * @returns The ERROR_PRODUCT_REVIEWS action
7
7
  */
8
- const errorProductReviews = productId => ({
8
+ const errorProductReviews = (productId, meta = {}) => ({
9
+ ...meta,
9
10
  type: ERROR_PRODUCT_REVIEWS,
10
11
  productId
11
12
  });
@@ -0,0 +1,19 @@
1
+ import { ERROR_REVIEWS } from '../constants';
2
+ import type { ReviewsRequestMeta } from '../types/reviews';
3
+ /**
4
+ * Dispatches the ERROR_REVIEWS action.
5
+ * @param hash Generated hash.
6
+ * @param meta Request metadata.
7
+ * @returns The ERROR_PRODUCT_REVIEWS action.
8
+ */
9
+ declare const errorProductReviews: (hash: string, meta?: ReviewsRequestMeta) => {
10
+ type: typeof ERROR_REVIEWS;
11
+ hash: string;
12
+ requestId?: number;
13
+ offset?: number;
14
+ sort?: string;
15
+ filters?: import("../types/reviews").ReviewListFilters;
16
+ };
17
+ export type ErrorReviewsAction = ReturnType<typeof errorProductReviews>;
18
+ export default errorProductReviews;
19
+ //# sourceMappingURL=errorReviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorReviews.d.ts","sourceRoot":"","sources":["../../../reviews/action-creators/errorReviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,OAAM,kBAAuB;UAE/C,OAAO,aAAa;;;;;;CAE3C,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAExE,eAAe,mBAAmB,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import { ERROR_REVIEWS } from "../constants";
2
-
3
2
  /**
4
3
  * Dispatches the ERROR_REVIEWS action.
5
- * @param {string} hash Generated hash.
6
- * @returns {Object} The ERROR_PRODUCT_REVIEWS action.
4
+ * @param hash Generated hash.
5
+ * @param meta Request metadata.
6
+ * @returns The ERROR_PRODUCT_REVIEWS action.
7
7
  */
8
- const errorProductReviews = hash => ({
8
+ const errorProductReviews = (hash, meta = {}) => ({
9
+ ...meta,
9
10
  type: ERROR_REVIEWS,
10
11
  hash
11
12
  });
@@ -0,0 +1,25 @@
1
+ import { RECEIVE_PRODUCT_REVIEWS } from '../constants';
2
+ import type { Review, ReviewsRequestMeta } from '../types/reviews';
3
+ /**
4
+ * Dispatches the RECEIVE_PRODUCT_REVIEWS action.
5
+ * @param productId The ID of the product
6
+ * @param reviews The received review data
7
+ * @param totalReviewCount The total number of reviews for a product
8
+ * @param meta Request metadata.
9
+ * @param summary The rating summary as returned by the pipeline.
10
+ * @returns The RECEIVE_PRODUCT_REVIEWS action
11
+ */
12
+ declare const receiveProductReviews: (productId: string, reviews: Review[], totalReviewCount?: number | null, meta?: ReviewsRequestMeta, summary?: unknown) => {
13
+ type: typeof RECEIVE_PRODUCT_REVIEWS;
14
+ productId: string;
15
+ reviews: Review[];
16
+ totalReviewCount: number | null | undefined;
17
+ summary: unknown;
18
+ requestId?: number;
19
+ offset?: number;
20
+ sort?: string;
21
+ filters?: import("../types/reviews").ReviewListFilters;
22
+ };
23
+ export type ReceiveProductReviewsAction = ReturnType<typeof receiveProductReviews>;
24
+ export default receiveProductReviews;
25
+ //# sourceMappingURL=receiveProductReviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receiveProductReviews.d.ts","sourceRoot":"","sources":["../../../reviews/action-creators/receiveProductReviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEnE;;;;;;;;GAQG;AACH,QAAA,MAAM,qBAAqB,GACzB,WAAW,MAAM,EACjB,SAAS,MAAM,EAAE,EACjB,mBAAmB,MAAM,GAAG,IAAI,EAChC,OAAM,kBAAuB,EAC7B,UAAU,OAAO;UAGgB,OAAO,uBAAuB;;;;;;;;;CAK/D,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEnF,eAAe,qBAAqB,CAAC"}
@@ -1,16 +1,19 @@
1
1
  import { RECEIVE_PRODUCT_REVIEWS } from "../constants";
2
-
3
2
  /**
4
3
  * Dispatches the RECEIVE_PRODUCT_REVIEWS action.
5
- * @param {string} productId The ID of the product
6
- * @param {Object} reviews The received review data
7
- * @param {number} totalReviewCount The total number of reviews for a product
8
- * @returns {Object} The RECEIVE_PRODUCT_REVIEWS action
4
+ * @param productId The ID of the product
5
+ * @param reviews The received review data
6
+ * @param totalReviewCount The total number of reviews for a product
7
+ * @param meta Request metadata.
8
+ * @param summary The rating summary as returned by the pipeline.
9
+ * @returns The RECEIVE_PRODUCT_REVIEWS action
9
10
  */
10
- const receiveProductReviews = (productId, reviews, totalReviewCount) => ({
11
+ const receiveProductReviews = (productId, reviews, totalReviewCount, meta = {}, summary) => ({
12
+ ...meta,
11
13
  type: RECEIVE_PRODUCT_REVIEWS,
12
14
  productId,
13
15
  reviews,
14
- totalReviewCount
16
+ totalReviewCount,
17
+ summary
15
18
  });
16
19
  export default receiveProductReviews;
@@ -0,0 +1,18 @@
1
+ import { RECEIVE_REVIEW_VOTE } from '../constants';
2
+ import type { ReviewId, ReviewVoteCounts, ReviewVote } from '../types/reviews';
3
+ /**
4
+ * Dispatches the RECEIVE_REVIEW_VOTE action.
5
+ * @param reviewId The ID of the review that was voted on.
6
+ * @param vote The vote of the user.
7
+ * @param reviewVotes The vote counts of the review after the vote.
8
+ * @returns The RECEIVE_REVIEW_VOTE action.
9
+ */
10
+ declare const receiveReviewVote: (reviewId: ReviewId, vote: ReviewVote, reviewVotes: ReviewVoteCounts) => {
11
+ type: typeof RECEIVE_REVIEW_VOTE;
12
+ reviewId: ReviewId;
13
+ vote: ReviewVote;
14
+ reviewVotes: ReviewVoteCounts;
15
+ };
16
+ export type ReceiveReviewVoteAction = ReturnType<typeof receiveReviewVote>;
17
+ export default receiveReviewVote;
18
+ //# sourceMappingURL=receiveReviewVote.d.ts.map