@shopify/shop-minis-platform 0.7.0 → 0.8.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shopify/shop-minis-platform",
3
3
  "license": "SEE LICENSE IN LICENSE.txt",
4
- "version": "0.7.0",
4
+ "version": "0.8.1",
5
5
  "description": "Shared type definitions for Shop Minis Platform",
6
6
  "main": "src/index.ts",
7
7
  "exports": {
@@ -93,6 +93,7 @@ import {
93
93
  RequestPermissionParams,
94
94
  RequestPermissionResponse,
95
95
  ReportErrorParams,
96
+ ReportFetchParams,
96
97
  } from './params'
97
98
  import {ShopAction, SnakeToCamelCase} from './shared'
98
99
 
@@ -231,4 +232,5 @@ export interface ShopActionEvents {
231
232
  RequestPermissionResponse
232
233
  >
233
234
  REPORT_ERROR: ShopAction<ReportErrorParams, void>
235
+ REPORT_FETCH: ShopAction<ReportFetchParams, void>
234
236
  }
@@ -65,6 +65,10 @@ export interface AddToCartParams extends BuyProductLineItem {
65
65
  * @deprecated
66
66
  */
67
67
  attribution?: LineItemAttribution
68
+ /**
69
+ * The URL of the variant image.
70
+ */
71
+ variantImageUrl?: string
68
72
  }
69
73
 
70
74
  export interface BuyProductLineItem {
@@ -680,3 +684,38 @@ export interface ReportErrorParams {
680
684
  */
681
685
  additionalContext?: {[key: string]: any}
682
686
  }
687
+
688
+ /**
689
+ * Parameters for reporting fetch calls made in the webview.
690
+ * This captures network request details for observability.
691
+ */
692
+ export interface ReportFetchParams {
693
+ /**
694
+ * The HTTP method used (GET, POST, etc.)
695
+ */
696
+ method: string
697
+ /**
698
+ * The URL that was fetched
699
+ */
700
+ url: string
701
+ /**
702
+ * The HTTP status code of the response (0 for network errors)
703
+ */
704
+ status: number
705
+ /**
706
+ * Duration of the request in milliseconds
707
+ */
708
+ duration: number
709
+ /**
710
+ * Whether the request was successful (response.ok)
711
+ */
712
+ success: boolean
713
+ /**
714
+ * Error message if the request failed
715
+ */
716
+ error?: string
717
+ /**
718
+ * Timestamp when the request completed
719
+ */
720
+ timestamp: number
721
+ }
@@ -82,6 +82,7 @@ export interface Product {
82
82
  featuredImage?: ProductImage | null
83
83
  price: Money
84
84
  compareAtPrice?: Money | null
85
+ referral?: boolean
85
86
  }
86
87
 
87
88
  export interface ProductList {