MMecsto developers

Docs SDK Actions

Actions

The mutations a theme is allowed to invoke. Anything absent from this list is deliberately not a theme's to perform.

applyPromotion
applyPromotion(input: ApplyPromotionInput,): Promise<PromotionPreview | null>
preview a promotion code against a base amount.
packages/theme-sdk/src/actions/applyPromotion.ts
cancelSubscription
cancelSubscription(input: CancelSubscriptionInput,): Promise<CancelSubscriptionResult>
Edge Function `customer-cancel-subscription`.
packages/theme-sdk/src/actions/cancelSubscription.ts
signOut
signOut(): Promise<SignOutResult>
clear the Supabase session.
packages/theme-sdk/src/actions/signOut.ts
skipSubscriptionCycle
skipSubscriptionCycle(input: SkipCycleInput,): Promise<SkipCycleResult>
Edge Function `customer-skip-cycle`.
packages/theme-sdk/src/actions/skipSubscriptionCycle.ts
submitContactForm
submitContactForm(input: SubmitContactFormInput,): Promise<SubmitContactFormResult>
POST to the Seller App's `storefront-contact-submit` Edge Function.
packages/theme-sdk/src/actions/submitContactForm.ts
updateMyAddresses
updateMyAddresses(addresses: Address[],): Promise<UpdateAddressesResult>
SECURITY DEFINER RPC `update_my_customer_addresses`.
packages/theme-sdk/src/actions/updateMyAddresses.ts
updateMyProfile
updateMyProfile(input: UpdateProfileInput,): Promise<UpdateProfileResult>
SECURITY DEFINER RPC `update_my_customer_profile`.
packages/theme-sdk/src/actions/updateMyProfile.ts