CartKernel
●cart · /core·interface
Host-facing surface returned by . Exposes typed read, create, and mutate operations that run through the middleware chain and broadcast lifecycle events without exposing the underlying adapter directly.
Properties
PROPTYPEDESCRIPTION
Example
const kernel: CartKernel = createCart({ adapter });
const cart = await kernel.create(ctx);
await kernel.mutate(ctx, { kind: 'add-line', variantId: 'v_1', quantity: 1 });Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
MetadataOpen in GitHub ↗
CartExt
Extension slot that lets adapter authors attach arbitrary providerspecific data to and without widening the core types. Pass a concrete shape as the TExt generi
CartLineMerchandise
Snapshot of the variantlevel product data attached to a cart line. Captured at addtocart time so the cart displays correct titles and prices even when the varia