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
PROPTYPEDESCRIPTION
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' });
}Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
MetadataOpen in GitHub ↗
CartAdapter
Contract that every cart provider implementation satisfies. Adapters expose required CRUD operations and declare their optional capabilities so the kernel can g
CartCapabilityUnsupportedError
Thrown by the kernel when a mutation requires a capability the active adapter doesn't advertise (e.g. gift cards on a provider without them).