Types: Availability to ProductOptionValue
The types of @poltura/theme-sdk/product, Availability to ProductOptionValue.
On this page
import { … } from '@poltura/theme-sdk/product';Availability
Whether and how a product or variant can be bought, with its label in the page language.
statusrequired'inStock'On hand.
purchasablerequiredtrueAlways purchasable.
labelrequiredstringThe status in the page language.
BundleRef
The fixed bundle a product card sells as one item.
idrequiredstringThe bundle's id.
titlerequiredstringThe bundle's title.
CountryLabel
A country with its name in the page language.
coderequiredCountryCodeThe country code.
labelrequiredstringThe country's name in the page language.
ExpectedDate
When a pre-ordered or upcoming product is expected to ship.
daterequiredstring | nullThe calendar day as `YYYY-MM-DD`, or null when no date is promised.
precisionrequiredExpectedPrecisionHow exact `date` is: the day, its month, its quarter, or not at all.
labelrequiredstringThe promise in the page language, such as "Q4 2026" or "Date to be confirmed".
ExpectedPrecision
How exact a promised date is.
type ExpectedPrecision = 'day' | 'month' | 'quarter' | 'none'GiftCardKind
Whether a gift card product is loaded with an amount or redeems for a set item.
type GiftCardKind = 'amount' | 'voucher'PersonalizationField
A text the shopper fills in to personalise their item, such as an engraving.
keyrequiredstringThe field's key; the cart receives the shopper's text under it.
labelrequiredstringThe field's label in the page language.
typerequired'text' | 'textarea'A single line or a multi-line text.
requiredrequiredbooleanWhether the item cannot be added without it.
maxLengthrequirednumber | nullThe longest text accepted, or null for no limit.
Product
A product with everything a product page shows of it.
idrequiredstringThe product's id.
handlerequiredstringThe product's URL segment.
hrefrequiredstringThe product page's path.
titlerequiredstringThe product's title.
subtitlerequiredstring | nullThe subtitle, or null.
descriptionrequiredRichTextValue | nullThe description, or null.
vendorrequiredstring | nullThe brand or maker, or null.
typerequiredProductTypeRef | nullThe product type, or null.
tagsrequiredreadonly string[]The product's public tags.
categoriesrequiredreadonly CategoryRef[]The categories the product is in.
collectionrequiredCollectionRef | nullThe collection the product is in, or null.
imagesrequiredreadonly MediaImageRef[]The gallery images, in order.
featuredImagerequiredMediaImageRef | nullThe image that represents the product, or null.
optionsrequiredreadonly ProductOption[]The choices that pick a variant; empty for a single-variant product.
variantsrequiredreadonly Variant[]The buyable variants.
pricerequiredPriceViewThe price of the variant shown first.
priceRangerequiredPriceBounds | nullThe lowest and highest variant prices, or null when every variant costs the same.
availabilityrequiredAvailabilityThe best availability of any variant.
specsrequiredreadonly SpecGroup[]The specification table.
ratingrequiredRatingStats | nullThe review score, or null when the product has no reviews.
badgesrequiredreadonly ProductBadge[]The badges the product shows, in the merchant's order; empty when none apply.
isDigitalrequiredbooleanWhether the product is delivered digitally.
giftCardrequiredGiftCardKind | nullThe gift card kind, or null for a product that is not a gift card.
personalizationrequiredreadonly PersonalizationField[]Texts the shopper fills in to personalise the item.
restrictedrequiredbooleanWhether the store's plan locks the product, so it shows as unavailable.
ProductBadge
A merchant-managed label on a product, such as "New" or "Sale", already in the page language.
idrequiredstringThe badge's id.
kindrequired'manual' | 'sale' | 'new' | 'lowStock'`manual` badges are put on products by hand; the others show by a rule: on sale, recently added, or low in stock.
labelrequiredstringThe text, in the page language.
tonerequired'dark' | 'accent' | 'red' | 'green' | 'blue' | 'amber' | nullThe theme colour preset the badge paints with, or null when it has a custom colour.
colorrequiredstring | nullThe custom background as `#rrggbb`, or null when the badge follows a tone.
textColorrequiredstring | nullThe text colour as `#rrggbb` that reads on `color`; set whenever `color` is.
ProductCoverage
Where a region-locked product, such as a licence key, can be used.
coversMarketrequiredbooleanWhether it works in the visitor's market country.
includedrequiredreadonly CountryLabel[]The countries and regions it works in, named as they read on their own; empty when only exclusions apply.
excludedrequiredreadonly CountryLabel[]The countries it does not work in.
ProductOption
A choice the shopper makes to pick a variant, such as colour or size.
idrequiredstringThe option's id.
titlerequiredstringThe option's name in the page language.
displayrequiredProductOptionDisplayHow the picker presents the values.
valuesrequiredreadonly ProductOptionValue[]The values, in the merchant's order.
ProductOptionDisplay
How the picker presents an option's values.
type ProductOptionDisplay = 'buttons' | 'dropdown' | 'swatch' | 'imageTiles'ProductOptionValue
One value of a product option, such as "Red".
idrequiredstringThe value's id.
labelrequiredstringThe value in the page language.
swatchrequiredSwatch | nullThe value's swatch, or null when it has none.