@shopify/shop-minis-react 0.0.8 → 0.0.9

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.
@@ -1,6 +1,5 @@
1
- import { __require as r } from "../node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js";
2
- var i = r();
1
+ var r = {};
3
2
  export {
4
- i as s
3
+ r as __exports
5
4
  };
6
5
  //# sourceMappingURL=index2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +1,6 @@
1
- var r = {};
1
+ import { __require as r } from "../node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js";
2
+ var i = r();
2
3
  export {
3
- r as __exports
4
+ i as s
4
5
  };
5
6
  //# sourceMappingURL=index3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,23 @@
1
+ import { useMemo as e } from "react";
2
+ import { parseUrl as s } from "../../utils/parseUrl.js";
3
+ const t = () => {
4
+ const { initialUrl: r } = window.minisParams;
5
+ return e(() => {
6
+ if (!r)
7
+ return {
8
+ path: void 0,
9
+ queryParams: void 0,
10
+ hash: void 0
11
+ };
12
+ const a = s(r);
13
+ return {
14
+ path: a.pathname,
15
+ queryParams: a.query,
16
+ hash: a.hash
17
+ };
18
+ }, [r]);
19
+ };
20
+ export {
21
+ t as useDeeplink
22
+ };
23
+ //# sourceMappingURL=useDeeplink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeeplink.js","sources":["../../../src/hooks/navigation/useDeeplink.ts"],"sourcesContent":["import {useMemo} from 'react'\n\nimport {parseUrl} from '../../utils/parseUrl'\n\ninterface UseDeeplinkReturnType {\n /**\n * The path of the deeplink.\n */\n path?: string\n /**\n * The query parameters of the deeplink.\n */\n queryParams?: {[key: string]: string | undefined}\n /**\n * The hash of the deeplink.\n */\n hash?: string\n}\n\nexport const useDeeplink = (): UseDeeplinkReturnType => {\n const {initialUrl} = window.minisParams\n\n return useMemo(() => {\n if (!initialUrl) {\n return {\n path: undefined,\n queryParams: undefined,\n hash: undefined,\n }\n }\n\n const parsedUrl = parseUrl(initialUrl)\n\n return {\n path: parsedUrl.pathname,\n queryParams: parsedUrl.query,\n hash: parsedUrl.hash,\n }\n }, [initialUrl])\n}\n"],"names":["useDeeplink","initialUrl","useMemo","parsedUrl","parseUrl"],"mappings":";;AAmBO,MAAMA,IAAc,MAA6B;AAChD,QAAA,EAAC,YAAAC,MAAc,OAAO;AAE5B,SAAOC,EAAQ,MAAM;AACnB,QAAI,CAACD;AACI,aAAA;AAAA,QACL,MAAM;AAAA,QACN,aAAa;AAAA,QACb,MAAM;AAAA,MACR;AAGI,UAAAE,IAAYC,EAASH,CAAU;AAE9B,WAAA;AAAA,MACL,MAAME,EAAU;AAAA,MAChB,aAAaA,EAAU;AAAA,MACvB,MAAMA,EAAU;AAAA,IAClB;AAAA,EAAA,GACC,CAACF,CAAU,CAAC;AACjB;"}
@@ -0,0 +1,12 @@
1
+ import { useHandleAction as r } from "../../internal/useHandleAction.js";
2
+ import { useShopActions as e } from "../../internal/useShopActions.js";
3
+ const n = () => {
4
+ const { share: o } = e();
5
+ return {
6
+ share: r(o)
7
+ };
8
+ };
9
+ export {
10
+ n as useShare
11
+ };
12
+ //# sourceMappingURL=useShare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShare.js","sources":["../../../src/hooks/util/useShare.ts"],"sourcesContent":["import {useHandleAction} from '../../internal/useHandleAction'\nimport {useShopActions} from '../../internal/useShopActions'\nimport {ShareParams} from '../../types'\n\ninterface UseShareReturns {\n /**\n * Closes the Mini viewer.\n */\n share: (params: ShareParams) => void\n}\n\nexport const useShare = (): UseShareReturns => {\n const {share} = useShopActions()\n\n return {\n share: useHandleAction(share),\n }\n}\n"],"names":["useShare","share","useShopActions","useHandleAction"],"mappings":";;AAWO,MAAMA,IAAW,MAAuB;AACvC,QAAA,EAAC,OAAAC,EAAK,IAAIC,EAAe;AAExB,SAAA;AAAA,IACL,OAAOC,EAAgBF,CAAK;AAAA,EAC9B;AACF;"}
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { MinisContainer as o } from "./components/MinisContainer.js";
2
- import { ProductCard as a, ProductCardBadge as i, ProductCardCurrentPrice as l, ProductCardFavoriteButton as n, ProductCardImage as c, ProductCardImageContainer as u, ProductCardInfo as d, ProductCardOriginalPrice as s, ProductCardPrice as p, ProductCardRoot as m, ProductCardTitle as f } from "./components/commerce/product-card.js";
3
- import { ProductLink as x, ProductLinkActions as C, ProductLinkCurrentPrice as P, ProductLinkDiscountPrice as D, ProductLinkImage as S, ProductLinkInfo as A, ProductLinkOriginalPrice as L, ProductLinkPrice as T, ProductLinkRating as k, ProductLinkRoot as h, ProductLinkTitle as w } from "./components/commerce/product-link.js";
2
+ import { ProductCard as a, ProductCardBadge as i, ProductCardCurrentPrice as l, ProductCardFavoriteButton as n, ProductCardImage as c, ProductCardImageContainer as u, ProductCardInfo as d, ProductCardOriginalPrice as p, ProductCardPrice as s, ProductCardRoot as m, ProductCardTitle as f } from "./components/commerce/product-card.js";
3
+ import { ProductLink as g, ProductLinkActions as C, ProductLinkCurrentPrice as P, ProductLinkDiscountPrice as D, ProductLinkImage as S, ProductLinkInfo as A, ProductLinkOriginalPrice as L, ProductLinkPrice as T, ProductLinkRating as k, ProductLinkRoot as h, ProductLinkTitle as w } from "./components/commerce/product-link.js";
4
4
  import { Accordion as b, AccordionContent as v, AccordionItem as R, AccordionTrigger as F } from "./components/atoms/accordion.js";
5
5
  import { Alert as y, AlertDescription as E, AlertTitle as H } from "./components/atoms/alert.js";
6
6
  import { AlertDialog as G, AlertDialogAction as M, AlertDialogCancel as N, AlertDialogContent as U, AlertDialogDescription as z, AlertDialogFooter as V, AlertDialogHeader as j, AlertDialogOverlay as q, AlertDialogPortal as J, AlertDialogTitle as K, AlertDialogTrigger as Q } from "./components/atoms/alert-dialog.js";
7
7
  import { Avatar as X, AvatarFallback as Y, AvatarImage as Z } from "./components/atoms/avatar.js";
8
8
  import { Badge as $, badgeVariants as rr } from "./components/atoms/badge.js";
9
9
  import { Button as or, buttonVariants as tr } from "./components/atoms/button.js";
10
- import { Card as ir, CardAction as lr, CardContent as nr, CardDescription as cr, CardFooter as ur, CardHeader as dr, CardTitle as sr } from "./components/atoms/card.js";
11
- import { Carousel as mr, CarouselContent as fr, CarouselItem as gr, CarouselNext as xr, CarouselPrevious as Cr } from "./components/atoms/carousel.js";
10
+ import { Card as ir, CardAction as lr, CardContent as nr, CardDescription as cr, CardFooter as ur, CardHeader as dr, CardTitle as pr } from "./components/atoms/card.js";
11
+ import { Carousel as mr, CarouselContent as fr, CarouselItem as xr, CarouselNext as gr, CarouselPrevious as Cr } from "./components/atoms/carousel.js";
12
12
  import { Checkbox as Dr } from "./components/atoms/checkbox.js";
13
13
  import { Dialog as Ar, DialogClose as Lr, DialogContent as Tr, DialogDescription as kr, DialogFooter as hr, DialogHeader as wr, DialogOverlay as Ir, DialogPortal as br, DialogTitle as vr, DialogTrigger as Rr } from "./components/atoms/dialog.js";
14
14
  import { Drawer as Br, DrawerClose as yr, DrawerContent as Er, DrawerDescription as Hr, DrawerFooter as Or, DrawerHeader as Gr, DrawerOverlay as Mr, DrawerPortal as Nr, DrawerTitle as Ur, DrawerTrigger as zr } from "./components/atoms/drawer.js";
@@ -18,8 +18,8 @@ import { Progress as Qr } from "./components/atoms/progress.js";
18
18
  import { RadioGroup as Xr, RadioGroupItem as Yr } from "./components/atoms/radio-group.js";
19
19
  import { ResizableHandle as _r, ResizablePanel as $r, ResizablePanelGroup as re } from "./components/atoms/resizable.js";
20
20
  import { ScrollArea as oe, ScrollBar as te } from "./components/atoms/scroll-area.js";
21
- import { Select as ie, SelectContent as le, SelectGroup as ne, SelectItem as ce, SelectLabel as ue, SelectScrollDownButton as de, SelectScrollUpButton as se, SelectSeparator as pe, SelectTrigger as me, SelectValue as fe } from "./components/atoms/select.js";
22
- import { Separator as xe } from "./components/atoms/separator.js";
21
+ import { Select as ie, SelectContent as le, SelectGroup as ne, SelectItem as ce, SelectLabel as ue, SelectScrollDownButton as de, SelectScrollUpButton as pe, SelectSeparator as se, SelectTrigger as me, SelectValue as fe } from "./components/atoms/select.js";
22
+ import { Separator as ge } from "./components/atoms/separator.js";
23
23
  import { Sheet as Pe, SheetClose as De, SheetContent as Se, SheetDescription as Ae, SheetFooter as Le, SheetHeader as Te, SheetTitle as ke, SheetTrigger as he } from "./components/atoms/sheet.js";
24
24
  import { Toaster as Ie } from "./components/atoms/sonner.js";
25
25
  import { useSavedProductsActions as ve } from "./hooks/user/useSavedProductsActions.js";
@@ -37,13 +37,15 @@ import { useSecureStorage as Ze } from "./hooks/storage/useSecureStorage.js";
37
37
  import { useImageUpload as $e } from "./hooks/storage/useImageUpload.js";
38
38
  import { useShopNavigation as eo } from "./hooks/navigation/useShopNavigation.js";
39
39
  import { useCloseMini as to } from "./hooks/navigation/useCloseMini.js";
40
- import { useShopCartActions as io } from "./hooks/shop/useShopCartActions.js";
41
- import { useRecommendedShops as no } from "./hooks/shop/useRecommendedShops.js";
42
- import { useErrorToast as uo } from "./hooks/util/useErrorToast.js";
43
- import { useErrorScreen as po } from "./hooks/util/useErrorScreen.js";
44
- import { MiniEntityNotFoundError as fo, MiniError as go, MiniNetworkError as xo, formatError as Co } from "./utils/errors.js";
45
- import { parseUrl as Do } from "./utils/parseUrl.js";
46
- import { Consent as Ao, ConsentStatus as Lo, CurrencyCode as To, Gender as ko } from "./types/minisSDK.generated.d.js";
40
+ import { useDeeplink as io } from "./hooks/navigation/useDeeplink.js";
41
+ import { useShopCartActions as no } from "./hooks/shop/useShopCartActions.js";
42
+ import { useRecommendedShops as uo } from "./hooks/shop/useRecommendedShops.js";
43
+ import { useErrorToast as so } from "./hooks/util/useErrorToast.js";
44
+ import { useErrorScreen as fo } from "./hooks/util/useErrorScreen.js";
45
+ import { useShare as go } from "./hooks/util/useShare.js";
46
+ import { MiniEntityNotFoundError as Po, MiniError as Do, MiniNetworkError as So, formatError as Ao } from "./utils/errors.js";
47
+ import { parseUrl as To } from "./utils/parseUrl.js";
48
+ import { Consent as ho, ConsentStatus as wo, CurrencyCode as Io, Gender as bo } from "./types/minisSDK.generated.d.js";
47
49
  export {
48
50
  b as Accordion,
49
51
  v as AccordionContent,
@@ -74,16 +76,16 @@ export {
74
76
  cr as CardDescription,
75
77
  ur as CardFooter,
76
78
  dr as CardHeader,
77
- sr as CardTitle,
79
+ pr as CardTitle,
78
80
  mr as Carousel,
79
81
  fr as CarouselContent,
80
- gr as CarouselItem,
81
- xr as CarouselNext,
82
+ xr as CarouselItem,
83
+ gr as CarouselNext,
82
84
  Cr as CarouselPrevious,
83
85
  Dr as Checkbox,
84
- Ao as Consent,
85
- Lo as ConsentStatus,
86
- To as CurrencyCode,
86
+ ho as Consent,
87
+ wo as ConsentStatus,
88
+ Io as CurrencyCode,
87
89
  Ar as Dialog,
88
90
  Lr as DialogClose,
89
91
  Tr as DialogContent,
@@ -104,12 +106,12 @@ export {
104
106
  Nr as DrawerPortal,
105
107
  Ur as DrawerTitle,
106
108
  zr as DrawerTrigger,
107
- ko as Gender,
109
+ bo as Gender,
108
110
  jr as Input,
109
111
  Jr as Label,
110
- fo as MiniEntityNotFoundError,
111
- go as MiniError,
112
- xo as MiniNetworkError,
112
+ Po as MiniEntityNotFoundError,
113
+ Do as MiniError,
114
+ So as MiniNetworkError,
113
115
  o as MinisContainer,
114
116
  a as ProductCard,
115
117
  i as ProductCardBadge,
@@ -118,11 +120,11 @@ export {
118
120
  c as ProductCardImage,
119
121
  u as ProductCardImageContainer,
120
122
  d as ProductCardInfo,
121
- s as ProductCardOriginalPrice,
122
- p as ProductCardPrice,
123
+ p as ProductCardOriginalPrice,
124
+ s as ProductCardPrice,
123
125
  m as ProductCardRoot,
124
126
  f as ProductCardTitle,
125
- x as ProductLink,
127
+ g as ProductLink,
126
128
  C as ProductLinkActions,
127
129
  P as ProductLinkCurrentPrice,
128
130
  D as ProductLinkDiscountPrice,
@@ -147,11 +149,11 @@ export {
147
149
  ce as SelectItem,
148
150
  ue as SelectLabel,
149
151
  de as SelectScrollDownButton,
150
- se as SelectScrollUpButton,
151
- pe as SelectSeparator,
152
+ pe as SelectScrollUpButton,
153
+ se as SelectSeparator,
152
154
  me as SelectTrigger,
153
155
  fe as SelectValue,
154
- xe as Separator,
156
+ ge as Separator,
155
157
  Pe as Sheet,
156
158
  De as SheetClose,
157
159
  Se as SheetContent,
@@ -163,14 +165,15 @@ export {
163
165
  Ie as Toaster,
164
166
  rr as badgeVariants,
165
167
  tr as buttonVariants,
166
- Co as formatError,
167
- Do as parseUrl,
168
+ Ao as formatError,
169
+ To as parseUrl,
168
170
  Xe as useAsyncStorage,
169
171
  Ge as useBuyerAttributes,
170
172
  to as useCloseMini,
171
173
  ye as useCurrentUser,
172
- po as useErrorScreen,
173
- uo as useErrorToast,
174
+ io as useDeeplink,
175
+ fo as useErrorScreen,
176
+ so as useErrorToast,
174
177
  Fe as useFollowedShopsActions,
175
178
  $e as useImageUpload,
176
179
  He as useOrders,
@@ -179,10 +182,11 @@ export {
179
182
  Ne as useProductListActions,
180
183
  ze as useProductLists,
181
184
  Je as useRecommendedProducts,
182
- no as useRecommendedShops,
185
+ uo as useRecommendedShops,
183
186
  ve as useSavedProductsActions,
184
187
  Ze as useSecureStorage,
185
- io as useShopCartActions,
188
+ go as useShare,
189
+ no as useShopCartActions,
186
190
  eo as useShopNavigation
187
191
  };
188
192
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { s as r } from "../../../../../../../_virtual/index2.js";
1
+ import { s as r } from "../../../../../../../_virtual/index3.js";
2
2
  function s() {
3
3
  return r.useSyncExternalStore(
4
4
  e,
@@ -1,4 +1,4 @@
1
- import { __exports as i } from "../../../../../_virtual/index3.js";
1
+ import { __exports as i } from "../../../../../_virtual/index2.js";
2
2
  var c;
3
3
  function d() {
4
4
  if (c) return i;
@@ -1 +1 @@
1
- {"version":3,"file":"minisSDK.generated.d.js","sources":["../../src/types/minisSDK.generated.d.ts"],"sourcesContent":["/* eslint-disable @shopify/typescript/prefer-pascal-case-enums */\n// Auto-generated type definitions for MinisSDK\n// Generated on: 2025-06-16T14:51:57.942Z\n// Do not edit this file manually - run the generation script instead\n// Source: useShopActionsImplementationV3.ts + shopActionsV3Definitions.ts + shopActionsV3Types.ts\n// Generated using TypeScript compiler API for reliable AST parsing\n//\n// This file is self-contained and can be shipped independently\n\n// ============================================================================\n// Base Types (extracted using TypeScript AST parsing)\n// ============================================================================\n\nexport interface ApiKeys {\n refreshToken: string\n accessToken: string\n}\n\nexport interface ShopActionOk<T> {\n ok: true\n data: T\n}\n\nexport interface ShopActionError {\n ok: false\n error: Error & {code?: string}\n}\n\nexport type ShopActionResult<T = void> = ShopActionOk<T> | ShopActionError\n\nexport interface ShopActions {\n getShopAppInformation: () => Promise<\n ShopActionResult<GetShopAppInformationResponse>\n >\n productRecommendationImpression(\n params: ProductRecommendationImpressionParams\n ): Promise<ShopActionResult>\n productRecommendationClick(\n params: ProductRecommendationClickParams\n ): Promise<ShopActionResult>\n hideEntryPoint(): Promise<ShopActionResult>\n closeMini(): Promise<ShopActionResult>\n\n // account actions\n followShop(params: FollowShopParams): Promise<ShopActionResult<boolean>>\n unfollowShop(params: UnfollowShopParams): Promise<ShopActionResult<boolean>>\n favorite(params: FavoriteParams): Promise<ShopActionResult>\n unfavorite(params: UnfavoriteParams): Promise<ShopActionResult>\n getAccountInformation: (\n params: GetAccountInformationParams\n ) => Promise<ShopActionResult<GetAccountInformationResponse>>\n\n // user actions\n getCurrentUser(\n params?: GetCurrentUserParams\n ): Promise<ShopActionResult<GetCurrentUserResponse>>\n\n // product actions\n createOrderAttribution(\n params: CreateOrderAttributionParams\n ): Promise<ShopActionResult>\n addToCart(params: AddToCartParams): Promise<ShopActionResult>\n buyProduct(params: BuyProductParams): Promise<ShopActionResult>\n buyProducts(params: BuyProductsParams): Promise<ShopActionResult>\n\n // error actions\n showErrorScreen: (params: ShowErrorScreenParams) => Promise<ShopActionResult>\n showErrorToast: (message: ShowErrorToastParams) => Promise<ShopActionResult>\n\n // deeplink actions\n getDeeplinkPaths(): Promise<ShopActionResult<GetDeeplinkPathsResponse>>\n navigateToDeeplink(\n params: NavigateToDeeplinkParams\n ): Promise<ShopActionResult>\n\n // navigation actions\n navigateToShop(params: NavigateToShopParams): Promise<ShopActionResult>\n navigateToProduct(params: NavigateToProductParams): Promise<ShopActionResult>\n navigateToOrder(params: NavigateToOrderParams): Promise<ShopActionResult>\n navigateToCheckout(\n params: NavigateToCheckoutParams\n ): Promise<ShopActionResult>\n\n // image upload actions\n createImageUploadLink(\n params: CreateImageUploadLinkParams\n ): Promise<ShopActionResult<CreateImageUploadLinkResponse>>\n completeImageUpload(\n params: CompleteImageUploadParams\n ): Promise<ShopActionResult<CompleteImageUploadResponse>>\n\n // async storage actions\n getPersistedItem(\n params: GetAsyncStorageItemParams\n ): Promise<ShopActionResult<string | null>>\n setPersistedItem(params: SetAsyncStorageItemParams): Promise<ShopActionResult>\n removePersistedItem(\n params: RemoveAsyncStorageItemParams\n ): Promise<ShopActionResult>\n getAllPersistedKeys(): Promise<ShopActionResult<string[]>>\n clearPersistedItems(): Promise<ShopActionResult>\n\n getInternalPersistedItem(\n params: GetAsyncStorageItemParams\n ): Promise<ShopActionResult<string | null>>\n setInternalPersistedItem(\n params: SetAsyncStorageItemParams\n ): Promise<ShopActionResult>\n removeInternalPersistedItem(\n params: RemoveAsyncStorageItemParams\n ): Promise<ShopActionResult>\n getAllInternalPersistedKeys(): Promise<ShopActionResult<string[]>>\n clearInternalPersistedItems(): Promise<ShopActionResult>\n\n // secure storage actions\n getSecret(): Promise<ShopActionResult<string | null>>\n setSecret(params: SetSecretParams): Promise<ShopActionResult>\n removeSecret(): Promise<ShopActionResult>\n\n // event reporting actions\n reportInteraction(params: ReportInteractionParams): Promise<ShopActionResult>\n reportImpression(params: ReportImpressionParams): Promise<ShopActionResult>\n reportContentImpression(\n params: ReportContentImpressionParams\n ): Promise<ShopActionResult>\n\n getProductLists(\n params?: GetProductListsParams\n ): Promise<ShopActionResult<GetProductListsResponse>>\n\n getProductList(\n params?: GetProductListParams\n ): Promise<ShopActionResult<GetProductListResponse>>\n\n // product list actions\n addProductList(\n params: AddProductListParams\n ): Promise<ShopActionResult<ProductList>>\n removeProductList(params: RemoveProductListParams): Promise<ShopActionResult>\n renameProductList: (\n params: RenameProductListParams\n ) => Promise<ShopActionResult<ProductList>>\n addProductListItem(\n params: AddProductListItemParams\n ): Promise<ShopActionResult>\n removeProductListItem(\n params: RemoveProductListItemParams\n ): Promise<ShopActionResult>\n\n // recommendations actions\n getRecommendedProducts(\n params?: GetRecommendedProductsParams\n ): Promise<ShopActionResult<GetRecommendedProductsResponse>>\n getRecommendedShops(\n params?: GetRecommendedShopsParams\n ): Promise<ShopActionResult<GetRecommendedShopsResponse>>\n searchProductsByShop(\n params?: SearchProductsByShopParams\n ): Promise<ShopActionResult<SearchProductsByShopResponse>>\n\n // orders list actions\n getOrders(\n params?: GetOrdersParams\n ): Promise<ShopActionResult<GetOrdersResponse>>\n\n getBuyerAttributes(): Promise<ShopActionResult<GetBuyerAttributesResponse>>\n\n // content actions\n showFeedbackSheet(params: ShowFeedbackSheetParams): Promise<ShopActionResult>\n\n getPopularProducts(\n params?: GetPopularProductsParams\n ): Promise<ShopActionResult<GetPopularProductsResponse>>\n}\n\nexport interface AuthShopActions {\n refreshAccessToken(\n params: RefreshAccessTokenParams\n ): Promise<ShopActionResult<ApiKeys>>\n signOut(): Promise<ShopActionResult>\n}\n\nexport type AllShopActions = ShopActions & AuthShopActions\n\nexport type ShopActionParams<T extends keyof AllShopActions> = Parameters<\n AllShopActions[T]\n>[0]\n\nexport interface FavoriteParams {\n shopId: string\n productId: string\n productVariantId: string\n}\n\nexport interface UnfavoriteParams {\n shopId: string\n productId: string\n productVariantId: string\n}\n\nexport interface LineItemAttribution {\n sourceName: string\n sourceIdentifier: string\n}\n\nexport interface CreateOrderAttributionParams {\n orderId: string\n productVariantId: string\n attribution?: LineItemAttribution\n}\n\nexport interface AddToCartParams extends BuyProductLineItem {\n /**\n * The discount codes to apply to the cart.\n */\n discountCodes?: string[]\n /**\n * Attribution data for the line item.\n * @deprecated\n */\n attribution?: LineItemAttribution\n}\n\nexport interface BuyProductLineItem {\n /**\n * The GID of the product. E.g. `gid://shopify/Product/123`.\n */\n productId: string\n /**\n * The GID of the product variant. E.g. `gid://shopify/ProductVariant/456`.\n */\n productVariantId: string\n /**\n * The quantity of the product to add to the cart.\n */\n quantity?: number\n}\n\nexport interface BuyProductsParams {\n items: [BuyProductLineItem, ...BuyProductLineItem[]] // at least one item\n attribution?: LineItemAttribution\n discountCode?: string\n}\n\nexport interface BuyProductParams extends BuyProductLineItem {\n /**\n * Attribution data for the line item.\n * @deprecated\n */\n attribution?: LineItemAttribution\n /**\n * The discount code to apply to the product.\n */\n discountCode?: string\n}\n\nexport interface UpdateLineItemAttributesParams {\n lineItemAttributes: {key: string; value: string}[]\n attribution?: LineItemAttribution\n}\n\nexport interface NavigateToShopParams {\n shopId: string\n /**\n * @deprecated\n */\n shopName?: string\n}\n\nexport interface NavigateToOrderParams {\n /**\n * The GID of the order. E.g. `gid://shopify/Order/123`.\n */\n orderId: string\n}\n\nexport interface NavigateToCheckoutParams {\n /**\n * The GID of the shop. E.g. `gid://shopify/Shop/123`.\n */\n shopId: string\n}\n\nexport interface NavigateToProductParams {\n /**\n * The GID of the product. E.g. `gid://shopify/Product/123`.\n */\n productId: string\n /**\n * If present, the GID of the variant that should be initially selected\n */\n productVariantId?: string\n /*\n * Variants displayed in the product details screen will be limited to those\n * whose ID is included in this list.\n */\n includedProductVariantGIDs?: string[]\n /**\n * @deprecated use includedProductVariantGIDs instead\n */\n includedProductVariantIds?: string[]\n /**\n * @deprecated do not use\n */\n attribution?: LineItemAttribution\n /**\n * The discount code to apply to the product.\n */\n discountCode?: string\n}\n\nexport interface RefreshAccessTokenParams {\n refreshToken: string\n}\n\nexport interface ProductRecommendationImpressionParams {\n // The product GID string\n productId: string\n // Optional section id, could be useful for tracking which UI sections get impressions\n sectionId?: string\n}\n\nexport interface ProductRecommendationClickParams {\n productId: string\n sectionId?: string\n}\n\nexport interface ShowErrorScreenParams {\n /**\n * The message to display in the error screen.\n */\n message?: string\n /**\n * The title of the error screen.\n */\n title?: string\n}\n\nexport interface ShowErrorToastParams {\n message?: string\n}\n\nexport interface GetAccountInformationParams {\n /**\n * To use user account information, a shopId must be given to track on\n * which shop's behalf user information is being accessed\n */\n shopId: string\n type: 'email' | 'name' | 'phone'\n}\n\nexport interface AccountInformationPhoneInfo {\n phoneNumber: string\n countryCode: string\n prefix: string\n}\n\nexport interface GetAccountInformationResponse {\n status: 'available' | 'not-available'\n value?: string | AccountInformationPhoneInfo\n}\n\nexport interface GetShopAppInformationResponse {\n appVersion: string\n buildNumber: string\n buildId: string\n}\n\nexport interface FollowShopParams {\n shopId: string\n}\n\nexport interface UnfollowShopParams {\n shopId: string\n}\n\nexport interface NavigateToDeeplinkParams {\n deeplink: string\n}\n\nexport interface GetDeeplinkPathsResponse {\n matchers: string[]\n}\n\nexport interface ProductRecommendationClickParams {\n productId: string\n productVariantId?: string\n variantGIDs?: string[]\n discountCode?: string\n attribution?: LineItemAttribution\n sectionId?: string\n}\n\nexport interface CreateImageUploadLinkParams {\n input: {\n mimeType: string\n fileSize: number\n }[]\n}\n\nexport interface UploadTarget {\n url: string\n resourceUrl: string\n parameters: {name: string; value: string}[]\n}\n\nexport interface CreateImageUploadLinkResponse {\n targets?: UploadTarget[]\n error?: string\n}\n\nexport interface CompleteImageUploadParams {\n resourceUrls: string[]\n}\n\nexport interface CompleteImageUploadResponse {\n files?: {\n id: string\n fileStatus: 'FAILED' | 'PENDING' | 'PROCESSING' | 'READY'\n image?: {\n url: string\n } | null\n }[]\n error?: string\n}\n\nexport interface PaginationInfo {\n hasNextPage: boolean\n endCursor: string | null\n}\n\nexport interface GetProductListsResponse {\n data: ProductList[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetProductListResponse {\n data: ProductList | null\n pageInfo: PaginationInfo\n}\n\nexport interface GetRecommendedProductsResponse {\n data: Product[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetRecommendedShopsResponse {\n data: Shop[]\n pageInfo: PaginationInfo\n}\n\nexport interface SearchProductsByShopResponse {\n data: Product[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetBuyerAttributesResponse {\n data: {\n genderAffinity?: Gender\n categoryAffinities: TaxonomyCategory[]\n }\n}\n\nexport interface GetCurrentUserResponse {\n data: UserProfile\n}\n\nexport interface GetOrdersResponse {\n data: Order[]\n pageInfo: PaginationInfo\n}\n\nexport interface SetSecretParams {\n value: string\n}\n\nexport interface SetAsyncStorageItemParams {\n key: string\n value: string\n}\n\nexport interface GetAsyncStorageItemParams {\n key: string\n}\n\nexport interface RemoveAsyncStorageItemParams {\n key: string\n}\n\nexport interface ReportInteractionParams {\n interactionType: string\n interactionValue?: string\n pageValue?: string\n}\n\nexport interface ReportImpressionParams {\n subjectType?: string\n subjectId?: string\n pageValue?: string\n}\n\nexport interface ReportContentImpressionParams {\n publicId: string\n pageValue?: string\n}\n\nexport interface GetProductListsParams {\n /**\n * The number of lists to fetch.\n */\n first?: number\n /**\n * The cursor to fetch the next page of lists.\n */\n after?: string\n /**\n * The number of items per list to fetch.\n */\n itemsFirst?: number\n /**\n * The fetch policy to use.\n */\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetProductListParams {\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n */\n id?: string\n /**\n * The public ID of the product list.\n */\n publicId?: string\n /**\n * The number of items to fetch.\n */\n first?: number\n /**\n * The cursor to fetch the next page of items.\n */\n after?: string\n /**\n * The fetch policy to use.\n */\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface AddProductListParams {\n /**\n * The name of the product list.\n */\n name: string\n /**\n * A description of the product list.\n */\n description?: string\n}\n\nexport interface RemoveProductListParams {\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n */\n id: string\n}\n\nexport interface RenameProductListParams {\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n */\n id: string\n /**\n * The new name of the product list.\n */\n name: string\n}\n\nexport interface AddProductListItemParams {\n /**\n * The GID of the shop. E.g. `gid://shopify/Shop/42`.\n */\n shopId: string\n /**\n * The GID of the product variant. E.g. `gid://shopify/ProductVariant/101`.\n */\n productVariantId: string\n /**\n * The GID of the product. E.g. `gid://shopify/Product/123`.\n */\n productId: string\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n * This will soon be deprecated in favor of just `publicListId`.\n */\n listId: string\n /**\n * The public ID of the product list.\n */\n publicListId: string\n}\n\nexport interface RemoveProductListItemParams {\n /**\n * The GID of the shop. E.g. `gid://shopify/Shop/42`.\n */\n shopId: string\n /**\n * The GID of the product variant. E.g. `gid://shopify/ProductVariant/101`.\n */\n productVariantId: string\n /**\n * The GID of the product. E.g. `gid://shopify/Product/123`.\n */\n productId: string\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n * This will soon be deprecated in favor of just `publicListId`.\n */\n listId: string\n /**\n * The public ID of the product list.\n */\n publicListId: string\n}\n\nexport interface GetRecommendedProductsParams {\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetRecommendedShopsParams {\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface SearchProductsByShopParams {\n shopId: string\n query?: string\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetBuyerAttributesParams {\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetCurrentUserParams {\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetOrdersParams {\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetPopularProductsParams {\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetPopularProductsResponse {\n data: Product[]\n pageInfo: PaginationInfo\n}\n\nexport interface PreviewProductInARParams {\n id: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetCuratedProductsParams {\n handle: string\n requiredTags: string[]\n anyOfTags: string[]\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetCuratedProductsResponse {\n data: Product[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetProductMediaParams {\n id: string\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetProductMediaResponse {\n data: ProductMedia[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetProductsParams {\n productIds: string[]\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetProductsResponse {\n data: Product[]\n}\n\nexport interface GetProductParams {\n id: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetProductResponse {\n data: Product\n}\n\nexport type FetchPolicy =\n | 'cache-first'\n | 'network-only'\n | 'cache-only'\n | 'no-cache'\n | 'standby'\n\nexport type WatchQueryFetchPolicy = FetchPolicy | 'cache-and-network'\n\nexport enum CurrencyCode {\n AED = 'AED',\n AFN = 'AFN',\n ALL = 'ALL',\n AMD = 'AMD',\n ANG = 'ANG',\n AOA = 'AOA',\n ARS = 'ARS',\n AUD = 'AUD',\n AWG = 'AWG',\n AZN = 'AZN',\n BAM = 'BAM',\n BBD = 'BBD',\n BDT = 'BDT',\n BGN = 'BGN',\n BHD = 'BHD',\n BIF = 'BIF',\n BMD = 'BMD',\n BND = 'BND',\n BOB = 'BOB',\n BRL = 'BRL',\n BSD = 'BSD',\n BTN = 'BTN',\n BWP = 'BWP',\n BYN = 'BYN',\n BYR = 'BYR',\n BZD = 'BZD',\n CAD = 'CAD',\n CDF = 'CDF',\n CHF = 'CHF',\n CLP = 'CLP',\n CNY = 'CNY',\n COP = 'COP',\n CRC = 'CRC',\n CVE = 'CVE',\n CZK = 'CZK',\n DJF = 'DJF',\n DKK = 'DKK',\n DOP = 'DOP',\n DZD = 'DZD',\n EGP = 'EGP',\n ERN = 'ERN',\n ETB = 'ETB',\n EUR = 'EUR',\n FJD = 'FJD',\n FKP = 'FKP',\n GBP = 'GBP',\n GEL = 'GEL',\n GHS = 'GHS',\n GIP = 'GIP',\n GMD = 'GMD',\n GNF = 'GNF',\n GTQ = 'GTQ',\n GYD = 'GYD',\n HKD = 'HKD',\n HNL = 'HNL',\n HRK = 'HRK',\n HTG = 'HTG',\n HUF = 'HUF',\n IDR = 'IDR',\n ILS = 'ILS',\n INR = 'INR',\n IQD = 'IQD',\n IRR = 'IRR',\n ISK = 'ISK',\n JEP = 'JEP',\n JMD = 'JMD',\n JOD = 'JOD',\n JPY = 'JPY',\n KES = 'KES',\n KGS = 'KGS',\n KHR = 'KHR',\n KID = 'KID',\n KMF = 'KMF',\n KRW = 'KRW',\n KWD = 'KWD',\n KYD = 'KYD',\n KZT = 'KZT',\n LAK = 'LAK',\n LBP = 'LBP',\n LKR = 'LKR',\n LRD = 'LRD',\n LSL = 'LSL',\n LTL = 'LTL',\n LVL = 'LVL',\n LYD = 'LYD',\n MAD = 'MAD',\n MDL = 'MDL',\n MGA = 'MGA',\n MKD = 'MKD',\n MMK = 'MMK',\n MNT = 'MNT',\n MOP = 'MOP',\n MRU = 'MRU',\n MUR = 'MUR',\n MVR = 'MVR',\n MWK = 'MWK',\n MXN = 'MXN',\n MYR = 'MYR',\n MZN = 'MZN',\n NAD = 'NAD',\n NGN = 'NGN',\n NIO = 'NIO',\n NOK = 'NOK',\n NPR = 'NPR',\n NZD = 'NZD',\n OMR = 'OMR',\n PAB = 'PAB',\n PEN = 'PEN',\n PGK = 'PGK',\n PHP = 'PHP',\n PKR = 'PKR',\n PLN = 'PLN',\n PYG = 'PYG',\n QAR = 'QAR',\n RON = 'RON',\n RSD = 'RSD',\n RUB = 'RUB',\n RWF = 'RWF',\n SAR = 'SAR',\n SBD = 'SBD',\n SCR = 'SCR',\n SDG = 'SDG',\n SEK = 'SEK',\n SGD = 'SGD',\n SHP = 'SHP',\n SLL = 'SLL',\n SOS = 'SOS',\n SRD = 'SRD',\n SSP = 'SSP',\n STD = 'STD',\n STN = 'STN',\n SYP = 'SYP',\n SZL = 'SZL',\n THB = 'THB',\n TJS = 'TJS',\n TMT = 'TMT',\n TND = 'TND',\n TOP = 'TOP',\n TRY = 'TRY',\n TTD = 'TTD',\n TWD = 'TWD',\n TZS = 'TZS',\n UAH = 'UAH',\n UGX = 'UGX',\n USD = 'USD',\n UYU = 'UYU',\n UZS = 'UZS',\n VED = 'VED',\n VEF = 'VEF',\n VES = 'VES',\n VND = 'VND',\n VUV = 'VUV',\n WST = 'WST',\n XAF = 'XAF',\n XCD = 'XCD',\n XOF = 'XOF',\n XPF = 'XPF',\n XXX = 'XXX',\n YER = 'YER',\n ZAR = 'ZAR',\n ZMW = 'ZMW',\n}\n\nexport type Decimal = string\n\nexport type MiniAppParams = any\n\nexport interface MiniAppConfig<\n _DeprecatedParams extends MiniAppParams = undefined,\n> {\n /**\n * Root component of used inside the Minis Viewer\n */\n ViewerRoot: () => JSX.Element | null\n}\n\nexport interface MiniManifest {\n trusted_domains?: string[]\n permissions?: string[]\n [key: string]: any\n}\n\nexport type Permission = 'CAMERA' | 'GALLERY' | 'MICROPHONE'\n\nexport interface Money {\n amount: Decimal\n currencyCode: CurrencyCode\n}\n\nexport interface ProductImage {\n id?: string | null\n altText?: string | null\n url: string\n sensitive?: boolean | null\n}\n\nexport interface ProductVariant {\n id: string\n isFavorited: boolean\n image?: ProductImage | null\n price: Money\n compareAtPrice?: Money | null\n}\n\nexport interface ProductShop {\n id: string\n name: string\n}\n\nexport type ProductMedia =\n | {\n id: string\n image: ProductImage | null\n mediaContentType: 'IMAGE'\n alt: string | null\n }\n | {\n id: string\n mediaContentType: 'MODEL_3D'\n previewImage: ProductImage | null\n sources: {\n filesize: number\n format: string\n mimeType: string\n url: string\n }[]\n alt: string | null\n }\n | {\n id: string\n mediaContentType: 'VIDEO'\n previewImage: ProductImage | null\n sources: {\n format: string\n mimeType: string\n url: string\n width: number\n height: number\n }[]\n alt: string | null\n }\n | {\n id: string\n mediaContentType: 'EXTERNAL_VIDEO'\n previewImage: ProductImage | null\n embedUrl: string\n alt: string | null\n }\n\nexport interface Product {\n id: string\n title: string\n reviewAnalytics: {\n averageRating?: number | null\n reviewCount?: number | null\n }\n shop: ProductShop\n selectedVariant?: ProductVariant\n defaultVariantId: string\n isFavorited: boolean\n variants?: ProductVariant[]\n featuredImage?: ProductImage | null\n price: Money\n compareAtPrice?: Money | null\n}\n\nexport interface Shop {\n id: string\n name: string\n isFollowing?: boolean | null\n shareUrl?: string | null\n primaryDomain: {\n url: string\n }\n logoImage?: ProductImage | null\n reviewAnalytics: {\n averageRating?: number | null\n reviewCount: number\n }\n}\n\nexport interface QueryOptions {\n fetchPolicy?: WatchQueryFetchPolicy\n skip?: boolean\n}\n\nexport interface ProductList {\n id: string\n publicId: string | null\n name: string | null\n products: Product[]\n}\n\nexport interface Order {\n id: string\n name: string\n lineItems: {\n productTitle: string\n variantTitle: string | null\n quantity: number\n product: Product | null\n }[]\n shop: Shop | null\n}\n\nexport interface BuyerAttributes {\n genderAffinity?: Gender\n categoryAffinities: TaxonomyCategory[]\n}\n\nexport enum Gender {\n Male = 'MALE',\n Female = 'FEMALE',\n Neutral = 'NEUTRAL',\n}\n\nexport interface TaxonomyCategory {\n id: string\n name: string\n ancestors?: TaxonomyCategory[]\n}\n\n/**\n * A user profile.\n */\nexport interface UserProfile {\n /**\n * The display name of the user.\n */\n displayName?: string | null\n /**\n * The avatar image of the user.\n */\n avatarImage?: {\n url: string\n } | null\n}\n\n/**\n * A user metafield.\n */\nexport interface UserMetafield {\n /**\n * The key of the user metafield.\n */\n key: string\n /**\n * The value of the user metafield.\n */\n value: string\n}\n\nexport interface ContentImage {\n id: string | null\n url: string\n width: number | null\n height: number | null\n}\n\nexport interface ContentProduct {\n id: string\n title: string\n featuredImage: ContentImage | null\n}\n\nexport type ContentVisibility = 'DISCOVERABLE' | 'LINKABLE'\n\nexport interface Content {\n publicId: string\n externalId: string | null\n image: ContentImage\n title: string\n description: string | null\n visibility: ContentVisibility[]\n shareableUrl: string | null\n products: ContentProduct[] | null\n}\n\n/**\n * The fetch policy to use. `cache-first` will only fetch from the network if there is no\n * cached data. `network-only` will fetch from the network regardless of whether there\n * is cached data.\n */\nexport type DataHookFetchPolicy = 'cache-first' | 'network-only'\n\nexport interface DataHookOptionsBase {\n /**\n * When true, the data will not be fetched immediately.\n */\n skip?: boolean\n /**\n * The fetch policy to use for the initial data load. Subsequent loads may use different policies.\n */\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface PaginatedDataHookOptionsBase extends DataHookOptionsBase {\n /**\n * The number of products to fetch.\n * @default 20\n */\n first?: number\n}\n\nexport interface DataHookReturnsBase {\n /**\n * Whether data is loading. Represents the initial data load but not `refetch`/`fetchMore` calls.\n */\n loading: boolean\n /**\n * The error that occurred while loading. Represents the initial data load and `refetch` calls but not `fetchMore`\n */\n error: Error | null\n /**\n * Refetch the data. Data is updated in place. The `loading` state will not update but the `error` state will.\n */\n refetch: () => Promise<void>\n}\n\nexport interface PaginatedDataHookReturnsBase extends DataHookReturnsBase {\n /**\n * Whether there is a next page to fetch.\n */\n hasNextPage: boolean\n /**\n * Fetch more data. Data is updated in place. The `loading` and `error` states will not update\n */\n fetchMore: () => Promise<void>\n}\n\nexport const Consent = {\n MiniConsent: 'mini_consent',\n CameraConsent: 'camera_consent',\n PhotoLibraryConsent: 'photo_library_consent',\n MicrophoneConsent: 'microphone_consent',\n} as const\n\nexport const ConsentStatus = {\n Granted: 'granted',\n Dismissed: 'dismissed',\n Idle: 'idle',\n} as const\n\nexport type ConsentType = (typeof Consent)[keyof typeof Consent]\n\nexport type ConsentStatusType =\n (typeof ConsentStatus)[keyof typeof ConsentStatus]\n\nexport interface PaginatedDataHookPageInfo {\n /**\n * Whether there is a next page to fetch.\n */\n hasNextPage: boolean\n /**\n * The cursor to use for the next page of data.\n */\n endCursor: string | null\n}\n\ndeclare global {\n interface Window {\n minisSDK: ShopActions\n }\n}\n\nexport {}\n"],"names":["CurrencyCode","Gender","Consent","ConsentStatus"],"mappings":"AAwtBY,IAAAA,sBAAAA,OACVA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA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ACrB,aAAa;AAAA,EACb,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,mBAAmB;AACrB,GAEaC,IAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,MAAM;AACR;"}
1
+ {"version":3,"file":"minisSDK.generated.d.js","sources":["../../src/types/minisSDK.generated.d.ts"],"sourcesContent":["/* eslint-disable @shopify/typescript/prefer-pascal-case-enums */\n// Auto-generated type definitions for MinisSDK\n// Generated on: 2025-06-18T10:56:57.588Z\n// Do not edit this file manually - run the generation script instead\n// Source: useShopActionsImplementationV3.ts + shopActionsV3Definitions.ts + shopActionsV3Types.ts\n// Generated using TypeScript compiler API for reliable AST parsing\n//\n// This file is self-contained and can be shipped independently\n\n// ============================================================================\n// Base Types (extracted using TypeScript AST parsing)\n// ============================================================================\n\nexport interface ApiKeys {\n refreshToken: string\n accessToken: string\n}\n\nexport interface ShopActionOk<T> {\n ok: true\n data: T\n}\n\nexport interface ShopActionError {\n ok: false\n error: Error & {code?: string}\n}\n\nexport type ShopActionResult<T = void> = ShopActionOk<T> | ShopActionError\n\nexport interface ShopActions {\n getShopAppInformation: () => Promise<\n ShopActionResult<GetShopAppInformationResponse>\n >\n productRecommendationImpression(\n params: ProductRecommendationImpressionParams\n ): Promise<ShopActionResult>\n productRecommendationClick(\n params: ProductRecommendationClickParams\n ): Promise<ShopActionResult>\n hideEntryPoint(): Promise<ShopActionResult>\n closeMini(): Promise<ShopActionResult>\n\n // account actions\n followShop(params: FollowShopParams): Promise<ShopActionResult<boolean>>\n unfollowShop(params: UnfollowShopParams): Promise<ShopActionResult<boolean>>\n favorite(params: FavoriteParams): Promise<ShopActionResult>\n unfavorite(params: UnfavoriteParams): Promise<ShopActionResult>\n getAccountInformation: (\n params: GetAccountInformationParams\n ) => Promise<ShopActionResult<GetAccountInformationResponse>>\n\n // user actions\n getCurrentUser(\n params?: GetCurrentUserParams\n ): Promise<ShopActionResult<GetCurrentUserResponse>>\n\n // product actions\n createOrderAttribution(\n params: CreateOrderAttributionParams\n ): Promise<ShopActionResult>\n addToCart(params: AddToCartParams): Promise<ShopActionResult>\n buyProduct(params: BuyProductParams): Promise<ShopActionResult>\n buyProducts(params: BuyProductsParams): Promise<ShopActionResult>\n\n // error actions\n showErrorScreen: (params: ShowErrorScreenParams) => Promise<ShopActionResult>\n showErrorToast: (message: ShowErrorToastParams) => Promise<ShopActionResult>\n\n // deeplink actions\n getDeeplinkPaths(): Promise<ShopActionResult<GetDeeplinkPathsResponse>>\n navigateToDeeplink(\n params: NavigateToDeeplinkParams\n ): Promise<ShopActionResult>\n\n // navigation actions\n navigateToShop(params: NavigateToShopParams): Promise<ShopActionResult>\n navigateToProduct(params: NavigateToProductParams): Promise<ShopActionResult>\n navigateToOrder(params: NavigateToOrderParams): Promise<ShopActionResult>\n navigateToCheckout(\n params: NavigateToCheckoutParams\n ): Promise<ShopActionResult>\n\n // image upload actions\n createImageUploadLink(\n params: CreateImageUploadLinkParams\n ): Promise<ShopActionResult<CreateImageUploadLinkResponse>>\n completeImageUpload(\n params: CompleteImageUploadParams\n ): Promise<ShopActionResult<CompleteImageUploadResponse>>\n\n // async storage actions\n getPersistedItem(\n params: GetAsyncStorageItemParams\n ): Promise<ShopActionResult<string | null>>\n setPersistedItem(params: SetAsyncStorageItemParams): Promise<ShopActionResult>\n removePersistedItem(\n params: RemoveAsyncStorageItemParams\n ): Promise<ShopActionResult>\n getAllPersistedKeys(): Promise<ShopActionResult<string[]>>\n clearPersistedItems(): Promise<ShopActionResult>\n\n getInternalPersistedItem(\n params: GetAsyncStorageItemParams\n ): Promise<ShopActionResult<string | null>>\n setInternalPersistedItem(\n params: SetAsyncStorageItemParams\n ): Promise<ShopActionResult>\n removeInternalPersistedItem(\n params: RemoveAsyncStorageItemParams\n ): Promise<ShopActionResult>\n getAllInternalPersistedKeys(): Promise<ShopActionResult<string[]>>\n clearInternalPersistedItems(): Promise<ShopActionResult>\n\n // secure storage actions\n getSecret(): Promise<ShopActionResult<string | null>>\n setSecret(params: SetSecretParams): Promise<ShopActionResult>\n removeSecret(): Promise<ShopActionResult>\n\n // event reporting actions\n reportInteraction(params: ReportInteractionParams): Promise<ShopActionResult>\n reportImpression(params: ReportImpressionParams): Promise<ShopActionResult>\n reportContentImpression(\n params: ReportContentImpressionParams\n ): Promise<ShopActionResult>\n\n getProductLists(\n params?: GetProductListsParams\n ): Promise<ShopActionResult<GetProductListsResponse>>\n\n getProductList(\n params?: GetProductListParams\n ): Promise<ShopActionResult<GetProductListResponse>>\n\n // product list actions\n addProductList(\n params: AddProductListParams\n ): Promise<ShopActionResult<ProductList>>\n removeProductList(params: RemoveProductListParams): Promise<ShopActionResult>\n renameProductList: (\n params: RenameProductListParams\n ) => Promise<ShopActionResult<ProductList>>\n addProductListItem(\n params: AddProductListItemParams\n ): Promise<ShopActionResult>\n removeProductListItem(\n params: RemoveProductListItemParams\n ): Promise<ShopActionResult>\n\n // recommendations actions\n getRecommendedProducts(\n params?: GetRecommendedProductsParams\n ): Promise<ShopActionResult<GetRecommendedProductsResponse>>\n getRecommendedShops(\n params?: GetRecommendedShopsParams\n ): Promise<ShopActionResult<GetRecommendedShopsResponse>>\n searchProductsByShop(\n params?: SearchProductsByShopParams\n ): Promise<ShopActionResult<SearchProductsByShopResponse>>\n\n // orders list actions\n getOrders(\n params?: GetOrdersParams\n ): Promise<ShopActionResult<GetOrdersResponse>>\n\n getBuyerAttributes(): Promise<ShopActionResult<GetBuyerAttributesResponse>>\n\n // content actions\n showFeedbackSheet(params: ShowFeedbackSheetParams): Promise<ShopActionResult>\n\n getPopularProducts(\n params?: GetPopularProductsParams\n ): Promise<ShopActionResult<GetPopularProductsResponse>>\n\n share(params: ShareParams): Promise<ShopActionResult>\n}\n\nexport interface AuthShopActions {\n refreshAccessToken(\n params: RefreshAccessTokenParams\n ): Promise<ShopActionResult<ApiKeys>>\n signOut(): Promise<ShopActionResult>\n}\n\nexport type AllShopActions = ShopActions & AuthShopActions\n\nexport type ShopActionParams<T extends keyof AllShopActions> = Parameters<\n AllShopActions[T]\n>[0]\n\nexport interface FavoriteParams {\n shopId: string\n productId: string\n productVariantId: string\n}\n\nexport interface UnfavoriteParams {\n shopId: string\n productId: string\n productVariantId: string\n}\n\nexport interface LineItemAttribution {\n sourceName: string\n sourceIdentifier: string\n}\n\nexport interface CreateOrderAttributionParams {\n orderId: string\n productVariantId: string\n attribution?: LineItemAttribution\n}\n\nexport interface AddToCartParams extends BuyProductLineItem {\n /**\n * The discount codes to apply to the cart.\n */\n discountCodes?: string[]\n /**\n * Attribution data for the line item.\n * @deprecated\n */\n attribution?: LineItemAttribution\n}\n\nexport interface BuyProductLineItem {\n /**\n * The GID of the product. E.g. `gid://shopify/Product/123`.\n */\n productId: string\n /**\n * The GID of the product variant. E.g. `gid://shopify/ProductVariant/456`.\n */\n productVariantId: string\n /**\n * The quantity of the product to add to the cart.\n */\n quantity?: number\n}\n\nexport interface BuyProductsParams {\n items: [BuyProductLineItem, ...BuyProductLineItem[]] // at least one item\n attribution?: LineItemAttribution\n discountCode?: string\n}\n\nexport interface BuyProductParams extends BuyProductLineItem {\n /**\n * Attribution data for the line item.\n * @deprecated\n */\n attribution?: LineItemAttribution\n /**\n * The discount code to apply to the product.\n */\n discountCode?: string\n}\n\nexport interface UpdateLineItemAttributesParams {\n lineItemAttributes: {key: string; value: string}[]\n attribution?: LineItemAttribution\n}\n\nexport interface NavigateToShopParams {\n shopId: string\n}\n\nexport interface NavigateToOrderParams {\n /**\n * The GID of the order. E.g. `gid://shopify/Order/123`.\n */\n orderId: string\n}\n\nexport interface NavigateToCheckoutParams {\n /**\n * The GID of the shop. E.g. `gid://shopify/Shop/123`.\n */\n shopId: string\n}\n\nexport interface NavigateToProductParams {\n /**\n * The GID of the product. E.g. `gid://shopify/Product/123`.\n */\n productId: string\n /**\n * If present, the GID of the variant that should be initially selected\n */\n productVariantId?: string\n /*\n * Variants displayed in the product details screen will be limited to those\n * whose ID is included in this list.\n */\n includedProductVariantGIDs?: string[]\n /**\n * @deprecated use includedProductVariantGIDs instead\n */\n includedProductVariantIds?: string[]\n /**\n * @deprecated do not use\n */\n attribution?: LineItemAttribution\n /**\n * The discount code to apply to the product.\n */\n discountCode?: string\n}\n\nexport interface RefreshAccessTokenParams {\n refreshToken: string\n}\n\nexport interface ProductRecommendationImpressionParams {\n // The product GID string\n productId: string\n // Optional section id, could be useful for tracking which UI sections get impressions\n sectionId?: string\n}\n\nexport interface ProductRecommendationClickParams {\n productId: string\n sectionId?: string\n}\n\nexport interface ShowErrorScreenParams {\n /**\n * The message to display in the error screen.\n */\n message?: string\n /**\n * The title of the error screen.\n */\n title?: string\n}\n\nexport interface ShowErrorToastParams {\n message?: string\n}\n\nexport interface GetAccountInformationParams {\n /**\n * To use user account information, a shopId must be given to track on\n * which shop's behalf user information is being accessed\n */\n shopId: string\n type: 'email' | 'name' | 'phone'\n}\n\nexport interface AccountInformationPhoneInfo {\n phoneNumber: string\n countryCode: string\n prefix: string\n}\n\nexport interface GetAccountInformationResponse {\n status: 'available' | 'not-available'\n value?: string | AccountInformationPhoneInfo\n}\n\nexport interface GetShopAppInformationResponse {\n appVersion: string\n buildNumber: string\n buildId: string\n}\n\nexport interface FollowShopParams {\n shopId: string\n}\n\nexport interface UnfollowShopParams {\n shopId: string\n}\n\nexport interface NavigateToDeeplinkParams {\n deeplink: string\n}\n\nexport interface GetDeeplinkPathsResponse {\n matchers: string[]\n}\n\nexport interface ProductRecommendationClickParams {\n productId: string\n productVariantId?: string\n variantGIDs?: string[]\n discountCode?: string\n attribution?: LineItemAttribution\n sectionId?: string\n}\n\nexport interface CreateImageUploadLinkParams {\n input: {\n mimeType: string\n fileSize: number\n }[]\n}\n\nexport interface UploadTarget {\n url: string\n resourceUrl: string\n parameters: {name: string; value: string}[]\n}\n\nexport interface CreateImageUploadLinkResponse {\n targets?: UploadTarget[]\n error?: string\n}\n\nexport interface CompleteImageUploadParams {\n resourceUrls: string[]\n}\n\nexport interface CompleteImageUploadResponse {\n files?: {\n id: string\n fileStatus: 'FAILED' | 'PENDING' | 'PROCESSING' | 'READY'\n image?: {\n url: string\n } | null\n }[]\n error?: string\n}\n\nexport interface PaginationInfo {\n hasNextPage: boolean\n endCursor: string | null\n}\n\nexport interface GetProductListsResponse {\n data: ProductList[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetProductListResponse {\n data: ProductList | null\n pageInfo: PaginationInfo\n}\n\nexport interface GetRecommendedProductsResponse {\n data: Product[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetRecommendedShopsResponse {\n data: Shop[]\n pageInfo: PaginationInfo\n}\n\nexport interface SearchProductsByShopResponse {\n data: Product[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetBuyerAttributesResponse {\n data: {\n genderAffinity?: Gender\n categoryAffinities: TaxonomyCategory[]\n }\n}\n\nexport interface GetCurrentUserResponse {\n data: UserProfile\n}\n\nexport interface GetOrdersResponse {\n data: Order[]\n pageInfo: PaginationInfo\n}\n\nexport interface SetSecretParams {\n value: string\n}\n\nexport interface SetAsyncStorageItemParams {\n key: string\n value: string\n}\n\nexport interface GetAsyncStorageItemParams {\n key: string\n}\n\nexport interface RemoveAsyncStorageItemParams {\n key: string\n}\n\nexport interface ReportInteractionParams {\n interactionType: string\n interactionValue?: string\n pageValue?: string\n}\n\nexport interface ReportImpressionParams {\n subjectType?: string\n subjectId?: string\n pageValue?: string\n}\n\nexport interface ReportContentImpressionParams {\n publicId: string\n pageValue: string\n}\n\nexport interface GetProductListsParams {\n /**\n * The number of lists to fetch.\n */\n first?: number\n /**\n * The cursor to fetch the next page of lists.\n */\n after?: string\n /**\n * The number of items per list to fetch.\n */\n itemsFirst?: number\n /**\n * The fetch policy to use.\n */\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetProductListParams {\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n */\n id?: string\n /**\n * The public ID of the product list.\n */\n publicId?: string\n /**\n * The number of items to fetch.\n */\n first?: number\n /**\n * The cursor to fetch the next page of items.\n */\n after?: string\n /**\n * The fetch policy to use.\n */\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface AddProductListParams {\n /**\n * The name of the product list.\n */\n name: string\n /**\n * A description of the product list.\n */\n description?: string\n}\n\nexport interface RemoveProductListParams {\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n */\n id: string\n}\n\nexport interface RenameProductListParams {\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n */\n id: string\n /**\n * The new name of the product list.\n */\n name: string\n}\n\nexport interface AddProductListItemParams {\n /**\n * The GID of the shop. E.g. `gid://shopify/Shop/42`.\n */\n shopId: string\n /**\n * The GID of the product variant. E.g. `gid://shopify/ProductVariant/101`.\n */\n productVariantId: string\n /**\n * The GID of the product. E.g. `gid://shopify/Product/123`.\n */\n productId: string\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n * This will soon be deprecated in favor of just `publicListId`.\n */\n listId: string\n /**\n * The public ID of the product list.\n */\n publicListId: string\n}\n\nexport interface RemoveProductListItemParams {\n /**\n * The GID of the shop. E.g. `gid://shopify/Shop/42`.\n */\n shopId: string\n /**\n * The GID of the product variant. E.g. `gid://shopify/ProductVariant/101`.\n */\n productVariantId: string\n /**\n * The GID of the product. E.g. `gid://shopify/Product/123`.\n */\n productId: string\n /**\n * The GID of the product list. E.g. `gid://shopapp/ProductList/123`.\n * This will soon be deprecated in favor of just `publicListId`.\n */\n listId: string\n /**\n * The public ID of the product list.\n */\n publicListId: string\n}\n\nexport interface GetRecommendedProductsParams {\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetRecommendedShopsParams {\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface SearchProductsByShopParams {\n shopId: string\n query?: string\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetBuyerAttributesParams {\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetCurrentUserParams {\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetOrdersParams {\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface ShowFeedbackSheetParams {\n publicId: string\n}\n\nexport interface GetPopularProductsParams {\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetPopularProductsResponse {\n data: Product[]\n pageInfo: PaginationInfo\n}\n\nexport interface PreviewProductInARParams {\n id: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetCuratedProductsParams {\n handle: string\n requiredTags: string[]\n anyOfTags: string[]\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetCuratedProductsResponse {\n data: Product[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetProductMediaParams {\n id: string\n first?: number\n after?: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetProductMediaResponse {\n data: ProductMedia[]\n pageInfo: PaginationInfo\n}\n\nexport interface GetProductsParams {\n productIds: string[]\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetProductsResponse {\n data: Product[]\n}\n\nexport interface GetProductParams {\n id: string\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface GetProductResponse {\n data: Product\n}\n\nexport interface ShareParams {\n message?: string\n title?: string\n url?: string\n urls?: string[]\n type?: string\n failOnCancel?: boolean\n}\n\nexport interface MinisParams {\n /** The handle/identifier of the Mini application */\n handle: string\n /** The initial URL that was used to load the Mini (optional) */\n initialUrl?: string\n}\n\nexport type FetchPolicy =\n | 'cache-first'\n | 'network-only'\n | 'cache-only'\n | 'no-cache'\n | 'standby'\n\nexport type WatchQueryFetchPolicy = FetchPolicy | 'cache-and-network'\n\nexport enum CurrencyCode {\n AED = 'AED',\n AFN = 'AFN',\n ALL = 'ALL',\n AMD = 'AMD',\n ANG = 'ANG',\n AOA = 'AOA',\n ARS = 'ARS',\n AUD = 'AUD',\n AWG = 'AWG',\n AZN = 'AZN',\n BAM = 'BAM',\n BBD = 'BBD',\n BDT = 'BDT',\n BGN = 'BGN',\n BHD = 'BHD',\n BIF = 'BIF',\n BMD = 'BMD',\n BND = 'BND',\n BOB = 'BOB',\n BRL = 'BRL',\n BSD = 'BSD',\n BTN = 'BTN',\n BWP = 'BWP',\n BYN = 'BYN',\n BYR = 'BYR',\n BZD = 'BZD',\n CAD = 'CAD',\n CDF = 'CDF',\n CHF = 'CHF',\n CLP = 'CLP',\n CNY = 'CNY',\n COP = 'COP',\n CRC = 'CRC',\n CVE = 'CVE',\n CZK = 'CZK',\n DJF = 'DJF',\n DKK = 'DKK',\n DOP = 'DOP',\n DZD = 'DZD',\n EGP = 'EGP',\n ERN = 'ERN',\n ETB = 'ETB',\n EUR = 'EUR',\n FJD = 'FJD',\n FKP = 'FKP',\n GBP = 'GBP',\n GEL = 'GEL',\n GHS = 'GHS',\n GIP = 'GIP',\n GMD = 'GMD',\n GNF = 'GNF',\n GTQ = 'GTQ',\n GYD = 'GYD',\n HKD = 'HKD',\n HNL = 'HNL',\n HRK = 'HRK',\n HTG = 'HTG',\n HUF = 'HUF',\n IDR = 'IDR',\n ILS = 'ILS',\n INR = 'INR',\n IQD = 'IQD',\n IRR = 'IRR',\n ISK = 'ISK',\n JEP = 'JEP',\n JMD = 'JMD',\n JOD = 'JOD',\n JPY = 'JPY',\n KES = 'KES',\n KGS = 'KGS',\n KHR = 'KHR',\n KID = 'KID',\n KMF = 'KMF',\n KRW = 'KRW',\n KWD = 'KWD',\n KYD = 'KYD',\n KZT = 'KZT',\n LAK = 'LAK',\n LBP = 'LBP',\n LKR = 'LKR',\n LRD = 'LRD',\n LSL = 'LSL',\n LTL = 'LTL',\n LVL = 'LVL',\n LYD = 'LYD',\n MAD = 'MAD',\n MDL = 'MDL',\n MGA = 'MGA',\n MKD = 'MKD',\n MMK = 'MMK',\n MNT = 'MNT',\n MOP = 'MOP',\n MRU = 'MRU',\n MUR = 'MUR',\n MVR = 'MVR',\n MWK = 'MWK',\n MXN = 'MXN',\n MYR = 'MYR',\n MZN = 'MZN',\n NAD = 'NAD',\n NGN = 'NGN',\n NIO = 'NIO',\n NOK = 'NOK',\n NPR = 'NPR',\n NZD = 'NZD',\n OMR = 'OMR',\n PAB = 'PAB',\n PEN = 'PEN',\n PGK = 'PGK',\n PHP = 'PHP',\n PKR = 'PKR',\n PLN = 'PLN',\n PYG = 'PYG',\n QAR = 'QAR',\n RON = 'RON',\n RSD = 'RSD',\n RUB = 'RUB',\n RWF = 'RWF',\n SAR = 'SAR',\n SBD = 'SBD',\n SCR = 'SCR',\n SDG = 'SDG',\n SEK = 'SEK',\n SGD = 'SGD',\n SHP = 'SHP',\n SLL = 'SLL',\n SOS = 'SOS',\n SRD = 'SRD',\n SSP = 'SSP',\n STD = 'STD',\n STN = 'STN',\n SYP = 'SYP',\n SZL = 'SZL',\n THB = 'THB',\n TJS = 'TJS',\n TMT = 'TMT',\n TND = 'TND',\n TOP = 'TOP',\n TRY = 'TRY',\n TTD = 'TTD',\n TWD = 'TWD',\n TZS = 'TZS',\n UAH = 'UAH',\n UGX = 'UGX',\n USD = 'USD',\n UYU = 'UYU',\n UZS = 'UZS',\n VED = 'VED',\n VEF = 'VEF',\n VES = 'VES',\n VND = 'VND',\n VUV = 'VUV',\n WST = 'WST',\n XAF = 'XAF',\n XCD = 'XCD',\n XOF = 'XOF',\n XPF = 'XPF',\n XXX = 'XXX',\n YER = 'YER',\n ZAR = 'ZAR',\n ZMW = 'ZMW',\n}\n\nexport type Decimal = string\n\nexport type MiniAppParams = any\n\nexport interface MiniAppConfig<\n _DeprecatedParams extends MiniAppParams = undefined,\n> {\n /**\n * Root component of used inside the Minis Viewer\n */\n ViewerRoot: () => JSX.Element | null\n}\n\nexport interface MiniManifest {\n trusted_domains?: string[]\n permissions?: string[]\n [key: string]: any\n}\n\nexport type Permission = 'CAMERA' | 'GALLERY' | 'MICROPHONE'\n\nexport interface Money {\n amount: Decimal\n currencyCode: CurrencyCode\n}\n\nexport interface ProductImage {\n id?: string | null\n altText?: string | null\n url: string\n sensitive?: boolean | null\n}\n\nexport interface ProductVariant {\n id: string\n isFavorited: boolean\n image?: ProductImage | null\n price: Money\n compareAtPrice?: Money | null\n}\n\nexport interface ProductShop {\n id: string\n name: string\n}\n\nexport type ProductMedia =\n | {\n id: string\n image: ProductImage | null\n mediaContentType: 'IMAGE'\n alt: string | null\n }\n | {\n id: string\n mediaContentType: 'MODEL_3D'\n previewImage: ProductImage | null\n sources: {\n filesize: number\n format: string\n mimeType: string\n url: string\n }[]\n alt: string | null\n }\n | {\n id: string\n mediaContentType: 'VIDEO'\n previewImage: ProductImage | null\n sources: {\n format: string\n mimeType: string\n url: string\n width: number\n height: number\n }[]\n alt: string | null\n }\n | {\n id: string\n mediaContentType: 'EXTERNAL_VIDEO'\n previewImage: ProductImage | null\n embedUrl: string\n alt: string | null\n }\n\nexport interface Product {\n id: string\n title: string\n reviewAnalytics: {\n averageRating?: number | null\n reviewCount?: number | null\n }\n shop: ProductShop\n selectedVariant?: ProductVariant\n defaultVariantId: string\n isFavorited: boolean\n variants?: ProductVariant[]\n featuredImage?: ProductImage | null\n price: Money\n compareAtPrice?: Money | null\n}\n\nexport interface Shop {\n id: string\n name: string\n isFollowing?: boolean | null\n shareUrl?: string | null\n primaryDomain: {\n url: string\n }\n logoImage?: ProductImage | null\n reviewAnalytics: {\n averageRating?: number | null\n reviewCount: number\n }\n}\n\nexport interface QueryOptions {\n fetchPolicy?: WatchQueryFetchPolicy\n skip?: boolean\n}\n\nexport interface ProductList {\n id: string\n publicId: string | null\n name: string | null\n products: Product[]\n}\n\nexport interface Order {\n id: string\n name: string\n lineItems: {\n productTitle: string\n variantTitle: string | null\n quantity: number\n product: Product | null\n }[]\n shop: Shop | null\n}\n\nexport interface BuyerAttributes {\n genderAffinity?: Gender\n categoryAffinities: TaxonomyCategory[]\n}\n\nexport enum Gender {\n Male = 'MALE',\n Female = 'FEMALE',\n Neutral = 'NEUTRAL',\n}\n\nexport interface TaxonomyCategory {\n id: string\n name: string\n ancestors?: TaxonomyCategory[]\n}\n\n/**\n * A user profile.\n */\nexport interface UserProfile {\n /**\n * The display name of the user.\n */\n displayName?: string | null\n /**\n * The avatar image of the user.\n */\n avatarImage?: {\n url: string\n } | null\n}\n\n/**\n * A user metafield.\n */\nexport interface UserMetafield {\n /**\n * The key of the user metafield.\n */\n key: string\n /**\n * The value of the user metafield.\n */\n value: string\n}\n\nexport interface ContentImage {\n id: string | null\n url: string\n width: number | null\n height: number | null\n}\n\nexport interface ContentProduct {\n id: string\n title: string\n featuredImage: ContentImage | null\n}\n\nexport type ContentVisibility = 'DISCOVERABLE' | 'LINKABLE'\n\nexport interface Content {\n publicId: string\n externalId: string | null\n image: ContentImage\n title: string\n description: string | null\n visibility: ContentVisibility[]\n shareableUrl: string | null\n products: ContentProduct[] | null\n}\n\n/**\n * The fetch policy to use. `cache-first` will only fetch from the network if there is no\n * cached data. `network-only` will fetch from the network regardless of whether there\n * is cached data.\n */\nexport type DataHookFetchPolicy = 'cache-first' | 'network-only'\n\nexport interface DataHookOptionsBase {\n /**\n * When true, the data will not be fetched immediately.\n */\n skip?: boolean\n /**\n * The fetch policy to use for the initial data load. Subsequent loads may use different policies.\n */\n fetchPolicy?: DataHookFetchPolicy\n}\n\nexport interface PaginatedDataHookOptionsBase extends DataHookOptionsBase {\n /**\n * The number of products to fetch.\n * @default 20\n */\n first?: number\n}\n\nexport interface DataHookReturnsBase {\n /**\n * Whether data is loading. Represents the initial data load but not `refetch`/`fetchMore` calls.\n */\n loading: boolean\n /**\n * The error that occurred while loading. Represents the initial data load and `refetch` calls but not `fetchMore`\n */\n error: Error | null\n /**\n * Refetch the data. Data is updated in place. The `loading` state will not update but the `error` state will.\n */\n refetch: () => Promise<void>\n}\n\nexport interface PaginatedDataHookReturnsBase extends DataHookReturnsBase {\n /**\n * Whether there is a next page to fetch.\n */\n hasNextPage: boolean\n /**\n * Fetch more data. Data is updated in place. The `loading` and `error` states will not update\n */\n fetchMore: () => Promise<void>\n}\n\nexport const Consent = {\n MiniConsent: 'mini_consent',\n CameraConsent: 'camera_consent',\n PhotoLibraryConsent: 'photo_library_consent',\n MicrophoneConsent: 'microphone_consent',\n} as const\n\nexport const ConsentStatus = {\n Granted: 'granted',\n Dismissed: 'dismissed',\n Idle: 'idle',\n} as const\n\nexport type ConsentType = (typeof Consent)[keyof typeof Consent]\n\nexport type ConsentStatusType =\n (typeof ConsentStatus)[keyof typeof ConsentStatus]\n\nexport interface PaginatedDataHookPageInfo {\n /**\n * Whether there is a next page to fetch.\n */\n hasNextPage: boolean\n /**\n * The cursor to use for the next page of data.\n */\n endCursor: string | null\n}\n\ndeclare global {\n interface Window {\n minisSDK: ShopActions\n minisParams: MinisParams\n }\n}\n\nexport {}\n"],"names":["CurrencyCode","Gender","Consent","ConsentStatus"],"mappings":"AA0uBY,IAAAA,sBAAAA,OACVA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,MAA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aC,IAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,MAAM;AACR;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shopify/shop-minis-react",
3
3
  "license": "SEE LICENSE IN LICENSE.txt",
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "engines": {
@@ -20,6 +20,7 @@ export * from './storage/useImageUpload'
20
20
  // - Navigation Hooks
21
21
  export * from './navigation/useShopNavigation'
22
22
  export * from './navigation/useCloseMini'
23
+ export * from './navigation/useDeeplink'
23
24
 
24
25
  // - Shop Hooks
25
26
  export * from './shop/useShopCartActions'
@@ -30,3 +31,4 @@ export * from './shop/useRecommendedShops'
30
31
  // - Utility Hooks
31
32
  export * from './util/useErrorToast'
32
33
  export * from './util/useErrorScreen'
34
+ export * from './util/useShare'
@@ -0,0 +1,32 @@
1
+ import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs'
2
+
3
+ const data: ReferenceEntityTemplateSchema = {
4
+ name: 'useDeeplink',
5
+ category: 'hooks',
6
+ subCategory: 'navigation',
7
+ isVisualComponent: false,
8
+ related: [],
9
+ description:
10
+ 'The `useDeeplink` hook returns the path, query parameters, and hash parameters of the deep link URL that opened the Mini.',
11
+ type: 'hook',
12
+ defaultExample: {
13
+ codeblock: {
14
+ tabs: [
15
+ {
16
+ code: './useDeeplink.example.tsx',
17
+ language: 'tsx',
18
+ },
19
+ ],
20
+ title: 'Example code',
21
+ },
22
+ },
23
+ definitions: [
24
+ {
25
+ title: '',
26
+ type: 'UseDeeplinkGeneratedType',
27
+ description: '',
28
+ },
29
+ ],
30
+ }
31
+
32
+ export default data
@@ -0,0 +1,7 @@
1
+ import {useDeeplink} from '@shopify/shop-minis-react'
2
+
3
+ export default function MyComponent() {
4
+ const {path, queryParams, hash} = useDeeplink()
5
+
6
+ console.log({path, queryParams, hash})
7
+ }
@@ -0,0 +1,40 @@
1
+ import {useMemo} from 'react'
2
+
3
+ import {parseUrl} from '../../utils/parseUrl'
4
+
5
+ interface UseDeeplinkReturnType {
6
+ /**
7
+ * The path of the deeplink.
8
+ */
9
+ path?: string
10
+ /**
11
+ * The query parameters of the deeplink.
12
+ */
13
+ queryParams?: {[key: string]: string | undefined}
14
+ /**
15
+ * The hash of the deeplink.
16
+ */
17
+ hash?: string
18
+ }
19
+
20
+ export const useDeeplink = (): UseDeeplinkReturnType => {
21
+ const {initialUrl} = window.minisParams
22
+
23
+ return useMemo(() => {
24
+ if (!initialUrl) {
25
+ return {
26
+ path: undefined,
27
+ queryParams: undefined,
28
+ hash: undefined,
29
+ }
30
+ }
31
+
32
+ const parsedUrl = parseUrl(initialUrl)
33
+
34
+ return {
35
+ path: parsedUrl.pathname,
36
+ queryParams: parsedUrl.query,
37
+ hash: parsedUrl.hash,
38
+ }
39
+ }, [initialUrl])
40
+ }
@@ -0,0 +1,18 @@
1
+ import {useHandleAction} from '../../internal/useHandleAction'
2
+ import {useShopActions} from '../../internal/useShopActions'
3
+ import {ShareParams} from '../../types'
4
+
5
+ interface UseShareReturns {
6
+ /**
7
+ * Closes the Mini viewer.
8
+ */
9
+ share: (params: ShareParams) => void
10
+ }
11
+
12
+ export const useShare = (): UseShareReturns => {
13
+ const {share} = useShopActions()
14
+
15
+ return {
16
+ share: useHandleAction(share),
17
+ }
18
+ }
@@ -233,4 +233,5 @@ window.minisSDK = window.minisSDK || {
233
233
  ],
234
234
  },
235
235
  }),
236
+ share: logAction('share'),
236
237
  }
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @shopify/typescript/prefer-pascal-case-enums */
2
2
  // Auto-generated type definitions for MinisSDK
3
- // Generated on: 2025-06-16T14:51:57.942Z
3
+ // Generated on: 2025-06-18T10:56:57.588Z
4
4
  // Do not edit this file manually - run the generation script instead
5
5
  // Source: useShopActionsImplementationV3.ts + shopActionsV3Definitions.ts + shopActionsV3Types.ts
6
6
  // Generated using TypeScript compiler API for reliable AST parsing
@@ -171,6 +171,8 @@ export interface ShopActions {
171
171
  getPopularProducts(
172
172
  params?: GetPopularProductsParams
173
173
  ): Promise<ShopActionResult<GetPopularProductsResponse>>
174
+
175
+ share(params: ShareParams): Promise<ShopActionResult>
174
176
  }
175
177
 
176
178
  export interface AuthShopActions {
@@ -261,10 +263,6 @@ export interface UpdateLineItemAttributesParams {
261
263
 
262
264
  export interface NavigateToShopParams {
263
265
  shopId: string
264
- /**
265
- * @deprecated
266
- */
267
- shopName?: string
268
266
  }
269
267
 
270
268
  export interface NavigateToOrderParams {
@@ -501,7 +499,7 @@ export interface ReportImpressionParams {
501
499
 
502
500
  export interface ReportContentImpressionParams {
503
501
  publicId: string
504
- pageValue?: string
502
+ pageValue: string
505
503
  }
506
504
 
507
505
  export interface GetProductListsParams {
@@ -657,6 +655,10 @@ export interface GetOrdersParams {
657
655
  fetchPolicy?: DataHookFetchPolicy
658
656
  }
659
657
 
658
+ export interface ShowFeedbackSheetParams {
659
+ publicId: string
660
+ }
661
+
660
662
  export interface GetPopularProductsParams {
661
663
  first?: number
662
664
  after?: string
@@ -717,6 +719,22 @@ export interface GetProductResponse {
717
719
  data: Product
718
720
  }
719
721
 
722
+ export interface ShareParams {
723
+ message?: string
724
+ title?: string
725
+ url?: string
726
+ urls?: string[]
727
+ type?: string
728
+ failOnCancel?: boolean
729
+ }
730
+
731
+ export interface MinisParams {
732
+ /** The handle/identifier of the Mini application */
733
+ handle: string
734
+ /** The initial URL that was used to load the Mini (optional) */
735
+ initialUrl?: string
736
+ }
737
+
720
738
  export type FetchPolicy =
721
739
  | 'cache-first'
722
740
  | 'network-only'
@@ -1189,6 +1207,7 @@ export interface PaginatedDataHookPageInfo {
1189
1207
  declare global {
1190
1208
  interface Window {
1191
1209
  minisSDK: ShopActions
1210
+ minisParams: MinisParams
1192
1211
  }
1193
1212
  }
1194
1213