@napps/component-extension.
Use the Services guides for behavior-oriented examples.
NAPPS
NAPPS is the proxy object used when you prefer an explicit object over ambient globals.
Storefront and customer calls
Both APIs return a typed GraphQL envelope. The optionalproperties object is passed as the
request properties/variables object supported by the host.
query, pass request values in the second properties object, and read
data and errors from the returned envelope. Do not depend on older positional overloads.
App utilities
country and locale describe the current app context. formatCurrency returns a localized
display string; it does not change the input amount.
Cart service
CartOperations when you
need to return a batch of mutations from an extension.
App navigation
navigateToExternalPage.
Product and metaobject services
null when no matching object exists. Treat these promises as
the supported lookup APIs and handle null; do not infer that a missing product is exceptional.
Customer context
Safe-area insets
subscribe invokes the callback immediately with the
current snapshot and returns an ID for cleanup.
Storage access
sessionStorage is synchronous and in-memory. For persistent scoped storage, see Runtime APIs
and the AppStorage declarations in @napps/nodes runtime.