@xenia-martech/sdk-js 1.1.0 → 1.2.0-dev.2

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.
Files changed (63) hide show
  1. package/README.md +50 -0
  2. package/assets/coverage.json +1 -0
  3. package/dist/{actions-CKeiofxJ.d.cts → actions-BcdlokGO.d.cts} +192 -4
  4. package/dist/{actions-CKeiofxJ.d.ts → actions-BcdlokGO.d.ts} +192 -4
  5. package/dist/api-BEPW0Uan.d.cts +88 -0
  6. package/dist/api-CktVQ6Gl.d.ts +88 -0
  7. package/dist/{chunk-U2WBBOYT.cjs → chunk-3PYPPIUM.cjs} +35 -10
  8. package/dist/chunk-3PYPPIUM.cjs.map +1 -0
  9. package/dist/{chunk-FYSEKFIY.js → chunk-7NGJC7CF.js} +249 -3
  10. package/dist/chunk-7NGJC7CF.js.map +1 -0
  11. package/dist/{chunk-WYAMPEVV.js → chunk-DWFVDNU5.js} +28 -3
  12. package/dist/chunk-DWFVDNU5.js.map +1 -0
  13. package/dist/{chunk-JEKVN7HK.cjs → chunk-IBNIRT7J.cjs} +251 -2
  14. package/dist/chunk-IBNIRT7J.cjs.map +1 -0
  15. package/dist/{chunk-TLTG3BTC.js → chunk-OUZU4Z5B.js} +2 -2
  16. package/dist/{chunk-TLTG3BTC.js.map → chunk-OUZU4Z5B.js.map} +1 -1
  17. package/dist/{chunk-5D7SJIO4.cjs → chunk-PKWANLT7.cjs} +2 -2
  18. package/dist/{chunk-5D7SJIO4.cjs.map → chunk-PKWANLT7.cjs.map} +1 -1
  19. package/dist/client/index.cjs +314 -12
  20. package/dist/client/index.cjs.map +1 -1
  21. package/dist/client/index.d.cts +2 -2
  22. package/dist/client/index.d.ts +2 -2
  23. package/dist/client/index.js +312 -13
  24. package/dist/client/index.js.map +1 -1
  25. package/dist/client/react/index.cjs +402 -16
  26. package/dist/client/react/index.cjs.map +1 -1
  27. package/dist/client/react/index.d.cts +53 -3
  28. package/dist/client/react/index.d.ts +53 -3
  29. package/dist/client/react/index.js +396 -17
  30. package/dist/client/react/index.js.map +1 -1
  31. package/dist/cms/contentful.cjs +138 -0
  32. package/dist/cms/contentful.cjs.map +1 -0
  33. package/dist/cms/contentful.d.cts +57 -0
  34. package/dist/cms/contentful.d.ts +57 -0
  35. package/dist/cms/contentful.js +134 -0
  36. package/dist/cms/contentful.js.map +1 -0
  37. package/dist/{cookie-names-QYMiEMAq.d.cts → cookie-names-BACctagz.d.cts} +1 -1
  38. package/dist/{cookie-names-8FxbGKGS.d.ts → cookie-names-CLqtmGBM.d.ts} +1 -1
  39. package/dist/index.cjs +35 -23
  40. package/dist/index.d.cts +4 -3
  41. package/dist/index.d.ts +4 -3
  42. package/dist/index.js +2 -2
  43. package/dist/next/index.cjs +41 -9
  44. package/dist/next/index.cjs.map +1 -1
  45. package/dist/next/index.d.cts +32 -3
  46. package/dist/next/index.d.ts +32 -3
  47. package/dist/next/index.js +14 -3
  48. package/dist/next/index.js.map +1 -1
  49. package/dist/{api-URhxxi4x.d.cts → personalize-content-Clc1oMYY.d.cts} +152 -69
  50. package/dist/{api-URhxxi4x.d.ts → personalize-content-Clc1oMYY.d.ts} +152 -69
  51. package/dist/server/index.cjs +29 -17
  52. package/dist/server/index.d.cts +5 -4
  53. package/dist/server/index.d.ts +5 -4
  54. package/dist/server/index.js +4 -4
  55. package/dist/xenia-sdk.iife.js +3 -3
  56. package/dist/xenia-sdk.iife.js.map +1 -1
  57. package/dist/{xenia-server-Cti94W49.d.cts → xenia-server-BWhWD0La.d.ts} +15 -1
  58. package/dist/{xenia-server-DDtQp6Wi.d.ts → xenia-server-o_wDOcei.d.cts} +15 -1
  59. package/package.json +15 -1
  60. package/dist/chunk-FYSEKFIY.js.map +0 -1
  61. package/dist/chunk-JEKVN7HK.cjs.map +0 -1
  62. package/dist/chunk-U2WBBOYT.cjs.map +0 -1
  63. package/dist/chunk-WYAMPEVV.js.map +0 -1
@@ -357,6 +357,41 @@ interface ResolveOptions {
357
357
  */
358
358
  context?: EventContext;
359
359
  }
360
+ /** How a personalized entry's replacement is spliced into the page. */
361
+ type EntrySwapOp = "replace" | "expand" | "items";
362
+ /** CMS-neutral filter of a content-type query; the adapter maps it to its CMS syntax. */
363
+ interface EntryFilter {
364
+ field: string;
365
+ op: "eq" | "ne" | "in" | "nin" | "exists" | "lt" | "lte" | "gt" | "gte" | "match";
366
+ /** Already rendered from the visitor data by the backend; comma-separated for `in`/`nin`. */
367
+ value: string;
368
+ }
369
+ /** "Entries of this content type", run by the adapter against the tenant's own delivery API. */
370
+ interface EntryQuery {
371
+ contentType: string;
372
+ filters?: EntryFilter[];
373
+ /** CMS order expression, e.g. `-sys.updatedAt`. */
374
+ order?: string;
375
+ limit: number;
376
+ }
377
+ /**
378
+ * Xenia's decision for one personalized entry: splice `ids` (explicit entries) or the result of
379
+ * `query` at `target`. A requested target with no decision keeps its base content.
380
+ */
381
+ interface EntryDecision {
382
+ target: string;
383
+ op: EntrySwapOp;
384
+ /** Array field replaced by `op: "items"`; absent = merge the replacement's array fields. */
385
+ field?: string;
386
+ ids?: string[];
387
+ query?: EntryQuery;
388
+ contentKey: string;
389
+ bucket?: string;
390
+ }
391
+ /** Response of `POST /api/personalization/resolve-entries`. */
392
+ interface ResolveEntriesResult {
393
+ decisions: EntryDecision[];
394
+ }
360
395
  /** Body posted to `POST /api/events/v1/identify` — binds visitor to a known user. */
361
396
  interface IdentifyRequest {
362
397
  xeniaVisitorId: string;
@@ -580,81 +615,129 @@ type XeniaAction = {
580
615
  };
581
616
 
582
617
  /**
583
- * Low-level, isomorphic Xenia API client. Wraps the raw endpoints; identity,
584
- * UTM capture, and action rendering are layered on top by the client runtime.
585
- * All paths are relative to `baseUrl`, which defaults to the hosted engine
586
- * (`https://engine.xeniamartech.com/xenia`) when omitted from config.
618
+ * CMS page personalization — walk a fetched CMS page breadth-first, swap the
619
+ * entries Xenia marked as personalized, and do it in as few round trips as
620
+ * the page's nesting allows.
621
+ *
622
+ * Rules (see the "Rounds" section of the feature plan):
623
+ * - **Static** targets carry their replacement in the payload (`xeniaVariants`)
624
+ * and are swapped inline — no network at all.
625
+ * - **Runtime** targets are a barrier: their id is collected, their subtree is
626
+ * NOT walked (it may be replaced). One `resolve-entries` call decides every
627
+ * target found in a round, one parallel CMS fetch loads every replacement,
628
+ * and the next round walks whatever now sits at each position.
629
+ * - Never throws: on error or when `timeoutMs` runs out, whatever is not yet
630
+ * decided keeps its base content.
631
+ *
632
+ * CMS specifics live behind {@link CmsAdapter}; built-in adapters ship as
633
+ * `@xenia-martech/sdk-js/cms/contentful` (and later `/cms/contentstack`). Any
634
+ * other CMS works by implementing the interface.
587
635
  */
588
- declare class XeniaApi {
589
- private readonly http;
590
- private readonly tenantId;
591
- private readonly environmentKey;
592
- private readonly tokenProvider;
593
- constructor(config: XeniaConfig);
594
- /** Tenant-scope headers required by header-scoped endpoints. */
595
- private tenantHeaders;
596
- /**
597
- * Tenant headers plus a resolved `Authorization: Bearer` header when
598
- * `config.token`/`config.getToken` is set — e.g. required by a webhook
599
- * trigger node configured with its own auth token. No-op (tenant headers
600
- * only) when no token source is configured, so this is safe to call
601
- * unconditionally on every request.
602
- */
603
- private authHeaders;
604
- /**
605
- * Webhook request/response — `GET|POST /flow?id={triggerId}`. Held open by the
606
- * backend until a `webhook-response` node resolves. Returns the normalized
607
- * response, including any `xeniaActions` parsed from the body.
608
- *
609
- * Not retried by default: the backend long-polls this call, so a retry would
610
- * duplicate the journey run.
611
- */
612
- webhook(triggerId: string, data?: JsonValue, method?: "GET" | "POST"): Promise<WebhookResponse>;
613
- /**
614
- * Widget form submission — `POST /widget-submissions?ref={bindingRef}`. Used whenever the
615
- * action's `formSubmit.requiresResolve` is true (spin-wheel, which must have a
616
- * server-resolved outcome before anything renders) or `mode === "endpoint"` — the common
617
- * plain-popup case (`mode === "journey" && !requiresResolve`) bypasses this entirely and calls
618
- * {@link webhook} against `flowRef` instead (see `XeniaClient.submitWidgetForm`'s endpoint
619
- * selection).
620
- *
621
- * Not retried (`noRetry: true`), styled like {@link webhook} — a retried POST must never
622
- * double-fire a journey or double-resolve a prize server-side.
623
- */
624
- submitWidget(ref: string, body?: JsonValue): Promise<WidgetSubmitResponse>;
625
- /**
626
- * Unified event batch (max 100/request per the backend) — `POST /api/events/v1`.
627
- * Records analytics for every event and matches/advances a journey for any
628
- * event with `trigger: true`. Replaces the old `sendEvent()` (journey trigger)
629
- * and `sendAnalytics()` (CDP) calls.
630
- */
631
- sendEvents(events: XeniaEvent[], opts?: {
632
- keepalive?: boolean;
633
- }): Promise<AnalyticsIngestResponse>;
634
- /** Bind visitor→user — `POST /api/events/v1/identify`. */
635
- identify(body: IdentifyRequest): Promise<IdentifyResponse>;
636
+
637
+ /** Any value inside a CMS payload — the walker is shape-agnostic; adapters give it meaning. */
638
+ type Node = any;
639
+ /** The parsed `xenia` marker field of a personalized entry. */
640
+ interface XeniaMarker {
641
+ kind: "static" | "runtime";
642
+ op?: EntrySwapOp;
643
+ /** Array field replaced by `op: "items"`. */
644
+ field?: string;
645
+ limit?: number;
646
+ }
647
+ /** What the page resolver needs to know about a CMS's entries. `N` is the entry shape. */
648
+ interface CmsAdapter<N extends object = Node> {
649
+ /** The entry id when `value` is a CMS entry (not a link stub, asset or plain object). */
650
+ entryId(value: unknown): string | undefined;
651
+ /** The entry's Xenia marker, or null when it is not personalized. */
652
+ marker(entry: N): XeniaMarker | null;
653
+ /** Static replacements pinned on the entry (its resolved `xeniaVariants`). */
654
+ staticVariants(entry: N): N[];
655
+ getField(entry: N, field: string): unknown;
656
+ setField(entry: N, field: string, value: unknown): void;
657
+ /** Legacy `items` without a field: copy the replacement's array fields onto the entry. */
658
+ mergeItems?(entry: N, replacement: N): void;
636
659
  /**
637
- * Update consent — `POST /api/events/v1/consent`.
638
- *
639
- * The three scope flags are required (non-null) by the backend, so an omitted
640
- * one is sent as an explicit `false` rather than left out: a partial body like
641
- * `consent({ analytics: true })` — the shape most callers actually write — is
642
- * otherwise rejected with a 400 and the consent record is never stored.
660
+ * Remove the marker from an entry that has been dealt with (kept base, or had its items replaced),
661
+ * so personalizing the output again — e.g. the browser continuing a server render — never decides
662
+ * it twice. Optional; without it a re-run re-asks Xenia about those entries.
643
663
  */
644
- consent(xeniaVisitorId: string, consent: ConsentState): Promise<JsonValue>;
664
+ clearMarker?(entry: N): void;
665
+ /** Normalize a fetched payload before walking (e.g. resolve links). Defaults to identity. */
666
+ prepare?(payload: unknown): unknown;
667
+ /** Load entries by id in ONE call; order does not matter. */
668
+ fetchEntries(ids: string[], locale?: string): Promise<N[]>;
669
+ /** Run a content-type query in ONE call, in the query's order. */
670
+ queryEntries(query: EntryQuery, locale?: string): Promise<N[]>;
645
671
  /**
646
- * Resolve in-entry content personalization for one content key —
647
- * `POST /api/personalization/resolve?merge=<bool>`. Requires the SDK Bearer
648
- * token (same credential as events; resolve is auth-required). `merge=true`
649
- * returns server-spliced `content`; otherwise splice `swaps` client-side.
672
+ * Load one page with its whole tree (links resolved), or null when there is none. Optional; it
673
+ * is what lets `personalizePage(ref)` do the fetch, so apps never fetch the page themselves.
650
674
  */
651
- resolve(contentKey: string, opts?: ResolveOptions): Promise<ResolveResult>;
675
+ fetchPage?(ref: PageRef, locale?: string): Promise<N | null>;
676
+ }
677
+ /** Identifies a page in the CMS: its entry id, or a content type plus exact field values (a slug). */
678
+ type PageRef = string | {
679
+ contentType: string;
680
+ fields: Record<string, string | number | boolean>;
681
+ };
682
+ /** Resolves a round's runtime targets — `XeniaApi.resolveEntries` bound to the visitor. */
683
+ type EntryResolver = (entryIds: string[]) => Promise<EntryDecision[]>;
684
+ /** Reported for every swap actually applied (for impressions / analytics). */
685
+ interface AppliedSwap {
686
+ target: string;
687
+ kind: "static" | "runtime";
688
+ op: EntrySwapOp;
689
+ /** Ids of the entries now at the target's position (or in its field). */
690
+ entryIds: string[];
691
+ contentKey?: string;
692
+ bucket?: string;
693
+ round: number;
694
+ }
695
+ interface PersonalizeContentOptions {
696
+ cms: CmsAdapter;
697
+ /** Decides runtime targets. Omit to apply static swaps only (zero network). */
698
+ resolve?: EntryResolver;
699
+ locale?: string;
700
+ /** Max network rounds (nesting depth of runtime targets). Default 3. */
701
+ maxRounds?: number;
702
+ /** Total budget for all rounds, in ms. Undecided targets keep their base. Default 300. */
703
+ timeoutMs?: number;
704
+ /** Mutate the payload in place instead of personalizing a copy. Default false. */
705
+ inPlace?: boolean;
706
+ onApplied?(swap: AppliedSwap): void;
652
707
  /**
653
- * Resolve several content keys in one round-trip (≤50) —
654
- * `POST /api/personalization/resolve-batch?merge=<bool>`. Same auth/merge
655
- * semantics as {@link resolve}.
708
+ * Called when a round starts waiting on the network (`pending` = targets being decided) and when
709
+ * it has been applied (`pending` empty). `content` is the live, partially personalized tree —
710
+ * lets a UI render level by level instead of waiting for every round.
656
711
  */
657
- resolveBatch(items: ResolveBatchItem[], opts?: ResolveOptions): Promise<ResolveBatchResult[]>;
712
+ onProgress?(progress: {
713
+ content: unknown;
714
+ round: number;
715
+ pending: string[];
716
+ }): void;
717
+ }
718
+ /** `personalizeContent` options as taken by `XeniaClient` / `XeniaServer`, which supply `resolve`. */
719
+ type PagePersonalizeOptions = Omit<PersonalizeContentOptions, "resolve"> & Pick<ResolveOptions, "data" | "identity" | "context">;
720
+ interface PersonalizeContentResult<T> {
721
+ content: T;
722
+ applied: AppliedSwap[];
723
+ /** False when the budget ran out, a call failed, or `maxRounds` was hit with targets left. */
724
+ complete: boolean;
725
+ error?: unknown;
658
726
  }
727
+ declare function personalizeContent<T>(payload: T, options: PersonalizeContentOptions): Promise<PersonalizeContentResult<T>>;
728
+ /**
729
+ * The entries Xenia still has to decide on this page — runtime targets reachable without crossing
730
+ * another undecided one. Synchronous and network-free (it reads the `xenia` markers), so a page can
731
+ * render a skeleton in exactly those places from the first frame instead of flashing base content.
732
+ * Nested targets inside a pending one are found once it is decided.
733
+ */
734
+ declare function pendingTargets(payload: unknown, cms: CmsAdapter): string[];
735
+ /**
736
+ * Fetch a page through `options.cms` and personalize it — {@link personalizeContent} without the
737
+ * fetch in app code. Never throws: a failed fetch comes back as `content: null` with `error`; a page
738
+ * that does not exist as `content: null`, `complete: true`. The page fetch is not counted against
739
+ * `timeoutMs` — that budget is for personalization only.
740
+ */
741
+ declare function personalizePage<T>(ref: PageRef, options: PersonalizeContentOptions): Promise<PersonalizeContentResult<T | null>>;
659
742
 
660
- export { type AnalyticsContext as A, type CircuitBreakerConfig as C, type EventContext as E, type HttpMethod as H, type IdentifyRequest as I, type JsonValue as J, type MessageCta as M, type PersonalizationSwap as P, type ResolveBatchItem as R, type TrackOptions as T, type VisitorCookieOptions as V, type WebhookResponse as W, type XeniaAction as X, type AnalyticsEventName as a, type AnalyticsIdentity as b, type AnalyticsIngestResponse as c, type ConsentState as d, type EventIdentity as e, type IdentifyResponse as f, type InteractionType as g, type JsonObject as h, type MessagePlacement as i, type ResolveBatchResult as j, type ResolveOptions as k, type ResolveResult as l, type RetryConfig as m, type WidgetFormSubmit as n, type WidgetPrize as o, type WidgetSegment as p, type WidgetSubmitResponse as q, type WidgetType as r, XeniaApi as s, type XeniaConfig as t, type XeniaEvent as u, type CallerIdentity as v };
743
+ export { type AnalyticsContext as A, type WidgetPrize as B, type CmsAdapter as C, type WidgetSegment as D, type EventContext as E, type WidgetSubmitResponse as F, type WidgetType as G, type HttpMethod as H, type IdentifyRequest as I, type JsonValue as J, type XeniaAction as K, type XeniaConfig as L, type MessageCta as M, type XeniaEvent as N, pendingTargets as O, type PagePersonalizeOptions as P, personalizeContent as Q, type ResolveBatchItem as R, personalizePage as S, type TrackOptions as T, type CallerIdentity as U, type VisitorCookieOptions as V, type WebhookResponse as W, type XeniaMarker as X, type AnalyticsEventName as a, type AnalyticsIdentity as b, type AnalyticsIngestResponse as c, type AppliedSwap as d, type CircuitBreakerConfig as e, type ConsentState as f, type EntryDecision as g, type EntryFilter as h, type EntryQuery as i, type EntryResolver as j, type EntrySwapOp as k, type EventIdentity as l, type IdentifyResponse as m, type InteractionType as n, type JsonObject as o, type MessagePlacement as p, type PageRef as q, type PersonalizationSwap as r, type PersonalizeContentOptions as s, type PersonalizeContentResult as t, type ResolveBatchResult as u, type ResolveEntriesResult as v, type ResolveOptions as w, type ResolveResult as x, type RetryConfig as y, type WidgetFormSubmit as z };
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- require('../chunk-5D7SJIO4.cjs');
4
- var chunkU2WBBOYT_cjs = require('../chunk-U2WBBOYT.cjs');
5
- var chunkJEKVN7HK_cjs = require('../chunk-JEKVN7HK.cjs');
3
+ require('../chunk-PKWANLT7.cjs');
4
+ var chunk3PYPPIUM_cjs = require('../chunk-3PYPPIUM.cjs');
5
+ var chunkIBNIRT7J_cjs = require('../chunk-IBNIRT7J.cjs');
6
6
 
7
7
  // src/server/token.ts
8
8
  async function refreshSdkToken(opts) {
9
- const http = new chunkJEKVN7HK_cjs.HttpClient({ baseUrl: opts.baseUrl, timeout: opts.timeout });
9
+ const http = new chunkIBNIRT7J_cjs.HttpClient({ baseUrl: opts.baseUrl, timeout: opts.timeout });
10
10
  const { data } = await http.request({
11
11
  method: "POST",
12
12
  path: "/api/personalization/token/refresh",
@@ -39,55 +39,67 @@ function createTokenRoute(config) {
39
39
 
40
40
  Object.defineProperty(exports, "XeniaServer", {
41
41
  enumerable: true,
42
- get: function () { return chunkU2WBBOYT_cjs.XeniaServer; }
42
+ get: function () { return chunk3PYPPIUM_cjs.XeniaServer; }
43
43
  });
44
44
  Object.defineProperty(exports, "createXeniaServer", {
45
45
  enumerable: true,
46
- get: function () { return chunkU2WBBOYT_cjs.createXeniaServer; }
46
+ get: function () { return chunk3PYPPIUM_cjs.createXeniaServer; }
47
47
  });
48
48
  Object.defineProperty(exports, "getConsent", {
49
49
  enumerable: true,
50
- get: function () { return chunkU2WBBOYT_cjs.getConsent; }
50
+ get: function () { return chunk3PYPPIUM_cjs.getConsent; }
51
51
  });
52
52
  Object.defineProperty(exports, "getVisitorId", {
53
53
  enumerable: true,
54
- get: function () { return chunkU2WBBOYT_cjs.getVisitorId; }
54
+ get: function () { return chunk3PYPPIUM_cjs.getVisitorId; }
55
55
  });
56
56
  Object.defineProperty(exports, "parseCookies", {
57
57
  enumerable: true,
58
- get: function () { return chunkU2WBBOYT_cjs.parseCookies; }
58
+ get: function () { return chunk3PYPPIUM_cjs.parseCookies; }
59
59
  });
60
60
  Object.defineProperty(exports, "CONSENT_COOKIE", {
61
61
  enumerable: true,
62
- get: function () { return chunkJEKVN7HK_cjs.CONSENT_COOKIE; }
62
+ get: function () { return chunkIBNIRT7J_cjs.CONSENT_COOKIE; }
63
63
  });
64
64
  Object.defineProperty(exports, "CircuitOpenError", {
65
65
  enumerable: true,
66
- get: function () { return chunkJEKVN7HK_cjs.CircuitOpenError; }
66
+ get: function () { return chunkIBNIRT7J_cjs.CircuitOpenError; }
67
67
  });
68
68
  Object.defineProperty(exports, "VISITOR_COOKIE", {
69
69
  enumerable: true,
70
- get: function () { return chunkJEKVN7HK_cjs.VISITOR_COOKIE; }
70
+ get: function () { return chunkIBNIRT7J_cjs.VISITOR_COOKIE; }
71
71
  });
72
72
  Object.defineProperty(exports, "XeniaApi", {
73
73
  enumerable: true,
74
- get: function () { return chunkJEKVN7HK_cjs.XeniaApi; }
74
+ get: function () { return chunkIBNIRT7J_cjs.XeniaApi; }
75
75
  });
76
76
  Object.defineProperty(exports, "consentCookie", {
77
77
  enumerable: true,
78
- get: function () { return chunkJEKVN7HK_cjs.consentCookie; }
78
+ get: function () { return chunkIBNIRT7J_cjs.consentCookie; }
79
79
  });
80
80
  Object.defineProperty(exports, "consentCookieName", {
81
81
  enumerable: true,
82
- get: function () { return chunkJEKVN7HK_cjs.consentCookieName; }
82
+ get: function () { return chunkIBNIRT7J_cjs.consentCookieName; }
83
83
  });
84
84
  Object.defineProperty(exports, "parseActions", {
85
85
  enumerable: true,
86
- get: function () { return chunkJEKVN7HK_cjs.parseActions; }
86
+ get: function () { return chunkIBNIRT7J_cjs.parseActions; }
87
+ });
88
+ Object.defineProperty(exports, "pendingTargets", {
89
+ enumerable: true,
90
+ get: function () { return chunkIBNIRT7J_cjs.pendingTargets; }
91
+ });
92
+ Object.defineProperty(exports, "personalizeContent", {
93
+ enumerable: true,
94
+ get: function () { return chunkIBNIRT7J_cjs.personalizeContent; }
95
+ });
96
+ Object.defineProperty(exports, "personalizePage", {
97
+ enumerable: true,
98
+ get: function () { return chunkIBNIRT7J_cjs.personalizePage; }
87
99
  });
88
100
  Object.defineProperty(exports, "visitorCookieName", {
89
101
  enumerable: true,
90
- get: function () { return chunkJEKVN7HK_cjs.visitorCookieName; }
102
+ get: function () { return chunkIBNIRT7J_cjs.visitorCookieName; }
91
103
  });
92
104
  exports.createTokenRoute = createTokenRoute;
93
105
  exports.refreshSdkToken = refreshSdkToken;
@@ -1,7 +1,8 @@
1
- export { S as ServerResolveOptions, a as ServerTrackOptions, b as ServerWebhookOptions, W as WithFallback, X as XeniaServer, c as createXeniaServer } from '../xenia-server-Cti94W49.cjs';
2
- import { d as ConsentState } from '../api-URhxxi4x.cjs';
3
- export { A as AnalyticsContext, a as AnalyticsEventName, b as AnalyticsIdentity, c as AnalyticsIngestResponse, C as CircuitBreakerConfig, E as EventContext, e as EventIdentity, I as IdentifyRequest, f as IdentifyResponse, J as JsonValue, P as PersonalizationSwap, R as ResolveBatchItem, j as ResolveBatchResult, k as ResolveOptions, l as ResolveResult, W as WebhookResponse, s as XeniaApi, t as XeniaConfig, u as XeniaEvent } from '../api-URhxxi4x.cjs';
4
- export { C as CONSENT_COOKIE, a as CircuitOpenError, V as VISITOR_COOKIE, f as consentCookie, g as consentCookieName, p as parseActions, v as visitorCookieName } from '../cookie-names-QYMiEMAq.cjs';
1
+ export { S as ServerResolveOptions, a as ServerTrackOptions, b as ServerWebhookOptions, W as WithFallback, X as XeniaServer, c as createXeniaServer } from '../xenia-server-o_wDOcei.cjs';
2
+ import { f as ConsentState } from '../personalize-content-Clc1oMYY.cjs';
3
+ export { A as AnalyticsContext, a as AnalyticsEventName, b as AnalyticsIdentity, c as AnalyticsIngestResponse, d as AppliedSwap, e as CircuitBreakerConfig, C as CmsAdapter, E as EventContext, l as EventIdentity, I as IdentifyRequest, m as IdentifyResponse, J as JsonValue, P as PagePersonalizeOptions, q as PageRef, r as PersonalizationSwap, t as PersonalizeContentResult, R as ResolveBatchItem, u as ResolveBatchResult, w as ResolveOptions, x as ResolveResult, W as WebhookResponse, L as XeniaConfig, N as XeniaEvent, X as XeniaMarker, O as pendingTargets, Q as personalizeContent, S as personalizePage } from '../personalize-content-Clc1oMYY.cjs';
4
+ export { X as XeniaApi } from '../api-BEPW0Uan.cjs';
5
+ export { C as CONSENT_COOKIE, a as CircuitOpenError, V as VISITOR_COOKIE, f as consentCookie, g as consentCookieName, p as parseActions, v as visitorCookieName } from '../cookie-names-BACctagz.cjs';
5
6
 
6
7
  interface RefreshTokenOptions {
7
8
  /**
@@ -1,7 +1,8 @@
1
- export { S as ServerResolveOptions, a as ServerTrackOptions, b as ServerWebhookOptions, W as WithFallback, X as XeniaServer, c as createXeniaServer } from '../xenia-server-DDtQp6Wi.js';
2
- import { d as ConsentState } from '../api-URhxxi4x.js';
3
- export { A as AnalyticsContext, a as AnalyticsEventName, b as AnalyticsIdentity, c as AnalyticsIngestResponse, C as CircuitBreakerConfig, E as EventContext, e as EventIdentity, I as IdentifyRequest, f as IdentifyResponse, J as JsonValue, P as PersonalizationSwap, R as ResolveBatchItem, j as ResolveBatchResult, k as ResolveOptions, l as ResolveResult, W as WebhookResponse, s as XeniaApi, t as XeniaConfig, u as XeniaEvent } from '../api-URhxxi4x.js';
4
- export { C as CONSENT_COOKIE, a as CircuitOpenError, V as VISITOR_COOKIE, f as consentCookie, g as consentCookieName, p as parseActions, v as visitorCookieName } from '../cookie-names-8FxbGKGS.js';
1
+ export { S as ServerResolveOptions, a as ServerTrackOptions, b as ServerWebhookOptions, W as WithFallback, X as XeniaServer, c as createXeniaServer } from '../xenia-server-BWhWD0La.js';
2
+ import { f as ConsentState } from '../personalize-content-Clc1oMYY.js';
3
+ export { A as AnalyticsContext, a as AnalyticsEventName, b as AnalyticsIdentity, c as AnalyticsIngestResponse, d as AppliedSwap, e as CircuitBreakerConfig, C as CmsAdapter, E as EventContext, l as EventIdentity, I as IdentifyRequest, m as IdentifyResponse, J as JsonValue, P as PagePersonalizeOptions, q as PageRef, r as PersonalizationSwap, t as PersonalizeContentResult, R as ResolveBatchItem, u as ResolveBatchResult, w as ResolveOptions, x as ResolveResult, W as WebhookResponse, L as XeniaConfig, N as XeniaEvent, X as XeniaMarker, O as pendingTargets, Q as personalizeContent, S as personalizePage } from '../personalize-content-Clc1oMYY.js';
4
+ export { X as XeniaApi } from '../api-CktVQ6Gl.js';
5
+ export { C as CONSENT_COOKIE, a as CircuitOpenError, V as VISITOR_COOKIE, f as consentCookie, g as consentCookieName, p as parseActions, v as visitorCookieName } from '../cookie-names-CLqtmGBM.js';
5
6
 
6
7
  interface RefreshTokenOptions {
7
8
  /**
@@ -1,7 +1,7 @@
1
- import '../chunk-TLTG3BTC.js';
2
- export { XeniaServer, createXeniaServer, getConsent, getVisitorId, parseCookies } from '../chunk-WYAMPEVV.js';
3
- import { HttpClient } from '../chunk-FYSEKFIY.js';
4
- export { CONSENT_COOKIE, CircuitOpenError, VISITOR_COOKIE, XeniaApi, consentCookie, consentCookieName, parseActions, visitorCookieName } from '../chunk-FYSEKFIY.js';
1
+ import '../chunk-OUZU4Z5B.js';
2
+ export { XeniaServer, createXeniaServer, getConsent, getVisitorId, parseCookies } from '../chunk-DWFVDNU5.js';
3
+ import { HttpClient } from '../chunk-7NGJC7CF.js';
4
+ export { CONSENT_COOKIE, CircuitOpenError, VISITOR_COOKIE, XeniaApi, consentCookie, consentCookieName, parseActions, pendingTargets, personalizeContent, personalizePage, visitorCookieName } from '../chunk-7NGJC7CF.js';
5
5
 
6
6
  // src/server/token.ts
7
7
  async function refreshSdkToken(opts) {