@joryio/web-sdk 1.4.0-beta.1 → 1.4.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/README.md +1 -1
  3. package/dist/cards-ui/card-feed-view.d.ts +4 -0
  4. package/dist/cards-ui/card-feed-view.d.ts.map +1 -0
  5. package/dist/cards-ui/index.d.ts +4 -0
  6. package/dist/cards-ui/index.d.ts.map +1 -0
  7. package/dist/core/cards-ui-contract.d.ts +30 -0
  8. package/dist/core/cards-ui-contract.d.ts.map +1 -0
  9. package/dist/core/cards.d.ts +130 -0
  10. package/dist/core/cards.d.ts.map +1 -0
  11. package/dist/core/config.d.ts +21 -1
  12. package/dist/core/config.d.ts.map +1 -1
  13. package/dist/core/editor-gate.d.ts +47 -0
  14. package/dist/core/editor-gate.d.ts.map +1 -0
  15. package/dist/core/flags.d.ts +73 -0
  16. package/dist/core/flags.d.ts.map +1 -0
  17. package/dist/core/inapp.d.ts +13 -1
  18. package/dist/core/inapp.d.ts.map +1 -1
  19. package/dist/core/links.d.ts +27 -0
  20. package/dist/core/links.d.ts.map +1 -0
  21. package/dist/core/network.d.ts.map +1 -1
  22. package/dist/core/page-context.d.ts +101 -0
  23. package/dist/core/page-context.d.ts.map +1 -0
  24. package/dist/core/page-edits.d.ts +129 -0
  25. package/dist/core/page-edits.d.ts.map +1 -0
  26. package/dist/core/placements.d.ts +218 -0
  27. package/dist/core/placements.d.ts.map +1 -0
  28. package/dist/core/sdk-host-files.d.ts +5 -0
  29. package/dist/core/sdk-host-files.d.ts.map +1 -0
  30. package/dist/core/sdk.d.ts +36 -0
  31. package/dist/core/sdk.d.ts.map +1 -1
  32. package/dist/editor/index.d.ts +4 -0
  33. package/dist/editor/index.d.ts.map +1 -0
  34. package/dist/editor/visual-editor.d.ts +39 -0
  35. package/dist/editor/visual-editor.d.ts.map +1 -0
  36. package/dist/index.d.mts +201 -3
  37. package/dist/index.d.ts +8 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/joryio-cards-ui.min.js +7 -0
  40. package/dist/joryio-cards-ui.min.js.map +1 -0
  41. package/dist/joryio-editor.min.js +7 -0
  42. package/dist/joryio-editor.min.js.map +1 -0
  43. package/dist/joryio-sw.js +1 -1
  44. package/dist/joryio.cjs.js +7200 -3513
  45. package/dist/joryio.min.js +2 -2
  46. package/dist/joryio.min.js.map +1 -1
  47. package/dist/joryio.mjs +7192 -3514
  48. package/dist/joryio.umd.js +7200 -3513
  49. package/package.json +4 -1
  50. package/src/cards-ui/card-feed-view.ts +249 -0
  51. package/src/cards-ui/index.ts +26 -0
  52. package/src/core/cards-ui-contract.ts +58 -0
  53. package/src/core/cards.ts +843 -0
  54. package/src/core/config.ts +86 -2
  55. package/src/core/editor-gate.ts +158 -0
  56. package/src/core/flags.ts +372 -0
  57. package/src/core/inapp.ts +283 -152
  58. package/src/core/links.ts +104 -0
  59. package/src/core/network.ts +5 -2
  60. package/src/core/page-context.ts +460 -0
  61. package/src/core/page-edits.ts +1036 -0
  62. package/src/core/placements.ts +1431 -0
  63. package/src/core/sdk-host-files.ts +93 -0
  64. package/src/core/sdk.ts +378 -1
  65. package/src/editor/index.ts +27 -0
  66. package/src/editor/visual-editor.ts +301 -0
  67. package/src/index.ts +33 -0
  68. package/src/snippet/loader.js +25 -1
package/CHANGELOG.md CHANGED
@@ -2,9 +2,53 @@
2
2
 
3
3
  ## 1.4.0 - 2026-11-18
4
4
 
5
+ Changed (1.4.0-beta.4): the page-edit site settings (`GET /v1/in-app/site-settings`) are asked once per SDK session instead of once per page load. The answer is kept in `sessionStorage`, per workspace (`jry_page_edit_site_<hash>`, the SDK-key hash of the other page-edit stores), tied to the session id - a new session asks again - and refreshed at most every `SITE_SETTINGS_SESSION_REFRESH_SECONDS` (600, new export) within the session; the server's `ttlSeconds` (60, the browser and CDN cache lifetime) no longer shortens that. With a stored answer a page no longer waits for the site settings before asking for its edits: the stored answer is used at once and refreshed in the background when it is 10 minutes old (if that refresh finds a newly live campaign, the page asks for its edits then). What this means for marketers: a page-edit campaign launched while a visitor is on the site reaches that visitor within 10 minutes (on a new session at once); pausing is not delayed, because `/v1/in-app/page-edits` checks every campaign's liveness on every page. A failed request is still "unknown": nothing is stored, the page asks `/v1/in-app/page-edits` as before, and a failed background refresh drops the stale answer. `reset()`, `resetTo()`, `wipeData()` and every consent change remove the stored answer, as the other per-workspace stores; `identify()` keeps it - it is the same for every visitor. No wire changes. Web only: iOS, Android, React Native and Unity are not applicable - page edits are a browser concept (no DOM, no page loads in an app screen).
6
+
7
+ Fixed (1.4.0-beta.4): the lazily loaded files (`joryio-editor.min.js`, `joryio-cards-ui.min.js`) are loaded from the folder `joryio.min.js` itself was loaded from first (read from its script tag; https only, file name `joryio.min.js`), then from `sdk.joryio.com/web/<version>/` and `/web/<major>/` as before. Before, a beta (whose `SDK_VERSION` says the final version) loaded from `sdk.joryio.com/web/1.4.0-beta.4/` or from the npm package's `dist/` on a CDN asked `web/1.4.0/` (not published yet) and then `web/1/` - the previous final's editor and card feed. A core loaded from the major channel `web/<major>/` keeps the exact version first (the channel moves); an SDK bundled into the site's own code is unchanged; `editorScriptUrl` / `cardsUiScriptUrl` still replace all of it. `joryio.min.js` 69961 bytes gzip, budget raised to 70500. Web only: iOS, Android, React Native and Unity are not applicable - nothing is loaded at run time on those platforms.
8
+
9
+ Added: server-side page edits (Joryio BACKLOG D450, not released yet). The Joryio store plugins (WooCommerce / WordPress 1.6.45, Magento 1.4.33, PrestaShop 1.2.27) write the page edits that are the same for every visitor into the page's HTML and mark them: a JSON block `<script type="application/json" id="joryio-server-page-edits">` listing the edits applied, and `data-joryio-applied="<campaignId>:<editId>"` (with undo data in `data-joryio-orig`) on each changed element. The SDK never applies a marked edit again (same campaign, variant and edit), counts it as landed for the one exposure report, never holds a marked element back in the anti-flicker rule, and undoes a marked edit when the visitor's definitive answer no longer carries it (paused or changed campaign, a suppressed visitor, a control, page edits switched off for the site) or after a route change to another page. The marker is trusted only as a JSON `<script>` directly in `<head>` (an element with that id elsewhere - user content, DOM clobbering - is ignored), and an undo writes back only to an element that still shows exactly the value the server applied, only addresses that are http(s) or relative (anything else removes the attribute), never a style string from the marker (it removes the one declaration the server added), and a replaced text comes back rebuilt node by node through an allowlist of inline text elements and attributes (no script, frame, object, embed, meta, base, link, style, form, svg or math element, no on*, style, srcdoc or data attribute, URLs checked as above) - the kept markup is never made live as is. A failed answer keeps the page as sent. `joryio.min.js` 68943 bytes gzip, budget raised to 69300. No new options; a page without the marker behaves exactly as before. Web only: iOS, Android, React Native and Unity are not applicable - server-rendered HTML is a browser concept.
10
+
11
+ Added: the default placement view draws an item's recommended products (Joryio BACKLOG D444) - a horizontal row of product cards (image, title, price with the compare-at price struck through, optional button) below the item's content, or alone for a data item. A tap reports `clicked` with elementId `product:<id>` and opens the product link like a `deep_link` button, through `setLinkHandler` first (source `placement`). `insertPlacement` options `showProducts` (default true), `productButtonText`, `productCardWidth`; CSS classes `joryio-placement-product*`. New exports `PLACEMENT_PRODUCT_ELEMENT_PREFIX`, `PLACEMENT_PRODUCT_CARD_WIDTH`, `placementProductElementId`. A data item with products was not drawn before; `showProducts: false` keeps that.
12
+
13
+ Changed: the default card feed's drawing code (`mountCardFeed`) is its own file, `joryio-cards-ui.min.js`, next to `joryio.min.js` on the SDK host (`sdk.joryio.com/web/<version>/`, then `/web/<major>/`) and in the npm package's `dist/` (Joryio BACKLOG D444, not released yet), so a visitor of a page without a feed never downloads it: `joryio.min.js` 68077 -> 67289 bytes gzip, the new file 2242 gzip; the size budget is lowered to 68300. The card data API (`getCards`, `getUnreadCardCount`, `markCard*`, `dismissCard`, `refreshCards`, `onCardsUpdated`) stays in the core. `mountCardFeed(element, options)` keeps its signature and still returns its handle at once; the feed is drawn as soon as the file has loaded (at once when it already is, such as for a second feed), and `remove()` before that draws nothing. If the file cannot be loaded - a Content-Security-Policy whose `script-src` does not allow `https://sdk.joryio.com`, a network failure - the SDK logs a warning, sets `data-joryio-card-feed-state="unavailable"` on the element and throws nothing; the data API keeps working and the next `mountCardFeed` tries again. New init option `cardsUiScriptUrl` for a self-hosted SDK; a bundler can `import '@joryio/web-sdk/dist/joryio-cards-ui.min.js'` once to skip the fetch. The renderer gets only what the public card API already offers (the feed view, the reports, the link handler, the next page), through the core's handle - never the delivery tokens or the storage. No wire changes. Web only: iOS, Android, React Native and Unity are not applicable - their feed views are compiled into the app binary, which is not downloaded per page view, so there is nothing to split (React Native's `<JoryioCardFeed />` and Unity wrap those native SDKs).
14
+
15
+ Changed: the point-and-click page editor is its own file, `joryio-editor.min.js`, next to `joryio.min.js` on the SDK host (`sdk.joryio.com/web/<version>/`, then `/web/<major>/`) and in the npm package's `dist/` (Joryio BACKLOG D444, not released yet). The core keeps only the handshake: the file is loaded only in a tab the Joryio dashboard opened with `?joryio_editor=1`, and only after Joryio accepted the editor token - no visitor downloads it. `joryio.min.js` is 238,080 bytes (63,464 gzip), down from 240,133 (64,424 gzip); the editor file is 7,565 bytes (3,111 gzip). A site with a Content-Security-Policy needs `script-src https://sdk.joryio.com` for the editor (as for the SDK itself). New init option `editorScriptUrl` for a self-hosted SDK.
16
+
17
+ Added: `pageEdits: false` (init). The SDK never applies a page edit, never holds an element back and never loads the editor, whatever Joryio sends.
18
+
19
+ Added: site settings for page edits. Before asking for a page's edits the SDK reads `GET /v1/in-app/site-settings?sdkKey=` - a CORS-simple request, the key in the query string only, cached by the browser and the CDN for 60 s, the same answer for every visitor. Page edits switched off for the site, or no live page-edit campaign: no `/v1/in-app/page-edits` request on that page view, and edits applied from the session cache are undone. On a visitor's first view of a page (no selectors remembered for it yet) the SDK holds back the elements the site's live page edits change, from that answer - selectors only, never the body, inside the same 300 ms from the start of the page.
20
+
21
+ Added: UTM in page targeting. With `captureUTM` on, every in-app, placement and page-edit request's `context` carries `utm: { session, firstTouch }` - the five standard fields (`source`, `medium`, `campaign`, `term`, `content`) of this session's campaign and of this browser's first one, from what the SDK already recorded; never the query string. Page rules on the sources `utm_session` and `utm_first_touch` are matched on the device for overlays exactly as the server matches them.
22
+
23
+ Changed: the placements session cache and the page-edit stores are per workspace - their names carry a hash of the SDK key (`joryio_placements_v1_<hash>`, `jry_page_edits_<hash>`, `jry_page_edit_selectors_<hash>`, the scheme of the flags cache), so two workspaces on one site never read each other's answers. The unscoped stores of earlier builds are removed on load.
24
+
25
+ Web only: iOS, Android, React Native and Unity are not applicable - page edits, the page editor, page context and UTM landing data are browser concepts (no DOM, no URL, no query-string campaign landing in an app screen); the app equivalent is placements.
26
+
27
+ Added: `setLinkHandler((link) => boolean)` / `clearLinkHandler()` (work before `init()`, stubbed by the snippet): every link the SDK is about to open - an in-app message button or link, a placement button or HTML link, a card click - reaches your handler first as a `JoryioLink` (`url`, `source`: `in_app` / `placement` / `card`, `campaignId`, `placementKey`, `itemId`, `cardId`, `isAppDeepLink`, `openDefault()`), so a single-page app can route `https://shop.example/sale` with its own router instead of a new tab. Return true to take it over, false for the behaviour without a handler. Synchronous, so the click's user activation still holds when the SDK opens a tab. A root-relative in-app link reaches the handler resolved against the page. Refused schemes (`javascript:`, `data:`, ...) never reach it. `onDeepLink` options keep receiving app deep links, after the handler declines. `push` is part of the shared source values but never emitted on web: a push click is handled by the service worker. The same names and source values on all five SDKs.
28
+
29
+ Added: page edits and the visual editor (Joryio BACKLOG D444 Phase 4). Page-edit campaigns change elements of the page by CSS selector - `replace_text` (always set as text), `replace_image` and `replace_link` (absolute http(s) only), `hide`, `insert_placement` - fetched from `POST /v1/in-app/page-edits` for the current page, re-checked on the device (an untrusted edit is skipped whole), applied as elements appear (MutationObserver), undone and re-applied on a route change. Anti-flicker hides only the elements edited on this page last time, for at most `PAGE_EDIT_ANTI_FLICKER_MS` (300), never the body; static edits are remembered for the session, personalized ones never stored. Exposure `in_app.displayed` once an edit landed; a control visitor reports `in_app.control_viewed` once the element is on the page. A tab opened by the dashboard with `?joryio_editor=1` shows the point-and-click picker after the editor token (sent by `postMessage`, never in the URL) is verified with `POST /v1/in-app/editor/verify`; messages go only to the dashboard origin the token names. New capability `page_edits`.
30
+
31
+ Added: page context (Joryio BACKLOG D444 Phase 4, docs/PLACEMENTS_WEBSITE_LAYER.md) - campaigns can target pages by URL rules and page / dataLayer variables. Every in-app, placement and page-edit request reports the page URL (origin + path, never the query string or the fragment), the variables set with the new `setPageVariables(vars)`, and only the globals and dataLayer keys listed in the new `pageContext: { pageVariables, dataLayerVariables, dataLayerName }` option. Single-page-app route changes (`pushState`, `replaceState`, back) are new pages. New in-app trigger types `page_view`, `exit_intent`, `scroll_depth` (percent) and `time_on_page` (visible seconds). Overlays check their campaign's `pageTargeting` before every display and on every route change; the display-time re-check sends the page. A placement answer marked `pageScoped` is cached per page and asked again on a route change. New capability `page_context`. `setPageVariables` is stubbed by the snippet.
32
+
33
+ Added: content cards (Joryio BACKLOG D444 Phase 3, docs/PLACEMENTS_PLAN.md section 11) - a message center inside your site: a feed per person of cards (title, body, image, optional button / link, pinned, expiry) sent from Card campaigns and the journey step "Add card". `mountCardFeed(element, options?)` draws a plain feed into an element and returns a handle with `remove()` - image, title, body, button, a pinned marker, an unread dot and a dismiss x, drawn as text with the page's own font and colors (`.joryio-card-*` classes, no stylesheet of its own); `emptyText` ("No messages yet"), `pinnedLabel`, `dismissLabel` and `unreadLabel` can be replaced, and `onDeepLink` routes `myapp://` links. `getCards({ cursor? })` returns `{ cards, unreadCount, nextCursor, stateScope }` to draw yourself, `getUnreadCardCount()` reads the cache, `markCardViewed` / `markCardRead` / `markCardClicked` / `dismissCard` take a card or its id, `refreshCards()`, and `onCardsUpdated(cb)` returns an unsubscribe. One `POST /v1/in-app/cards` (20 a page, `cards` capability, `etag` on the first page) cached in memory and `sessionStorage` for `CARD_FEED_TTL_SECONDS` (300) for the same visitor, at most once per `CARD_MIN_REFRESH_SECONDS` (30) with extra calls coalesced; `notModified`, `success: false` and HTTP 429 keep the cache; identify, reset, another tab switching the visitor and any consent change discard the cache and any answer still on its way. Reports are `POST /v1/in-app/track` `{ deliveryToken, action, sessionId }` with `viewed` / `read` / `clicked` / `dismissed`, each once per card, applied to the cache at once; the feed reports viewed then read once half a card was on screen for 1 s. An anonymous visitor (`stateScope: "device"`) keeps read / dismissed in `localStorage` (up to 500, cleared on identify, reset and wipeData). Without tracking consent nothing is requested or reported. Links follow the placement rule: http(s) in a new tab, an app deep link to `onDeepLink`, `javascript:` / `data:` / `file:` / `intent:` and the like never. The placement viewability measurement is now one shared helper used by placements and the feed. The nine methods are stubbed by the snippet. The same names and wire values on all five SDKs.
34
+
35
+ Added: placements (Joryio BACKLOG D444, docs/PLACEMENTS_PLAN.md) - named spots inside your pages that Joryio fills per visitor from placement campaigns and journey steps. `insertPlacement(key, element, options?)` draws one into an element and returns a handle with `remove()`; `<div data-joryio-placement="key"></div>` is filled automatically, including elements added later (`inApp.autoMountPlacements: false` turns that off). `getPlacements([keys])` hands you the data to draw yourself, with `item.markDisplayed()`, `item.markClicked(elementId?)`, `item.markDismissed()` and, for a held-out visitor, `placement.markDisplayed()`; `refreshPlacements(keys?)` and `onPlacementsUpdated(cb)` (returns an unsubscribe). Every key asked for within 50 ms goes in one `POST /v1/in-app/placements` (up to 10 keys), answers are cached for the placement's `ttlSeconds` in memory and `sessionStorage` (for the same visitor only), and a key is fetched at most once per `PLACEMENT_MIN_REFRESH_SECONDS` (30); a 429 keeps the cache. An item counts as displayed once `PLACEMENT_VIEWABLE_FRACTION` (0.5) of it was in view for `IN_APP_DISPLAY_DWELL_MS` with the page visible; a held-out visitor's empty spot reports `in_app.control_viewed` the same way. Content is never swapped while the spot is on screen. HTML items use the overlay's sandboxed frame and nonce CSP and need `allowHtmlJsInAppMessages`. Without tracking consent the request names nobody (no user id, anonymous id or session; `trackingConsent` says why) and nothing is reported. New sync capabilities `placements` and `content.data`. The four methods are stubbed by the snippet. The same names and wire values on all five SDKs.
36
+
37
+ Fixed: content cards (D444, not released yet) - the device caches are per workspace, like the placements cache and the flags answer: the feed cache in `sessionStorage` and an anonymous visitor's read / dismissed state in `localStorage` now carry a hash of the SDK key (`joryio_cards_v1_<hash>`, `joryio_cards_device_v1_<hash>`), so two workspaces on one site never read each other's cards. The old origin-wide `joryio_cards_v1` and `joryio_cards_device_v1` entries are never read and are removed on start. No wire changes.
38
+
39
+ Fixed: placements (D444, not released yet) - the session cache is per workspace, like the flags answer below: its `sessionStorage` key now carries a hash of the SDK key, so two workspaces on one site never read each other's placements. The old origin-wide `joryio_placements_v1` entry is never read and is removed on start. No wire changes.
40
+
41
+ Fixed: feature flags (D446, not released yet) - the stored answer is per workspace. It was kept under one localStorage key for the whole origin, so two workspaces on one site that know a person by the same user id could read each other's flags. The key now carries a hash of the SDK key (the same one every other stored key uses); the old unscoped `jry_flags` is never read and is removed on start. No wire changes.
42
+
43
+ Fixed: feature flags (D446, not released yet). An exposure is logged once per visitor, flag and variant per session - after an account switch in the same session the next person's first read of a flag is their own exposure (it was skipped as already logged). An answer that was in flight when the visitor changed is still discarded, and the new visitor's flags are now fetched right after it (they waited for the next refresh). Found while building the iOS and Android flags.
44
+
45
+ Added: feature flags and remote config (Joryio BACKLOG D446). `getFlag(key, default)` and the typed `getBoolFlag`, `getStringFlag`, `getNumberFlag`, `getJsonFlag` return the value Joryio decided for this visitor, or your in-code default before the first answer, for a flag Joryio did not send, for a value of another type, or without tracking consent; they never wait for the network. `getAllFlags()`, `refreshFlags()` and `onFlagsUpdated(cb)` (returns an unsubscribe). Nothing is fetched until the page uses flags; then one `POST /v1/flags/evaluate` returns every flag, kept in localStorage for the same visitor only and refreshed on start, when the page is shown again (at most once per `FLAGS_MIN_REFRESH_SECONDS`, 60), on identify / reset and on a consent change, with the `etag` so an unchanged answer is not sent again. The first read of a value in a session logs an exposure (`POST /v1/flags/exposures`, batched, once per flag and variant per session, skipped when the answer says `logExposure: false`). Browsers have no silent push, so `jry_sync: "flags"` applies to the native SDKs only. The eight methods are stubbed by the snippet. The same names and wire values on all five SDKs.
46
+
47
+ Added: every request names the SDK and its version - `X-Joryio-SDK: web` and `X-Joryio-SDK-Version: <version>` - on the event batches, the unload keepalive hand-off, in-app sync / resolve / track / form submit and every other API call (BACKLOG D427). Settings > Apps shows the oldest version each app ran in the last 7 days and when a newer SDK is out. The same wire names on all five SDKs; the web SDK has no bridge, so it never sends `X-Joryio-SDK-Wrapper`. The backend allows the headers in CORS on the public SDK routes. No personal data, nothing new stored on the device.
48
+
5
49
  Added: recognise people who click your messages (Joryio BACKLOG D407). A tracked link from a Joryio message lands with `jr_t`, an opaque token Joryio signs and encrypts (no personal data in it, 7 days; added only to links to the workspace's own websites). On load the SDK removes `jr_t` from the address bar with `history.replaceState` - before the landing page is recorded, so the token is never bookmarked, shared or stored; `jr_cid` / `jr_jid` / utm_* stay - and, only while tracking is allowed (consent granted, not opted out, Do Not Track respected; held in memory while consent is `pending`, dropped on a denial or opt-out), sends it once to `POST /v1/identify-link` as `{ token, anonymousId }`. The server uses it only to attribute this visitor's events (Session Start, page views, conversions) to the recipient - it never identifies the browser as the contact. Not sent when a user is identified on the browser or a storefront identity token is held for this visitor - a link never overrides a stronger identity. New method `identifyFromLink(url)` for single-page apps and routers (also stubbed by the snippet). The same name and wire on all five SDKs.
6
50
 
7
- Added: `resetTo(anonymousId)` - everything `reset()` does, then the anonymous id you pass instead of a random one, for an app that keeps its own visitor id (BACKLOG D366). The id must be 8 to 255 letters, digits, `.`, `_`, `:` or `-`, must not have the shape of a Joryio profile id (24 lowercase hex) and must not be the user id the SDK holds; a refused id is logged and the call is a plain `reset()` (a random id), so a logout is never skipped. The same name and rule on all five SDKs. No wire changes: the server sees an ordinary anonymous id. Also stubbed by the snippet.
51
+ Added: `resetTo(anonymousId)` - everything `reset()` does, then the anonymous id you pass instead of a random one, for an app that keeps its own visitor id (BACKLOG D366). The id must be 8 to 255 letters, digits, `.`, `_`, `:` or `-`, must not have the shape of a Joryio profile id (24 lowercase hex) and must not be the user id the SDK holds; a refused id is logged and the call is a plain `reset()` (a random id), so a logout is never skipped. The same name and rule on all five SDKs. No wire changes: the server sees an ordinary anonymous id. Like `reset()`, `resetTo` drops a click-link token the SDK has not sent yet (one held while consent is pending), so the link is never attributed to the next visitor on the browser. Also stubbed by the snippet.
8
52
 
9
53
  Changed (BACKLOG D366, before any release of resetTo): it also refuses the anonymous id the SDK holds while a user is signed in - that id is tied to the signed-in person's profile, and adopting it would hand their in-app messages, events, form attribution and push subscription to the next person on a shared device (a random id is used instead). `resetTo` now resolves `true` (adopted) or `false` (refused, or the SDK is not initialized). The same on all five SDKs.
10
54
 
package/README.md CHANGED
@@ -33,7 +33,7 @@ If `init` fails (a missing or malformed SDK key - the reason is logged to the co
33
33
 
34
34
  ```html
35
35
  <script>
36
- !function(){var e=window.joryio=window.joryio||[];if(!e.initialize)if(e.invoked)window.console&&console.error&&console.error("Joryio snippet included twice.");else{e.invoked=!0,e.methods=["init","track","identify","identifyFromLink","addAlias","setAttributes","setAttribute","incrementAttribute","unsetAttribute","addToArray","removeFromArray","reset","resetTo","flush","optOut","optIn","updateConsent","getTrackingConsent","isUserOptedOut","setSdkAuthenticationToken","setSdkAuthenticationErrorCallback","setStorefrontIdentityToken","setStorefrontIdentityTokenProvider","getAnonymousId","getUserId","ready","getIdentity","getSessionInfo","getUTMData","updateUTM","syncInAppCampaigns","getInAppCampaigns","displayInAppCampaign","dismissInAppMessage","trackInAppConversion","ecommerce","wipeData","destroy"],e.keep=["init","optOut","optIn","updateConsent","wipeData"],e.factory=function(t){return function(){var n=Array.prototype.slice.call(arguments);if(n.unshift(t),e.length>=1e3)for(var i=0;i<e.length;i++)if(e.keep.indexOf(e[i][0])<0){e.splice(i,1);break}return e.push(n),/^(get|is)[A-Z]/.test(t)?void 0:e}};for(var t=0;t<e.methods.length;t++){var n=e.methods[t];e[n]=e.factory(n)}e.load=function(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://sdk.joryio.com/web/1/joryio.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)},e.load()}}();
36
+ !function(){var e=window.joryio=window.joryio||[];if(!e.initialize)if(e.invoked)window.console&&console.error&&console.error("Joryio snippet included twice.");else{e.invoked=!0,e.methods=["init","track","identify","identifyFromLink","addAlias","setAttributes","setAttribute","incrementAttribute","unsetAttribute","addToArray","removeFromArray","reset","resetTo","flush","optOut","optIn","updateConsent","getTrackingConsent","isUserOptedOut","setSdkAuthenticationToken","setSdkAuthenticationErrorCallback","setStorefrontIdentityToken","setStorefrontIdentityTokenProvider","getAnonymousId","getUserId","ready","getIdentity","getSessionInfo","getUTMData","updateUTM","syncInAppCampaigns","getInAppCampaigns","displayInAppCampaign","dismissInAppMessage","trackInAppConversion","insertPlacement","getPlacements","refreshPlacements","onPlacementsUpdated","setPageVariables","getCards","getUnreadCardCount","markCardViewed","markCardRead","markCardClicked","dismissCard","refreshCards","onCardsUpdated","mountCardFeed","setLinkHandler","clearLinkHandler","getFlag","getBoolFlag","getStringFlag","getNumberFlag","getJsonFlag","getAllFlags","refreshFlags","onFlagsUpdated","ecommerce","wipeData","destroy"],e.keep=["init","optOut","optIn","updateConsent","wipeData"],e.factory=function(t){return function(){var n=Array.prototype.slice.call(arguments);if(n.unshift(t),e.length>=1e3)for(var i=0;i<e.length;i++)if(e.keep.indexOf(e[i][0])<0){e.splice(i,1);break}return e.push(n),/^(get|is)[A-Z]/.test(t)?void 0:e}};for(var t=0;t<e.methods.length;t++){var n=e.methods[t];e[n]=e.factory(n)}e.load=function(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://sdk.joryio.com/web/1/joryio.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)},e.load()}}();
37
37
  joryio.init({ sdkKey: 'jry_sdk_web_YOUR_SDK_KEY' });
38
38
  </script>
39
39
  ```
@@ -0,0 +1,4 @@
1
+ import type { MountCardFeedOptions } from '../core/cards';
2
+ import type { CardFeedHost, CardFeedView } from '../core/cards-ui-contract';
3
+ export declare function mountFeedView(element: HTMLElement, options: MountCardFeedOptions, host: CardFeedHost): CardFeedView;
4
+ //# sourceMappingURL=card-feed-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-feed-view.d.ts","sourceRoot":"","sources":["../../src/cards-ui/card-feed-view.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAQ,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQ5E,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,YAAY,GAAG,YAAY,CAwOnH"}
@@ -0,0 +1,4 @@
1
+ import { type CardsUiBundleApi } from '../core/cards-ui-contract';
2
+ declare const api: CardsUiBundleApi;
3
+ export { api as cardsUiApi };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cards-ui/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAyC,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAEzG,QAAA,MAAM,GAAG,EAAE,gBAGV,CAAC;AAMF,OAAO,EAAE,GAAG,IAAI,UAAU,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { Card, CardFeed, MountCardFeedOptions } from './cards';
2
+ import type { ViewTracker } from './placements';
3
+ import type { Logger } from '../utils/logger';
4
+ export declare const CARDS_UI_GLOBAL = "__joryioCardsUi";
5
+ export declare const CARDS_UI_API_VERSION = 1;
6
+ export declare const CARDS_UI_BUNDLE_FILE = "joryio-cards-ui.min.js";
7
+ export interface CardFeedHost {
8
+ view(): CardFeed;
9
+ generation(): number;
10
+ markCardViewed(card: Card): void;
11
+ markCardRead(card: Card): void;
12
+ markCardClicked(card: Card): void;
13
+ dismissCard(card: Card): void;
14
+ routeLink(url: string, context: {
15
+ campaignId?: string;
16
+ cardId?: string;
17
+ }, fallback: () => void): void;
18
+ loadMore(): Promise<void>;
19
+ trackViewable(node: Element, onViewable: () => void): ViewTracker;
20
+ logger: Logger;
21
+ }
22
+ export interface CardFeedView {
23
+ render(): void;
24
+ remove(): void;
25
+ }
26
+ export interface CardsUiBundleApi {
27
+ version: number;
28
+ mount(element: HTMLElement, options: MountCardFeedOptions, host: CardFeedHost): CardFeedView;
29
+ }
30
+ //# sourceMappingURL=cards-ui-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards-ui-contract.d.ts","sourceRoot":"","sources":["../../src/core/cards-ui-contract.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAG7D,MAAM,WAAW,YAAY;IAE3B,IAAI,IAAI,QAAQ,CAAC;IAEjB,UAAU,IAAI,MAAM,CAAC;IACrB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IACjC,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAC/B,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClC,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAE9B,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAEtG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,GAAG,WAAW,CAAC;IAClE,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,YAAY;IAE3B,MAAM,IAAI,IAAI,CAAC;IAEf,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC;CAC9F"}
@@ -0,0 +1,130 @@
1
+ import { Logger } from '../utils/logger';
2
+ import { IdentityManager } from './identity';
3
+ import { SessionManager } from './session';
4
+ import { InAppAuthProvider } from './inapp';
5
+ import type { LinkRouter } from './links';
6
+ import { PlacementConsent } from './placements';
7
+ export declare const CARD_MIN_REFRESH_SECONDS = 30;
8
+ export declare const CARD_FEED_TTL_SECONDS = 300;
9
+ export declare const CARD_SDK_CAPABILITY = "cards";
10
+ export declare const CARD_ACTIONS: {
11
+ readonly VIEWED: "viewed";
12
+ readonly READ: "read";
13
+ readonly CLICKED: "clicked";
14
+ readonly DISMISSED: "dismissed";
15
+ };
16
+ export type CardAction = (typeof CARD_ACTIONS)[keyof typeof CARD_ACTIONS];
17
+ export type CardStateScope = 'server' | 'device';
18
+ export declare const cardsFeedStorageKey: (sdkKey: string) => string;
19
+ export declare const cardsDeviceStorageKey: (sdkKey: string) => string;
20
+ export interface Card {
21
+ id: string;
22
+ campaignId: string;
23
+ variantId: string | null;
24
+ title: string | null;
25
+ body: string | null;
26
+ imageUrl: string | null;
27
+ buttonText: string | null;
28
+ url: string | null;
29
+ pinned: boolean;
30
+ createdAt: string;
31
+ expiresAt: string | null;
32
+ read: boolean;
33
+ clicked: boolean;
34
+ }
35
+ export interface CardFeed {
36
+ cards: Card[];
37
+ unreadCount: number;
38
+ nextCursor: string | null;
39
+ stateScope: CardStateScope;
40
+ }
41
+ export interface GetCardsOptions {
42
+ cursor?: string | null;
43
+ }
44
+ export type CardsUpdatedCallback = (feed: CardFeed) => void;
45
+ export interface MountCardFeedOptions {
46
+ emptyText?: string;
47
+ pinnedLabel?: string;
48
+ dismissLabel?: string;
49
+ unreadLabel?: string;
50
+ onDeepLink?: (url: string, card: Card) => void;
51
+ onRender?: (feed: CardFeed, element: HTMLElement) => void;
52
+ }
53
+ export interface CardFeedHandle {
54
+ element: HTMLElement;
55
+ remove(): void;
56
+ }
57
+ export interface CardRuntime {
58
+ consent: () => PlacementConsent | null;
59
+ requestTimeoutMs?: number;
60
+ noteStatus?: (status: number, data: any) => void;
61
+ cardsUiScriptUrl?: string;
62
+ loadScript?: (src: string) => Promise<void>;
63
+ }
64
+ export declare class CardManager {
65
+ private apiEndpoint;
66
+ private sdkKey;
67
+ private identity;
68
+ private session;
69
+ private logger;
70
+ private runtime;
71
+ private auth?;
72
+ links: LinkRouter | null;
73
+ private wireCards;
74
+ private serverUnread;
75
+ private nextCursor;
76
+ private stateScope;
77
+ private etag;
78
+ private ttlSeconds;
79
+ private fetchedAt;
80
+ private lastNetworkAt;
81
+ private inflight;
82
+ private deferredTimer;
83
+ private listeners;
84
+ private mounts;
85
+ private reported;
86
+ private overlayRead;
87
+ private overlayClicked;
88
+ private overlayDismissed;
89
+ private deviceRead;
90
+ private deviceDismissed;
91
+ private generation;
92
+ private destroyed;
93
+ private cardsUi;
94
+ private cardsUiLoading;
95
+ constructor(apiEndpoint: string, sdkKey: string, identity: IdentityManager, session: SessionManager, logger: Logger, runtime: CardRuntime, auth?: InAppAuthProvider | undefined);
96
+ getCards(options?: GetCardsOptions): Promise<CardFeed>;
97
+ getUnreadCardCount(): number;
98
+ refreshCards(): Promise<void>;
99
+ onCardsUpdated(callback: CardsUpdatedCallback): () => void;
100
+ markCardViewed(card: Card | string): void;
101
+ markCardRead(card: Card | string): void;
102
+ markCardClicked(card: Card | string): void;
103
+ dismissCard(card: Card | string): void;
104
+ mountCardFeed(element: HTMLElement, options?: MountCardFeedOptions): CardFeedHandle | null;
105
+ invalidate(clearDeviceState: boolean): void;
106
+ destroy(): void;
107
+ private fresh;
108
+ private fetch;
109
+ private defer;
110
+ private post;
111
+ private requestFirstPage;
112
+ private loadPage;
113
+ private notify;
114
+ private key;
115
+ private view;
116
+ private report;
117
+ private send;
118
+ private loadCardsUi;
119
+ private attach;
120
+ private feedHost;
121
+ private unmount;
122
+ private render;
123
+ private subjectKey;
124
+ private removeLegacyStorage;
125
+ private persistFeed;
126
+ private loadFeedCache;
127
+ private persistDeviceState;
128
+ private loadDeviceState;
129
+ }
130
+ //# sourceMappingURL=cards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../src/core/cards.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAiB,MAAM,cAAc,CAAC;AAK/D,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAE3C,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAG1E,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAejD,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,KAAG,MAA8D,CAAC;AACpH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,KAAG,MAAqE,CAA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hB,OAAO,CAAC,OAAO;IAWf,OAAO,CAAC,MAAM;IAUd,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,WAAW;IAqBnB,OAAO,CAAC,aAAa;IAoBrB,OAAO,CAAC,kBAAkB;IAqB1B,OAAO,CAAC,eAAe;CAexB"}
@@ -1,4 +1,8 @@
1
1
  export declare const SDK_VERSION = "1.4.0";
2
+ export declare const SDK_PLATFORM_HEADER = "X-Joryio-SDK";
3
+ export declare const SDK_VERSION_HEADER = "X-Joryio-SDK-Version";
4
+ export declare const SDK_PLATFORM = "web";
5
+ export declare function sdkIdentityHeaders(): Record<string, string>;
2
6
  export declare const DEFAULT_API_ENDPOINT = "https://api-eu1.joryio.com/api";
3
7
  export declare function normalizeApiEndpoint(raw: string | undefined | null): string;
4
8
  export declare const DEFAULT_BATCH_SIZE = 50;
@@ -23,12 +27,21 @@ export interface InAppOptions {
23
27
  syncInterval?: number;
24
28
  displayOptions?: InAppDisplayOptions;
25
29
  allowHtmlJsInAppMessages?: boolean;
30
+ autoMountPlacements?: boolean;
26
31
  onMessageDisplay?: (message: any) => void;
27
32
  onMessageClick?: (message: any, action: string) => void;
28
33
  onMessageDismiss?: (message: any, action: string) => void;
29
34
  }
30
35
  export interface InitConfig {
31
36
  sdkKey: string;
37
+ pageContext?: {
38
+ pageVariables?: string[];
39
+ dataLayerVariables?: string[];
40
+ dataLayerName?: string;
41
+ };
42
+ pageEdits?: boolean;
43
+ editorScriptUrl?: string;
44
+ cardsUiScriptUrl?: string;
32
45
  apiEndpoint?: string;
33
46
  userId?: string;
34
47
  anonymousId?: string;
@@ -60,12 +73,19 @@ export interface InitConfig {
60
73
  logLevel?: 'error' | 'warn' | 'info' | 'debug';
61
74
  plugins?: Array<Plugin>;
62
75
  }
63
- export interface ResolvedConfig extends Required<Omit<InitConfig, 'userId' | 'plugins' | 'inApp' | 'sdkAuthenticationToken' | 'trackingConsent' | 'webPush' | 'storefrontIdentityToken' | 'storefrontIdentityTokenProvider'>> {
76
+ export interface ResolvedConfig extends Required<Omit<InitConfig, 'userId' | 'plugins' | 'inApp' | 'pageContext' | 'sdkAuthenticationToken' | 'trackingConsent' | 'webPush' | 'storefrontIdentityToken' | 'storefrontIdentityTokenProvider' | 'editorScriptUrl' | 'cardsUiScriptUrl'>> {
64
77
  userId?: string;
78
+ editorScriptUrl?: string;
79
+ cardsUiScriptUrl?: string;
65
80
  webPush?: boolean;
66
81
  trackingConsent?: 'granted' | 'denied' | 'pending';
67
82
  plugins: Array<Plugin>;
68
83
  inApp: Required<InAppOptions>;
84
+ pageContext: {
85
+ pageVariables: string[];
86
+ dataLayerVariables: string[];
87
+ dataLayerName: string;
88
+ };
69
89
  sdkAuthenticationToken?: string;
70
90
  storefrontIdentityToken?: string;
71
91
  storefrontIdentityTokenProvider?: InitConfig['storefrontIdentityTokenProvider'];
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,oBAAoB,mCAAmC,CAAC;AAarE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAY3E;AACD,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAM3C,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAE7C,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAC7C,eAAO,MAAM,uBAAuB,QAAiB,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IAElC,eAAe,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QA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B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CACpE;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AA6CD,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CA+FhE"}
@@ -0,0 +1,47 @@
1
+ import type { Logger } from '../utils/logger';
2
+ export declare const EDITOR_QUERY_FLAG = "joryio_editor";
3
+ export declare const EDITOR_MESSAGES: {
4
+ readonly READY: "joryio:editor-ready";
5
+ readonly TOKEN: "joryio:editor-token";
6
+ readonly ACTIVE: "joryio:editor-active";
7
+ readonly PICK: "joryio:editor-pick";
8
+ readonly CLOSE: "joryio:editor-close";
9
+ readonly CLOSED: "joryio:editor-closed";
10
+ };
11
+ export declare const EDITOR_GLOBAL = "__joryioEditor";
12
+ export declare const EDITOR_API_VERSION = 1;
13
+ export declare const EDITOR_BUNDLE_FILE = "joryio-editor.min.js";
14
+ export interface EditorBundleApi {
15
+ version: number;
16
+ start(ctx: {
17
+ dashboardOrigin: string;
18
+ opener: Window;
19
+ logger: Logger;
20
+ onStop: () => void;
21
+ }): {
22
+ stop(): void;
23
+ };
24
+ }
25
+ export declare function editorBundleUrls(override?: string): string[];
26
+ export declare function editorRequested(): boolean;
27
+ export declare class EditorGate {
28
+ private apiEndpoint;
29
+ private sdkKey;
30
+ private logger;
31
+ private options;
32
+ private opener;
33
+ private dashboardOrigin;
34
+ private verifying;
35
+ private session;
36
+ private off;
37
+ constructor(apiEndpoint: string, sdkKey: string, logger: Logger, options?: {
38
+ scriptUrl?: string;
39
+ load?: (src: string) => Promise<void>;
40
+ });
41
+ start(): void;
42
+ isActive(): boolean;
43
+ stop(): void;
44
+ private onMessage;
45
+ private loadAndStart;
46
+ }
47
+ //# sourceMappingURL=editor-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-gate.d.ts","sourceRoot":"","sources":["../../src/core/editor-gate.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAI9C,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AACjD,eAAO,MAAM,eAAe;;;;;;;CAOlB,CAAC;AAGX,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,GAAG,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG;QAAE,IAAI,IAAI,IAAI,CAAA;KAAE,CAAC;CAC/G;AAOD,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAE5D;AAGD,wBAAgB,eAAe,IAAI,OAAO,CAMzC;AAMD,qBAAa,UAAU;IAQnB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IAVjB,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,GAAG,CAA6B;gBAG9B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KAAO;IAIrF,KAAK,IAAI,IAAI;IAcb,QAAQ,IAAI,OAAO;IAInB,IAAI,IAAI,IAAI;YAUE,SAAS;YA8BT,YAAY;CAkB3B"}
@@ -0,0 +1,73 @@
1
+ import { Logger } from '../utils/logger';
2
+ import { IdentityManager } from './identity';
3
+ import { SessionManager } from './session';
4
+ export declare const FLAGS_MIN_REFRESH_SECONDS = 60;
5
+ export declare const FLAG_EXPOSURE_FLUSH_MS = 1000;
6
+ export declare const FLAG_SYNC_PUSH_VALUE = "flags";
7
+ export type FlagValueType = 'boolean' | 'string' | 'number' | 'json';
8
+ export type FlagReason = 'off' | 'rule' | 'default' | 'holdout' | 'archived' | 'override' | 'experiment';
9
+ export interface FlagResult {
10
+ value: unknown;
11
+ variant: string;
12
+ valueType: FlagValueType;
13
+ reason: FlagReason;
14
+ version: number;
15
+ logExposure: boolean;
16
+ }
17
+ export type FlagsUpdatedCallback = (changedKeys: string[]) => void;
18
+ interface FlagsAuth {
19
+ getSdkAuthHeaders(subjectUserId?: string | null, anonymousId?: string | null): Record<string, string>;
20
+ }
21
+ interface FlagsRuntime {
22
+ canSend: () => boolean;
23
+ requestTimeoutMs?: number;
24
+ noteStatus?: (status: number, data: unknown) => void;
25
+ attributes?: () => Record<string, unknown>;
26
+ }
27
+ export declare const flagsStorageKey: (sdkKey: string) => string;
28
+ export declare class FlagsManager {
29
+ private readonly apiEndpoint;
30
+ private readonly sdkKey;
31
+ private readonly identity;
32
+ private readonly session;
33
+ private readonly logger;
34
+ private readonly runtime;
35
+ private readonly auth?;
36
+ private flags;
37
+ private etag;
38
+ private fetchedAt;
39
+ private generation;
40
+ private inflight;
41
+ private inflightGeneration;
42
+ private listeners;
43
+ private exposed;
44
+ private pending;
45
+ private flushTimer;
46
+ private used;
47
+ private onVisible;
48
+ constructor(apiEndpoint: string, sdkKey: string, identity: IdentityManager, session: SessionManager, logger: Logger, runtime: FlagsRuntime, auth?: (FlagsAuth | null) | undefined);
49
+ start(): void;
50
+ private use;
51
+ destroy(): void;
52
+ onIdentityChanged(): void;
53
+ getFlag<T = unknown>(key: string, defaultValue: T): T;
54
+ getBoolFlag(key: string, defaultValue: boolean): boolean;
55
+ getStringFlag(key: string, defaultValue: string): string;
56
+ getNumberFlag(key: string, defaultValue: number): number;
57
+ getJsonFlag<T = unknown>(key: string, defaultValue: T): T;
58
+ getAllFlags(): Record<string, unknown>;
59
+ refreshFlags(): Promise<void>;
60
+ onFlagsUpdated(callback: FlagsUpdatedCallback): () => void;
61
+ private read;
62
+ private noteExposure;
63
+ flush(): void;
64
+ private subjectKey;
65
+ private requestBody;
66
+ private refresh;
67
+ private post;
68
+ private emit;
69
+ private load;
70
+ private save;
71
+ }
72
+ export {};
73
+ //# sourceMappingURL=flags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../src/core/flags.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAOrE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,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IAWb,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,WAAW;YAeL,OAAO;YAwCP,IAAI;IA2BlB,OAAO,CAAC,IAAI;IAUZ,OAAO,CAAC,IAAI;IAoBZ,OAAO,CAAC,IAAI;CASb"}
@@ -1,7 +1,9 @@
1
+ import { type PageContextTracker, type PageTargeting } from './page-context';
1
2
  import { Logger } from '../utils/logger';
2
3
  import type { InAppDisplayOptions } from './config';
3
4
  import { IdentityManager } from './identity';
4
5
  import { SessionManager } from './session';
6
+ import type { LinkRouter } from './links';
5
7
  import { StorageManager } from './storage';
6
8
  import { SdkAuthFailureInfo } from './network';
7
9
  export interface InAppAuthProvider {
@@ -62,9 +64,10 @@ export interface InAppCampaign {
62
64
  triggers: InAppTrigger[];
63
65
  reevaluateBeforeDisplay?: boolean;
64
66
  watchedAttributes?: string[];
67
+ pageTargeting?: PageTargeting;
65
68
  }
66
69
  export interface InAppTrigger {
67
- type: 'immediate' | 'event' | 'attribute_change' | 'attribute_threshold' | 'push_notification_tap';
70
+ type: 'immediate' | 'event' | 'attribute_change' | 'attribute_threshold' | 'push_notification_tap' | 'page_view' | 'exit_intent' | 'scroll_depth' | 'time_on_page';
68
71
  event?: string;
69
72
  attribute?: string;
70
73
  operator?: string;
@@ -112,6 +115,7 @@ export declare function scopeCssRules(rules: ArrayLike<unknown>, scope: string):
112
115
  export declare function normalizedElementId(raw: unknown): string | undefined;
113
116
  export declare function cssValue(raw: unknown): string | null;
114
117
  export declare class InAppMessagingManager {
118
+ links: LinkRouter | null;
115
119
  private pendingDelays;
116
120
  private logger;
117
121
  private identity;
@@ -144,6 +148,12 @@ export declare class InAppMessagingManager {
144
148
  private viewportTimer?;
145
149
  private allowHtmlJsInAppMessages;
146
150
  private capabilities;
151
+ private page;
152
+ private pageUnsubscribe;
153
+ private pageFired;
154
+ setPageContext(tracker: PageContextTracker | null): void;
155
+ private pageAllows;
156
+ private onPageSignal;
147
157
  private callHost;
148
158
  invalidate(): void;
149
159
  setAllowHtmlJsInAppMessages(value: boolean): void;
@@ -199,4 +209,6 @@ export declare class InAppMessagingManager {
199
209
  private boundedSetAdd;
200
210
  destroy(): void;
201
211
  }
212
+ export declare function buildInAppSrcdoc(campaignId: string, html: string, css: string, type: InAppCampaign['type'] | 'placement', bridgeKey?: string): string;
213
+ export declare function inAppTriggerFilterMatches(trigger: InAppTrigger, properties?: Record<string, any>): boolean;
202
214
  //# sourceMappingURL=inapp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inapp.d.ts","sourceRoot":"","sources":["../../src/core/inapp.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAQ/C,MAAM,WAAW,iBAAiB;IAGhC,iBAAiB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtG,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC;IAEnD,yBAAyB,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC;IAE/D,6BAA6B,CAAC,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5D,mBAAmB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE3E,gBAAgB,CAAC,IAAI,MAAM,GAAG,IAAI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push';
2
+ export interface JoryioLink {
3
+ url: string;
4
+ source: JoryioLinkSource;
5
+ campaignId?: string;
6
+ placementKey?: string;
7
+ itemId?: string;
8
+ cardId?: string;
9
+ isAppDeepLink: boolean;
10
+ openDefault: () => void;
11
+ }
12
+ export type JoryioLinkHandler = (link: JoryioLink) => boolean;
13
+ export interface LinkContext {
14
+ campaignId?: string;
15
+ placementKey?: string;
16
+ itemId?: string;
17
+ cardId?: string;
18
+ }
19
+ export declare class LinkRouter {
20
+ private onHandlerError;
21
+ private handler;
22
+ constructor(onHandlerError?: (error: unknown) => void);
23
+ setHandler(handler: JoryioLinkHandler | null): void;
24
+ get hasHandler(): boolean;
25
+ route(url: unknown, source: JoryioLinkSource, context: LinkContext, fallback: () => void): boolean;
26
+ }
27
+ //# sourceMappingURL=links.d.ts.map