Developers
Start building
Themes/Theme SDK/Modules/product/Types: ProductPageView to RatingStats

Types: ProductPageView to RatingStats

The types of @poltura/theme-sdk/product, ProductPageView to RatingStats.

On this page
import { … } from '@poltura/theme-sdk/product';

ProductPageView

Everything a product page shows beyond the product itself.

productrequiredProduct

The product.

breadcrumbsrequiredreadonly BreadcrumbItem[]

The trail from the home page to the product.

descriptionMarkdownrequiredstring | null

The product description as the merchant wrote it, Markdown that may hold HTML, as `Markdown` from the content module draws it; null without one.

descriptionAiGeneratedrequiredboolean

Whether AI wrote the description; `Markdown` from the content module marks it in the page by itself.

highlightsrequiredreadonly string[]

The merchant's highlighted selling points.

specGroupsrequiredreadonly SpecGroup[]

The specification table.

keySpecsrequiredreadonly Spec[]

The attributes the store shows by the title, such as a game's platform; empty when none apply.

guidesrequiredreadonly Guide[]

Guides that belong to the product.

downloadsrequiredreadonly GuideAttachment[]

Every file and link the guides tab lists: the product's own first, then each guide's, in order.

filesrequiredreadonly ProductFile[]

The files buyers download after purchase, product-wide ones first; empty when it delivers none.

warrantyrequiredProductWarranty | null

The warranty, or null.

safetyrequiredProductSafety | null

The safety information, or null.

coveragerequiredProductCoverage | null

Where the product can be used, or null when it is not region-locked.

tablesrequiredreadonly ProductTable[]

The tables attached to the product, strongest first; empty when it has none.

tabsrequiredreadonly ProductTab[]

The tabs under the product in the merchant's order, without the ones that have nothing to show for this product.

reviewsSeedrequiredReviewPage | null

The first page of reviews, read with the page, or null.

reviewTargetrequiredReviewTarget

Whose reviews the page shows and the review form asks about: the product, or each item of its bundle.

ProductSafety

What the EU product safety rules (2023/988, Art. 19) require a listing to show.

manufacturerrequiredProductSafetyContact | null

The manufacturer, or null.

responsiblePersonrequiredProductSafetyContact | null

The person responsible in the EU, or null.

informationrequiredstring | null

Safety warnings and instructions, or null.

ProductSafetyContact

Who answers for a product's safety.

namerequiredstring

The company's name.

addressrequiredstring | null

The postal address, or null.

emailrequiredstring | null

The contact address, or null.

ProductTab

A product page tab. A built-in one, the merchant's text, or a table.

idrequiredstring

The tab's id.

kindrequired'builtin'

A built-in tab shows content the product already holds.

labelrequiredstring

The merchant's name for it in the page language, or the default name of that content.

ProductTabBuiltin

A built-in tab's content: what the product already holds.

type ProductTabBuiltin = 'description' | 'specs' | 'guides' | 'warranty'

ProductTable

A product table. A size chart, nutrition facts or specifications.

idrequiredstring

The table's id.

namerequiredstring

The table's name in the page language, such as "Women's tops".

labelrequiredstring

The text of its link, its tab title or its section heading; the name when the merchant wrote none.

placementsrequiredreadonly ProductTablePlacement[]

Where it shows.

introrequiredstring | null

The sentence above the table, or null.

guideTextrequiredstring | null

The measuring instructions below the table, as Markdown, or null.

guideImageUrlrequiredstring | null

The picture beside the measuring instructions, or null.

columnsrequiredreadonly ProductTableColumn[]

The columns, the first one naming each row.

rowsrequiredreadonly ProductTableRow[]

The rows, in the merchant's order.

selectVariantrequiredboolean

Whether a row whose first cell names a value of a product option selects that value.

unitSwitchrequiredboolean

Whether the shopper may flip the table between metric and imperial units.

ProductTableColumn

One column of a product table, such as a measurement.

idrequiredstring

The column's id; the key of its cell in each row.

labelrequiredstring

The column's heading in the page language.

typerequiredProductTableColumnType

Whether its cells are text, one number or a range of numbers.

unitrequiredstring | null

The unit its numbers are written in, such as `cm`, or null.

ProductTableColumnType

How a column's cells read.

type ProductTableColumnType = 'text' | 'number' | 'range'

ProductTablePlacement

Where a table shows.

type ProductTablePlacement = 'link' | 'tab' | 'section'

ProductTableRow

One row of a product table, such as a size.

idrequiredstring

The row's id.

cellsrequiredReadonly<Record<string, string>>

The row's cell texts, by column id; a missing cell is empty.

ProductTabsDisplay

Tabs or an accordion. A tab bar, or one heading per tab.

type ProductTabsDisplay = 'tabs' | 'accordion'

ProductWarranty

The warranty that comes with a product.

namerequiredstring

The warranty's name in the page language.

kindrequired'digitalLicense' | 'standard'

Whether it covers a digital licence or a physical product.

activationWindowDaysrequirednumber

Days the buyer has to activate the product.

supportWindowDaysrequirednumber | null

Days of support, or null when support has no end.

replacementWindowDaysrequirednumber

Days within which a faulty item is replaced.

replacementAfterWindowGuaranteedrequiredboolean

Whether replacement is guaranteed after that window too.

RatingCount

How many reviews gave one star rating.

starsrequired1 | 2 | 3 | 4 | 5

The star rating.

countrequirednumber

How many reviews gave it.

RatingStats

A product's review score.

averagerequirednumber

The average star rating, from 1 to 5.

countrequirednumber

How many reviews the average is over.

breakdownrequiredreadonly RatingCount[]

How many reviews gave each star rating.

Last updated