@shopify/shop-minis-platform 0.8.5 → 0.9.0
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 +1 -1
- package/src/actions/actions.ts +6 -0
- package/src/actions/params.ts +11 -0
- package/src/types/product.ts +10 -0
package/package.json
CHANGED
package/src/actions/actions.ts
CHANGED
|
@@ -73,6 +73,8 @@ import {
|
|
|
73
73
|
GetProductVariantsResponse,
|
|
74
74
|
GetProductMediaParams,
|
|
75
75
|
GetProductMediaResponse,
|
|
76
|
+
GetProductReviewsParams,
|
|
77
|
+
GetProductReviewsResponse,
|
|
76
78
|
GetShopParams,
|
|
77
79
|
GetShopResponse,
|
|
78
80
|
GetRecentShopsParams,
|
|
@@ -208,6 +210,10 @@ export interface ShopActionEvents {
|
|
|
208
210
|
GetProductVariantsResponse
|
|
209
211
|
>
|
|
210
212
|
GET_PRODUCT_MEDIA: ShopAction<GetProductMediaParams, GetProductMediaResponse>
|
|
213
|
+
GET_PRODUCT_REVIEWS: ShopAction<
|
|
214
|
+
GetProductReviewsParams,
|
|
215
|
+
GetProductReviewsResponse
|
|
216
|
+
>
|
|
211
217
|
GET_SHOP: ShopAction<GetShopParams, GetShopResponse>
|
|
212
218
|
GET_RECENT_SHOPS: ShopAction<GetRecentShopsParams, GetRecentShopsResponse>
|
|
213
219
|
GET_FOLLOWED_SHOPS: ShopAction<
|
package/src/actions/params.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ProductFilters,
|
|
7
7
|
ProductList,
|
|
8
8
|
ProductMedia,
|
|
9
|
+
ProductReview,
|
|
9
10
|
ProductSearchSortBy,
|
|
10
11
|
ProductVariant,
|
|
11
12
|
Shop,
|
|
@@ -515,6 +516,16 @@ export interface GetProductMediaParams {
|
|
|
515
516
|
export interface GetProductMediaResponse
|
|
516
517
|
extends PaginatedResponse<ProductMedia[]> {}
|
|
517
518
|
|
|
519
|
+
export interface GetProductReviewsParams {
|
|
520
|
+
id: string
|
|
521
|
+
first?: number
|
|
522
|
+
after?: string
|
|
523
|
+
fetchPolicy?: DataHookFetchPolicy
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export interface GetProductReviewsResponse
|
|
527
|
+
extends PaginatedResponse<ProductReview[]> {}
|
|
528
|
+
|
|
518
529
|
export interface GetShopParams {
|
|
519
530
|
id: string
|
|
520
531
|
fetchPolicy?: DataHookFetchPolicy
|
package/src/types/product.ts
CHANGED
|
@@ -22,6 +22,16 @@ export interface ProductVariant {
|
|
|
22
22
|
compareAtPrice?: Money | null
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
export interface ProductReview {
|
|
26
|
+
id: string
|
|
27
|
+
rating: number
|
|
28
|
+
title?: string | null
|
|
29
|
+
body?: string | null
|
|
30
|
+
submittedAt: string
|
|
31
|
+
merchantReply?: string | null
|
|
32
|
+
merchantRepliedAt?: string | null
|
|
33
|
+
}
|
|
34
|
+
|
|
25
35
|
export interface ProductShop {
|
|
26
36
|
id: string
|
|
27
37
|
name: string
|