# Types (/themes/sdk/reference/price/types)

```ts
import { … } from '@poltura/theme-sdk/price';
```

## `MeasureUnit` [#measureunit]

A unit a product's contents or a unit price is measured in.

```ts
type MeasureUnit = 'mg' | 'g' | 'kg' | 'ml' | 'cl' | 'l' | 'm3' | 'cm' | 'm' | 'm2' | 'ct'
```

## `Money` [#money]

An amount of money in major units (`12.99`, not `1299`).

<TypeTable type={{"amount":{"description":"The amount in major units.","type":"number","required":true},"currencyCode":{"description":"The currency of the amount.","type":"CurrencyCode","required":true}}} />

## `PriceAccess` [#priceaccess]

Whether and how the current visitor may see prices.

<TypeTable type={{"visible":{"description":"Whether prices are shown to this visitor at all.","type":"boolean","required":true},"displayMode":{"description":"The basis prices are shown on.","type":"PriceDisplayMode","required":true},"gate":{"description":"Why prices are hidden, or null when they are visible.","type":"PriceGateReason | null","required":true},"minimumOrder":{"description":"The visitor's minimum order value per currency; empty when there is none.","type":"readonly Money[]","required":true}}} />

## `PriceBounds` [#pricebounds]

The lowest and highest price of a product's variants.

<TypeTable type={{"min":{"description":"The lowest variant price.","type":"PriceView","required":true},"max":{"description":"The highest variant price.","type":"PriceView","required":true}}} />

## `PriceDisplayMode` [#pricedisplaymode]

Which basis prices are shown on: with tax, without tax, or without tax plus a tax note.

```ts
type PriceDisplayMode = 'gross' | 'net' | 'netPlusTax'
```

## `PriceGateReason` [#pricegatereason]

Why prices are hidden from the visitor: they must sign in, or apply for a business account.

```ts
type PriceGateReason = 'signIn' | 'apply'
```

## `PriceRef` [#priceref]

The opaque key the storefront fills a live price into on pages with live prices.

<TypeTable type={{"__brand":{"description":"Keeps arbitrary strings from passing as a price ref; never read it.","type":"'PriceRef'","required":true}}} />

## `PriceView` [#priceview]

A price as a view model carries it; render it with the price parts.

`resolved` is null on pages with live prices (`islands`) or when the visitor may not see them.

<TypeTable type={{"ref":{"description":"The key the host fills this price into.","type":"PriceRef","required":true},"resolved":{"description":"The worked-out price, or null when it is filled in by the host or hidden.","type":"ResolvedPrice | null","required":true}}} />

## `ResolvedPrice` [#resolvedprice]

A price worked out for the visitor's display mode, ready to show.

<TypeTable type={{"amount":{"description":"The amount to show, on the visitor's display basis.","type":"Money","required":true},"compareAt":{"description":"The price before the markdown on the same basis, or null at full price.","type":"Money | null","required":true},"discountPercent":{"description":"The markdown as a whole percentage (27 means 27 %), or null at full price.","type":"number | null","required":true},"gross":{"description":"The amount with tax.","type":"Money","required":true},"net":{"description":"The amount without tax, or null when the market has no tax split.","type":"Money | null","required":true},"taxIncluded":{"description":"Whether `amount` includes tax.","type":"boolean","required":true},"taxRatePercent":{"description":"The tax rate as a percentage, or null when rates are mixed or unknown.","type":"number | null","required":true},"unit":{"description":"The unit price, or null when the product has no measured contents.","type":"UnitPriceInfo | null","required":true},"displayMode":{"description":"The basis `amount` and `compareAt` are on.","type":"PriceDisplayMode","required":true}}} />

## `UnitMeasure` [#unitmeasure]

A quantity with its unit, such as 500 g.

<TypeTable type={{"value":{"description":"The quantity.","type":"number","required":true},"unit":{"description":"The unit the quantity is in.","type":"MeasureUnit","required":true}}} />

## `UnitPriceInfo` [#unitpriceinfo]

The price per base quantity the EU unit-pricing rules (98/6/EC) require, such as 4.20 per kg.

<TypeTable type={{"perAmount":{"description":"The price of one `base` quantity.","type":"Money","required":true},"measure":{"description":"What the product contains.","type":"UnitMeasure","required":true},"base":{"description":"The quantity the unit price is quoted per.","type":"UnitMeasure","required":true}}} />

## `UnitPricing` [#unitpricing]

What a variant contains and the quantity its unit price is quoted per.

<TypeTable type={{"measure":{"description":"What the variant contains, such as 500 g.","type":"UnitMeasure","required":true},"base":{"description":"The quantity the unit price is quoted per, such as 1 kg.","type":"UnitMeasure","required":true}}} />

## `PriceProps` [#priceprops]

Props of [`Price`](/themes/sdk/reference/price/parts#price), [`CompareAtPrice`](/themes/sdk/reference/price/parts#compareatprice), [`DiscountBadge`](/themes/sdk/reference/price/parts#discountbadge) and [`UnitPrice`](/themes/sdk/reference/price/parts#unitprice).

<TypeTable type={{"price":{"description":"The price of a product, variant or card.","type":"PriceView","required":true},"className":{"description":"Classes added to the price.","type":"string","required":false},"noteClassName":{"description":"Classes added to the net or plus-VAT note `Price` and `PriceRange` draw for a net-display buyer.","type":"string","required":false}}} />

## `PriceRangeProps` [#pricerangeprops]

Props of [`PriceRange`](/themes/sdk/reference/price/parts#pricerange).

<TypeTable type={{"price":{"description":"The price of a product, variant or card.","type":"PriceView","required":true},"className":{"description":"Classes added to the price.","type":"string","required":false},"noteClassName":{"description":"Classes added to the net or plus-VAT note `Price` and `PriceRange` draw for a net-display buyer.","type":"string","required":false},"range":{"description":"The lowest and highest variant prices; null draws `price` alone.","type":"PriceBounds | null","required":true}}} />

## `PriceNoteProps` [#pricenoteprops]

Props of [`TaxNote`](/themes/sdk/reference/price/parts#taxnote) and [`PriceGate`](/themes/sdk/reference/price/parts#pricegate).

<TypeTable type={{"className":{"description":"Classes added to the note.","type":"string","required":false}}} />
