# data (/themes/sdk/reference/data)

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

## [Hooks](/themes/sdk/reference/data/hooks-1) [#hooks]

| Name | What it is |
| --- | --- |
| [`useProducts`](/themes/sdk/reference/data/hooks-1#useproducts) | One page of product cards matching a query, priced for the visitor. |
| [`useInfiniteProducts`](/themes/sdk/reference/data/hooks-1#useinfiniteproducts) | Product cards matching a query, a page at a time, for "load more" and endless lists. |
| [`useProduct`](/themes/sdk/reference/data/hooks-1#useproduct) | One product with every variant, option and specification, priced for the visitor. |
| [`useCategories`](/themes/sdk/reference/data/hooks-1#usecategories) | The store's categories, in the merchant's order. |
| [`useCategory`](/themes/sdk/reference/data/hooks-1#usecategory) | One category with its path, description, image and subcategories. |
| [`useCollections`](/themes/sdk/reference/data/hooks-1#usecollections) | The store's collections. |
| [`useCollection`](/themes/sdk/reference/data/hooks-1#usecollection) | One collection with its description and image. |
| [`useProductAttributes`](/themes/sdk/reference/data/hooks-1#useproductattributes) | Product attributes with their values, by key or as a category offers them for filtering. |
| [`useProductTypes`](/themes/sdk/reference/data/hooks-1#useproducttypes) | The store's product types, such as "T-shirt" or "Gift card". |
| [`useCollectionListEntry`](/themes/sdk/reference/data/hooks-2#usecollectionlistentry) | One pick of a `collectionList` setting, read as a card: its title, page and image. |
| [`usePage`](/themes/sdk/reference/data/hooks-2#usepage) | The site page a `page` setting points to. |
| [`usePost`](/themes/sdk/reference/data/hooks-2#usepost) | The blog post or guide a `post` setting points to. |

## [Constants](/themes/sdk/reference/data/constants) [#constants]

| Name | What it is |
| --- | --- |
| [`StoreReadError`](/themes/sdk/reference/data/constants#storereaderror) | A failed store read; `instanceof StoreReadError` holds for it wherever the theme renders. |

## [Types](/themes/sdk/reference/data/types-1) [#types]

| Name | What it is |
| --- | --- |
| [`Category`](/themes/sdk/reference/data/types-1#category) | A product category with its place in the category tree. |
| [`CategoryQuery`](/themes/sdk/reference/data/types-1#categoryquery) | Which categories [`useCategories`](/themes/sdk/reference/data/hooks-1#usecategories) lists. |
| [`CategoryRef`](/themes/sdk/reference/data/types-1#categoryref) | A category as other view models link to it. |
| [`Collection`](/themes/sdk/reference/data/types-1#collection) | A hand-picked group of products with its own page. |
| [`CollectionQuery`](/themes/sdk/reference/data/types-1#collectionquery) | Which collections [`useCollections`](/themes/sdk/reference/data/hooks-1#usecollections) lists. |
| [`CollectionRef`](/themes/sdk/reference/data/types-1#collectionref) | A collection as other view models link to it. |
| [`InfiniteQueryResult`](/themes/sdk/reference/data/types-1#infinitequeryresult) | What [`useInfiniteProducts`](/themes/sdk/reference/data/hooks-1#useinfiniteproducts) answers: every page loaded so far and a way to load the next. |
| [`PageRequest`](/themes/sdk/reference/data/types-1#pagerequest) | Which page of a list to read. |
| [`ProductAttribute`](/themes/sdk/reference/data/types-1#productattribute) | A merchant-defined product attribute a list can be filtered by, such as material or colour. |
| [`ProductAttributeValue`](/themes/sdk/reference/data/types-1#productattributevalue) | One value of a product attribute, such as "Cotton" or "Red". |
| [`ProductPage`](/themes/sdk/reference/data/types-1#productpage) | One page of a product list. |
| [`ProductQuery`](/themes/sdk/reference/data/types-1#productquery) | Which products [`useProducts`](/themes/sdk/reference/data/hooks-1#useproducts) lists; every given narrowing applies at once. |
| [`ProductSort`](/themes/sdk/reference/data/types-1#productsort) | The orders a product list can be sorted in. |
| [`ProductTypeRef`](/themes/sdk/reference/data/types-1#producttyperef) | A product type, such as "T-shirt" or "Gift card". |
| [`QueryOptions`](/themes/sdk/reference/data/types-1#queryoptions) | Options every data hook takes. |
| [`QueryResult`](/themes/sdk/reference/data/types-1#queryresult) | What a data hook answers: the data once it arrived, the read's status and a way to read again. |
| [`QueryStatus`](/themes/sdk/reference/data/types-1#querystatus) | Where a read is: still loading its first answer, failed, or answered. |
| [`StoreReadErrorCode`](/themes/sdk/reference/data/types-1#storereaderrorcode) | Why a store read failed. |
| [`SuspenseQueryOptions`](/themes/sdk/reference/data/types-1#suspensequeryoptions) | [`QueryOptions`](/themes/sdk/reference/data/types-1#queryoptions) that suspend: the hook answers a [`SuspenseQueryResult`](/themes/sdk/reference/data/types-1#suspensequeryresult). |
| [`SuspenseQueryResult`](/themes/sdk/reference/data/types-1#suspensequeryresult) | What a data hook answers with `{ suspense: true }`: the component renders only once the data is there. |
| [`ProductLookup`](/themes/sdk/reference/data/types-1#productlookup) | Names one product, by its URL segment or by its id. |
| [`CategoryLookup`](/themes/sdk/reference/data/types-1#categorylookup) | Names one category, by its URL path from the root or by its id. |
| [`CollectionLookup`](/themes/sdk/reference/data/types-2#collectionlookup) | Names one collection, by its URL segment or by its id. |
| [`ProductAttributeLookup`](/themes/sdk/reference/data/types-2#productattributelookup) | Selects what [`useProductAttributes`](/themes/sdk/reference/data/hooks-1#useproductattributes) reads: by key, or every attribute a category offers. |
| [`CollectionListPick`](/themes/sdk/reference/data/types-2#collectionlistpick) | One pick of a `collectionList` setting: a collection or a category by its URL segment. |
| [`CollectionListEntry`](/themes/sdk/reference/data/types-2#collectionlistentry) | A collection or category in a collection list. |
| [`ContentEntry`](/themes/sdk/reference/data/types-2#contententry) | A content page, blog post or guide as a setting points to it. |
| [`PostLookup`](/themes/sdk/reference/data/types-2#postlookup) | The value of a `post` setting: a blog post or a guide by its URL segment. |

<AnchorRedirect to={{"hooks":"/themes/sdk/reference/data/hooks-1","useproducts":"/themes/sdk/reference/data/hooks-1","useinfiniteproducts":"/themes/sdk/reference/data/hooks-1","useproduct":"/themes/sdk/reference/data/hooks-1","usecategories":"/themes/sdk/reference/data/hooks-1","usecategory":"/themes/sdk/reference/data/hooks-1","usecollections":"/themes/sdk/reference/data/hooks-1","usecollection":"/themes/sdk/reference/data/hooks-1","useproductattributes":"/themes/sdk/reference/data/hooks-1","useproducttypes":"/themes/sdk/reference/data/hooks-1","usecollectionlistentry":"/themes/sdk/reference/data/hooks-2","usepage":"/themes/sdk/reference/data/hooks-2","usepost":"/themes/sdk/reference/data/hooks-2","constants":"/themes/sdk/reference/data/constants","storereaderror":"/themes/sdk/reference/data/constants","types":"/themes/sdk/reference/data/types-1","category":"/themes/sdk/reference/data/types-1","categoryquery":"/themes/sdk/reference/data/types-1","categoryref":"/themes/sdk/reference/data/types-1","collection":"/themes/sdk/reference/data/types-1","collectionquery":"/themes/sdk/reference/data/types-1","collectionref":"/themes/sdk/reference/data/types-1","infinitequeryresult":"/themes/sdk/reference/data/types-1","pagerequest":"/themes/sdk/reference/data/types-1","productattribute":"/themes/sdk/reference/data/types-1","productattributevalue":"/themes/sdk/reference/data/types-1","productpage":"/themes/sdk/reference/data/types-1","productquery":"/themes/sdk/reference/data/types-1","productsort":"/themes/sdk/reference/data/types-1","producttyperef":"/themes/sdk/reference/data/types-1","queryoptions":"/themes/sdk/reference/data/types-1","queryresult":"/themes/sdk/reference/data/types-1","querystatus":"/themes/sdk/reference/data/types-1","storereaderrorcode":"/themes/sdk/reference/data/types-1","suspensequeryoptions":"/themes/sdk/reference/data/types-1","suspensequeryresult":"/themes/sdk/reference/data/types-1","productlookup":"/themes/sdk/reference/data/types-1","categorylookup":"/themes/sdk/reference/data/types-1","collectionlookup":"/themes/sdk/reference/data/types-2","productattributelookup":"/themes/sdk/reference/data/types-2","collectionlistpick":"/themes/sdk/reference/data/types-2","collectionlistentry":"/themes/sdk/reference/data/types-2","contententry":"/themes/sdk/reference/data/types-2","postlookup":"/themes/sdk/reference/data/types-2"}} />
