@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shopify/shop-minis-platform",
3
3
  "license": "SEE LICENSE IN LICENSE.txt",
4
- "version": "0.8.5",
4
+ "version": "0.9.0",
5
5
  "description": "Shared type definitions for Shop Minis Platform",
6
6
  "main": "src/index.ts",
7
7
  "exports": {
@@ -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<
@@ -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
@@ -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