Types: CollectionLookup to PostLookup
The types of @poltura/theme-sdk/data, CollectionLookup to PostLookup.
On this page
import { … } from '@poltura/theme-sdk/data';CollectionLookup
Names one collection, by its URL segment or by its id.
type CollectionLookup = {
readonly handle: string;
} | {
readonly id: string;
}ProductAttributeLookup
Selects what useProductAttributes reads: by key, or every attribute a category offers.
type ProductAttributeLookup = {
readonly handles: readonly string[];
} | {
readonly categoryId: string;
}CollectionListPick
One pick of a collectionList setting: a collection or a category by its URL segment.
kindrequired'collection' | 'category'Whether the pick is a collection or a category.
handlerequiredstringThe URL segment, the full path for a subcategory.
CollectionListEntry
A collection or category in a collection list.
kindrequired'collection' | 'category'Whether it is a collection or a category.
idrequiredstringIts id.
titlerequiredstringIts title in the page language.
hrefrequiredstringIts page's path.
imagerequiredMediaImageRef | nullIts image, or null.
ContentEntry
A content page, blog post or guide as a setting points to it.
idrequiredstringIts id.
kindrequired'page' | 'post' | 'guide'Whether it is a site page, a blog post or a guide.
titlerequiredstringIts title in the page language.
excerptrequiredstring | nullIts short summary, or null.
hrefrequiredstringIts path.
coverrequired{ readonly url: string; readonly alt: string | null; } | nullIts cover image, or null.
publishedAtrequiredstring | nullWhen it was published, as an ISO 8601 moment, or null.
PostLookup
The value of a post setting: a blog post or a guide by its URL segment.
kindrequired'post' | 'guide'Whether it is a blog post or a guide.
slugrequiredstringIts URL segment.