The SDK is fully typed. Types can be imported from any entry point.
import type { XeniaConfig, TrackOptions, WebhookResponse, XeniaAction } from "@xenia-martech/sdk-js";@xenia-martech/sdk-js/client, no framework dependency.
createXeniaClient(config) returns a XeniaClient:
The client also exposes api, identity (for example xenia.identity.getDeviceId())
and responses.
Standalone helpers, usable without a client: swapContent, hideContent,
showContent, resolveTarget, parseDataAttribute, readSlotMeta,
parseActions, spliceSlots, extractContentSwaps, generateUlid.
@xenia-martech/sdk-js/client/react, requires React 18 or later. Re-exports
everything from /client.
@xenia-martech/sdk-js/server, for Node, SSR and React Server Components.
createXeniaServer(config) returns a XeniaServer:
Tokens and cookies:
@xenia-martech/sdk-js/next, for the App Router in Next.js 15 and later.
@xenia-martech/sdk-js, works anywhere. Rarely needed directly.