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, and for
personalized content pendingTargets, applyIdentifierSwaps, webhookEntryId,
slotAttributes, slotProps and appliedSlots.
@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/edge, for proxies, edge functions and workers. No Next.js,
React or DOM dependency.
The package also ships a xenia-manifest <out.json> command that writes the
manifest at build time.
Any other CMS can implement the CmsAdapter interface.
@xenia-martech/sdk-js, works anywhere. Rarely needed directly.