CartCapabilities

cart · /core·type

Feature flags advertised by every . The kernel checks these before calling optional adapter methods, allowing hosts to also branch on capabilities without probing method presence at runtime.

Properties

buyerIdentity
boolean
cartAttributes
boolean
customMutations
readonly string[]
giftCards
boolean
lineAttributes
boolean

Example

if (kernel.capabilities.giftCards) {
  await kernel.mutate(ctx, { kind: 'apply-gift-card', code: 'GIFT123' });
}

RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter

Sourceadapter.ts:15Edit the JSDoc directly

On this page