@spwig/sdk 2.1.0
2.1.0 (2026-07-26)
Catches the SDK up to the rest of the Spwig 1.7.0 release. Additive —
nothing that worked in 2.0.0 changes.
Added
checkout.setContact({ email, first_name?, last_name?, password? })→
POST /api/checkout/contact/. Records the customer's email/name on the
session, and — when apasswordis supplied — creates an account and signs
them in (the password is never stored or echoed back). This is the only
place a no-shipping guest's email is captured before payment, so
digital-only and booking-only carts (which skip the shipping step) must call
it beforecomplete().admin.analytics.getTraffic({ period?, start_date?, end_date? })→
GET /api/admin/analytics/traffic/. Visitor overview, daily trends, top
pages, geographic distribution, and referrers. Reachable by a merchant API
token holding theanalytics.trafficscope. NewTrafficAnalyticsand
related types.
Removed
admin.media.getUploadProgress()—/api/media/upload-progress/is a
non-functional stub that returns a hardcodedprogress: 100; the binding was
dead.admin.auth.ssoMobileCallback()—/api/admin/auth/sso/mobile/callback/is a
browser-driven OIDC redirect (returns a 302 to the app's custom scheme),
invoked by the identity provider, not a JSON API the SDK calls. The mobile SSO
flow isssoMobileAuthorize()→ OS-handled redirect →ssoMobileToken().
Changed
referrals.getMyReferrals()now calls the versioned DRF endpoint
/api/referrals/identities/me/(a superset ofReferralDashboard) instead of
the uncontracted legacy/api/referrals/me/aggregation view. Same return
type; no consumer change.- Marked the
addressService,customizer, andadmin.currenciesmodules as
⚠️ Uncontracted in their doc comments: they reach Spwig's storefront/admin
UI backends, which are deliberately not part ofapi-schema.ymland may change
without a contract bump. This is a reviewed decision, not an omission — see the
coverage-allowlistSCHEMA_MISSINGnotes.
Fixed
- Regenerated types from the corrected
api-schema.yml. The 2.0.0 contract
was generated with the HQ apps installed, leaking 37 non-merchant paths
(/api/hq/*,/api/license-checkout/*,/api/marketplace/*,
/api/hosting-events/) into a merchant SDK. They are gone. Agentic Commerce
paths (/api/agentic/ucp/*, ACP feed) now appear in the generated types;
they are agent-facing and intentionally have no client wrappers.