Skip to main content
A grab-bag of the remaining surface: the server-only content API, money formatting, and order status lookup.

content

@replohq/sdk/content

ContentCollectionEntry

One entry’s slot in a collection listing.

ContentEntryJsonLd

Structured data for an entry as a JSON-LD script tag. Serialization is script-safe (< escaped) so entry content can never break out of the tag. The type is a deliberately neutral WebPage; collections have no schema type of their own.

ContentField

Public name for the shared collection-field contract.

ContentFieldWithValue

An ordered content field paired with this entry’s value for it.
A related entry resolved to a public link; unresolvable refs stay plain text.

getContentCollection

A collection and its renderable entries for a listing page. Uses the not-found contract when the collection is missing or archived.

getContentCollectionStaticParams

Static params for one collection’s [slug] detail route.

getContentEntryMetadata

Per-entry head metadata (title/description/OpenGraph/Twitter) from the entry’s SEO fields with content fallbacks. Returns an empty object when the entry is not renderable, so generateMetadata can call it unconditionally.

getContentFields

The entry’s renderable content fields in collection-settings order, paired with values. This is the published half of the shared ordering contract in schemas/contentCollection; empty values are omitted so templates never render bare labels.

getContentSitemapEntries

Absolute sitemap entries for every collection listing and renderable entry. origin comes from the caller (e.g. the request’s platform-validated Host) because site origins are not fixed at build time.

getContentSitemapXml

The full sitemap XML document for a site’s content (home, collection listings, entries). Kept here so the generated sitemap route stays a tiny, restylable-free shell around one call.
Also exported

money

@replohq/sdk/money

formatAmount

Formats integer minor units for display, e.g. 1999 -> “$19.99” (USD), “¥1,999” (JPY).

fromMajorUnitsToMinorUnits

Converts a decimal major-unit amount (e.g. “19.99”, 19.99) into integer minor units (1999) using the currency’s Stripe exponent. Half-away-from-zero rounding for the non-negative amounts this domain uses (prices, totals), matching Stripe. Throws on non-numeric input.

fromMinorUnitsToMajorUnits

Converts integer minor units (1999) back into a decimal major-unit number (19.99). Only for true decimal boundaries: display, analytics events, and third-party APIs that speak major units.

fromMinorUnitsToMajorUnitsString

Renders integer minor units as a plain decimal string for providers that speak decimal money (e.g. Printful retail_price): 1999 -> “19.99” (USD), “1999” (JPY), “1.999” (KWD).

orders/order-status

@replohq/sdk/orders/order-status

getOrderStatus

Resolve an order-status reference (an order’s statusToken, or a cs_ Stripe Checkout Session id straight after checkout) into what the order status page renders. Every failure — network, non-200, contract drift — maps to { state: "unavailable" }: a broken status lookup must degrade to the page’s no-data state, never take the storefront down.

orders/order-status-schema

@replohq/sdk/orders/order-status-schema Exports