API Reference
@frontend-sdk/recharge - v0.26.0
Interfaces
Type aliases
CDNRequestStatus
Ƭ CDNRequestStatus: "loading"
| "ready"
ShippingIntervalUnitType
Ƭ ShippingIntervalUnitType: "days"
| "weeks"
| "months"
Functions
useReCharge
▸ Const
useReCharge(options
): UseReCharge
Parameters
Name | Type |
---|---|
options | UseReChargeOptions |
Returns
Interface: Cart
Properties
checkoutUrl
• Readonly
checkoutUrl: string
items
• Readonly
items: readonly CartItem[]
Interface: CartItem
Properties
id
• Readonly
id: number
properties
• Optional
Readonly
properties: Record
<PropertyKey, unknown>
quantity
• Readonly
quantity: number
Interface: Metafield
Properties
key
• Readonly
key: string
namespace
• Readonly
namespace: string
value
• Readonly
value: unknown
Interface: Metafields
Hierarchy
-
ReadonlyArray
<Metafield>↳ Metafields
Interface: Product
Properties
externalId
• Readonly
externalId: number
metafields
• Optional
Readonly
metafields: Metafields
Interface: UseReCharge
Properties
getCartItem
• Readonly
getCartItem: <Target>(target
: Target
, shippingIntervalFrequency
: number
) => Target
Type declaration
▸ <Target>(target
, shippingIntervalFrequency
): Target
Returns the cart item object that is passed to addItems hook in frontend-checkout to add items to cart
Type parameters
Name | Type |
---|---|
Target | Target : CartItem |
Parameters
Name | Type |
---|---|
target | Target |
shippingIntervalFrequency | number |
Returns
Target
isRechargeable
• Readonly
isRechargeable: boolean
Does the product have subscriptions/selling plans?
shippingIntervalFrequency
• Optional
Readonly
shippingIntervalFrequency: readonly number
[]
Available shipping intervals for a given product variant
shippingIntervalUnitType
• Optional
Readonly
shippingIntervalUnitType: string
status
• Optional
Readonly
status: CDNRequestStatus
Status of the fetch call to reCharge's CDN
Interface: UseReChargeOptions
Properties
currentVariantId
• Readonly
currentVariantId: number
product
• Readonly
product: null
| CMSProduct
storeUrl
• Readonly
storeUrl: string
Updated about 1 year ago