useErrorScreen
The useErrorScreen hook displays a full-screen blocking error UI. Use this for critical, unrecoverable errors that prevent users from continuing, such as missing required data or fatal API errors. The error screen takes over the entire Mini interface and typically requires user action to dismiss or retry.
Use useErrorScreen for critical failures that block the user workflow (e.g., authentication failures, data corruption, network timeouts that prevent the app from functioning). This provides a full-screen error UI that the user must acknowledge. Use useErrorToast for recoverable errors or informational warnings (e.g., failed to save preference, temporary network issues). This shows a non-blocking notification that auto-dismisses and allows users to continue their current task.
Use useErrorScreen for critical failures that block the user workflow (e.g., authentication failures, data corruption, network timeouts that prevent the app from functioning). This provides a full-screen error UI that the user must acknowledge. Use useErrorToast for recoverable errors or informational warnings (e.g., failed to save preference, temporary network issues). This shows a non-blocking notification that auto-dismisses and allows users to continue their current task.
Anchor to useErrorScreenuse Error Screen()
UseErrorScreenReturns
- showErrorScreen
Show an error screen with the given error message.
ShopActions
ShopActions
{
[K in keyof ShopActionEvents as SnakeToCamelCase<K>]: ShopActionEvents[K]
}ShopActionEvents
- ADD_PRODUCT_LIST
ShopAction<AddProductListParams, ProductList> - ADD_PRODUCT_LIST_ITEM
ShopAction<AddProductListItemParams, void> - ADD_TO_CART
ShopAction<AddToCartParams, void> - BUY_PRODUCT
ShopAction<BuyProductParams, void> - BUY_PRODUCTS
ShopAction<BuyProductsParams, void> - CHECK_PERMISSION
ShopAction<CheckPermissionParams, CheckPermissionResponse> - CHECK_SCOPES_CONSENT
ShopAction< CheckScopesConsentParams, {data: CheckScopesConsentResponse} > - CLEAR_INTERNAL_PERSISTED_ITEMS
ShopAction<void, void> - CLEAR_PERSISTED_ITEMS
ShopAction<void, void> - CLOSE_MINI
ShopAction<void, void> - COMPLETE_IMAGE_UPLOAD
ShopAction< CompleteImageUploadParams, CompleteImageUploadResponse > - CREATE_CONTENT
ShopAction<CreateContentParams, CreateContentResponse> - CREATE_IMAGE_UPLOAD_LINK
ShopAction< CreateImageUploadLinkParams, CreateImageUploadLinkResponse > - CREATE_ORDER_ATTRIBUTION
ShopAction<CreateOrderAttributionParams, void> - FAVORITE
ShopAction<FavoriteParams, void> - FOLLOW_SHOP
ShopAction<FollowShopParams, boolean> - GENERATE_USER_TOKEN
ShopAction<void, GenerateUserTokenResponse> - GET_ACCOUNT_INFORMATION
ShopAction< GetAccountInformationParams, GetAccountInformationResponse > - GET_ALL_INTERNAL_PERSISTED_KEYS
ShopAction<void, string[]> - GET_ALL_PERSISTED_KEYS
ShopAction<void, string[]> - GET_BUYER_ATTRIBUTES
ShopAction< GetBuyerAttributesParams, GetBuyerAttributesResponse > - GET_CONTENT
ShopAction<GetContentParams, GetContentResponse> - GET_CURRENT_USER
ShopAction<GetCurrentUserParams, GetCurrentUserResponse> - GET_DEEPLINK_PATHS
ShopAction<void, GetDeeplinkPathsResponse> - GET_FOLLOWED_SHOPS
ShopAction< GetFollowedShopsParams, GetFollowedShopsResponse > - GET_INTERNAL_PERSISTED_ITEM
ShopAction< GetAsyncStorageItemParams, string | null > - GET_ORDERS
ShopAction<GetOrdersParams, GetOrdersResponse> - GET_PERSISTED_ITEM
ShopAction<GetAsyncStorageItemParams, string | null> - GET_POPULAR_PRODUCTS
ShopAction< GetPopularProductsParams, GetPopularProductsResponse > - GET_PRODUCT
ShopAction<GetProductParams, GetProductResponse> - GET_PRODUCT_LIST
ShopAction<GetProductListParams, GetProductListResponse> - GET_PRODUCT_LISTS
ShopAction<GetProductListsParams, GetProductListsResponse> - GET_PRODUCT_MEDIA
ShopAction<GetProductMediaParams, GetProductMediaResponse> - GET_PRODUCT_REVIEWS
ShopAction< GetProductReviewsParams, GetProductReviewsResponse > - GET_PRODUCT_SEARCH
ShopAction< GetProductSearchParams, GetProductSearchResponse > - GET_PRODUCT_VARIANTS
ShopAction< GetProductVariantsParams, GetProductVariantsResponse > - GET_PRODUCTS
ShopAction<GetProductsParams, GetProductsResponse> - GET_RECENT_PRODUCTS
ShopAction< GetRecentProductsParams, GetRecentProductsResponse > - GET_RECENT_SHOPS
ShopAction<GetRecentShopsParams, GetRecentShopsResponse> - GET_RECOMMENDED_PRODUCTS
ShopAction< GetRecommendedProductsParams, GetRecommendedProductsResponse > - GET_RECOMMENDED_SHOPS
ShopAction< GetRecommendedShopsParams, GetRecommendedShopsResponse > - GET_SAVED_PRODUCTS
ShopAction< GetSavedProductsParams, GetSavedProductsResponse > - GET_SECRET
ShopAction<void, string | null> - GET_SHOP
ShopAction<GetShopParams, GetShopResponse> - GET_SHOP_APP_INFORMATION
ShopAction<void, GetShopAppInformationResponse> - INVOKE_INTENT
ShopAction<InvokeIntentParams, InvokeIntentResponse> - NAVIGATE_TO_CART
ShopAction<void, void> - NAVIGATE_TO_CHECKOUT
ShopAction<NavigateToCheckoutParams, void> - NAVIGATE_TO_DEEPLINK
ShopAction<NavigateToDeeplinkParams, void> - NAVIGATE_TO_ORDER
ShopAction<NavigateToOrderParams, void> - NAVIGATE_TO_PRODUCT
ShopAction<NavigateToProductParams, void> - NAVIGATE_TO_SHOP
ShopAction<NavigateToShopParams, void> - PREVIEW_PRODUCT_IN_AR
ShopAction<PreviewProductInARParams, void> - PRODUCT_RECOMMENDATION_CLICK
ShopAction< ProductRecommendationClickParams, void > - PRODUCT_RECOMMENDATION_IMPRESSION
ShopAction< ProductRecommendationImpressionParams, void > - REMOVE_INTERNAL_PERSISTED_ITEM
ShopAction<RemoveAsyncStorageItemParams, void> - REMOVE_PERSISTED_ITEM
ShopAction<RemoveAsyncStorageItemParams, void> - REMOVE_PRODUCT_LIST
ShopAction<RemoveProductListParams, void> - REMOVE_PRODUCT_LIST_ITEM
ShopAction<RemoveProductListItemParams, void> - REMOVE_SECRET
ShopAction<void, void> - RENAME_PRODUCT_LIST
ShopAction<RenameProductListParams, ProductList> - REPORT_CONTENT_IMPRESSION
ShopAction<ReportContentImpressionParams, void> - REPORT_ERROR
ShopAction<ReportErrorParams, void> - REPORT_FETCH
ShopAction<ReportFetchParams, void> - REPORT_IMPRESSION
ShopAction<ReportImpressionParams, void> - REPORT_INTERACTION
ShopAction<ReportInteractionParams, void> - REQUEST_PERMISSION
ShopAction< RequestPermissionParams, RequestPermissionResponse > - REQUEST_SCOPES_CONSENT
ShopAction<void, RequestScopesConsentResponse> - RESOLVE_INTENT
ShopAction<ResolveIntentParams, void> - SEARCH_PRODUCTS_BY_SHOP
ShopAction< SearchProductsByShopParams, SearchProductsByShopResponse > - SET_INTERNAL_PERSISTED_ITEM
ShopAction<SetAsyncStorageItemParams, void> - SET_PERSISTED_ITEM
ShopAction<SetAsyncStorageItemParams, void> - SET_PRODUCT_LIST_VISIBILITY
ShopAction< SetProductListVisibilityParams, ProductList > - SET_SECRET
ShopAction<SetSecretParams, void> - SHARE
ShopAction<ShareParams, ShareResponse> - SHARE_SINGLE
ShopAction<ShareSingleParams, ShareSingleResponse> - SHOW_ERROR_SCREEN
ShopAction<ShowErrorScreenParams, void> - SHOW_ERROR_TOAST
ShopAction<ShowErrorToastParams, void> - SHOW_FEEDBACK_SHEET
ShopAction<ShowFeedbackSheetParams, void> - TRANSLATE_CONTENT_DOWN
ShopAction<void, void> - TRANSLATE_CONTENT_UP
ShopAction<TranslateContentUpParams, void> - UNFAVORITE
ShopAction<UnfavoriteParams, void> - UNFOLLOW_SHOP
ShopAction<UnfollowShopParams, boolean>
ShopAction
A generic type representing any action in ShopActions. - N: The name of the action (string literal type) - P: The params type for the action - R: The result type for the action
- params
P
Promise<ShopActionResult<R>>ShopActionResult
ShopActionOk<T> | ShopActionErrorShopActionOk
- data
T - mocked
boolean - ok
true
ShopActionError
- error
Error & { code?: string; } - mocked
boolean - ok
false
AddProductListParams
- description
A description of the product list.
string - name
The name of the product list.
string - privacyStatus
The privacy status of the product list. Defaults to 'PRIVATE'.
ProductListPrivacyStatus
ProductListPrivacyStatus
'PRIVATE' | 'PUBLIC'ProductList
- id
string - name
string | null - privacyStatus
ProductListPrivacyStatus - products
Product[] - publicId
string | null
Product
- compareAtPrice
Money | null - defaultVariantId
string - featuredImage
ProductImage | null - id
string - isFavorited
boolean - price
Money - referral
boolean - reviewAnalytics
{ averageRating?: number; reviewCount?: number; } - selectedVariant
ProductVariant - shop
ProductShop - title
string - variants
ProductVariant[]
Money
- amount
Decimal - currencyCode
CurrencyCode
Decimal
stringCurrencyCode
'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JEP' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KID' | 'KMF' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VED' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'XXX' | 'YER' | 'ZAR' | 'ZMW'ProductImage
- altText
string | null - height
number | null - id
string | null - sensitive
boolean | null - thumbhash
string | null - url
string - width
number | null
ProductVariant
- availableForSale
Whether the variant can be purchased. When `false`, calls to add the variant to cart or buy it through the SDK will fail. UI should be gated on this flag. May be `undefined` if the variant was sourced from an API that does not expose stock state.
boolean - compareAtPrice
Money | null - id
string - image
ProductImage | null - isFavorited
boolean - price
Money - title
string
ProductShop
- id
string - name
string
AddProductListItemParams
- listId
The GID of the product list. E.g. `gid://shopapp/ProductList/123`. This will soon be deprecated in favor of just `publicListId`.
string - productId
The GID of the product. E.g. `gid://shopify/Product/123`.
string - productVariantId
The GID of the product variant. E.g. `gid://shopify/ProductVariant/101`.
string - publicListId
The public ID of the product list.
string - shopId
The GID of the shop. E.g. `gid://shopify/Shop/42`.
string
AddToCartParams
- attribution
Attribution data for the line item.
LineItemAttribution - discountCodes
The discount codes to apply to the cart.
string[] - productId
The GID of the product. E.g. `gid://shopify/Product/123`.
string - productVariantId
The GID of the product variant. E.g. `gid://shopify/ProductVariant/456`.
string - quantity
The quantity of the product to add to the cart.
number - variantImageUrl
The URL of the variant image.
string
LineItemAttribution
- sourceIdentifier
string - sourceName
string
BuyProductParams
- attribution
Attribution data for the line item.
LineItemAttribution - discountCode
The discount code to apply to the product.
string - productId
The GID of the product. E.g. `gid://shopify/Product/123`.
string - productVariantId
The GID of the product variant. E.g. `gid://shopify/ProductVariant/456`.
string - quantity
The quantity of the product to add to the cart.
number
BuyProductsParams
- attribution
LineItemAttribution - discountCode
string - items
[BuyProductLineItem, ...BuyProductLineItem[]]
BuyProductLineItem
- productId
The GID of the product. E.g. `gid://shopify/Product/123`.
string - productVariantId
The GID of the product variant. E.g. `gid://shopify/ProductVariant/456`.
string - quantity
The quantity of the product to add to the cart.
number
CheckPermissionParams
- permission
MiniPermission
MiniPermission
'CAMERA' | 'MICROPHONE' | 'MOTION'CheckPermissionResponse
- errorMessage
string - status
PermissionStatus
PermissionStatus
The current state of a permission for the Mini. - `granted`: The user has approved the in-app consent dialog and the OS has granted the permission. - `denied`: The user has previously denied the permission, either in the in-app consent dialog or at the OS level. The permission can still be requested again. - `blocked`: The permission is blocked at the OS level. The user must enable it from device settings. - `undetermined`: The user has not yet been shown the in-app consent dialog for this permission. - `unavailable`: The permission is not declared in the Mini's manifest, or the feature is not available on this device.
'granted' | 'denied' | 'blocked' | 'undetermined' | 'unavailable'CheckScopesConsentParams
- fetchPolicy
DataHookFetchPolicy
DataHookFetchPolicy
'cache-first' | 'network-only'CheckScopesConsentResponse
- grantedScopes
string[] - requiredScopes
string[] - status
'granted' | 'partially_granted' | 'not_granted'
CompleteImageUploadParams
- resourceUrls
string[]
CompleteImageUploadResponse
- error
string - files
{ id: string; fileStatus: "FAILED" | "PENDING" | "PROCESSING" | "READY"; image?: { url: string; }; }[]
CreateContentParams
- description
string - externalId
string - imageUrl
string - productIds
string[] - title
string - visibility
ContentVisibility[] | null
ContentVisibility
'DISCOVERABLE' | 'LINKABLE'CreateContentResponse
- data
Content - userErrors
ContentCreateUserErrors[]
Content
- description
string | null - externalId
string | null - image
ContentImage - products
ContentProduct[] | null - publicId
string - shareableUrl
string | null - status
MinisContentStatus | null - title
string - visibility
ContentVisibility[]
ContentImage
- altText
string | null - height
number | null - id
string | null - thumbhash
string | null - url
string - width
number | null
ContentProduct
- featuredImage
ContentImage | null - id
string - title
string
MinisContentStatus
- PENDING
PENDING - READY
READY - REJECTED
REJECTED
ContentCreateUserErrors
- code
ContentCreateUserErrorCode - message
string
ContentCreateUserErrorCode
- DUPLICATE_EXTERNAL_ID
DUPLICATE_EXTERNAL_ID - INELIGIBLE_PRODUCTS
INELIGIBLE_PRODUCTS
CreateImageUploadLinkParams
- input
{ mimeType: string; fileSize: number; }[]
CreateImageUploadLinkResponse
- error
string - targets
UploadTarget[]
UploadTarget
- parameters
{ name: string; value: string; }[] - resourceUrl
string - url
string
CreateOrderAttributionParams
- attribution
LineItemAttribution - orderId
string - productVariantId
string
FavoriteParams
- productId
string - productVariantId
string - shopId
string
FollowShopParams
- shopId
string
GenerateUserTokenResponse
- data
GeneratedTokenData - userErrors
UserTokenGenerateUserErrors[]
GeneratedTokenData
- expiresAt
The expiration time of the token.
ISO8601DateTime | null - token
A temporary token for the user.
string | null - userState
Whether the user is verified or a guest.
UserState | null
ISO8601DateTime
stringUserState
- GUEST
GUEST - VERIFIED
VERIFIED
UserTokenGenerateUserErrors
- code
UserTokenGenerateUserErrorCode - field
string[] | null - message
string
UserTokenGenerateUserErrorCode
- MINI_NOT_FOUND
MINI_NOT_FOUND - USER_NOT_FOUND
USER_NOT_FOUND
GetAccountInformationParams
- shopId
To use user account information, a shopId must be given to track on which shop's behalf user information is being accessed
string - type
'email' | 'name' | 'phone'
GetAccountInformationResponse
- status
'available' | 'not-available' - value
string | AccountInformationPhoneInfo
AccountInformationPhoneInfo
- countryCode
string - phoneNumber
string - prefix
string
GetBuyerAttributesParams
- fetchPolicy
DataHookFetchPolicy
GetBuyerAttributesResponse
- data
{ genderAffinity?: Gender; categoryAffinities: TaxonomyCategory[]; }
Gender
'MALE' | 'FEMALE' | 'NEUTRAL'TaxonomyCategory
- ancestors
TaxonomyCategory[] - id
string - name
string
GetContentParams
- fetchPolicy
DataHookFetchPolicy - identifiers
ContentIdentifierInput | ContentIdentifierInput[]
ContentIdentifierInput
- externalId
string | null - publicId
string | null
GetContentResponse
- data
Content[]
GetCurrentUserParams
- fetchPolicy
DataHookFetchPolicy
GetCurrentUserResponse
- data
UserProfile
UserProfile
- avatarImage
{ url: string } | null - displayName
string | null
GetDeeplinkPathsResponse
- matchers
string[]
GetFollowedShopsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number
GetFollowedShopsResponse
- data
T - pageInfo
PaginationInfo
PaginationInfo
- endCursor
string | null - hasNextPage
boolean
GetAsyncStorageItemParams
- key
string
GetOrdersParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number
GetOrdersResponse
- data
T - pageInfo
PaginationInfo
GetPopularProductsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number
GetPopularProductsResponse
- data
T - pageInfo
PaginationInfo
GetProductParams
- fetchPolicy
DataHookFetchPolicy - id
string
GetProductResponse
- data
Product
GetProductListParams
- after
The cursor to fetch the next page of items.
string - fetchPolicy
The fetch policy to use.
DataHookFetchPolicy - first
The number of items to fetch.
number - id
The GID of the product list. E.g. `gid://shopapp/ProductList/123`.
string - publicId
The public ID of the product list.
string
GetProductListResponse
- data
T - pageInfo
PaginationInfo
GetProductListsParams
- after
The cursor to fetch the next page of lists.
string - fetchPolicy
The fetch policy to use.
DataHookFetchPolicy - first
The number of lists to fetch.
number - itemsFirst
The number of items per list to fetch.
number
GetProductListsResponse
- data
T - pageInfo
PaginationInfo
GetProductMediaParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number - id
string
GetProductMediaResponse
- data
T - pageInfo
PaginationInfo
GetProductReviewsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number - id
string
GetProductReviewsResponse
- data
T - pageInfo
PaginationInfo
GetProductSearchParams
- after
string - fetchPolicy
DataHookFetchPolicy - filters
ProductFilters - first
number - includeSensitive
boolean - query
string - sortBy
ProductSearchSortBy
ProductFilters
- apparelSize
ProductApparelSizeFilter[] - available
boolean - category
string[] - color
ProductColorFilter[] - gender
'MALE' | 'FEMALE' | 'NEUTRAL' - includeShopIds
string[] - minimumRating
number - price
{ min?: number; max?: number; } - shoeSize
ProductShoeSizeFilter[]
ProductApparelSizeFilter
'SIZE_3XL' | 'SIZE_4XL' | 'SIZE_5XL' | 'SIZE_L' | 'SIZE_M' | 'SIZE_S' | 'SIZE_XL' | 'SIZE_XS' | 'SIZE_XXL' | 'SIZE_XXS'ProductColorFilter
'BEIGE' | 'BLACK' | 'BLUE' | 'BROWN' | 'GOLD' | 'GREEN' | 'GREY' | 'NAVY' | 'ORANGE' | 'PINK' | 'PURPLE' | 'RED' | 'SILVER' | 'WHITE' | 'YELLOW'ProductShoeSizeFilter
'SIZE_4' | 'SIZE_4_5' | 'SIZE_5' | 'SIZE_5_5' | 'SIZE_6' | 'SIZE_6_5' | 'SIZE_7' | 'SIZE_7_5' | 'SIZE_8' | 'SIZE_8_5' | 'SIZE_9' | 'SIZE_9_5' | 'SIZE_10' | 'SIZE_10_5' | 'SIZE_11' | 'SIZE_11_5' | 'SIZE_12' | 'SIZE_12_5' | 'SIZE_13' | 'SIZE_13_5' | 'SIZE_14' | 'SIZE_14_5' | 'SIZE_15'ProductSearchSortBy
'MOST_RECENT' | 'PRICE_HIGH_TO_LOW' | 'PRICE_LOW_TO_HIGH' | 'RELEVANCE'GetProductSearchResponse
- data
T - pageInfo
PaginationInfo
GetProductVariantsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number - id
string
GetProductVariantsResponse
- data
T - pageInfo
PaginationInfo
GetProductsParams
- fetchPolicy
DataHookFetchPolicy - ids
string[]
GetProductsResponse
- data
Product[]
GetRecentProductsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number - includeSensitive
boolean
GetRecentProductsResponse
- data
T - pageInfo
PaginationInfo
GetRecentShopsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number
GetRecentShopsResponse
- data
T - pageInfo
PaginationInfo
GetRecommendedProductsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number
GetRecommendedProductsResponse
- data
T - pageInfo
PaginationInfo
GetRecommendedShopsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number
GetRecommendedShopsResponse
- data
T - pageInfo
PaginationInfo
GetSavedProductsParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number - includeSensitive
boolean
GetSavedProductsResponse
- data
T - pageInfo
PaginationInfo
GetShopParams
- fetchPolicy
DataHookFetchPolicy - id
string
GetShopResponse
- data
Shop
Shop
- id
string - isFollowing
boolean | null - logoImage
ProductImage | null - name
string - primaryDomain
{ url: string; } - reviewAnalytics
{ averageRating?: number; reviewCount: number; } - shareUrl
string | null - visualTheme
VisualTheme | null
VisualTheme
- brandSettings
BrandSettings | null - description
string | null - featuredImages
ImageType[] - id
string - logoImage
ImageType | null
BrandSettings
- colors
ColorTheme | null - headerTheme
HeaderTheme | null - id
string - logos
LogoTheme | null
ColorTheme
- coverDominant
string | null - id
string - logoAverage
string | null - logoDominant
string | null - primary
string | null - secondary
string | null - secondaryText
string | null - statusBarStyle
string | null
HeaderTheme
- coverImage
ImageType | null - endingScrimColor
string | null - id
string - startingScrimColor
string | null - thumbnailImage
ImageType | null - videoUrl
string | null - wordmark
ImageType | null
ImageType
- altText
string | null - height
number | null - sensitive
boolean - thumbhash
string | null - url
string - width
number | null
LogoTheme
- id
string - logoImage
ImageType | null
GetShopAppInformationResponse
- appVersion
string - buildId
string - buildNumber
string
InvokeIntentParams
Params for the INVOKE_INTENT shop action.
- action
Verb describing the operation (e.g., 'create', 'edit', 'view')
string - data
Optional JSON-serializable input payload
TData - type
MIME-type identifier for the target resource (e.g., 'shop/UserImage')
string - value
Optional identifier (e.g. a resource GID) for an existing resource
string
InvokeIntentResponse
Untyped intent response used at the INVOKE_INTENT bridge boundary.
IntentResultIntentResult
Discriminated union of all possible intent completion outcomes. - `'ok'` — workflow completed successfully with typed result data - `'error'` — workflow failed with a message - `'closed'` — user dismissed without completing
IntentResultOk<T> | IntentResultError | IntentResultClosedIntentResultOk
- code
'ok' - data
T
IntentResultError
- code
'error' - message
string
IntentResultClosed
- code
'closed'
NavigateToCheckoutParams
- shopId
The GID of the shop. E.g. `gid://shopify/Shop/123`.
string
NavigateToDeeplinkParams
- deeplink
string
NavigateToOrderParams
- orderId
The GID of the order. E.g. `gid://shopify/Order/123`.
string
NavigateToProductParams
- attribution
LineItemAttribution - discountCode
The discount code to apply to the product.
string - includedProductVariantGIDs
string[] - includedProductVariantIds
string[] - productId
The GID of the product. E.g. `gid://shopify/Product/123`.
string - productVariantId
If present, the GID of the variant that should be initially selected
string
NavigateToShopParams
- shopId
string
PreviewProductInARParams
- fetchPolicy
DataHookFetchPolicy - id
string
ProductRecommendationClickParams
- attribution
LineItemAttribution - discountCode
string - productId
string - productVariantId
string - sectionId
string - variantGIDs
string[]
ProductRecommendationImpressionParams
- productId
string - sectionId
string
RemoveAsyncStorageItemParams
- key
string
RemoveProductListParams
- id
The GID of the product list. E.g. `gid://shopapp/ProductList/123`.
string
RemoveProductListItemParams
- listId
The GID of the product list. E.g. `gid://shopapp/ProductList/123`. This will soon be deprecated in favor of just `publicListId`.
string - productId
The GID of the product. E.g. `gid://shopify/Product/123`.
string - productVariantId
The GID of the product variant. E.g. `gid://shopify/ProductVariant/101`.
string - publicListId
The public ID of the product list.
string - shopId
The GID of the shop. E.g. `gid://shopify/Shop/42`.
string
RenameProductListParams
- id
The GID of the product list. E.g. `gid://shopapp/ProductList/123`.
string - name
The new name of the product list.
string
ReportContentImpressionParams
- pageValue
string - publicId
string
ReportErrorParams
Parameters for reporting JavaScript errors that occur in the webview. This captures detailed error information to help with debugging and monitoring.
- additionalContext
Additional context about the error (e.g., user actions, state, etc.)
{[key: string]: any} - message
The error message
string - stack
The stack trace of the error
string
ReportFetchParams
Parameters for reporting fetch calls made in the webview. This captures network request details for observability.
- duration
Duration of the request in milliseconds
number - error
Error message if the request failed
string - method
The HTTP method used (GET, POST, etc.)
string - status
The HTTP status code of the response (0 for network errors)
number - success
Whether the request was successful (response.ok)
boolean - timestamp
Timestamp when the request completed
number - url
The URL that was fetched
string
ReportImpressionParams
- pageValue
string - subjectId
string - subjectType
string
ReportInteractionParams
- interactionType
string - interactionValue
string - pageValue
string
RequestPermissionParams
- permission
MiniPermission
RequestPermissionResponse
- errorMessage
string - granted
boolean
RequestScopesConsentResponse
- granted
boolean
ResolveIntentParams
Params for the RESOLVE_INTENT shop action. A Mini calls `resolveIntent(result)` to signal the outcome of the intent it was launched with. The host tracks the pending intent itself (parsed from the launch URL) and dispatches to the registered handler. The Mini also passes back the `intentKey` it declared on the SDK side (e.g. `'tryOnProduct'`). The host compares this against its own pending intent — a mismatch means the Mini's typed payload doesn't apply to the actually-launched intent, so the host short-circuits with an error and cleans up rather than running the wrong handler with the wrong shape.
- intentKey
The IntentDefinitions key the Mini declared at the call site.
K - result
The outcome of the intent workflow.
IntentResult<IntentDefinitions[K]['result']>
IntentDefinitions
- createUserImage
{ action: "create"; type: "shop/UserImage"; data: CreateUserImageParams; result: ImageUrlResponse; } - tryOnProduct
{ action: "try_on"; type: "shopify/Product"; data: TryOnProductParams; result: ImageUrlResponse; }
CreateUserImageParams
- camera
Which camera to default to when the camera is used. Defaults to 'front'.
'front' | 'rear' - crop
Cropping configuration. Omit to skip the cropping step — the user's original photo is returned as-is (capped by `maxSize`).
{ aspectRatio?: { width: number; height: number; }; shape?: "rectangle" | "circle"; } - maxSize
Max width/height of the output image in pixels. Defaults to 700.
number - source
If set, skip the source chooser and open this source directly. When omitted, the host shows a sheet letting the user pick a source.
'camera' | 'library' - tag
Tag identifying the image in the mini's image library. Required so a future saved-images intent can surface previously created images by tag.
string
ImageUrlResponse
- imageUrl
URL of the generated image.
string
TryOnProductParams
- variantId
Variant the user selected on the PDP that launched the Mini.
string
SearchProductsByShopParams
- after
string - fetchPolicy
DataHookFetchPolicy - first
number - query
string - shopId
string
SearchProductsByShopResponse
- data
T - pageInfo
PaginationInfo
SetAsyncStorageItemParams
- key
string - value
string
SetProductListVisibilityParams
- id
The GID of the product list. E.g. `gid://shopapp/ProductList/123`.
string - name
The name of the product list. Required to preserve the existing name.
string - privacyStatus
The privacy status to set for the product list.
ProductListPrivacyStatus
SetSecretParams
- value
string
ShareParams
- failOnCancel
boolean - message
string - title
string - type
string - url
string - urls
string[]
ShareResponse
- dismissedAction
boolean - message
string - success
boolean
ShareSingleParams
BaseShareSingleOptions | InstagramShareSingleOptions | FacebookShareSingleOptionsBaseShareSingleOptions
- appId
string - email
string - filename
string - forceDialog
boolean - message
string - recipient
string - social
Social.Facebook | Social.Pagesmanager | Social.Twitter | Social.Whatsapp | Social.Whatsappbusiness | Social.Instagram | Social.Googleplus | Social.Email | Social.Pinterest | Social.Linkedin | Social.Sms | Social.Telegram | Social.Snapchat | Social.Messenger | Social.Viber | Social.Discord - subject
string - title
string - type
string - url
string - urls
string[]
Social
- Facebook
facebook - FacebookStories
facebookstories - Pagesmanager
pagesmanager - Twitter
twitter - Whatsapp
whatsapp - Whatsappbusiness
whatsappbusiness - Instagram
instagram - InstagramStories
instagramstories - Googleplus
googleplus - Email
email - Pinterest
pinterest - Linkedin
linkedin - Sms
sms - Telegram
telegram - Snapchat
snapchat - Messenger
messenger - Viber
viber - Discord
discord
InstagramShareSingleOptions
- appId
string - attributionURL
string - backgroundBottomColor
string - backgroundImage
string - backgroundTopColor
string - backgroundVideo
string - email
string - filename
string - forceDialog
boolean - linkText
string - linkUrl
string - message
string - recipient
string - social
Social.InstagramStories - stickerImage
string - subject
string - title
string - type
string - url
string - urls
string[]
FacebookShareSingleOptions
- appId
string - attributionURL
string - backgroundBottomColor
string - backgroundImage
string - backgroundTopColor
string - backgroundVideo
string - email
string - filename
string - forceDialog
boolean - linkText
string - linkUrl
string - message
string - recipient
string - social
Social.FacebookStories - stickerImage
string - subject
string - title
string - type
string - url
string - urls
string[]
ShareSingleResponse
- message
string - success
boolean
ShowErrorScreenParams
- message
The message to display in the error screen.
string - title
The title of the error screen.
string
ShowErrorToastParams
- message
string
ShowFeedbackSheetParams
- publicId
string
TranslateContentUpParams
- inputYPosition
number
UnfavoriteParams
- productId
string - productVariantId
string - shopId
string
UnfollowShopParams
- shopId
string
SnakeToCamelCase
S extends `${infer Head}_${infer Tail}`
? `${Lowercase<Head>}${SnakeToCamelCaseTail<Tail>}`
: Lowercase<S>SnakeToCamelCaseTail
S extends `${infer Head}_${infer Tail}`
? `${CapitalizeSegment<Head>}${SnakeToCamelCaseTail<Tail>}`
: CapitalizeSegment<S>CapitalizeSegment
Uppercase<S> extends 'AR' ? 'AR' : Capitalize<Lowercase<S>>