@xenia-martech/sdk-js 1.1.0 → 1.2.0-dev.1
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 +50 -0
- package/assets/coverage.json +1 -0
- package/dist/{actions-CKeiofxJ.d.cts → actions-D9_aAvCv.d.cts} +188 -2
- package/dist/{actions-CKeiofxJ.d.ts → actions-D9_aAvCv.d.ts} +188 -2
- package/dist/api-BEPW0Uan.d.cts +88 -0
- package/dist/api-CktVQ6Gl.d.ts +88 -0
- package/dist/{chunk-U2WBBOYT.cjs → chunk-3PYPPIUM.cjs} +35 -10
- package/dist/chunk-3PYPPIUM.cjs.map +1 -0
- package/dist/{chunk-FYSEKFIY.js → chunk-7NGJC7CF.js} +249 -3
- package/dist/chunk-7NGJC7CF.js.map +1 -0
- package/dist/{chunk-WYAMPEVV.js → chunk-DWFVDNU5.js} +28 -3
- package/dist/chunk-DWFVDNU5.js.map +1 -0
- package/dist/{chunk-JEKVN7HK.cjs → chunk-IBNIRT7J.cjs} +251 -2
- package/dist/chunk-IBNIRT7J.cjs.map +1 -0
- package/dist/{chunk-TLTG3BTC.js → chunk-OUZU4Z5B.js} +2 -2
- package/dist/{chunk-TLTG3BTC.js.map → chunk-OUZU4Z5B.js.map} +1 -1
- package/dist/{chunk-5D7SJIO4.cjs → chunk-PKWANLT7.cjs} +2 -2
- package/dist/{chunk-5D7SJIO4.cjs.map → chunk-PKWANLT7.cjs.map} +1 -1
- package/dist/client/index.cjs +287 -9
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +285 -10
- package/dist/client/index.js.map +1 -1
- package/dist/client/react/index.cjs +375 -13
- package/dist/client/react/index.cjs.map +1 -1
- package/dist/client/react/index.d.cts +53 -3
- package/dist/client/react/index.d.ts +53 -3
- package/dist/client/react/index.js +369 -14
- package/dist/client/react/index.js.map +1 -1
- package/dist/cms/contentful.cjs +138 -0
- package/dist/cms/contentful.cjs.map +1 -0
- package/dist/cms/contentful.d.cts +57 -0
- package/dist/cms/contentful.d.ts +57 -0
- package/dist/cms/contentful.js +134 -0
- package/dist/cms/contentful.js.map +1 -0
- package/dist/{cookie-names-QYMiEMAq.d.cts → cookie-names-BACctagz.d.cts} +1 -1
- package/dist/{cookie-names-8FxbGKGS.d.ts → cookie-names-CLqtmGBM.d.ts} +1 -1
- package/dist/index.cjs +35 -23
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +2 -2
- package/dist/next/index.cjs +41 -9
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +32 -3
- package/dist/next/index.d.ts +32 -3
- package/dist/next/index.js +14 -3
- package/dist/next/index.js.map +1 -1
- package/dist/{api-URhxxi4x.d.cts → personalize-content-Clc1oMYY.d.cts} +152 -69
- package/dist/{api-URhxxi4x.d.ts → personalize-content-Clc1oMYY.d.ts} +152 -69
- package/dist/server/index.cjs +29 -17
- package/dist/server/index.d.cts +5 -4
- package/dist/server/index.d.ts +5 -4
- package/dist/server/index.js +4 -4
- package/dist/xenia-sdk.iife.js +3 -3
- package/dist/xenia-sdk.iife.js.map +1 -1
- package/dist/{xenia-server-Cti94W49.d.cts → xenia-server-BWhWD0La.d.ts} +15 -1
- package/dist/{xenia-server-DDtQp6Wi.d.ts → xenia-server-o_wDOcei.d.cts} +15 -1
- package/package.json +15 -1
- package/dist/chunk-FYSEKFIY.js.map +0 -1
- package/dist/chunk-JEKVN7HK.cjs.map +0 -1
- package/dist/chunk-U2WBBOYT.cjs.map +0 -1
- 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
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
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
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
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
|
-
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
647
|
-
* `
|
|
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
|
-
|
|
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
|
-
*
|
|
654
|
-
* `
|
|
655
|
-
*
|
|
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
|
-
|
|
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
|
|
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 };
|
package/dist/server/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('../chunk-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
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
|
|
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
|
|
42
|
+
get: function () { return chunk3PYPPIUM_cjs.XeniaServer; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "createXeniaServer", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk3PYPPIUM_cjs.createXeniaServer; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "getConsent", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk3PYPPIUM_cjs.getConsent; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "getVisitorId", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk3PYPPIUM_cjs.getVisitorId; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "parseCookies", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk3PYPPIUM_cjs.parseCookies; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "CONSENT_COOKIE", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkIBNIRT7J_cjs.CONSENT_COOKIE; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "CircuitOpenError", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkIBNIRT7J_cjs.CircuitOpenError; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "VISITOR_COOKIE", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkIBNIRT7J_cjs.VISITOR_COOKIE; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "XeniaApi", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkIBNIRT7J_cjs.XeniaApi; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "consentCookie", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkIBNIRT7J_cjs.consentCookie; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "consentCookieName", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkIBNIRT7J_cjs.consentCookieName; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "parseActions", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
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
|
|
102
|
+
get: function () { return chunkIBNIRT7J_cjs.visitorCookieName; }
|
|
91
103
|
});
|
|
92
104
|
exports.createTokenRoute = createTokenRoute;
|
|
93
105
|
exports.refreshSdkToken = refreshSdkToken;
|
package/dist/server/index.d.cts
CHANGED
|
@@ -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-
|
|
2
|
-
import {
|
|
3
|
-
export { A as AnalyticsContext, a as AnalyticsEventName, b as AnalyticsIdentity, c as AnalyticsIngestResponse,
|
|
4
|
-
export {
|
|
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
|
/**
|
package/dist/server/index.d.ts
CHANGED
|
@@ -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-
|
|
2
|
-
import {
|
|
3
|
-
export { A as AnalyticsContext, a as AnalyticsEventName, b as AnalyticsIdentity, c as AnalyticsIngestResponse,
|
|
4
|
-
export {
|
|
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
|
/**
|
package/dist/server/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import '../chunk-
|
|
2
|
-
export { XeniaServer, createXeniaServer, getConsent, getVisitorId, parseCookies } from '../chunk-
|
|
3
|
-
import { HttpClient } from '../chunk-
|
|
4
|
-
export { CONSENT_COOKIE, CircuitOpenError, VISITOR_COOKIE, XeniaApi, consentCookie, consentCookieName, parseActions, visitorCookieName } from '../chunk-
|
|
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) {
|