Developers
Start building
Themes/Theme SDK/Modules/product/Types: Availability to ProductOptionValue

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.

purchasablerequiredtrue

Always purchasable.

labelrequiredstring

The status in the page language.

BundleRef

The fixed bundle a product card sells as one item.

idrequiredstring

The bundle's id.

titlerequiredstring

The bundle's title.

CountryLabel

A country with its name in the page language.

coderequiredCountryCode

The country code.

labelrequiredstring

The country's name in the page language.

ExpectedDate

When a pre-ordered or upcoming product is expected to ship.

daterequiredstring | null

The calendar day as `YYYY-MM-DD`, or null when no date is promised.

precisionrequiredExpectedPrecision

How exact `date` is: the day, its month, its quarter, or not at all.

labelrequiredstring

The 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.

keyrequiredstring

The field's key; the cart receives the shopper's text under it.

labelrequiredstring

The field's label in the page language.

typerequired'text' | 'textarea'

A single line or a multi-line text.

requiredrequiredboolean

Whether the item cannot be added without it.

maxLengthrequirednumber | null

The longest text accepted, or null for no limit.

Product

A product with everything a product page shows of it.

idrequiredstring

The product's id.

handlerequiredstring

The product's URL segment.

hrefrequiredstring

The product page's path.

titlerequiredstring

The product's title.

subtitlerequiredstring | null

The subtitle, or null.

descriptionrequiredRichTextValue | null

The description, or null.

vendorrequiredstring | null

The brand or maker, or null.

typerequiredProductTypeRef | null

The product type, or null.

tagsrequiredreadonly string[]

The product's public tags.

categoriesrequiredreadonly CategoryRef[]

The categories the product is in.

collectionrequiredCollectionRef | null

The collection the product is in, or null.

imagesrequiredreadonly MediaImageRef[]

The gallery images, in order.

featuredImagerequiredMediaImageRef | null

The 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.

pricerequiredPriceView

The price of the variant shown first.

priceRangerequiredPriceBounds | null

The lowest and highest variant prices, or null when every variant costs the same.

availabilityrequiredAvailability

The best availability of any variant.

specsrequiredreadonly SpecGroup[]

The specification table.

ratingrequiredRatingStats | null

The 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.

isDigitalrequiredboolean

Whether the product is delivered digitally.

giftCardrequiredGiftCardKind | null

The 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.

restrictedrequiredboolean

Whether 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.

idrequiredstring

The 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.

labelrequiredstring

The text, in the page language.

tonerequired'dark' | 'accent' | 'red' | 'green' | 'blue' | 'amber' | null

The theme colour preset the badge paints with, or null when it has a custom colour.

colorrequiredstring | null

The custom background as `#rrggbb`, or null when the badge follows a tone.

textColorrequiredstring | null

The 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.

coversMarketrequiredboolean

Whether 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.

idrequiredstring

The option's id.

titlerequiredstring

The option's name in the page language.

displayrequiredProductOptionDisplay

How 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".

idrequiredstring

The value's id.

labelrequiredstring

The value in the page language.

swatchrequiredSwatch | null

The value's swatch, or null when it has none.

Last updated