@playstack/catalog
Portable products, variants, immutable offers, and provider-instance-aware quote resolution.
Pro. Covered by the Playstack Pro License. Registry access is required; check preview availability before installing. See package access.
@playstack/catalog owns commercial identity and server-authored terms. Storefront presentation, CMS content, payment execution, inventory, and fulfillment remain separate boundaries.
import { createCatalog } from '@playstack/catalog'
const catalog = createCatalog({
persistence,
events,
ids,
clock,
orderMetadataKeys: ['contentRef'],
})
const quote = await catalog.resolveOffer({
offerId: 'offer-controller-stand-v1',
provider: 'stripe',
providerInstance: 'store',
})Offers are immutable revisions. Activating a revision atomically retires the previous active offer for the variant. Resolution rejects inactive products and offers, and matches both provider and configured instance so price IDs cannot cross merchant accounts.
Use @playstack/catalog/prisma for PostgreSQL persistence and @playstack/catalog/testing for in-memory contract tests. The application owns administration routes, presentation, migrations, and product-copy policy.
Install
After confirming preview access, install the package at your application's shared Playstack version:
npm install --save-exact @playstack/catalog@0.1.0-beta.1Check the peer requirements below before choosing a runtime or provider.
API entry points and requirements
Reference snapshot: @playstack/catalog@0.1.0-beta.1. Import only the entry point your runtime needs. Paths below are relative to the installed package; use Go to Definition in your editor to inspect exact parameters, return types and overloads. Do not import the declaration-file paths directly.
| Public entry point | Declaration file |
|---|---|
@playstack/catalog | ./dist/index.d.ts |
@playstack/catalog/errors | ./dist/errors.d.ts |
@playstack/catalog/prisma | ./dist/prisma.d.ts |
@playstack/catalog/testing | ./dist/testing.d.ts |
@playstack/catalog/package.json | No TypeScript declaration (asset or metadata export). |
Node.js engine requirement: >=20. This is not a claim that every entry point works in browsers or Workers.
Peer dependencies
This package declares no peer dependencies. Its ordinary dependencies are resolved by the package manager.
For a complete first program, start with Getting started. For API lookup and partial-example conventions, see Reading the reference. Provider failures, lifecycle requirements and application responsibilities remain described in the guide above; types alone do not establish production safety.