@xenia-martech/sdk-js 1.2.0-dev.2 → 1.2.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -3
- package/dist/{actions-BcdlokGO.d.cts → actions-C18Kv-4w.d.cts} +50 -2
- package/dist/{actions-BcdlokGO.d.ts → actions-C18Kv-4w.d.ts} +50 -2
- package/dist/{api-CktVQ6Gl.d.ts → api-0IycTYJR.d.cts} +4 -2
- package/dist/{api-BEPW0Uan.d.cts → api-COXWLL5L.d.ts} +4 -2
- package/dist/{chunk-3PYPPIUM.cjs → chunk-2DR5AVPX.cjs} +11 -46
- package/dist/chunk-2DR5AVPX.cjs.map +1 -0
- package/dist/chunk-BQ5PJCZ7.js +179 -0
- package/dist/chunk-BQ5PJCZ7.js.map +1 -0
- package/dist/{chunk-DWFVDNU5.js → chunk-GWRDZIVA.js} +5 -37
- package/dist/chunk-GWRDZIVA.js.map +1 -0
- package/dist/{chunk-7NGJC7CF.js → chunk-LW5AEJ6K.js} +20 -183
- package/dist/chunk-LW5AEJ6K.js.map +1 -0
- package/dist/chunk-N5M4PI7C.cjs +192 -0
- package/dist/chunk-N5M4PI7C.cjs.map +1 -0
- package/dist/chunk-OMMIRSPK.js +336 -0
- package/dist/chunk-OMMIRSPK.js.map +1 -0
- package/dist/chunk-QEYONKWY.js +42 -0
- package/dist/chunk-QEYONKWY.js.map +1 -0
- package/dist/{chunk-IBNIRT7J.cjs → chunk-RWE2OCQL.cjs} +20 -194
- package/dist/chunk-RWE2OCQL.cjs.map +1 -0
- package/dist/chunk-WHGK55JP.cjs +46 -0
- package/dist/chunk-WHGK55JP.cjs.map +1 -0
- package/dist/chunk-YLMMTKQL.cjs +358 -0
- package/dist/chunk-YLMMTKQL.cjs.map +1 -0
- package/dist/client/index.cjs +320 -31
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +15 -4
- package/dist/client/index.d.ts +15 -4
- package/dist/client/index.js +320 -31
- package/dist/client/index.js.map +1 -1
- package/dist/client/react/index.cjs +731 -34
- package/dist/client/react/index.cjs.map +1 -1
- package/dist/client/react/index.d.cts +32 -3
- package/dist/client/react/index.d.ts +32 -3
- package/dist/client/react/index.js +732 -37
- package/dist/client/react/index.js.map +1 -1
- package/dist/cms/contentful.cjs +2 -1
- package/dist/cms/contentful.cjs.map +1 -1
- package/dist/cms/contentful.d.cts +2 -1
- package/dist/cms/contentful.d.ts +2 -1
- package/dist/cms/contentful.js +2 -1
- package/dist/cms/contentful.js.map +1 -1
- package/dist/consent-Cemn91j3.d.ts +248 -0
- package/dist/consent-DgWdjsSy.d.cts +248 -0
- package/dist/{cookie-names-CLqtmGBM.d.ts → cookie-names-BvUaW3uo.d.ts} +1 -1
- package/dist/{cookie-names-BACctagz.d.cts → cookie-names-CnL65Oly.d.cts} +1 -1
- package/dist/edge/index.cjs +280 -0
- package/dist/edge/index.cjs.map +1 -0
- package/dist/edge/index.d.cts +61 -0
- package/dist/edge/index.d.ts +61 -0
- package/dist/edge/index.js +191 -0
- package/dist/edge/index.js.map +1 -0
- package/dist/index.cjs +41 -40
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +2 -1
- package/dist/next/index.cjs +320 -15
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +180 -6
- package/dist/next/index.d.ts +180 -6
- package/dist/next/index.js +309 -9
- package/dist/next/index.js.map +1 -1
- package/dist/personalize-content-c2DDAV6g.d.ts +140 -0
- package/dist/personalize-content-ghZPKlf1.d.cts +140 -0
- package/dist/server/index.cjs +34 -32
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +6 -5
- package/dist/server/index.d.ts +6 -5
- package/dist/server/index.js +5 -3
- package/dist/server/index.js.map +1 -1
- package/dist/{personalize-content-Clc1oMYY.d.ts → types-DgVHS4Qw.d.cts} +7 -127
- package/dist/{personalize-content-Clc1oMYY.d.cts → types-DgVHS4Qw.d.ts} +7 -127
- package/dist/xenia-sdk.iife.js +3 -3
- package/dist/xenia-sdk.iife.js.map +1 -1
- package/dist/{xenia-server-o_wDOcei.d.cts → xenia-server-C3O-cWQT.d.cts} +3 -2
- package/dist/{xenia-server-BWhWD0La.d.ts → xenia-server-DV8Sjmoo.d.ts} +3 -2
- package/package.json +14 -1
- package/dist/chunk-3PYPPIUM.cjs.map +0 -1
- package/dist/chunk-7NGJC7CF.js.map +0 -1
- package/dist/chunk-DWFVDNU5.js.map +0 -1
- package/dist/chunk-IBNIRT7J.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ElementType, ComponentType } from 'react';
|
|
3
|
-
import { E as XeniaClientOptions, D as XeniaClient, w as ResolveResult, u as ResolveBatchResult, J as JsonValue, x as WebhookResponse, R as ResolveBatchItem, g as AnalyticsEventName, T as TrackOptions, P as PagePersonalizeOptions, j as AppliedSwap, s as PageRef, e as XeniaAction, I as InteractionType, q as MessageMountContext, c as MessageComponentRenderer } from '../../actions-
|
|
4
|
-
export { A as AnalyticsContext, h as AnalyticsIdentity, i as AnalyticsIngestResponse, k as ClientEvent, l as CmsAdapter, C as ConsentState, m as ContentSwap, n as IdentifyRequest, o as IdentifyResponse, M as MessageCta, f as MessagePlacement, r as MessageRenderContext, b as MessageTemplateFn, t as PersonalizationSwap, v as ResolveOptions, X as XeniaConfig, a as XeniaEvent, F as XeniaMarker, G as createXeniaClient, H as extractContentSwaps, K as parseActions, L as pendingTargets, N as personalizeContent, O as personalizePage, Q as spliceSlots } from '../../actions-
|
|
3
|
+
import { E as XeniaClientOptions, D as XeniaClient, w as ResolveResult, u as ResolveBatchResult, J as JsonValue, x as WebhookResponse, R as ResolveBatchItem, g as AnalyticsEventName, T as TrackOptions, P as PagePersonalizeOptions, j as AppliedSwap, s as PageRef, e as XeniaAction, I as InteractionType, q as MessageMountContext, c as MessageComponentRenderer } from '../../actions-C18Kv-4w.cjs';
|
|
4
|
+
export { A as AnalyticsContext, h as AnalyticsIdentity, i as AnalyticsIngestResponse, k as ClientEvent, l as CmsAdapter, C as ConsentState, m as ContentSwap, n as IdentifyRequest, o as IdentifyResponse, M as MessageCta, f as MessagePlacement, r as MessageRenderContext, b as MessageTemplateFn, t as PersonalizationSwap, v as ResolveOptions, X as XeniaConfig, a as XeniaEvent, F as XeniaMarker, G as createXeniaClient, H as extractContentSwaps, K as parseActions, L as pendingTargets, N as personalizeContent, O as personalizePage, Q as spliceSlots } from '../../actions-C18Kv-4w.cjs';
|
|
5
5
|
|
|
6
6
|
interface XeniaProviderProps extends XeniaClientOptions {
|
|
7
7
|
children: ReactNode;
|
|
@@ -223,4 +223,33 @@ type XeniaMessageComponentProps = MessageMountContext;
|
|
|
223
223
|
*/
|
|
224
224
|
declare function reactMessageComponent(Component: ComponentType<XeniaMessageComponentProps>): MessageComponentRenderer;
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
/** One page's entry in the edge debug cookie (written by `xeniaEdgeProxy({ debug })`, read by `<XeniaDebugPanel>`). */
|
|
227
|
+
type DebugEntry = Record<string, unknown> & {
|
|
228
|
+
page: string;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
/** personalized: Xenia changed something · base: it decided, nothing changed · attention: it couldn't decide. */
|
|
232
|
+
type DebugStatus = "personalized" | "base" | "attention";
|
|
233
|
+
interface XeniaDebugPanelProps {
|
|
234
|
+
/** Must match the proxy's `prefix`, if you set one. */
|
|
235
|
+
prefix?: string;
|
|
236
|
+
/** Corner for the launcher. Default `bottom-right` (Next.js's own dev tools sit bottom-left). */
|
|
237
|
+
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
|
|
238
|
+
/**
|
|
239
|
+
* Content of your own for the Site tab, beyond `custom` (which the panel shows by itself), from
|
|
240
|
+
* the fields your proxy's `debugInfo` added.
|
|
241
|
+
*/
|
|
242
|
+
renderExtra?: (page: DebugEntry) => ReactNode;
|
|
243
|
+
}
|
|
244
|
+
declare function debugStatus(entry: DebugEntry): DebugStatus;
|
|
245
|
+
/**
|
|
246
|
+
* What Xenia decided for this page view, for development and QA: the round Xenia launcher in a corner
|
|
247
|
+
* opens a white card, like Next.js's dev tools — the status and timing, then tabs for the decision
|
|
248
|
+
* per content key (with the journey path it took), the visitor profile (answers, their source,
|
|
249
|
+
* confidence and scores), the request (location, how it was resolved, device, consent) and the
|
|
250
|
+
* site's own rows (`debugInfo`'s `custom`). Reads the debug cookie `xeniaEdgeProxy({ debug: true })`
|
|
251
|
+
* writes; renders nothing without an entry for this page.
|
|
252
|
+
*/
|
|
253
|
+
declare function XeniaDebugPanel({ prefix, position, renderExtra }: XeniaDebugPanelProps): react.JSX.Element | null;
|
|
254
|
+
|
|
255
|
+
export { AnalyticsEventName, AppliedSwap, type DebugStatus, type EntryStatus, InteractionType, JsonValue, MessageComponentRenderer, MessageMountContext, PagePersonalizeOptions, PageRef, ResolveBatchItem, ResolveBatchResult, ResolveResult, TrackOptions, type UsePersonalizationResolveResult, type UsePersonalizationResolveSlotsResult, type UsePersonalizationResult, type UsePersonalizationSlotsResult, type UsePersonalizedContentOptions, type UsePersonalizedContentResult, type UseWebhookResult, WebhookResponse, XeniaAction, XeniaClient, XeniaClientOptions, XeniaContentProvider, XeniaContext, XeniaDebugPanel, type XeniaDebugPanelProps, XeniaMessage, type XeniaMessageComponentProps, type XeniaMessageProps, XeniaProvider, type XeniaProviderProps, XeniaTrack, type XeniaTrackProps, debugStatus, reactMessageComponent, usePersonalization, usePersonalizationResolve, usePersonalizationResolveSlots, usePersonalizationSlots, usePersonalizedContent, usePersonalizedPage, useTrack, useWebhook, useXenia, useXeniaEntry, useXeniaResponse };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ElementType, ComponentType } from 'react';
|
|
3
|
-
import { E as XeniaClientOptions, D as XeniaClient, w as ResolveResult, u as ResolveBatchResult, J as JsonValue, x as WebhookResponse, R as ResolveBatchItem, g as AnalyticsEventName, T as TrackOptions, P as PagePersonalizeOptions, j as AppliedSwap, s as PageRef, e as XeniaAction, I as InteractionType, q as MessageMountContext, c as MessageComponentRenderer } from '../../actions-
|
|
4
|
-
export { A as AnalyticsContext, h as AnalyticsIdentity, i as AnalyticsIngestResponse, k as ClientEvent, l as CmsAdapter, C as ConsentState, m as ContentSwap, n as IdentifyRequest, o as IdentifyResponse, M as MessageCta, f as MessagePlacement, r as MessageRenderContext, b as MessageTemplateFn, t as PersonalizationSwap, v as ResolveOptions, X as XeniaConfig, a as XeniaEvent, F as XeniaMarker, G as createXeniaClient, H as extractContentSwaps, K as parseActions, L as pendingTargets, N as personalizeContent, O as personalizePage, Q as spliceSlots } from '../../actions-
|
|
3
|
+
import { E as XeniaClientOptions, D as XeniaClient, w as ResolveResult, u as ResolveBatchResult, J as JsonValue, x as WebhookResponse, R as ResolveBatchItem, g as AnalyticsEventName, T as TrackOptions, P as PagePersonalizeOptions, j as AppliedSwap, s as PageRef, e as XeniaAction, I as InteractionType, q as MessageMountContext, c as MessageComponentRenderer } from '../../actions-C18Kv-4w.js';
|
|
4
|
+
export { A as AnalyticsContext, h as AnalyticsIdentity, i as AnalyticsIngestResponse, k as ClientEvent, l as CmsAdapter, C as ConsentState, m as ContentSwap, n as IdentifyRequest, o as IdentifyResponse, M as MessageCta, f as MessagePlacement, r as MessageRenderContext, b as MessageTemplateFn, t as PersonalizationSwap, v as ResolveOptions, X as XeniaConfig, a as XeniaEvent, F as XeniaMarker, G as createXeniaClient, H as extractContentSwaps, K as parseActions, L as pendingTargets, N as personalizeContent, O as personalizePage, Q as spliceSlots } from '../../actions-C18Kv-4w.js';
|
|
5
5
|
|
|
6
6
|
interface XeniaProviderProps extends XeniaClientOptions {
|
|
7
7
|
children: ReactNode;
|
|
@@ -223,4 +223,33 @@ type XeniaMessageComponentProps = MessageMountContext;
|
|
|
223
223
|
*/
|
|
224
224
|
declare function reactMessageComponent(Component: ComponentType<XeniaMessageComponentProps>): MessageComponentRenderer;
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
/** One page's entry in the edge debug cookie (written by `xeniaEdgeProxy({ debug })`, read by `<XeniaDebugPanel>`). */
|
|
227
|
+
type DebugEntry = Record<string, unknown> & {
|
|
228
|
+
page: string;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
/** personalized: Xenia changed something · base: it decided, nothing changed · attention: it couldn't decide. */
|
|
232
|
+
type DebugStatus = "personalized" | "base" | "attention";
|
|
233
|
+
interface XeniaDebugPanelProps {
|
|
234
|
+
/** Must match the proxy's `prefix`, if you set one. */
|
|
235
|
+
prefix?: string;
|
|
236
|
+
/** Corner for the launcher. Default `bottom-right` (Next.js's own dev tools sit bottom-left). */
|
|
237
|
+
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
|
|
238
|
+
/**
|
|
239
|
+
* Content of your own for the Site tab, beyond `custom` (which the panel shows by itself), from
|
|
240
|
+
* the fields your proxy's `debugInfo` added.
|
|
241
|
+
*/
|
|
242
|
+
renderExtra?: (page: DebugEntry) => ReactNode;
|
|
243
|
+
}
|
|
244
|
+
declare function debugStatus(entry: DebugEntry): DebugStatus;
|
|
245
|
+
/**
|
|
246
|
+
* What Xenia decided for this page view, for development and QA: the round Xenia launcher in a corner
|
|
247
|
+
* opens a white card, like Next.js's dev tools — the status and timing, then tabs for the decision
|
|
248
|
+
* per content key (with the journey path it took), the visitor profile (answers, their source,
|
|
249
|
+
* confidence and scores), the request (location, how it was resolved, device, consent) and the
|
|
250
|
+
* site's own rows (`debugInfo`'s `custom`). Reads the debug cookie `xeniaEdgeProxy({ debug: true })`
|
|
251
|
+
* writes; renders nothing without an entry for this page.
|
|
252
|
+
*/
|
|
253
|
+
declare function XeniaDebugPanel({ prefix, position, renderExtra }: XeniaDebugPanelProps): react.JSX.Element | null;
|
|
254
|
+
|
|
255
|
+
export { AnalyticsEventName, AppliedSwap, type DebugStatus, type EntryStatus, InteractionType, JsonValue, MessageComponentRenderer, MessageMountContext, PagePersonalizeOptions, PageRef, ResolveBatchItem, ResolveBatchResult, ResolveResult, TrackOptions, type UsePersonalizationResolveResult, type UsePersonalizationResolveSlotsResult, type UsePersonalizationResult, type UsePersonalizationSlotsResult, type UsePersonalizedContentOptions, type UsePersonalizedContentResult, type UseWebhookResult, WebhookResponse, XeniaAction, XeniaClient, XeniaClientOptions, XeniaContentProvider, XeniaContext, XeniaDebugPanel, type XeniaDebugPanelProps, XeniaMessage, type XeniaMessageComponentProps, type XeniaMessageProps, XeniaProvider, type XeniaProviderProps, XeniaTrack, type XeniaTrackProps, debugStatus, reactMessageComponent, usePersonalization, usePersonalizationResolve, usePersonalizationResolveSlots, usePersonalizationSlots, usePersonalizedContent, usePersonalizedPage, useTrack, useWebhook, useXenia, useXeniaEntry, useXeniaResponse };
|