ports
Interfaces
AovBundleDetection
Properties
available
available: boolean;offers
offers: AovBundleOffer[];AovBundleOffer
Active AOV offer fields consumed by the bundle-card controller.
Properties
bundleBuilderProductHandle?
bundleBuilderProductHandle?: string;bundleBuilderProductId?
bundleBuilderProductId?: string | number;bundleProductId?
bundleProductId?: string | number;id?
id?: string | number;mixMatchProductHandle?
mixMatchProductHandle?: string;mixMatchProductId?
mixMatchProductId?: string | number;productHandle?
productHandle?: string;triggerProducts?
triggerProducts?: AovBundleProductCandidate[];type?
type?: string;AovBundleProductCandidate
Product fields from an AOV offer that the bundle-card controller reads.
Extends
Properties
compare_at_price?
compare_at_price?: StorefrontProductPrice;Inherited from
StorefrontProduct.compare_at_price
compare_at_price_max?
compare_at_price_max?: StorefrontProductPrice;Inherited from
StorefrontProduct.compare_at_price_max
compareAtPrice?
compareAtPrice?: StorefrontProductPrice;compareAtPriceV2?
compareAtPriceV2?: object;amount?
amount?: StorefrontProductPrice;featured_image?
featured_image?: string | StorefrontProductImage;Inherited from
StorefrontProduct.featured_image
featuredImage?
featuredImage?: StorefrontProductImage;handle?
handle?: string;Inherited from
id?
id?: string | number;Inherited from
image?
image?: string | StorefrontProductImage;images?
images?: (string | StorefrontProductImage)[];Inherited from
price?
price?: StorefrontProductPrice;Inherited from
priceV2?
priceV2?: object;amount?
amount?: StorefrontProductPrice;product_id?
product_id?: string | number;Inherited from
selling_plan_allocations?
selling_plan_allocations?: StorefrontSellingPlanAllocation[];Inherited from
StorefrontProduct.selling_plan_allocations
sellingPlanAllocations?
sellingPlanAllocations?: StorefrontSellingPlanAllocation[];Inherited from
StorefrontProduct.sellingPlanAllocations
title?
title?: string;Inherited from
variants?
variants?: StorefrontProductVariant[];Inherited from
AppleWalletPassCache
Properties
createdApplePass
createdApplePass: boolean;qrCodeDownloadApplePass
qrCodeDownloadApplePass: string;AuthPort
Methods
getState()
getState(): AuthState;Returns
subscribe()
subscribe(listener): () => void;Parameters
| Parameter | Type |
|---|---|
listener | (state) => void |
Returns
() => void
Cart
Properties
cost
cost: object;subtotalAmount
subtotalAmount: CartMoney;totalAmount
totalAmount: CartMoney;discountCodes
discountCodes: object[];applicable
applicable: boolean;code
code: string;lines
lines: object[];quantity
quantity: number;variantId
variantId: string;CartMoney
Properties
amount
amount: string;currencyCode
currencyCode: string;CartPort
Properties
capabilities
capabilities: object;discountCodes
discountCodes: boolean;freeGift
freeGift: boolean;mergeCodes
mergeCodes: boolean;revalidate
revalidate: boolean;Methods
addLines()
addLines(lines): Promise<void>;Parameters
| Parameter | Type |
|---|---|
lines | object[] |
Returns
Promise<void>
applyDiscount()
applyDiscount(code): Promise<{
applied: boolean;
droppedCodes?: string[];
ok: boolean;
reason?: string;
}>;Parameters
| Parameter | Type |
|---|---|
code | string |
Returns
Promise<{
applied: boolean;
droppedCodes?: string[];
ok: boolean;
reason?: string;
}>
getCart()
getCart(): Promise<Cart | null>;Returns
Promise<Cart | null>
redeemGift()
redeemGift(input): Promise<void>;Parameters
| Parameter | Type |
|---|---|
input | { code: string; variantId: string; } |
input.code | string |
input.variantId | string |
Returns
Promise<void>
removeDiscount()
removeDiscount(code): Promise<void>;Parameters
| Parameter | Type |
|---|---|
code | string |
Returns
Promise<void>
revalidate()
revalidate(): void;Returns
void
CompleteEarningProgramData
Legacy earning payload fields core reads after a completed earning action.
Extends
Record<string,unknown>
Indexable
[key: string]: unknownProperties
customer?
customer?: Record<string, unknown>;newPoint?
newPoint?: number;point?
point?: number;success?
success?: boolean;CompleteEarningProgramResult
Legacy earning result payload. All fields core reads are optional: a non-empty
unmarked payload is a successful result, while {} means "no result" and is a
host contract violation.
Extends
Record<string,unknown>
Indexable
[key: string]: unknownProperties
customer?
customer?: Record<string, unknown>;data?
data?: CompleteEarningProgramData;error?
error?: string | Record<string, unknown>;newPoint?
newPoint?: number;point?
point?: number;status?
status?: boolean;success?
success?: boolean;CurrentProduct
The current Liquid product shape consumed by the recently-viewed controller.
Extends
Properties
compare_at_price?
compare_at_price?: StorefrontProductPrice;Inherited from
StorefrontProduct.compare_at_price
compare_at_price_max?
compare_at_price_max?: StorefrontProductPrice;Inherited from
StorefrontProduct.compare_at_price_max
featured_image?
featured_image?: string | StorefrontProductImage;Inherited from
StorefrontProduct.featured_image
handle?
handle?: string;Inherited from
id?
id?: string | number;Inherited from
images?
images?: (string | StorefrontProductImage)[];Inherited from
price?
price?: StorefrontProductPrice;Inherited from
product_id?
product_id?: string | number;Inherited from
selling_plan_allocations?
selling_plan_allocations?: StorefrontSellingPlanAllocation[];Inherited from
StorefrontProduct.selling_plan_allocations
sellingPlanAllocations?
sellingPlanAllocations?: StorefrontSellingPlanAllocation[];Inherited from
StorefrontProduct.sellingPlanAllocations
title?
title?: string;Inherited from
url?
url?: string;variants?
variants?: StorefrontProductVariant[];Inherited from
CustomerWidgetData
Properties
customer
customer: object;earnSignUp?
earnSignUp?: unknown;impact?
impact?: object;impact.plasticBottles?
plasticBottles?: unknown;impact.trees?
trees?: unknown;latestActivity?
latestActivity?: unknown;point?
point?: unknown;pointExpiration?
pointExpiration?: unknown;tierAssessmentStatus?
tierAssessmentStatus?: unknown;tierId?
tierId?: unknown;tierPoint?
tierPoint?: unknown;storeCredit?
storeCredit?: object;accounts?
accounts?: StoreCreditAccount[];enabled?
enabled?: boolean;CustomerWidgetDataRequest
Properties
customerId
customerId: string;fresh?
fresh?: boolean;Bypass the host's request cache (sign-up balance refetch).
includeStoreCredit
includeStoreCredit: boolean;includeTierAssessmentStatus?
includeTierAssessmentStatus?: boolean;Ask /info for the Tier Assessment "spend to keep" status (ta=1).
DataCapabilities
Properties
appleWalletPass
appleWalletPass: boolean;customerPrivacy
customerPrivacy: boolean;Not available on headless hosts yet: the host has no equivalent consent surface.
freeGiftStock
freeGiftStock: boolean;googleWalletPass
googleWalletPass: boolean;joinProgram
joinProgram: boolean;profileEdit
profileEdit: boolean;providerReviews
providerReviews: boolean;receivedRewards
receivedRewards: boolean;referralHistory
referralHistory: boolean;referralInvite
referralInvite: boolean;sendRewardToFriend
sendRewardToFriend: boolean;socialConnect
socialConnect: boolean;storeCreditTransactions
storeCreditTransactions: boolean;DataPort
Properties
capabilities
capabilities: DataCapabilities;Methods
claimInteractWebsite()
claimInteractWebsite(input): Promise<EarnActionResponse>;Parameters
| Parameter | Type |
|---|---|
input | { customerId: string; programId: string; } |
input.customerId | string |
input.programId | string |
Returns
Promise<EarnActionResponse>
completeEarningProgram()
completeEarningProgram(input): Promise<CompleteEarningProgramResult>;Parameters
| Parameter | Type |
|---|---|
input | { customer: Record<string, unknown>; program: Record<string, unknown>; } |
input.customer | Record<string, unknown> |
input.program | Record<string, unknown> |
Returns
Promise<CompleteEarningProgramResult>
earn()
earn(req): Promise<EarnResult>;Parameters
| Parameter | Type |
|---|---|
req | EarnRequest |
Returns
Promise<EarnResult>
earnSocial()
earnSocial(programId): Promise<SocialEarnResult>;Parameters
| Parameter | Type |
|---|---|
programId | string |
Returns
Promise<SocialEarnResult>
earnUpload()
earnUpload(input): Promise<EarnUploadResult>;Parameters
| Parameter | Type |
|---|---|
input | { images: EarnImageUpload[]; } |
input.images | EarnImageUpload[] |
Returns
Promise<EarnUploadResult>
generateReferralLink()
generateReferralLink(input): Promise<ReferralLink>;Generate a customer's referral link. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
input | ReferralLinkRequest |
Returns
Promise<ReferralLink>
getActivities()
getActivities(query?): Promise<LegacyActivityPage>;Parameters
| Parameter | Type |
|---|---|
query? | ActivityQuery |
Returns
Promise<LegacyActivityPage>
getAovBundleOffers()
getAovBundleOffers(): Promise<AovBundleDetection>;Obtain active AOV bundle offers or return unavailable. Not available on headless hosts yet.
Returns
Promise<AovBundleDetection>
getAppleWalletLink()
getAppleWalletLink(): Promise<string>;Returns
Promise<string>
getAppleWalletPassCache()
getAppleWalletPassCache(): AppleWalletPassCache;Returns
getCustomer()
getCustomer(): Promise<Customer>;Returns
Promise<Customer>
getCustomerWidgetData()
getCustomerWidgetData(input): Promise<CustomerWidgetData>;Retrieve the customer data needed by the loyalty widget. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
input | CustomerWidgetDataRequest |
Returns
Promise<CustomerWidgetData>
getFreeGiftStock()
getFreeGiftStock(input): Promise<FreeGiftStockResult>;Retrieve the available variants for a free-gift program. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
input | FreeGiftStockRequest |
Returns
Promise<FreeGiftStockResult>
getGoogleWalletLink()
getGoogleWalletLink(): Promise<string>;Returns
Promise<string>
getImpactHistory()
getImpactHistory(customerId): Promise<ImpactHistory>;Retrieve a customer's environmental-impact history and totals. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
customerId | string |
Returns
Promise<ImpactHistory>
getLineAuthUrl()
getLineAuthUrl(input): Promise<{
data?: {
authUrl?: string;
};
error?: string;
success?: boolean;
}>;Parameters
| Parameter | Type |
|---|---|
input | { customerId: string; } |
input.customerId | string |
Returns
Promise<{
data?: {
authUrl?: string;
};
error?: string;
success?: boolean;
}>
getMilestoneProgress()
getMilestoneProgress(customerId): Promise<MilestoneProgress>;Retrieve a customer's milestone progress. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
customerId | string |
Returns
Promise<MilestoneProgress>
getOrderActivities()
getOrderActivities(input): Promise<OrderListResponse>;Retrieve activities for one signed-in customer's order. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
input | OrderActivitiesRequest |
Returns
Promise<OrderListResponse>
getOrderById()
getOrderById(input): Promise<OrderListResponse>;Retrieve one signed-in customer's order. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
input | OrderByIdRequest |
Returns
Promise<OrderListResponse>
getOrders()
getOrders(input): Promise<OrderListResponse>;Retrieve the signed-in customer's orders. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
input | OrdersRequest |
Returns
Promise<OrderListResponse>
getPendingTierRewardClaims()
getPendingTierRewardClaims(): Promise<PendingTierRewardClaim[]>;Retrieve a customer's pending tier-reward claims. Not available on headless hosts yet.
Returns
Promise<PendingTierRewardClaim[]>
getPrivacyConsentState()
getPrivacyConsentState(): Promise<PrivacyConsentState>;Not available on headless hosts yet: the host has no equivalent consent surface.
Returns
Promise<PrivacyConsentState>
getProductByHandle()
getProductByHandle(handle): Promise<StorefrontProduct | null>;Parameters
| Parameter | Type |
|---|---|
handle | string |
Returns
Promise<StorefrontProduct | null>
getPrograms()
getPrograms(): Promise<Program[]>;Returns
Promise<Program[]>
getPromotedCollections()
getPromotedCollections(selections): Promise<PromotedCollection[]>;Retrieve live storefront details for promoted collections. Not available on headless hosts yet.
Parameters
| Parameter | Type |
|---|---|
selections | PromotedCollectionSelection[] |
Returns
Promise<PromotedCollection[]>
getProviderReviews()
getProviderReviews(input): Promise<ProviderReviewsResult>;Parameters
| Parameter | Type |
|---|---|
input | ProviderReviewsRequest |
Returns
Promise<ProviderReviewsResult>
getRecentlyViewedProducts()
getRecentlyViewedProducts(): Promise<RecentlyViewedProduct[]>;Returns
Promise<RecentlyViewedProduct[]>
getReferral()
getReferral(): Promise<Referral>;Returns
Promise<Referral>
getReferralHistory()
getReferralHistory(opts?): Promise<ReferralHistoryPage>;Parameters
| Parameter | Type |
|---|---|
opts? | ReferralQuery |
Returns
Promise<ReferralHistoryPage>
getReviewRewards()
getReviewRewards(input): Promise<ReviewRewardsResult>;Parameters
| Parameter | Type |
|---|---|
input | ReviewRewardsRequest |
Returns
Promise<ReviewRewardsResult>
getRewards()
getRewards(params?): Promise<LegacyRewardSet>;Parameters
| Parameter | Type |
|---|---|
params? | RewardQuery |
Returns
Promise<LegacyRewardSet>
getShopConfig()
getShopConfig(): Promise<ShopConfig>;Returns
Promise<ShopConfig>
getStoreCreditTransactions()
getStoreCreditTransactions(input): Promise<StoreCreditTransactionsResult>;Parameters
| Parameter | Type |
|---|---|
input | StoreCreditTransactionsRequest |
Returns
Promise<StoreCreditTransactionsResult>
getTierRewards()
getTierRewards(): Promise<TierRewardsResult>;Retrieve configured tier rewards for widget perk rendering. Not available on headless hosts yet.
Returns
Promise<TierRewardsResult>
getTiers()
getTiers(): Promise<Tier[]>;Returns
Promise<Tier[]>
redeem()
redeem(programId, opts?): Promise<RedeemResult>;Parameters
| Parameter | Type |
|---|---|
programId | string |
opts? | RedeemOptions |
Returns
Promise<RedeemResult>
savePrivacyConsent()
savePrivacyConsent(changes): Promise<PrivacyConsentSaveResult>;Not available on headless hosts yet: the host has no equivalent consent surface.
Parameters
| Parameter | Type |
|---|---|
changes | PrivacyConsentChanges |
Returns
Promise<PrivacyConsentSaveResult>
saveRecentlyViewedProducts()
saveRecentlyViewedProducts(items): Promise<void>;Parameters
| Parameter | Type |
|---|---|
items | RecentlyViewedProduct[] |
Returns
Promise<void>
sendRewardToFriend()
sendRewardToFriend(input): Promise<SendRewardToFriendResult>;Parameters
| Parameter | Type |
|---|---|
input | SendRewardToFriendRequest |
Returns
Promise<SendRewardToFriendResult>
setAppleWalletPassCache()
setAppleWalletPassCache(qrUrl): void;Parameters
| Parameter | Type |
|---|---|
qrUrl | string |
Returns
void
submitEarnForm()
submitEarnForm(input): Promise<EarnActionResponse>;Parameters
| Parameter | Type | Description |
|---|---|---|
input | { customerId: string; programId: string; submittedAnswers?: object[]; submittedContent: string; uploadedImageUrls: string[]; uploadedVideo?: { fileName: string; path: string; }; } | - |
input.customerId | string | - |
input.programId | string | - |
input.submittedAnswers? | object[] | Form fields programs: one answer per non-file field, in admin order. |
input.submittedContent | string | - |
input.uploadedImageUrls | string[] | - |
input.uploadedVideo? | { fileName: string; path: string; } | Submit-form video already PUT to GCS via a signed URL. |
input.uploadedVideo.fileName | string | - |
input.uploadedVideo.path | string | - |
Returns
Promise<EarnActionResponse>
submitGoogleMapsReview()
submitGoogleMapsReview(input): Promise<EarnActionResponse>;Parameters
| Parameter | Type |
|---|---|
input | { customerId: string; programId?: string; reviewUrl: string; } |
input.customerId | string |
input.programId? | string |
input.reviewUrl | string |
Returns
Promise<EarnActionResponse>
submitProviderReview()
submitProviderReview(input): Promise<SubmitProviderReviewResult>;Parameters
| Parameter | Type |
|---|---|
input | SubmitProviderReviewRequest |
Returns
Promise<SubmitProviderReviewResult>
submitReceiptForApproval()
submitReceiptForApproval(input): Promise<EarnActionResponse>;Parameters
| Parameter | Type |
|---|---|
input | { customerId: string; imageUrls: string[]; programId: string; } |
input.customerId | string |
input.imageUrls | string[] |
input.programId | string |
Returns
Promise<EarnActionResponse>
subscribeToPrivacyConsent()
subscribeToPrivacyConsent(listener): () => void;Not available on headless hosts yet: the host has no equivalent consent surface.
Parameters
| Parameter | Type |
|---|---|
listener | () => void |
Returns
() => void
trackPrivacyEngagement()
trackPrivacyEngagement(event): void;Not available on headless hosts yet: the host has no equivalent consent surface.
Parameters
| Parameter | Type |
|---|---|
event | PrivacyEngagement |
Returns
void
verifyApplePass()
verifyApplePass(): Promise<boolean>;Returns
Promise<boolean>
FreeGiftStockProduct
Properties
available
available: boolean;productId
productId: string;variants
variants: FreeGiftStockVariant[];FreeGiftStockRequest
Properties
programId
programId: string;shopId
shopId: string;FreeGiftStockVariant
Properties
available
available: boolean;variantId
variantId: string;HostAdapter
Properties
auth
auth: AuthPort;cart
cart: CartPort;data
data: DataPort;Methods
context()
context(): HostContext;Returns
navigate()
navigate(target): void;Parameters
| Parameter | Type |
|---|---|
target | NavTarget |
Returns
void
HostContext
Properties
accountUrl
accountUrl: string;activeMarketCurrency?
activeMarketCurrency?: string;Liquid active-market currency without shop or USD fallback. Not available on headless hosts yet.
contentLocale?
contentLocale?: string;Joy content locale preserves the legacy empty-string fallback. Not available on headless hosts yet.
country
country: string;currency
currency: string;currencyRate?
currencyRate?: number;Liquid active-market currency conversion rate. Not available on headless hosts yet.
currentProduct?
currentProduct?: CurrentProduct;customerId?
customerId?: string;customerProfile?
customerProfile?: object;Synchronous Liquid customer fields used during initial rendering. Not available on headless hosts yet.
addresses?
addresses?: unknown[];avatarUrl?
avatarUrl?: string;default_address?
default_address?: Record<string, unknown>;first_name?
first_name?: string;last_name?
last_name?: string;orders?
orders?: unknown[];orders_count?
orders_count?: number;phone?
phone?: string;customerTierId?
customerTierId?: string;Liquid customer tier identity backs tier-aware referral rates. Not available on headless hosts yet.
debug?
debug?: boolean;Liquid diagnostic flag; distinct from preview mode. Not available on headless hosts yet.
demoMode?
demoMode?: boolean;locale?
locale?: string;loginUrl
loginUrl: string;loyaltyPageUrl
loyaltyPageUrl: string;moneyFormat?
moneyFormat?: string;ordersCustomerId?
ordersCustomerId?: string;The legacy orders API requires the bare Shopify session customer id. Not available on headless hosts yet.
page
page: object;handle
handle: string;resourceId
resourceId: string;type
type: string;preview?
preview?: boolean;registerUrl
registerUrl: string;routesRoot
routesRoot: string;shopDomain
shopDomain: string;shopId?
shopId?: string;shopifyCustomerId?
shopifyCustomerId?: string;Shopify session identity. Not available on headless hosts yet.
translation
translation: Record<string, string>;viewport
viewport: object;Liquid viewport snapshot used by launcher visibility. Not available on headless hosts yet.
width
width: number;ImpactHistory
Properties
connected
connected: boolean;events
events: ImpactHistoryEvent[];totals
totals: object;plasticBottles
plasticBottles: number;trees
trees: number;ImpactHistoryEvent
Properties
createdAt?
createdAt?: string;id?
id?: string;quantity
quantity: number;status
status: string;type
type: "tree" | "plastic";LegacyActivityPage
Legacy activity list fields consumed by the moved activity handlers.
Properties
data?
data?: unknown[];pageInfo?
pageInfo?: LegacyPageInfo;LegacyPageInfo
Cursor flags consumed by the activity and reward pagers.
Properties
hasNext?
hasNext?: boolean;hasPre?
hasPre?: boolean;LegacyRewardSet
Legacy reward list fields consumed by the moved reward handlers.
Properties
data?
data?: unknown[];pageInfo?
pageInfo?: LegacyPageInfo;response?
response?: object;pageInfo?
pageInfo?: LegacyPageInfo;total?
total?: number;total?
total?: number;OrderActivitiesRequest
The legacy order-activities API uses Joy's customer id. Not available on headless hosts yet.
Properties
customerId
customerId: string;orderId
orderId: string | number;OrderByIdRequest
The legacy orders API needs a Shopify session customer id. Not available on headless hosts yet.
Properties
customerId
customerId: string;orderId
orderId: string | number;OrderListResponse
The legacy list envelope consumed by unwrapListResponse().
Properties
data?
data?:
| unknown[]
| {
data?: unknown[];
};OrdersRequest
The legacy orders API needs a Shopify session customer id. Not available on headless hosts yet.
Properties
customerId
customerId: string;PendingTierRewardClaim
Properties
claimedCount?
claimedCount?: number;claimedVariantIds?
claimedVariantIds?: string[];claimType?
claimType?: string;expiredAt?
expiredAt?: string | null;id?
id?: string;maxClaims?
maxClaims?: number;programId?
programId?: string;rewardProductQuantity?
rewardProductQuantity?: number;status?
status?: string;PrivacyConsent
Properties
analytics
analytics: string;marketing
marketing: string;preferences
preferences: string;sale_of_data
sale_of_data: string;PrivacyConsentSaveResult
Properties
ok
ok: boolean;state
state: PrivacyConsentState;PrivacyConsentState
Properties
consent
consent: PrivacyConsent;region
region: "eu" | "us" | "row";PromotedCollection
Properties
handle
handle: string;id
id: string;image?
image?: string;productCount?
productCount?: number;title
title: string;url
url: string;PromotedCollectionSelection
Properties
handle
handle: string;id?
id?: string | number;title?
title?: string;ProviderReview
Provider-neutral raw review fields consumed by normalizeReview().
Properties
body?
body?: string;content?
content?: string;contentReview?
contentReview?: string;created_at?
created_at?: string;createdAt?
createdAt?: string;id?
id?: string | number;images?
images?: unknown[];product?
product?: ProviderReviewProduct;products?
products?: ProviderReviewProduct[];rate?
rate?: number;rating?
rating?: number;reviewId?
reviewId?: string | number;reviewImages?
reviewImages?: unknown[];title?
title?: string;titleReview?
titleReview?: string;ProviderReviewProduct
Raw provider product fields consumed by normalizeProduct().
Properties
handle?
handle?: string;id?
id?: string | number;image?
image?: string;title?
title?: string;ProviderReviewsRequest
Properties
after?
after?: string;before?
before?: string;customerId?
customerId?: string;provider
provider: string;RecentlyViewedProduct
Persisted product-card fields rendered by the recently-viewed carousel.
Properties
compareAtPrice
compareAtPrice: string;handle
handle: string;id
id: string | number;image
image: string;imageHover
imageHover: string;price
price: string;title
title: string;url
url: string;RedeemOptions
Properties
points?
points?: number;recipient?
recipient?: RedeemRecipient | null;variantId?
variantId?: string;RedeemRecipient
Gift-card "send as a gift" payload forwarded verbatim in the /redeem body.
Shape matches the widget's joy-redeem event detail (joy-redeem-detail
_buildRecipientPayload). Null/omitted for self-redeem or non-gift-card.
Properties
email: string;message?
message?: string;name?
name?: string;sendNotificationAt?
sendNotificationAt?: string;ReferralHistoryItem
One paginated referral-history row returned by Liquid's /referred API.
Properties
createdAt
createdAt: string | null;email: string;id
id: string;status
status: "pending" | "complete" | "cancel";ReferralHistoryPage
Referral-history rows plus the cursor flags the pager consumes.
Properties
items
items: ReferralHistoryItem[];pagination
pagination: Pagination;ReferralLink
Properties
referralCode?
referralCode?: string;urlReferral?
urlReferral?: string;ReferralLinkRequest
Properties
email: string;shopId
shopId: string;ReferralQuery
Properties
after?
after?: string;before?
before?: string;ReviewRewardsRequest
Properties
customerId?
customerId?: string;provider
provider: string;ReviewRewardsResult
Properties
customerPoint?
customerPoint?: number;rewards
rewards: Record<string, number>;RewardQuery
Rewards and "received rewards" (gifts from friends) are one method discriminated by
received, because they page independently but map to the same reward shape.
query is fully built by the caller — forward it whole, as with ActivityQuery.
Properties
query?
query?: string | URLSearchParams;received?
received?: boolean;SendRewardToFriendRequest
Properties
couponCode
couponCode: string;customerId
customerId: string;programId
programId: string;recipient
recipient: object;personalMessage?
personalMessage?: string;recipientEmail
recipientEmail: string;recipientName?
recipientName?: string;shopId
shopId: string;SendRewardToFriendResult
Properties
error?
error?: string;success?
success?: boolean;StoreCreditAccount
Properties
amount
amount: number;currencyCode
currencyCode: string;id?
id?: string;StoreCreditTransactionsRequest
Properties
accountId
accountId: string;after?
after?: string;before?
before?: string;customerId?
customerId?: string;limit
limit: number;StoreCreditTransactionsResult
Properties
accountId
accountId: string | null;data
data: unknown[];endCursor
endCursor: string | null;hasNextPage
hasNextPage: boolean;hasPrevPage
hasPrevPage: boolean;startCursor
startCursor: string | null;StorefrontProduct
The Shopify Ajax product shape consumed by shared product-card helpers.
Extended by
Properties
compare_at_price?
compare_at_price?: StorefrontProductPrice;compare_at_price_max?
compare_at_price_max?: StorefrontProductPrice;featured_image?
featured_image?: string | StorefrontProductImage;handle?
handle?: string;id?
id?: string | number;images?
images?: (string | StorefrontProductImage)[];price?
price?: StorefrontProductPrice;product_id?
product_id?: string | number;selling_plan_allocations?
selling_plan_allocations?: StorefrontSellingPlanAllocation[];sellingPlanAllocations?
sellingPlanAllocations?: StorefrontSellingPlanAllocation[];title?
title?: string;variants?
variants?: StorefrontProductVariant[];StorefrontProductImage
Properties
src?
src?: string;url?
url?: string;StorefrontProductVariant
Properties
compare_at_price?
compare_at_price?: StorefrontProductPrice;price?
price?: StorefrontProductPrice;selling_plan_allocations?
selling_plan_allocations?: StorefrontSellingPlanAllocation[];sellingPlanAllocations?
sellingPlanAllocations?: StorefrontSellingPlanAllocation[];StorefrontSellingPlanAllocation
Properties
per_delivery_price?
per_delivery_price?: StorefrontProductPrice;perDeliveryPrice?
perDeliveryPrice?: StorefrontProductPrice;price?
price?: StorefrontProductPrice;SubmitProviderReviewRequest
Properties
payload
payload: Record<string, unknown>;provider
provider: string;TierReward
Properties
id?
id?: string | number;tierRewards?
tierRewards?: TierRewardDefinition[];WidgetControllerHandle
Methods
dispose()
dispose(): void;Returns
void
Type Aliases
ActivityQuery
type ActivityQuery = string | URLSearchParams;A fully-built activity query — NOT a bare cursor. Carries limit and, for the
points-only history, type=points, alongside any before/after cursor. A host
must forward it whole; rebuilding it from a cursor silently drops the other params.
AuthState
type AuthState =
| {
status: "loading";
}
| {
status: "guest";
}
| {
status: "authenticated";
};CoreDataPort
type CoreDataPort = Pick<DataPort,
| "getShopConfig"
| "getTiers"
| "getCustomer"
| "getPrograms"
| "getReferral"
| "getReferralHistory"
| "redeem"
| "earn"
| "earnUpload"
| "earnSocial"
| "getProductByHandle"
| "getRecentlyViewedProducts"
| "saveRecentlyViewedProducts">;The slice of DataPort that BOTH the Liquid host and the headless host implement with identical signatures. Measured, not asserted: the other 35 members are either absent from the headless port or carry a different contract there. Adding a member here is a promise that both hosts honour it.
Customer
type Customer = Customer;EarnActionResponse
type EarnActionResponse = object;Properties
data?
data?: object & Record<string, unknown>;Type Declaration
customer?
customer?: Record<string, unknown>;point?
point?: number;error?
error?:
| string
| {
message?: string;
};point?
point?: number;success?
success?: boolean;EarnImageInput
type EarnImageInput = EarnImageUpload;EarnRequest
type EarnRequest =
| {
context: SubmitFormEarnContext;
endpoint: "/submit-form";
programId: string;
}
| {
context: GoogleMapsReviewEarnContext;
endpoint: "/google-maps-review";
programId: string;
}
| {
context: ReceiptEarnContext;
endpoint: "/activity/submit-receipt";
programId: string;
}
| {
context: BirthdayEarnContext;
endpoint: "/birthday";
programId: string;
};Semantic input for the three legacy activity-submit transports. The
discriminator preserves the endpoint distinction Liquid needs, while the
context shapes are the frozen Headless API v1 contract Hydrogen sends to
its single /customer/earn endpoint.
EarnResult
type EarnResult = EarnResult;EarnUploadResult
type EarnUploadResult = EarnUploadResult;FreeGiftStockResult
type FreeGiftStockResult = FreeGiftStockProduct[] | null;Null preserves the legacy malformed-response branch separately from an empty stock list.
MilestoneProgress
type MilestoneProgress = Record<string, number>;NavTarget
type NavTarget =
| {
type: "login" | "register" | "loyaltyPage" | "view" | "external";
url?: string;
view?: string;
}
| {
hash: string;
type: "hash";
};PrivacyConsentChanges
type PrivacyConsentChanges = Partial<Record<keyof PrivacyConsent, boolean>>;PrivacyEngagement
type PrivacyEngagement =
| {
name: "privacy_block_viewed";
region: PrivacyConsentState["region"];
}
| {
category: string;
name: "privacy_toggle_changed";
region?: PrivacyConsentState["region"];
};Program
type Program = Program;ProviderReviewsResult
type ProviderReviewsResult =
| {
errorKind: "login_required";
}
| {
data?: {
pagination?: unknown;
reviews?: ProviderReview[];
};
success: true;
};RedeemResult
type RedeemResult = RedeemResult;Referral
type Referral = Referral;ShopConfig
type ShopConfig = ShopConfig;SocialEarnResult
type SocialEarnResult = SocialEarnResult;StorefrontProductPrice
type StorefrontProductPrice = number | string;SubmitProviderReviewResult
type SubmitProviderReviewResult =
| {
errorKind: "login_required";
}
| {
unsupported: true;
}
| {
message?: string;
success: false;
}
| {
data: ProviderReview;
success: true;
};Tier
type Tier = Tier;TierRewardsResult
type TierRewardsResult = TierReward[] | null;Null preserves the legacy malformed-response branch separately from an empty reward list.
References
TierRewardDefinition
Re-exports TierRewardDefinition