@active-reach/web-sdk 1.43.0 → 1.43.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 (185) hide show
  1. package/dist/aegis-push.min.js +2 -0
  2. package/dist/aegis-push.min.js.map +1 -0
  3. package/dist/aegis-sw.js +1 -0
  4. package/dist/aegis.min.js +2 -0
  5. package/dist/aegis.min.js.map +1 -0
  6. package/dist/analytics-C-Go3Pm5.mjs +3509 -0
  7. package/dist/analytics-C-Go3Pm5.mjs.map +1 -0
  8. package/dist/cdn.d.ts +26 -0
  9. package/dist/cdn.d.ts.map +1 -0
  10. package/dist/chat/AegisChat.d.ts +169 -0
  11. package/dist/chat/AegisChat.d.ts.map +1 -0
  12. package/dist/chat/index.d.ts +3 -0
  13. package/dist/chat/index.d.ts.map +1 -0
  14. package/dist/core/analytics.d.ts +320 -0
  15. package/dist/core/analytics.d.ts.map +1 -0
  16. package/dist/core/bootstrap.d.ts +96 -0
  17. package/dist/core/bootstrap.d.ts.map +1 -0
  18. package/dist/core/prefetch-bundle-client.d.ts +175 -0
  19. package/dist/core/prefetch-bundle-client.d.ts.map +1 -0
  20. package/dist/core/queue.d.ts +35 -0
  21. package/dist/core/queue.d.ts.map +1 -0
  22. package/dist/core/rate-limiter.d.ts +45 -0
  23. package/dist/core/rate-limiter.d.ts.map +1 -0
  24. package/dist/core/sdk-config-poller.d.ts +59 -0
  25. package/dist/core/sdk-config-poller.d.ts.map +1 -0
  26. package/dist/core/session.d.ts +52 -0
  27. package/dist/core/session.d.ts.map +1 -0
  28. package/dist/core/transport.d.ts +50 -0
  29. package/dist/core/transport.d.ts.map +1 -0
  30. package/dist/core/user-namespace.d.ts +48 -0
  31. package/dist/core/user-namespace.d.ts.map +1 -0
  32. package/dist/ecommerce/index.d.ts +94 -0
  33. package/dist/ecommerce/index.d.ts.map +1 -0
  34. package/dist/ecommerce/types.d.ts +81 -0
  35. package/dist/ecommerce/types.d.ts.map +1 -0
  36. package/dist/governance/bloom-filter.d.ts +47 -0
  37. package/dist/governance/bloom-filter.d.ts.map +1 -0
  38. package/dist/governance/index.d.ts +8 -0
  39. package/dist/governance/index.d.ts.map +1 -0
  40. package/dist/governance/murmur3.d.ts +43 -0
  41. package/dist/governance/murmur3.d.ts.map +1 -0
  42. package/dist/governance/name-governor.d.ts +98 -0
  43. package/dist/governance/name-governor.d.ts.map +1 -0
  44. package/dist/governance/trait-governor.d.ts +63 -0
  45. package/dist/governance/trait-governor.d.ts.map +1 -0
  46. package/dist/inapp/AegisInAppManager.d.ts +894 -0
  47. package/dist/inapp/AegisInAppManager.d.ts.map +1 -0
  48. package/dist/inapp/actions.d.ts +91 -0
  49. package/dist/inapp/actions.d.ts.map +1 -0
  50. package/dist/inapp/devicePairing.d.ts +70 -0
  51. package/dist/inapp/devicePairing.d.ts.map +1 -0
  52. package/dist/inapp/eval-throttle.d.ts +33 -0
  53. package/dist/inapp/eval-throttle.d.ts.map +1 -0
  54. package/dist/inapp/font.d.ts +16 -0
  55. package/dist/inapp/font.d.ts.map +1 -0
  56. package/dist/inapp/index.d.ts +8 -0
  57. package/dist/inapp/index.d.ts.map +1 -0
  58. package/dist/inapp/lucide-svg.d.ts +46 -0
  59. package/dist/inapp/lucide-svg.d.ts.map +1 -0
  60. package/dist/inapp/renderPreview.d.ts +40 -0
  61. package/dist/inapp/renderPreview.d.ts.map +1 -0
  62. package/dist/inapp/renderers/active-web-chat.d.ts +45 -0
  63. package/dist/inapp/renderers/active-web-chat.d.ts.map +1 -0
  64. package/dist/inapp/renderers/card-style.d.ts +31 -0
  65. package/dist/inapp/renderers/card-style.d.ts.map +1 -0
  66. package/dist/inapp/renderers/card-template.d.ts +233 -0
  67. package/dist/inapp/renderers/card-template.d.ts.map +1 -0
  68. package/dist/inapp/renderers/carousel-cards.d.ts +15 -0
  69. package/dist/inapp/renderers/carousel-cards.d.ts.map +1 -0
  70. package/dist/inapp/renderers/coachmark-tour.d.ts +24 -0
  71. package/dist/inapp/renderers/coachmark-tour.d.ts.map +1 -0
  72. package/dist/inapp/renderers/games.d.ts +27 -0
  73. package/dist/inapp/renderers/games.d.ts.map +1 -0
  74. package/dist/inapp/renderers/hero.d.ts +23 -0
  75. package/dist/inapp/renderers/hero.d.ts.map +1 -0
  76. package/dist/inapp/renderers/index.d.ts +22 -0
  77. package/dist/inapp/renderers/index.d.ts.map +1 -0
  78. package/dist/inapp/renderers/interactive-contract.d.ts +48 -0
  79. package/dist/inapp/renderers/interactive-contract.d.ts.map +1 -0
  80. package/dist/inapp/renderers/product-recommendation.d.ts +37 -0
  81. package/dist/inapp/renderers/product-recommendation.d.ts.map +1 -0
  82. package/dist/inapp/renderers/progress-bar.d.ts +38 -0
  83. package/dist/inapp/renderers/progress-bar.d.ts.map +1 -0
  84. package/dist/inapp/renderers/progress-core.d.ts +80 -0
  85. package/dist/inapp/renderers/progress-core.d.ts.map +1 -0
  86. package/dist/inapp/renderers/reviews.d.ts +38 -0
  87. package/dist/inapp/renderers/reviews.d.ts.map +1 -0
  88. package/dist/inapp/renderers/scratch-engine.d.ts +66 -0
  89. package/dist/inapp/renderers/scratch-engine.d.ts.map +1 -0
  90. package/dist/inapp/renderers/sticky-bar.d.ts +14 -0
  91. package/dist/inapp/renderers/sticky-bar.d.ts.map +1 -0
  92. package/dist/inapp/renderers/stories.d.ts +31 -0
  93. package/dist/inapp/renderers/stories.d.ts.map +1 -0
  94. package/dist/inapp/renderers/types.d.ts +152 -0
  95. package/dist/inapp/renderers/types.d.ts.map +1 -0
  96. package/dist/inapp/renderers/video.d.ts +20 -0
  97. package/dist/inapp/renderers/video.d.ts.map +1 -0
  98. package/dist/inbox/AegisInbox.d.ts +106 -0
  99. package/dist/inbox/AegisInbox.d.ts.map +1 -0
  100. package/dist/inbox/index.d.ts +3 -0
  101. package/dist/inbox/index.d.ts.map +1 -0
  102. package/dist/index.d.ts +42 -0
  103. package/dist/index.d.ts.map +1 -0
  104. package/dist/index.js +15478 -0
  105. package/dist/index.js.map +1 -0
  106. package/dist/integrations/react.d.ts +19 -0
  107. package/dist/integrations/react.d.ts.map +1 -0
  108. package/dist/loyalty/AegisLoyaltyManager.d.ts +120 -0
  109. package/dist/loyalty/AegisLoyaltyManager.d.ts.map +1 -0
  110. package/dist/loyalty/index.d.ts +3 -0
  111. package/dist/loyalty/index.d.ts.map +1 -0
  112. package/dist/plugins/registry.d.ts +13 -0
  113. package/dist/plugins/registry.d.ts.map +1 -0
  114. package/dist/push/AegisWebPush.d.ts +199 -0
  115. package/dist/push/AegisWebPush.d.ts.map +1 -0
  116. package/dist/push/AegisWebPush.js +542 -0
  117. package/dist/push/AegisWebPush.js.map +1 -0
  118. package/dist/push/cdn-push.d.ts +21 -0
  119. package/dist/push/cdn-push.d.ts.map +1 -0
  120. package/dist/react.js +70 -0
  121. package/dist/react.js.map +1 -0
  122. package/dist/runtime/AegisMessageRuntime.d.ts +276 -0
  123. package/dist/runtime/AegisMessageRuntime.d.ts.map +1 -0
  124. package/dist/runtime/index.d.ts +3 -0
  125. package/dist/runtime/index.d.ts.map +1 -0
  126. package/dist/snippet.min.js +1 -0
  127. package/dist/state/intent_ledger.d.ts +136 -0
  128. package/dist/state/intent_ledger.d.ts.map +1 -0
  129. package/dist/triggers/ContactScoresFetcher.d.ts +113 -0
  130. package/dist/triggers/ContactScoresFetcher.d.ts.map +1 -0
  131. package/dist/triggers/IntentRuleEvaluator.d.ts +213 -0
  132. package/dist/triggers/IntentRuleEvaluator.d.ts.map +1 -0
  133. package/dist/triggers/IntentSnapshotCollector.d.ts +83 -0
  134. package/dist/triggers/IntentSnapshotCollector.d.ts.map +1 -0
  135. package/dist/triggers/SelectorBinder.d.ts +118 -0
  136. package/dist/triggers/SelectorBinder.d.ts.map +1 -0
  137. package/dist/triggers/TriggerEngine.d.ts +296 -0
  138. package/dist/triggers/TriggerEngine.d.ts.map +1 -0
  139. package/dist/triggers/behaviouralTriggers.d.ts +44 -0
  140. package/dist/triggers/behaviouralTriggers.d.ts.map +1 -0
  141. package/dist/triggers/index.d.ts +11 -0
  142. package/dist/triggers/index.d.ts.map +1 -0
  143. package/dist/triggers/microIntentTriggers.d.ts +80 -0
  144. package/dist/triggers/microIntentTriggers.d.ts.map +1 -0
  145. package/dist/types/config.d.ts +77 -0
  146. package/dist/types/config.d.ts.map +1 -0
  147. package/dist/types/events.d.ts +147 -0
  148. package/dist/types/events.d.ts.map +1 -0
  149. package/dist/types/index.d.ts +5 -0
  150. package/dist/types/index.d.ts.map +1 -0
  151. package/dist/types/plugin.d.ts +21 -0
  152. package/dist/types/plugin.d.ts.map +1 -0
  153. package/dist/types/type-safe-events.d.ts +14 -0
  154. package/dist/types/type-safe-events.d.ts.map +1 -0
  155. package/dist/utils/canonical-identity.d.ts +29 -0
  156. package/dist/utils/canonical-identity.d.ts.map +1 -0
  157. package/dist/utils/consent.d.ts +40 -0
  158. package/dist/utils/consent.d.ts.map +1 -0
  159. package/dist/utils/debounce.d.ts +3 -0
  160. package/dist/utils/debounce.d.ts.map +1 -0
  161. package/dist/utils/device.d.ts +6 -0
  162. package/dist/utils/device.d.ts.map +1 -0
  163. package/dist/utils/identity.d.ts +27 -0
  164. package/dist/utils/identity.d.ts.map +1 -0
  165. package/dist/utils/index.d.ts +7 -0
  166. package/dist/utils/index.d.ts.map +1 -0
  167. package/dist/utils/logger.d.ts +15 -0
  168. package/dist/utils/logger.d.ts.map +1 -0
  169. package/dist/utils/meta-cookies.d.ts +65 -0
  170. package/dist/utils/meta-cookies.d.ts.map +1 -0
  171. package/dist/utils/redact-url.d.ts +56 -0
  172. package/dist/utils/redact-url.d.ts.map +1 -0
  173. package/dist/utils/storage.d.ts +20 -0
  174. package/dist/utils/storage.d.ts.map +1 -0
  175. package/dist/utils/url-parser.d.ts +61 -0
  176. package/dist/utils/url-parser.d.ts.map +1 -0
  177. package/dist/utils/uuid.d.ts +4 -0
  178. package/dist/utils/uuid.d.ts.map +1 -0
  179. package/dist/utils/visitor.d.ts +43 -0
  180. package/dist/utils/visitor.d.ts.map +1 -0
  181. package/dist/widgets/AegisWidgetManager.d.ts +209 -0
  182. package/dist/widgets/AegisWidgetManager.d.ts.map +1 -0
  183. package/dist/widgets/index.d.ts +3 -0
  184. package/dist/widgets/index.d.ts.map +1 -0
  185. package/package.json +2 -1
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Native review-wall renderer (Reviews Display & Integrity §3.5, mockup B′).
3
+ *
4
+ * The cross-surface PDP/storefront review widget. Unlike the preload-first
5
+ * renderers in this directory, this one does REST reads at mount + on filter
6
+ * change (the Active-Chat precedent for I/O-doing widgets) —
7
+ * `GET {apiHost}/v1/reviews/public` via the gateway (writeKey-authed; tenant
8
+ * resolved from the key). No SSE/socket (web-sdk is REST; review walls are a
9
+ * browsing surface). Between fetches it is pure DOM, inline-styled in the
10
+ * canonical Urbanist in-app font (IN_APP_FONT_STACK) — no external stylesheet,
11
+ * works on any host incl. Shopify themes.
12
+ *
13
+ * Mounted into a `data-aegis-slot="reviews"` anchor (widget_category='reviews',
14
+ * sub_type='reviews', delivery_modes:['embedded_card']). Product read from the
15
+ * slot's `data-product-id`. The SAME contract drives the native SDK + Shopify/
16
+ * Woo/Magento embeds.
17
+ *
18
+ * Renders: a premium AI-summary card, AggregateRating + distribution panel, sort
19
+ * + filter pills, and per card an avatar + verified-purchase badge (G1) + media
20
+ * thumbs + an accent operator-reply card, plus `Review`/`AggregateRating`
21
+ * JSON-LD (G4 SEO stars). The whole wall is centered (margin:auto).
22
+ */
23
+ import type { RenderContext } from './types';
24
+ /** SDK credentials the review fetch needs (the campaign payload doesn't carry
25
+ * them). Supplied by `AegisInAppManager`, same shape pattern as Active Chat. */
26
+ export interface ReviewsCredentials {
27
+ writeKey: string;
28
+ apiHost: string;
29
+ }
30
+ export declare function renderReviewsInline(ctx: RenderContext, target: HTMLElement, creds: ReviewsCredentials): boolean;
31
+ /**
32
+ * Overlay variant (mockup C) — a slide-up bottom sheet containing the full
33
+ * review wall. For a reviews campaign whose delivery_modes include
34
+ * 'in_app_overlay' (typically client-triggered). Mounts the SAME
35
+ * renderReviewsInline into the sheet body.
36
+ */
37
+ export declare function renderReviewsOverlay(ctx: RenderContext, creds: ReviewsCredentials): void;
38
+ //# sourceMappingURL=reviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/reviews.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C;iFACiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAiMD,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,kBAAkB,GACxB,OAAO,CA8RT;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAgCxF"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * The ONE scratch-off engine (REWARDS_WALLET_PARITY_SPEC Phase 2, Model B).
3
+ *
4
+ * A foil canvas the customer scratches away from a prize layer, with a taint-free
5
+ * coverage grid, idle shimmer, dust flecks and tap-to-reveal. It is mounted by the
6
+ * in-flow scratch card (`AegisInAppManager.renderScratchCardSlot`) AND by the
7
+ * cashier-portal wallet teaser, so a card scratched in the flow and a card
8
+ * scratched later from the wallet are the same object. It owns the foil and the
9
+ * gesture and nothing else: what is underneath, the sound and the win rendering
10
+ * are the caller's, and `onThreshold` is the single seam where the caller asks its
11
+ * server to reveal.
12
+ */
13
+ export interface ScratchFoilPalette {
14
+ g0: string;
15
+ g1: string;
16
+ g2: string;
17
+ ink: string;
18
+ }
19
+ /** Brushed-metal palette + contrast ink from a brand colour, or default silver. */
20
+ export declare function scratchFoilPalette(hex?: string): ScratchFoilPalette;
21
+ export interface ScratchSurfaceOptions {
22
+ /** Layer shown under the foil (the prize, or a neutral teaser). */
23
+ prizeLayer: HTMLElement;
24
+ /** Fraction of the foil that must be cleared (0.1..1). Default 0.5. */
25
+ thresholdPct?: number;
26
+ brushRadius?: number;
27
+ palette?: ScratchFoilPalette;
28
+ /** Optional brand logo painted on the foil (CORS-enabled URL). */
29
+ foilImageUrl?: string;
30
+ idleShimmer?: boolean;
31
+ /** A single tap (no drag) reveals with a burst. Default true. */
32
+ tapToReveal?: boolean;
33
+ /** Called on every second scratch stroke (sound / haptics hook). */
34
+ onScratch?: () => void;
35
+ /**
36
+ * Fires ONCE when the threshold is crossed. Resolve `false` to say the reveal
37
+ * did not happen (network / refusal): the foil is put back so the customer can
38
+ * scratch again. Any other result keeps the card revealed.
39
+ */
40
+ onThreshold: () => Promise<boolean | void> | boolean | void;
41
+ }
42
+ export interface ScratchSurface {
43
+ stage: HTMLElement;
44
+ canvas: HTMLCanvasElement;
45
+ isRevealed(): boolean;
46
+ /** Reveal without scratching (keyboard / assistive-tech path). */
47
+ reveal(): void;
48
+ destroy(): void;
49
+ }
50
+ /**
51
+ * Send a "deal" at most once, and only for an identified contact. An anonymous
52
+ * card cannot be held in a wallet, so it keeps the single-call grant-at-threshold
53
+ * path and never deals. Every call returns the SAME in-flight promise (null when
54
+ * anonymous), so the reveal can wait for the deal and never overtake it.
55
+ */
56
+ export declare function createDealOnce(isIdentified: () => boolean, send: () => Promise<unknown>): () => Promise<unknown> | null;
57
+ export declare function mountScratchSurface(host: HTMLElement, opts: ScratchSurfaceOptions): ScratchSurface;
58
+ /**
59
+ * The server's verdict on a scratch reveal. The response has no top-level `won`:
60
+ * a loss is `prize.win === false` (or a `no_prize` slice) with no reward, and a
61
+ * win is `prize.win === true` or a granted reward. Reading only `won` /
62
+ * `reward.granted` rendered every loss as a win with the sample prize label.
63
+ * Returns `undefined` only when the response says neither.
64
+ */
65
+ export declare function scratchOutcome(resp: Record<string, unknown>): boolean | undefined;
66
+ //# sourceMappingURL=scratch-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scratch-engine.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/scratch-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb;AAED,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAmBnE;AAED,MAAM,WAAW,qBAAqB;IACpC,mEAAmE;IACnE,UAAU,EAAE,WAAW,CAAC;IACxB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iEAAiE;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;OAIG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;CAC7D;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,IAAI,OAAO,CAAC;IACtB,kEAAkE;IAClE,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;CACjB;AAeD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,MAAM,OAAO,EAC3B,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAC3B,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAQ/B;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,qBAAqB,GAAG,cAAc,CAwPlG;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,GAAG,SAAS,CAMjF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * StickyBar renderer — a pinned notification strip at the top or bottom
3
+ * of the viewport. Used for free-shipping hints, flash-sale banners,
4
+ * cart-reminder strips. Dismissible, optionally auto-hiding.
5
+ *
6
+ * interactive_config:
7
+ * sticky_position: 'top' | 'bottom' (required)
8
+ * sticky_bg_color?: string
9
+ * sticky_dismissible?: boolean default true
10
+ * sticky_auto_hide_ms?: number 0 = never
11
+ */
12
+ import type { RenderContext } from './types';
13
+ export declare function renderStickyBar(ctx: RenderContext): void;
14
+ //# sourceMappingURL=sticky-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sticky-bar.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/sticky-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAO7C,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAgHxD"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Stories renderer — Instagram/Plotline-style stories, in two surfaces:
3
+ *
4
+ * 1. LAUNCHER BAR (the collapsed entry) — a horizontal row of story-GROUP
5
+ * thumbnails. Each group is one bubble (circular gradient ring OR
6
+ * rectangular cover card) with a title + cover; tapping it opens the
7
+ * player and plays that group's FRAMES in sequence. Renders inline in a
8
+ * `[data-aegis-slot]` anchor (the embedded widget, Plotline-parity).
9
+ * 2. PLAYER — full-screen tap-through. tap RIGHT → next frame · tap LEFT →
10
+ * previous · press-and-hold → pause · segmented progress fills per frame ·
11
+ * ✕ / Esc closes · ←/→ navigate.
12
+ *
13
+ * Data shape (interactive_config):
14
+ * stories: Array<{ id?, title?, cover_image_url?, frames: Frame[] }> // GROUPS
15
+ * Frame: { image_url?, video_url?, title?, body?, cta_text?, cta_url?, cta_target?, duration_ms? }
16
+ * stories_thumbnail_shape?: 'circle' | 'rectangle'
17
+ * stories_ring_style?: 'brand' | 'instagram' | 'custom' // default brand
18
+ * stories_ring_color?: string // for 'custom'
19
+ * stories_autoplay?: boolean · stories_loop?: boolean · stories_show_progress?: boolean
20
+ * stories_default_duration_ms?: number
21
+ * surface_style?: 'clean' | 'branded' // branded → brand-fill launcher bar
22
+ *
23
+ * A flat `stories: Frame[]` (pre-groups shape) is tolerated — treated as one group.
24
+ */
25
+ import type { RenderContext } from './types';
26
+ /** Overlay entry — a stories campaign delivered as an OVERLAY is a full-screen
27
+ * takeover; open at the first group and auto-advance through every group. */
28
+ export declare function renderStories(ctx: RenderContext): void;
29
+ /** Slot/embedded entry — the inline launcher bar of group thumbnails. */
30
+ export declare function renderStoriesRings(ctx: RenderContext, target: HTMLElement | null): boolean;
31
+ //# sourceMappingURL=stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stories.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAyH7C;8EAC8E;AAC9E,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAMtD;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAO1F"}
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Preload-first renderer types — the 5 display types added in Phase 0
3
+ * of the In-App Messages Expansion Plan (carousel_cards, sticky_bar,
4
+ * progress_bar, coachmark_tour, product_recommendation).
5
+ *
6
+ * Each renderer is a pure function over a `RenderContext` so that the
7
+ * main `AegisInAppManager` class does not grow unbounded. Render paths
8
+ * never do network I/O — everything they need is already in the
9
+ * campaign payload from the prefetch bundle.
10
+ */
11
+ import type { InAppCampaign } from '../AegisInAppManager';
12
+ /**
13
+ * Live cart snapshot fed imperatively into the runtime by a headless
14
+ * storefront via `runtime.setCartState(...)`. Held in PRIVATE SDK state
15
+ * (not a `window.*` global) and surfaced to renderers through
16
+ * `RenderContext.getCartState` — the first-party, encapsulated equivalent
17
+ * of the `window.aegis_cart` / `window.Shopify` cart globals the SDK reads
18
+ * for third-party storefront embeds. Used by the progress-bar renderer
19
+ * (free-delivery / cart-total goals) and, via the runtime, to feed the
20
+ * `cart_value` micro-intent signal.
21
+ */
22
+ export interface CartState {
23
+ /** Cart subtotal in the storefront's display currency (major units). */
24
+ total: number;
25
+ /** Distinct line count (or summed quantity — caller's choice, used for `items_in_cart`). */
26
+ itemCount: number;
27
+ /** ISO currency code (e.g. 'INR'). */
28
+ currency: string;
29
+ /**
30
+ * The free-delivery threshold the SERVER quoted for this cart's address —
31
+ * the matched AREA's line when there is one, the brand's otherwise.
32
+ *
33
+ * `null`/absent means NOT MEASURED (no address checked yet, or a host app
34
+ * that never feeds one), and a renderer must show nothing rather than a
35
+ * threshold of 0. Before this existed, a card element with
36
+ * `threshold_source: 'free_delivery_setting'` read a token
37
+ * (`cart.free_delivery_above`) that no server path has ever written — two
38
+ * ACTIVE campaigns on ST rendered a permanently empty bar, while the
39
+ * dashboard preview substituted 999 and looked correct.
40
+ */
41
+ freeDeliveryAbove?: number | null;
42
+ }
43
+ export interface RenderContext {
44
+ campaign: InAppCampaign;
45
+ /**
46
+ * Read the live cart state set via `runtime.setCartState(...)`. Renderers
47
+ * (e.g. progress-bar) prefer this over `window.*` cart globals — it's the
48
+ * first-party path and is undefined only when the host app never fed a cart.
49
+ */
50
+ getCartState?: () => CartState | undefined;
51
+ /**
52
+ * Flat, fail-soft property map for client-side token interpolation in
53
+ * `card_template` `text` elements (e.g. `{loyalty.points}`, `{first_name}`,
54
+ * `{cart.total}`). The CEP model: per-user/live values interpolate CLIENT-side
55
+ * over this hydrated map so the cached bundle stays generic (vs server
56
+ * pre-substitution, which kills per-user cacheability). Unknown/missing keys
57
+ * resolve to '' — never throw, never eval. Built from getCartState + the
58
+ * campaign's served context. See RICH_CARD_EDITOR_IMPLEMENTATION.md Part I.A.
59
+ */
60
+ properties?: () => Record<string, unknown>;
61
+ /**
62
+ * Track served/impression/click/dismiss via navigator.sendBeacon-capable writer.
63
+ *
64
+ * Event semantics (WEB_SDK_DLR_ENHANCEMENT_TRACKER P2):
65
+ * - `served` — SDK received the campaign payload (post-refreshCampaigns).
66
+ * Fires automatically from AegisInAppManager; renderers do NOT fire this.
67
+ * - `impression` — DOM element entered the viewport (IntersectionObserver, ≥200ms threshold).
68
+ * Renderers fire this from their IntersectionObserver callback.
69
+ * - `clicked` — user clicked the primary CTA.
70
+ * - `dismissed` — user closed/dismissed the campaign.
71
+ * - `anchor_unresolved` — an anchored renderer (tooltip / coachmark step)
72
+ * declared an anchor but it couldn't be resolved on this
73
+ * surface, so the widget rendered at a fallback position (or
74
+ * not at all). Surfaces a silent misconfiguration the
75
+ * operator otherwise can't see — impressions still look
76
+ * healthy. `meta.anchor_selector` carries the unresolved key.
77
+ * - `step_id` — optional, present on multi-step renderers (WEB P3).
78
+ * - `meta` — optional free-form metadata merged into the event's
79
+ * metadata map (e.g. `{ anchor_resolved: false }`).
80
+ */
81
+ trackEvent: (campaignId: string, eventType: 'served' | 'impression' | 'clicked' | 'dismissed' | 'anchor_unresolved', extra?: {
82
+ stepId?: string;
83
+ meta?: Record<string, unknown>;
84
+ }) => void;
85
+ /** Null-safe URL hardener — rejects javascript:/data: */
86
+ sanitizeUrl: (url: string) => string | null;
87
+ /**
88
+ * Navigate to a campaign action URL with the manager's full semantics —
89
+ * `aegis://` action verbs (dismiss / push / cart-add), the campaign-click
90
+ * lifecycle event + preventDefault contract, then the hard nav. Renderers
91
+ * should prefer this over `window.location.href` for CTA destinations so
92
+ * structured cta_target values (page / product / dismiss) resolve correctly.
93
+ */
94
+ navigate?: (url: string, buttonId?: string) => void;
95
+ /**
96
+ * Canonical CTA-action dispatch (CANONICAL_ACTION_MODEL_TRACKER.md). Renderers
97
+ * funnel CTA intents (add_to_cart / open_product / …) here instead of firing a
98
+ * bespoke `aegis:*` DOM event directly — the manager routes to the host's
99
+ * single `onAction` handler, the legacy DOM event (back-compat), and a
100
+ * graceful fallback. `undefined` outside the manager (e.g. dashboard preview).
101
+ */
102
+ dispatchAction?: (action: import('../actions').AegisAction) => void;
103
+ /**
104
+ * Submit a widget response (records it + triggers the loyalty/coupon grant on
105
+ * the server). Used by the gamification renderers on their key action
106
+ * (claim / play / reveal). Resolves to the server's response JSON or null.
107
+ */
108
+ submitResponse?: (responseType: string, payload: Record<string, unknown>) => Promise<Record<string, unknown> | null>;
109
+ /**
110
+ * Play a celebration/feedback reaction on `el` — the SHARED Lottie + confetti
111
+ * + ring system (existing assets: trophy/gift/affirm/check/empathize).
112
+ * celebrate → trophy + rings + confetti (big win) · affirm → affirm + confetti
113
+ * acknowledge → check (neutral) · empathize → empathize (loss/near-miss)
114
+ * `lottieFile` overrides the intent's default (e.g. 'gift.json'). Reduced-motion
115
+ * aware. Reuse this instead of bespoke CSS celebrations.
116
+ */
117
+ playReaction?: (el: HTMLElement, intent: 'celebrate' | 'affirm' | 'acknowledge' | 'empathize', lottieFile?: string,
118
+ /** 'card' (default) = burst anchored to `el`. 'viewport' = full-viewport
119
+ * fixed burst for hero moments (overlay celebration surfaces). */
120
+ scope?: 'card' | 'viewport') => void;
121
+ /** Haptic feedback (navigator.vibrate). Gated on support; intensity ∝ moment. */
122
+ haptic?: (pattern: number | number[]) => void;
123
+ /** Only accept #hex / rgb() / rgba() / named tokens — everything else returns the default. */
124
+ sanitizeColor: (color: string) => string;
125
+ /** Debug logger — forwarded to the manager's logger. */
126
+ log: (msg: string, level?: 'log' | 'warn' | 'error') => void;
127
+ /** Lazily inject the shared keyframes. */
128
+ addAnimationStyles: () => void;
129
+ /** The host `[data-aegis-slot]` element this campaign rendered into (set by
130
+ * the slot path). Elements that bind to HOST context — e.g.
131
+ * `product_rating_list` reading the order's `data-rateable-items` /
132
+ * `data-order-id` / `data-token` — read it here, the same way `reviews.ts`
133
+ * reads `data-product-id`. Undefined in overlay/preview (no host slot). */
134
+ slotEl?: HTMLElement;
135
+ /** SDK gateway host + write key — for the rare element that does a runtime
136
+ * read (e.g. `product_rating_list` token→server-resolve on untrusted
137
+ * origins). Most elements never need these (submit goes via submitResponse). */
138
+ apiHost?: string;
139
+ writeKey?: string;
140
+ /** Organization id (write-key-derived). Needed by the `product_rating_list`
141
+ * composer's media upload (`POST /v1/in-app/review-media` requires
142
+ * `X-Organization-ID`). Undefined when the runtime has no org bound. */
143
+ organizationId?: string;
144
+ /** The brand (workspace) the runtime is scoped to — `getWorkspaceId()` at
145
+ * context build. Per-brand runtime reads (e.g. `/v1/in-app/review-earn-hint`,
146
+ * which reads it as the `workspace_id` query param) send it; undefined =
147
+ * org-level answer, as before (Aman 2026-09-29). */
148
+ workspaceId?: string;
149
+ }
150
+ /** Renderer signature — side-effectful DOM mutation, no return. */
151
+ export type Renderer = (ctx: RenderContext) => void;
152
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACxB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;O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;IACnB;uEACmE;IACnE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,KACxB,IAAI,CAAC;IACV,iFAAiF;IACjF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IAC9C,8FAA8F;IAC9F,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,wDAAwD;IACxD,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;IAC7D,0CAA0C;IAC1C,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;;;gFAI4E;IAC5E,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;qFAEiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;6EAEyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;yDAGqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,mEAAmE;AACnE,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Standalone video hero ("Video Banner", 2026-06-14) — a prominent
3
+ * muted-autoplay-loop video with an unmute pill, optional poster, and
4
+ * title/body/CTA either OVERLAID on the video or BELOW it. Two surfaces:
5
+ * - inline (renders into a `[data-aegis-slot]` anchor) — the Video Banner
6
+ * - overlay (centred hero card) — the takeover
7
+ * Distinct from `pip` (small floating corner) and `full_screen` (full-bleed
8
+ * takeover). Reuses interactive_config.video_url + image_url (poster) + the
9
+ * campaign title/body/button_text/action_url.
10
+ *
11
+ * interactive_config:
12
+ * video_url (the muted-inline video) · video_aspect '16:9'|'9:16'|'1:1'|'4:5'
13
+ * video_caption 'overlay'|'below' · video_autoplay (default true) · video_loop (default true)
14
+ */
15
+ import type { RenderContext } from './types';
16
+ /** Overlay entry — a centred video hero card. */
17
+ export declare function renderVideo(ctx: RenderContext): void;
18
+ /** Slot/embedded entry — the inline Video Banner. */
19
+ export declare function renderVideoInline(ctx: RenderContext, target: HTMLElement | null): boolean;
20
+ //# sourceMappingURL=video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAmH7C,iDAAiD;AACjD,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CA2BpD;AAED,qDAAqD;AACrD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAczF"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * AegisInbox — client-side App Inbox (Message Center).
3
+ *
4
+ * Backs the notification drawer on actii.me WebView and every tenant
5
+ * storefront that embeds the Web SDK. Operates against cell-plane's
6
+ * /v1/in-app/inbox family of endpoints (list, unread-count, read,
7
+ * dismiss, read-all).
8
+ *
9
+ * Design choices:
10
+ * • Hydrate from the prefetch bundle at init — no extra HTTP on first
11
+ * paint. PrefetchBundleClient seeds us; we then own the live copy.
12
+ * • Mutations are optimistic + beacon-backed. Read / dismiss writes to
13
+ * local state immediately, then POSTs with `keepalive: true` so an
14
+ * in-flight dismiss survives page unload.
15
+ * • Badge polling uses the tiny `/unread-count` endpoint on a 60-second
16
+ * cadence — matches the `inbox_poll_interval_ms` from sdk_config's
17
+ * TransportConfig.hybrid mode.
18
+ * • No external dependencies; IndexedDB is optional (we gracefully fall
19
+ * back to in-memory when unavailable, e.g., in private browsing).
20
+ */
21
+ import type { PrefetchBundleClient } from '../core/prefetch-bundle-client';
22
+ export interface AegisInboxEntry {
23
+ id: string;
24
+ source: string;
25
+ campaign_id: string | null;
26
+ title: string;
27
+ body: string;
28
+ media_url: string | null;
29
+ cta_url: string | null;
30
+ metadata: Record<string, unknown> | null;
31
+ read: boolean;
32
+ read_at: string | null;
33
+ dismissed_at?: string | null;
34
+ created_at: string | null;
35
+ expires_at: string | null;
36
+ }
37
+ export interface AegisInboxConfig {
38
+ apiHost: string;
39
+ writeKey: string;
40
+ organizationId?: string;
41
+ contactId?: string;
42
+ contactToken?: string;
43
+ propertyId?: string;
44
+ bundleClient?: PrefetchBundleClient;
45
+ unreadPollIntervalMs?: number;
46
+ }
47
+ export type InboxListener = (state: {
48
+ entries: AegisInboxEntry[];
49
+ unreadCount: number;
50
+ }) => void;
51
+ export declare class AegisInbox {
52
+ private apiHost;
53
+ private writeKey;
54
+ private organizationId?;
55
+ private contactId?;
56
+ private contactToken?;
57
+ private propertyId?;
58
+ private bundleClient?;
59
+ private unreadPollIntervalMs;
60
+ private entries;
61
+ private unreadCount;
62
+ private cursor;
63
+ private listeners;
64
+ private pollTimer;
65
+ private bundleUnsub;
66
+ constructor(config: AegisInboxConfig);
67
+ /** Hydrate from bundle (if available), restore the IDB cache (if any),
68
+ * then start the background unread-count poll. */
69
+ initialize(): Promise<void>;
70
+ stop(): void;
71
+ /** Update identity after login / property switch. Clears the local
72
+ * inbox since it's intrinsically contact+property scoped. */
73
+ setIdentity(partial: {
74
+ contactId?: string;
75
+ contactToken?: string;
76
+ propertyId?: string;
77
+ organizationId?: string;
78
+ }): void;
79
+ getEntries(): AegisInboxEntry[];
80
+ getUnreadCount(): number;
81
+ /** Pagination cursor (ISO-8601 timestamp of the oldest entry currently
82
+ * held). Pass it back via `loadMore()` to fetch older history. */
83
+ getCursor(): string | null;
84
+ /** Append one more page of older entries using the current cursor. */
85
+ loadMore(): Promise<void>;
86
+ onChange(l: InboxListener): () => void;
87
+ refreshList(): Promise<void>;
88
+ refreshUnreadCount(): Promise<void>;
89
+ markRead(messageId: string): Promise<void>;
90
+ dismiss(messageId: string): Promise<void>;
91
+ markAllRead(): Promise<void>;
92
+ private seedFromBundle;
93
+ private recomputeUnread;
94
+ private emit;
95
+ private headers;
96
+ /** Best-effort beacon-style POST. Uses `keepalive: true` so it survives
97
+ * a navigation away from the current page (e.g., user taps the CTA
98
+ * which takes them to another URL right after dismiss). */
99
+ private postBeacon;
100
+ private openDb;
101
+ private cacheKey;
102
+ private writeCache;
103
+ private readCache;
104
+ private clearCache;
105
+ }
106
+ //# sourceMappingURL=AegisInbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AegisInbox.d.ts","sourceRoot":"","sources":["../../src/inbox/AegisInbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAG3E,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY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I,OAAO,CAAC,IAAI,CAAC;IAuB/B,QAAQ,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,IAAI;IAQhC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IA0B5B,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAwBnC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW1C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYzC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBlC,OAAO,CAAC,cAAc;IAuBtB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,IAAI;IAWZ,OAAO,CAAC,OAAO;IAYf;;gEAE4D;YAC9C,UAAU;YAiBV,MAAM;IAmBpB,OAAO,CAAC,QAAQ;YAKF,UAAU;YAmBV,SAAS;YAmBT,UAAU;CAkBzB"}
@@ -0,0 +1,3 @@
1
+ export { AegisInbox } from './AegisInbox';
2
+ export type { AegisInboxConfig, AegisInboxEntry, InboxListener } from './AegisInbox';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { Aegis } from './core/analytics';
2
+ declare const aegis: Aegis;
3
+ export default aegis;
4
+ export { Aegis } from './core/analytics';
5
+ export type { LinkAttribution, AdClickIDs } from './utils/url-parser';
6
+ export type { AegisConfig, CellEndpoint, CellRegion } from './types/config';
7
+ export type { AegisEvent, TrackEvent, IdentifyEvent, PageEvent, ScreenEvent, GroupEvent, AliasEvent, EventContext, BatchPayload, BatchResponse, } from './types/events';
8
+ export { UserNamespace } from './core/user-namespace';
9
+ export type { OptInChannel } from './core/user-namespace';
10
+ export type { Plugin, PluginRegistry } from './types/plugin';
11
+ export { debounce, throttle } from './utils/debounce';
12
+ export type { ConsentPreferences, ConsentCategory, ConsentStatus, } from './utils/consent';
13
+ export type { InAppCampaign, AegisInAppConfig, CartState, CampaignClickEvent, CampaignDismissEvent, AegisErrorEvent, InAppLifecycleEventMap, AegisAction, ActionMeta, } from './inapp';
14
+ export { renderPreview, parseAction, fallbackUrlForAction } from './inapp';
15
+ export { mountScratchSurface, scratchFoilPalette, createDealOnce } from './inapp/renderers/scratch-engine';
16
+ export type { ScratchSurface, ScratchSurfaceOptions, ScratchFoilPalette } from './inapp/renderers/scratch-engine';
17
+ export type { WidgetConfig, AegisWidgetConfig, } from './widgets';
18
+ export { TriggerEngine } from './triggers';
19
+ export type { TriggerRule, ScrollDepthConfig, TimeOnPageConfig, ExitIntentConfig, InactivityConfig, TriggerEvent, } from './triggers';
20
+ export { SdkConfigPoller } from './core/sdk-config-poller';
21
+ export type { SdkConfig, SdkConfigPollerOptions, ConfigChangeCallback } from './core/sdk-config-poller';
22
+ export { PrefetchBundleClient } from './core/prefetch-bundle-client';
23
+ export type { PrefetchBundle, PrefetchBundleCampaign, PrefetchBundleInbox, PrefetchBundleInboxEntry, PrefetchBundleClientOptions, PrefetchBundleContext, PrefetchBundleListener, } from './core/prefetch-bundle-client';
24
+ export { AegisInbox } from './inbox';
25
+ export type { AegisInboxConfig, AegisInboxEntry, InboxListener } from './inbox';
26
+ export { AegisMessageRuntime } from './runtime';
27
+ export type { AegisMessageRuntimeConfig } from './runtime';
28
+ export { AegisChat, openChat, closeChat, getCurrentLauncher } from './chat';
29
+ export type { AegisChatConfig } from './chat';
30
+ export { AegisLoyaltyManager } from './loyalty';
31
+ export type { AegisLoyaltyManagerConfig, StoreCreditBalance, ReloadCheckoutResult, GiftCard, GiftCardPurchaseResult, GiftCardClaimResult, } from './loyalty';
32
+ export { AegisWebPush } from './push/AegisWebPush';
33
+ export type { AegisWebPushConfig, AegisAPIClient, ContactIdentity, PushEventTracker, } from './push/AegisWebPush';
34
+ export { bootstrap, readFirstPartyCookie, writeFirstPartyCookie, deriveDeviceFingerprint, BootstrapError, } from './core/bootstrap';
35
+ export type { BootstrapRequest, BootstrapResult } from './core/bootstrap';
36
+ export { RateLimiter } from './core/rate-limiter';
37
+ export type { RateLimiterOptions } from './core/rate-limiter';
38
+ export { NameGovernor, BloomFilter, murmurhash3_x86_32 } from './governance';
39
+ export type { EventGovernanceHint, DropReport, BloomFilterParams } from './governance';
40
+ export { EcommerceTracker } from './ecommerce';
41
+ export type { EcommerceProduct, EcommerceCart, EcommerceCheckout, EcommerceOrder, EcommerceCoupon, EcommerceSearch, EcommerceProductList, EcommerceWishlist, EcommerceWaitlist, EcommercePromotion, } from './ecommerce';
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,QAAA,MAAM,KAAK,OAAc,CAAC;AAE1B,eAAe,KAAK,CAAC;AAErB,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACtE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5E,YAAY,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D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