Skip to content

@spwig/react 2.4.0

Latest

Choose a tag to compare

@dayyanj dayyanj released this 01 Sep 05:13

Tracks @spwig/sdk 2.4.0 and the Spwig 1.8.0 release (Campaign Studio).
Requires @spwig/sdk ^2.4.0.

Purely additive — no breaking changes in the React layer or the SDK. This
version also subsumes SDK 2.3.0 (responsive image srcset ladders): those were
new optional fields on existing payload types, so they flow through the hooks
unchanged with no new API.

Added

  • useAdminAttribution(params?) — query hook for Campaign Studio revenue
    attribution (admin.analytics.getAttribution). Returns totals (attributed
    revenue, orders, average touches) for the window plus per-campaign and
    per-journey breakdowns, under the selected attribution model and period
    preset.
  • useAdminAdjustWallet() — mutation hook wrapping
    admin.wallets.adjust(walletId, { amount, direction, description, … }), a
    signed staff balance correction. Invalidates the affected wallet detail and
    the transactions list on success.