@layers/react-native 2.1.6 → 3.1.0

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 (42) hide show
  1. package/android/build.gradle +62 -0
  2. package/android/src/main/AndroidManifest.xml +2 -0
  3. package/android/src/main/java/io/layers/sdk/reactnative/LayersAdvertisingIdModule.java +70 -0
  4. package/android/src/main/java/io/layers/sdk/reactnative/LayersDeviceInfoModule.java +54 -0
  5. package/android/src/main/java/io/layers/sdk/reactnative/LayersInstallReferrerModule.java +116 -0
  6. package/android/src/main/java/io/layers/sdk/reactnative/LayersReactNativePackage.java +36 -0
  7. package/dist/att-BDPyE-Gs.d.mts.map +1 -1
  8. package/dist/debug-overlay.d.mts +3 -3
  9. package/dist/debug-overlay.d.mts.map +1 -1
  10. package/dist/debug-overlay.d.ts +3 -3
  11. package/dist/debug-overlay.d.ts.map +1 -1
  12. package/dist/debug-overlay.js +18 -18
  13. package/dist/debug-overlay.mjs +18 -18
  14. package/dist/debug-overlay.mjs.map +1 -1
  15. package/dist/{index-CHZdzlpP.d.mts → index-BqcbQZEP.d.mts} +324 -47
  16. package/dist/index-BqcbQZEP.d.mts.map +1 -0
  17. package/dist/{index-DKnTFmDn.d.ts → index-fU6euPnq.d.ts} +324 -47
  18. package/dist/index-fU6euPnq.d.ts.map +1 -0
  19. package/dist/index.d.mts +2 -2
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +54 -1
  22. package/dist/index.mjs +2 -2
  23. package/dist/react.d.mts +1 -1
  24. package/dist/react.d.ts +1 -1
  25. package/dist/react.js +1 -1
  26. package/dist/react.mjs +1 -1
  27. package/dist/{src-B4Ri1LeO.mjs → src-BNoj1E-e.mjs} +679 -90
  28. package/dist/src-BNoj1E-e.mjs.map +1 -0
  29. package/dist/{src-CTABFR5u.js → src-ym3bM4JE.js} +706 -87
  30. package/ios/LayersAdServices.m +8 -0
  31. package/ios/LayersAdServices.swift +41 -0
  32. package/ios/LayersDeviceInfo.m +14 -0
  33. package/ios/LayersDeviceInfo.swift +53 -0
  34. package/ios/LayersSKAN.m +45 -0
  35. package/ios/LayersSKAN.swift +188 -0
  36. package/ios/LayersSKANCompat.h +22 -0
  37. package/ios/LayersSKANCompat.m +118 -0
  38. package/layers-react-native.podspec +34 -0
  39. package/package.json +6 -3
  40. package/dist/index-CHZdzlpP.d.mts.map +0 -1
  41. package/dist/index-DKnTFmDn.d.ts.map +0 -1
  42. package/dist/src-B4Ri1LeO.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { t as ATTStatus } from "./att-BDPyE-Gs.mjs";
2
2
  import { n as SKANManager } from "./skan-CAN-v1eU.mjs";
3
- import { ConsentState, ConsentState as ConsentState$1, DeviceContext, DeviceContext as DeviceContext$1, Environment, Environment as Environment$1, EventProperties, EventProperties as EventProperties$1, LayersError, UserProperties, UserProperties as UserProperties$1 } from "@layers/core-wasm";
3
+ import { AddToCartEventParams, BeforeSendEvent, BeforeSendHook, BeforeSendHook as BeforeSendHook$1, BeginCheckoutEventParams, ConsentState, ConsentState as ConsentState$1, DeviceContext, DeviceContext as DeviceContext$1, EcommerceItem, Environment, Environment as Environment$1, EventProperties, EventProperties as EventProperties$1, FeatureFlagBootstrap, FeatureFlagBootstrap as FeatureFlagBootstrap$1, FeatureFlagBootstrapData, FeatureFlagCondition, FeatureFlagDefinition, FeatureFlagValue, FeatureFlagValue as FeatureFlagValue$1, FeatureFlagVariant, FeatureFlagsListener, FeatureFlagsListener as FeatureFlagsListener$1, GroupsState, GroupsState as GroupsState$1, LayersCore, LayersError, LayersEvent, LayersEventName, PurchaseEventParams, RefundEventParams, StartTrialEventParams, SubscribeEventParams, SurveyAnswer, SurveyDefinition, SurveyDefinition as SurveyDefinition$1, SurveyDisplay, SurveyPosition, SurveyQuestion, SurveyResponse, SurveyResponse as SurveyResponse$1, SurveyTargeting, SurveyTargetingContext, SurveyType, TypedEventPayload, UserProperties, UserProperties as UserProperties$1, ViewItemEventParams, addToCartEvent as buildAddToCartEvent, beginCheckoutEvent as buildBeginCheckoutEvent, purchaseEvent as buildPurchaseEvent, refundEvent as buildRefundEvent, startTrialEvent as buildStartTrialEvent, subscribeEvent as buildSubscribeEvent, viewItemEvent as buildViewItemEvent } from "@layers/core-wasm";
4
4
 
5
5
  //#region src/standard-events.d.ts
6
6
 
@@ -14,6 +14,7 @@ import { ConsentState, ConsentState as ConsentState$1, DeviceContext, DeviceCont
14
14
  * ```
15
15
  */
16
16
  declare const StandardEvents: {
17
+ readonly APP_INSTALL: "app_install";
17
18
  readonly APP_OPEN: "app_open";
18
19
  readonly LOGIN: "login";
19
20
  readonly SIGN_UP: "sign_up";
@@ -116,54 +117,54 @@ interface SuperwallProduct {
116
117
  *
117
118
  * Superwall.instance.setDelegate({
118
119
  * handleSuperwallEvent(eventInfo) {
119
- * superwallOnEvent(layers, eventInfo);
120
+ * superwallOnEvent(sdk, eventInfo);
120
121
  * }
121
122
  * });
122
123
  * ```
123
124
  */
124
- declare function superwallOnEvent(layers: LayersReactNative, eventInfo: SuperwallEventInfo): void;
125
+ declare function superwallOnEvent(sdk: LayersReactNative, eventInfo: SuperwallEventInfo): void;
125
126
  /**
126
127
  * Track that a paywall was presented to the user.
127
128
  *
128
129
  * ```ts
129
- * superwallTrackPresentation(layers, paywallInfo);
130
+ * superwallTrackPresentation(sdk, paywallInfo);
130
131
  * ```
131
132
  */
132
- declare function superwallTrackPresentation(layers: LayersReactNative, paywallInfo: SuperwallPaywallInfo): void;
133
+ declare function superwallTrackPresentation(sdk: LayersReactNative, paywallInfo: SuperwallPaywallInfo): void;
133
134
  /**
134
135
  * Track that a paywall was dismissed.
135
136
  *
136
137
  * ```ts
137
- * superwallTrackDismiss(layers, paywallInfo);
138
+ * superwallTrackDismiss(sdk, paywallInfo);
138
139
  * ```
139
140
  */
140
- declare function superwallTrackDismiss(layers: LayersReactNative, paywallInfo: SuperwallPaywallInfo): void;
141
+ declare function superwallTrackDismiss(sdk: LayersReactNative, paywallInfo: SuperwallPaywallInfo): void;
141
142
  /**
142
143
  * Track a purchase initiated from a Superwall paywall.
143
144
  *
144
145
  * ```ts
145
- * superwallTrackPurchase(layers, paywallInfo, product);
146
+ * superwallTrackPurchase(sdk, paywallInfo, product);
146
147
  * ```
147
148
  */
148
- declare function superwallTrackPurchase(layers: LayersReactNative, paywallInfo: SuperwallPaywallInfo, product?: SuperwallProduct): void;
149
+ declare function superwallTrackPurchase(sdk: LayersReactNative, paywallInfo: SuperwallPaywallInfo, product?: SuperwallProduct): void;
149
150
  /**
150
151
  * Track that a paywall was skipped (e.g. holdout, no rule match).
151
152
  *
152
153
  * ```ts
153
- * superwallTrackSkip(layers, paywallInfo, 'holdout');
154
+ * superwallTrackSkip(sdk, paywallInfo, 'holdout');
154
155
  * ```
155
156
  */
156
- declare function superwallTrackSkip(layers: LayersReactNative, paywallInfo: SuperwallPaywallInfo | null, reason: string): void;
157
+ declare function superwallTrackSkip(sdk: LayersReactNative, paywallInfo: SuperwallPaywallInfo | null, reason: string): void;
157
158
  /**
158
159
  * Get Layers attribution data formatted as Superwall user attributes.
159
160
  *
160
161
  * Pass the returned object to `Superwall.instance.setUserAttributes()`:
161
162
  * ```ts
162
- * const attrs = superwallUserAttributes(layers);
163
+ * const attrs = superwallUserAttributes(sdk);
163
164
  * Superwall.instance.setUserAttributes(attrs);
164
165
  * ```
165
166
  */
166
- declare function superwallUserAttributes(layers: LayersReactNative): Record<string, string>;
167
+ declare function superwallUserAttributes(sdk: LayersReactNative): Record<string, string>;
167
168
  //#endregion
168
169
  //#region src/commerce.d.ts
169
170
  /** Minimal Layers SDK interface required by the commerce module. */
@@ -238,7 +239,7 @@ interface PurchaseFailedParams {
238
239
  * ```ts
239
240
  * import { trackPurchase } from '@layers/react-native';
240
241
  *
241
- * trackPurchase(layers, {
242
+ * trackPurchase(sdk, {
242
243
  * productId: 'premium_monthly',
243
244
  * price: 9.99,
244
245
  * currency: 'USD',
@@ -246,18 +247,18 @@ interface PurchaseFailedParams {
246
247
  * });
247
248
  * ```
248
249
  */
249
- declare function trackPurchase(layers: CommerceTracker, params: PurchaseParams): void;
250
+ declare function trackPurchase(sdk: CommerceTracker, params: PurchaseParams): void;
250
251
  /**
251
252
  * Track a failed purchase attempt.
252
253
  */
253
- declare function trackPurchaseFailed(layers: CommerceTracker, params: PurchaseFailedParams): void;
254
+ declare function trackPurchaseFailed(sdk: CommerceTracker, params: PurchaseFailedParams): void;
254
255
  /**
255
256
  * Track a subscription purchase or renewal.
256
257
  *
257
258
  * ```ts
258
259
  * import { trackSubscription } from '@layers/react-native';
259
260
  *
260
- * trackSubscription(layers, {
261
+ * trackSubscription(sdk, {
261
262
  * productId: 'pro_annual',
262
263
  * price: 49.99,
263
264
  * currency: 'USD',
@@ -265,31 +266,31 @@ declare function trackPurchaseFailed(layers: CommerceTracker, params: PurchaseFa
265
266
  * });
266
267
  * ```
267
268
  */
268
- declare function trackSubscription(layers: CommerceTracker, params: SubscriptionParams): void;
269
+ declare function trackSubscription(sdk: CommerceTracker, params: SubscriptionParams): void;
269
270
  /**
270
271
  * Track a completed order with multiple line items.
271
272
  */
272
- declare function trackOrder(layers: CommerceTracker, params: OrderParams): void;
273
+ declare function trackOrder(sdk: CommerceTracker, params: OrderParams): void;
273
274
  /**
274
275
  * Track an item being added to the cart.
275
276
  */
276
- declare function trackAddToCart(layers: CommerceTracker, item: CartItem, properties?: EventProperties): void;
277
+ declare function trackAddToCart(sdk: CommerceTracker, item: CartItem, properties?: EventProperties): void;
277
278
  /**
278
279
  * Track an item being removed from the cart.
279
280
  */
280
- declare function trackRemoveFromCart(layers: CommerceTracker, item: CartItem, properties?: EventProperties): void;
281
+ declare function trackRemoveFromCart(sdk: CommerceTracker, item: CartItem, properties?: EventProperties): void;
281
282
  /**
282
283
  * Track beginning the checkout flow.
283
284
  */
284
- declare function trackBeginCheckout(layers: CommerceTracker, items: CartItem[], currency?: string, properties?: EventProperties): void;
285
+ declare function trackBeginCheckout(sdk: CommerceTracker, items: CartItem[], currency?: string, properties?: EventProperties): void;
285
286
  /**
286
287
  * Track viewing a product detail page.
287
288
  */
288
- declare function trackViewProduct(layers: CommerceTracker, productId: string, name: string, price: number, currency?: string, category?: string, properties?: EventProperties): void;
289
+ declare function trackViewProduct(sdk: CommerceTracker, productId: string, name: string, price: number, currency?: string, category?: string, properties?: EventProperties): void;
289
290
  /**
290
291
  * Track a refund.
291
292
  */
292
- declare function trackRefund(layers: CommerceTracker, params: RefundParams): void;
293
+ declare function trackRefund(sdk: CommerceTracker, params: RefundParams): void;
293
294
  //#endregion
294
295
  //#region src/revenuecat.d.ts
295
296
  /**
@@ -315,7 +316,7 @@ interface RevenueCatPackage {
315
316
  */
316
317
  interface RevenueCatConfig {
317
318
  /** The Layers SDK instance to bridge events to. */
318
- layers: LayersReactNative;
319
+ sdk: LayersReactNative;
319
320
  /**
320
321
  * Callback invoked when a new subscription is detected.
321
322
  * By default, new subscriptions are tracked as `subscription_start` events.
@@ -334,16 +335,16 @@ interface RevenueCatConfig {
334
335
  * import Purchases from 'react-native-purchases';
335
336
  * import { LayersReactNative, connectRevenueCat } from '@layers/react-native';
336
337
  *
337
- * const layers = new LayersReactNative();
338
+ * const sdk = new LayersReactNative();
338
339
  * await layers.init({ appId: 'your-app-id', environment: 'production' });
339
340
  *
340
341
  * connectRevenueCat({
341
- * layers,
342
+ * sdk,
342
343
  * purchases: Purchases,
343
344
  * });
344
345
  * ```
345
346
  *
346
- * @param config - Configuration including the Layers instance.
347
+ * @param config - Configuration including the SDK instance.
347
348
  * @param purchases - The RevenueCat Purchases instance (duck-typed to avoid hard dependency).
348
349
  */
349
350
  declare function connectRevenueCat(config: RevenueCatConfig, purchases: {
@@ -361,17 +362,17 @@ declare function connectRevenueCat(config: RevenueCatConfig, purchases: {
361
362
  * ```ts
362
363
  * const offerings = await Purchases.getOfferings();
363
364
  * const pkg = offerings.current?.availablePackages[0];
364
- * if (pkg) trackRevenueCatPurchase(layers, pkg);
365
+ * if (pkg) trackRevenueCatPurchase(sdk, pkg);
365
366
  * ```
366
367
  */
367
- declare function trackRevenueCatPurchase(layers: LayersReactNative, rcPackage: RevenueCatPackage, store?: string): void;
368
+ declare function trackRevenueCatPurchase(sdk: LayersReactNative, rcPackage: RevenueCatPackage, store?: string): void;
368
369
  /**
369
370
  * Manually sync RevenueCat subscriber attributes to Layers user properties.
370
371
  *
371
372
  * This is called automatically when using `connectRevenueCat()`, but can also
372
373
  * be called manually if needed.
373
374
  */
374
- declare function syncRevenueCatAttributes(layers: LayersReactNative, customerInfo: RevenueCatCustomerInfo): void;
375
+ declare function syncRevenueCatAttributes(sdk: LayersReactNative, customerInfo: RevenueCatCustomerInfo): void;
375
376
  /**
376
377
  * Reset RevenueCat integration state. For testing only.
377
378
  */
@@ -414,16 +415,16 @@ interface BackgroundFlushResult {
414
415
  * will flush any queued events via the Layers SDK. It is safe to call even
415
416
  * if the SDK is not initialized (it will silently no-op).
416
417
  *
417
- * @param getLayers - A getter that returns the current LayersReactNative
418
+ * @param getSDK - A getter that returns the current LayersReactNative
418
419
  * instance, or `null` if the SDK is not yet initialized.
419
420
  * @returns An async handler suitable for use with background task libraries.
420
421
  *
421
422
  * @example
422
423
  * ```typescript
423
- * const handler = createBackgroundFlushHandler(() => myLayersInstance);
424
+ * const handler = createBackgroundFlushHandler(() => mySDKInstance);
424
425
  * ```
425
426
  */
426
- declare function createBackgroundFlushHandler(getLayers: () => LayersReactNative | null): () => Promise<BackgroundFlushResult>;
427
+ declare function createBackgroundFlushHandler(getSDK: () => LayersReactNative | null): () => Promise<BackgroundFlushResult>;
427
428
  /**
428
429
  * Registers a background flush task with `expo-task-manager`.
429
430
  *
@@ -431,7 +432,7 @@ declare function createBackgroundFlushHandler(getLayers: () => LayersReactNative
431
432
  * `expo-task-manager` requires tasks to be defined before the app mounts.
432
433
  *
433
434
  * @param taskManager - The `expo-task-manager` module (import * as TaskManager from 'expo-task-manager').
434
- * @param getLayers - A getter that returns the current LayersReactNative
435
+ * @param getSDK - A getter that returns the current LayersReactNative
435
436
  * instance, or `null` if the SDK is not yet initialized.
436
437
  *
437
438
  * @example
@@ -439,24 +440,158 @@ declare function createBackgroundFlushHandler(getLayers: () => LayersReactNative
439
440
  * import * as TaskManager from 'expo-task-manager';
440
441
  * import { registerExpoBackgroundFlush } from '@layers/expo';
441
442
  *
442
- * let layers: LayersReactNative | null = null;
443
- * registerExpoBackgroundFlush(TaskManager, () => layers);
443
+ * let sdk: LayersReactNative | null = null;
444
+ * registerExpoBackgroundFlush(TaskManager, () => sdk);
444
445
  *
445
446
  * // Later, in your app initialization:
446
- * layers = new LayersReactNative({ appId: '...', environment: 'production' });
447
+ * sdk = new LayersReactNative({ appId: '...', environment: 'production' });
447
448
  * await layers.init();
448
449
  * ```
449
450
  */
450
451
  declare function registerExpoBackgroundFlush(taskManager: {
451
452
  defineTask: (taskName: string, handler: () => Promise<void>) => void;
452
- }, getLayers: () => LayersReactNative | null): void;
453
+ }, getSDK: () => LayersReactNative | null): void;
454
+ //#endregion
455
+ //#region src/navigation-tracking.d.ts
456
+ /** Minimal SDK surface — supplied by LayersReactNative. */
457
+ interface NavigationTrackingHooks {
458
+ screen(screenName: string, properties?: EventProperties): void;
459
+ enableDebug?: boolean;
460
+ }
461
+ /**
462
+ * Internal route shape — matches React Navigation's
463
+ * `NavigationState.routes[i]` structure but only the fields we read.
464
+ */
465
+ interface RouteSnapshot {
466
+ name: string;
467
+ params?: Record<string, unknown>;
468
+ }
469
+ /** State shape we pull from `NavigationState`. */
470
+ interface NavigationStateSnapshot {
471
+ index?: number;
472
+ routes?: Array<RouteSnapshot & {
473
+ state?: NavigationStateSnapshot;
474
+ }>;
475
+ }
476
+ /**
477
+ * Build a stateful listener that emits `$screen_view` whenever the active
478
+ * route changes. The returned function should be passed to React
479
+ * Navigation's `onStateChange` prop or `navigationRef.addListener('state',
480
+ * cb)`. It returns nothing — the SDK records the event side-effecting.
481
+ *
482
+ * The listener:
483
+ * - resolves the deepest active route via `getActiveRouteName()`
484
+ * semantics so nested stack/tab navigators correctly report the
485
+ * leaf screen
486
+ * - de-dupes consecutive identical names (some RN versions emit the
487
+ * same state twice on re-renders)
488
+ * - attaches route params + previous screen on the screen event
489
+ */
490
+ declare function createNavigationListener(sdk: NavigationTrackingHooks): (state: NavigationStateSnapshot | undefined) => void;
491
+ /**
492
+ * React hook that subscribes to a React Navigation NavigationContainerRef
493
+ * and emits a `$screen_view` for each route change. Pass the SDK instance
494
+ * and the same `navigationRef` you give to `<NavigationContainer ref={...}>`.
495
+ *
496
+ * ```tsx
497
+ * import { createNavigationContainerRef } from '@react-navigation/native';
498
+ * const navigationRef = createNavigationContainerRef();
499
+ *
500
+ * function Root() {
501
+ * useLayersNavigationTracking(layers, navigationRef);
502
+ * return <NavigationContainer ref={navigationRef}>...</NavigationContainer>;
503
+ * }
504
+ * ```
505
+ *
506
+ * The hook is implemented via a lazy `require('react')` so it only fails
507
+ * if React itself is unavailable — consumers without React Navigation can
508
+ * still call it and it will silently no-op.
509
+ */
510
+ declare function useLayersNavigationTracking(sdk: NavigationTrackingHooks, navigationRef: {
511
+ addListener?: (event: string, cb: (...args: unknown[]) => void) => () => void;
512
+ }): void;
513
+ /**
514
+ * Walk a NavigationState tree and return the active leaf route. Mirrors
515
+ * React Navigation's own `getActiveRouteName()` helper without taking a
516
+ * peer-dep on `@react-navigation/native`.
517
+ *
518
+ * Exported for testing.
519
+ * @internal
520
+ */
521
+ declare function resolveActiveRoute(state: NavigationStateSnapshot | undefined): RouteSnapshot | null;
522
+ //#endregion
523
+ //#region src/surveys.d.ts
524
+ interface SurveysModuleOptions {
525
+ enabled?: boolean;
526
+ /** Caller-supplied person properties for targeting. */
527
+ personProperties?: Record<string, unknown>;
528
+ /** Caller-supplied feature flag resolver. */
529
+ resolveFeatureFlag?: (flagKey: string) => boolean | string | null | undefined;
530
+ /**
531
+ * Optional `AsyncStorage`-style persistence for the show-history map.
532
+ * The RN SDK passes its existing `AsyncStorage` adapter automatically.
533
+ */
534
+ persistence?: {
535
+ read(key: string): Promise<string | null>;
536
+ write(key: string, value: string): Promise<void>;
537
+ };
538
+ }
539
+ /**
540
+ * Public surveys API exposed via `LayersReactNative.surveys`.
541
+ *
542
+ * Render the actual chrome by mounting `<LayersSurveyModal />` from
543
+ * `@layers/react-native/surveys-component` somewhere in your app tree
544
+ * and binding it to the eligible survey via `surveys.getActive()`.
545
+ */
546
+ declare class SurveysModule {
547
+ private readonly core;
548
+ private readonly options;
549
+ private hydrated;
550
+ private listeners;
551
+ constructor(core: LayersCore, options?: SurveysModuleOptions);
552
+ get enabled(): boolean;
553
+ knownIds(): string[];
554
+ /**
555
+ * Return surveys currently eligible to show. Builds the targeting context
556
+ * from caller-supplied person properties + feature flag values. URL
557
+ * targeting is web-only so it's omitted.
558
+ */
559
+ getActive(): SurveyDefinition[];
560
+ /** Mark a survey as shown — emits `survey shown` auto-event. */
561
+ markShown(surveyId: string): void;
562
+ /** Mark a survey as dismissed — emits `survey dismissed` auto-event. */
563
+ markDismissed(surveyId: string): void;
564
+ /** Submit a survey response — emits `survey sent` auto-event. */
565
+ submit(surveyId: string, response: SurveyResponse): void;
566
+ /**
567
+ * Subscribe to changes in the eligible-surveys list. The callback fires
568
+ * after every show/dismiss/submit and after the show-history is hydrated
569
+ * from persistence on init.
570
+ */
571
+ subscribe(listener: (active: SurveyDefinition[]) => void): () => void;
572
+ configure(patch: Partial<SurveysModuleOptions>): void;
573
+ private buildContext;
574
+ private allDefinitions;
575
+ private hydrate;
576
+ private persistShowHistory;
577
+ private notify;
578
+ }
453
579
  //#endregion
454
580
  //#region src/index.d.ts
455
581
  interface LayersRNConfig {
456
582
  appId: string;
457
583
  environment: Environment;
458
584
  appUserId?: string;
585
+ /** Verbose console logging. @default false */
459
586
  enableDebug?: boolean;
587
+ /**
588
+ * Enable per-device DebugView. The SDK generates and persists a stable
589
+ * `debug_token` (UUID via AsyncStorage) and sends `X-Debug-Token: <uuid>`
590
+ * on every event upload. Use {@link LayersReactNative.getDebugToken}
591
+ * to retrieve the token for displaying in dev UIs.
592
+ * @default false
593
+ */
594
+ debug?: boolean;
460
595
  baseUrl?: string;
461
596
  flushIntervalMs?: number;
462
597
  flushThreshold?: number;
@@ -479,6 +614,40 @@ interface LayersRNConfig {
479
614
  * @default true
480
615
  */
481
616
  autoTrackDeepLinks?: boolean;
617
+ /**
618
+ * Whether to automatically emit `$app_background` / `$app_foreground`
619
+ * lifecycle events on AppState transitions. The flush trigger on
620
+ * background remains active regardless of this flag — only the EVENT
621
+ * emission is gated.
622
+ *
623
+ * @default true
624
+ */
625
+ autoTrackAppLifecycle?: boolean;
626
+ /**
627
+ * Whether to emit `$first_open` on the very first launch for a given
628
+ * install (gated by AsyncStorage). Subsequent launches do not emit it.
629
+ *
630
+ * Note: the Rust core emits `$first_open` on first init via the
631
+ * super-properties / install-id machinery. Setting this to `false`
632
+ * suppresses any *additional* emission from the wrapper layer; it
633
+ * does not unwind events emitted by the core.
634
+ *
635
+ * @default true
636
+ */
637
+ autoTrackFirstOpen?: boolean;
638
+ /**
639
+ * Whether to emit `$app_update` on launch when the persisted app
640
+ * version differs from the current `device_context.app_version`.
641
+ *
642
+ * @default true
643
+ */
644
+ autoTrackAppUpdate?: boolean;
645
+ /**
646
+ * Tier 4: optional bootstrap data for feature flags. Pre-seed flag values
647
+ * so the first render after launch doesn't flicker from default-off to
648
+ * actual-value while the first /config fetch is in flight.
649
+ */
650
+ bootstrap?: FeatureFlagBootstrap;
482
651
  }
483
652
  type ErrorListener = (error: Error) => void;
484
653
  /**
@@ -510,6 +679,7 @@ declare class LayersReactNative {
510
679
  private static readonly CONFIG_POLL_INTERVAL_MS;
511
680
  private _adServicesToken;
512
681
  private _installReferrer;
682
+ private _installReferrerParams;
513
683
  private _hadPriorSdkState;
514
684
  private _attributionDeeplinkId;
515
685
  private _attributionGclid;
@@ -531,6 +701,74 @@ declare class LayersReactNative {
531
701
  setUserProperties(properties: UserProperties): Promise<void>;
532
702
  setUserPropertiesOnce(properties: UserProperties): Promise<void>;
533
703
  setConsent(consent: ConsentState): Promise<void>;
704
+ /** Evaluate a feature flag. Emits `$feature_flag_called` (deduped per session). */
705
+ getFeatureFlag(flagKey: string): FeatureFlagValue | undefined;
706
+ /** Convenience: returns true iff `getFeatureFlag(flagKey)` is truthy. */
707
+ isFeatureEnabled(flagKey: string): boolean;
708
+ /** Look up the JSON payload attached to a flag. Does NOT emit exposure events. */
709
+ getFeatureFlagPayload<T = unknown>(flagKey: string): T | undefined;
710
+ /** Snapshot every accessible flag's current value. */
711
+ getAllFlags(): Record<string, FeatureFlagValue>;
712
+ /** Force a /config refresh and re-fire any registered listeners. */
713
+ reloadFeatureFlags(): Promise<void>;
714
+ /** Override person properties used for flag evaluation only. */
715
+ setPersonPropertiesForFlags(properties: Record<string, unknown>): void;
716
+ /** Merge additional person properties into the flag-evaluation map. */
717
+ mergePersonPropertiesForFlags(properties: Record<string, unknown>): void;
718
+ /** Subscribe to feature-flag refreshes. Returns an unsubscribe function. */
719
+ onFeatureFlags(callback: FeatureFlagsListener): () => void;
720
+ /** Seed bootstrap flag values + payloads after init. */
721
+ setFeatureFlagBootstrap(bootstrap: FeatureFlagBootstrap): void;
722
+ /**
723
+ * Register one or more super-properties — auto-merged into every track /
724
+ * screen call until cleared. Super-properties carry app-wide context
725
+ * (plan tier, region, experiment bucket).
726
+ */
727
+ setSuperProperties(properties: Record<string, unknown>): void;
728
+ /** Register super-properties only if their keys have not been set before. */
729
+ setSuperPropertiesOnce(properties: Record<string, unknown>): void;
730
+ /** Remove a single super-property by key. */
731
+ unregisterSuperProperty(key: string): void;
732
+ /** Clear all registered super-properties. */
733
+ clearSuperProperties(): void;
734
+ /** Snapshot the currently-registered super-properties. */
735
+ getSuperProperties(): Record<string, unknown>;
736
+ /** Start a duration timer for the next `track(name)` call. */
737
+ timeEvent(eventName: string): void;
738
+ /** Cancel a timed event without emitting it. Returns elapsed ms (0 if none). */
739
+ cancelTimedEvent(eventName: string): number;
740
+ /** Set membership for a single group_type. Empty `groupId` removes the type. */
741
+ setGroup(groupType: string, groupId: string): void;
742
+ /** Add a group membership without overwriting other types (alias for setGroup). */
743
+ addGroup(groupType: string, groupId: string): void;
744
+ /** Remove a group_type from the membership map. */
745
+ removeGroup(groupType: string): void;
746
+ /** Snapshot the current $groups membership map. */
747
+ getGroups(): GroupsState;
748
+ /** Increment a numeric user property by `delta`. */
749
+ increment(key: string, delta?: number): void;
750
+ /** Append a single value to a list-typed user property. */
751
+ append(key: string, value: unknown): void;
752
+ /** Union (set-add) values into a list-typed user property. */
753
+ union(key: string, values: unknown[]): void;
754
+ /** Remove a user property by key. */
755
+ unset(key: string): void;
756
+ /** Returns the current anonymous ID, rotated on `reset()`. */
757
+ getAnonymousId(): string | null;
758
+ /** Returns the current device ID (stable per install, rotated on `reset()`). */
759
+ getDeviceId(): string | null;
760
+ /** Returns the monotonically-increasing session number. */
761
+ getSessionNumber(): number;
762
+ /** Returns the SDK first-open RFC3339 timestamp, or null. */
763
+ getFirstOpenTime(): string | null;
764
+ /**
765
+ * Register a synchronous filter callback called for every track / screen
766
+ * before the event reaches the queue. Return `null` to drop, or a modified
767
+ * `BeforeSendEvent` to forward.
768
+ *
769
+ * Pass `null` to clear the hook.
770
+ */
771
+ setBeforeSend(hook: BeforeSendHook | null): void;
534
772
  /**
535
773
  * Request App Tracking Transparency authorization (iOS only).
536
774
  * After the user responds, this method automatically:
@@ -548,12 +786,12 @@ declare class LayersReactNative {
548
786
  setAppUserId(appUserId: string): void;
549
787
  clearAppUserId(): void;
550
788
  /**
551
- * Reset the SDK state: clears the user ID, unlocks set-user-once,
552
- * clears user properties, and starts a new session.
789
+ * Reset the SDK state: clears the user ID, unlocks set-user-once, drops
790
+ * super-properties + multi-group memberships, rotates device / anonymous
791
+ * IDs, and starts a new session.
553
792
  *
554
- * After reset(), the SDK behaves as if no user has been identified.
555
- * A new anonymous session is started. Events tracked after reset()
556
- * will not carry the previous user's identity.
793
+ * After reset(), the SDK behaves as if no user has been identified. Events
794
+ * tracked after reset() will not carry the previous user's identity.
557
795
  */
558
796
  reset(): void;
559
797
  /**
@@ -623,6 +861,15 @@ declare class LayersReactNative {
623
861
  get appId(): string;
624
862
  /** Number of events currently queued. */
625
863
  getQueueDepth(): number;
864
+ /**
865
+ * Return the per-device DebugView token, or null if `debug` was not enabled
866
+ * in the constructor config.
867
+ *
868
+ * When debug mode is on the SDK persists a stable UUID via AsyncStorage
869
+ * and sends it in the `X-Debug-Token` header on every event upload. This
870
+ * lets dashboard UIs filter the live tail to events from this device only.
871
+ */
872
+ getDebugToken(): string | null;
626
873
  /** Current device context from the core. */
627
874
  getDeviceContext(): DeviceContext;
628
875
  /** Whether the SDK believes the device is online. */
@@ -634,6 +881,21 @@ declare class LayersReactNative {
634
881
  * Each entry is a formatted string like "12:34:56 event_name (3 props)".
635
882
  */
636
883
  getRecentEvents(): readonly string[];
884
+ /**
885
+ * POST a device fingerprint to /clicks/resolve so the server can match this
886
+ * first-launch install to a recent /c/:appId click captured in the browser
887
+ * before the App Store / Play Store redirect. On a successful match, persist
888
+ * the returned click IDs via setAttributionData so every subsequent event
889
+ * (app_open, purchase_success, etc.) carries fbclid / gclid / ttclid / etc.
890
+ *
891
+ * This is the primary iOS web-to-app attribution path, since iOS has no
892
+ * equivalent of Android's Play Install Referrer. Also serves as a fallback
893
+ * for Android installs where the Install Referrer API returned nothing
894
+ * (sideload, Amazon Appstore, testing).
895
+ *
896
+ * Best-effort: all errors are swallowed — this must never block app_open.
897
+ */
898
+ private resolveClickFromFingerprint;
637
899
  /**
638
900
  * Fire-and-forget POST to /users/properties.
639
901
  * Best-effort: errors are silently swallowed.
@@ -742,6 +1004,12 @@ interface InstallReferrerData {
742
1004
  referrerClickTimestamp?: number;
743
1005
  installBeginTimestamp?: number;
744
1006
  }
1007
+ /**
1008
+ * Parse a raw Play Install Referrer string into a map of recognized attribution
1009
+ * params. Accepts either a bare query string (`a=1&b=2`) or a full URL.
1010
+ * Returns an empty object on parse failure.
1011
+ */
1012
+ declare function parseInstallReferrerUrl(referrer: string): Record<string, string>;
745
1013
  /**
746
1014
  * Fetch the Google Play install referrer on Android via NativeModules.
747
1015
  * Requires the `com.android.installreferrer` library on the native side.
@@ -772,7 +1040,16 @@ interface DeepLinkData {
772
1040
  }
773
1041
  declare function setupDeepLinkListener(onDeepLink: (data: DeepLinkData) => void): () => void;
774
1042
  declare function parseDeepLink(url: string): DeepLinkData | null;
775
- declare function useLayersExpoRouterTracking(layersInstance: LayersReactNative, usePathname: () => string, useGlobalSearchParams: () => Record<string, string | string[]>): void;
1043
+ /**
1044
+ * Hook that emits `$screen_view` for every Expo Router pathname change.
1045
+ *
1046
+ * The hook also tracks the previous pathname so the emitted event carries
1047
+ * `previous_screen_name`, matching the React Navigation observer in
1048
+ * `useLayersNavigationTracking`. This makes funnel analysis trivial
1049
+ * server-side: every screen event has a self-contained pair `(from, to)`
1050
+ * — no need to join adjacent rows.
1051
+ */
1052
+ declare function useLayersExpoRouterTracking(sdkInstance: LayersReactNative, usePathname: () => string, useGlobalSearchParams: () => Record<string, string | string[]>): void;
776
1053
  //#endregion
777
- export { trackSubscription as $, registerExpoBackgroundFlush as A, CommerceTracker as B, setupDeepLinkListener as C, shareEvent as Ct, BACKGROUND_FLUSH_TASK_NAME as D, tutorialCompleteEvent as Dt, BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES as E, subscribeEvent as Et, isRevenueCatConnected as F, SubscriptionParams as G, PurchaseFailedParams as H, resetRevenueCatForTesting as I, trackOrder as J, trackAddToCart as K, syncRevenueCatAttributes as L, RevenueCatCustomerInfo as M, RevenueCatPackage as N, BackgroundFlushResult as O, viewContentEvent as Ot, connectRevenueCat as P, trackRemoveFromCart as Q, trackRevenueCatPurchase as R, readClipboardAttribution as S, searchEvent as St, useLayersExpoRouterTracking as T, startTrialEvent as Tt, PurchaseParams as U, OrderParams as V, RefundParams as W, trackPurchaseFailed as X, trackPurchase as Y, trackRefund as Z, getFirstInstallTime as _, levelStartEvent as _t, Environment$1 as a, superwallTrackDismiss as at, getOrSetInstallId as b, registerEvent as bt, GoogleAdvertisingInfo as c, superwallTrackSkip as ct, LayersError as d, StandardEventPayload as dt, trackViewProduct as et, LayersRNConfig as f, StandardEvents as ft, getAdServicesToken as g, levelCompleteEvent as gt, formatFbc as h, initiateCheckoutEvent as ht, DeviceContext$1 as i, superwallOnEvent as it, RevenueCatConfig as j, createBackgroundFlushHandler as k, viewItemEvent as kt, InitListener as l, superwallUserAttributes as lt, UserProperties$1 as m, addToWishlistEvent as mt, ConsentState$1 as n, SuperwallPaywallInfo as nt, ErrorListener as o, superwallTrackPresentation as ot, LayersReactNative as p, addToCartEvent as pt, trackBeginCheckout as q, DeepLinkData as r, SuperwallProduct as rt, EventProperties$1 as s, superwallTrackPurchase as st, ClipboardAttribution as t, SuperwallEventInfo as tt, InstallReferrerData as u, StandardEventName as ut, getGoogleAdvertisingId as v, loginEvent as vt, shouldTreatAsNewInstall as w, signUpEvent as wt, parseDeepLink as x, screenViewEvent as xt, getInstallReferrer as y, purchaseEvent as yt, CartItem as z };
778
- //# sourceMappingURL=index-CHZdzlpP.d.mts.map
1054
+ export { getAdServicesToken as $, superwallUserAttributes as $t, RefundEventParams as A, CommerceTracker as At, SurveyTargetingContext as B, trackPurchaseFailed as Bt, InstallReferrerData as C, RevenueCatPackage as Ct, LayersRNConfig as D, syncRevenueCatAttributes as Dt, LayersEventName as E, resetRevenueCatForTesting as Et, SurveyDisplay as F, SubscriptionParams as Ft, buildAddToCartEvent as G, SuperwallEventInfo as Gt, TypedEventPayload as H, trackRemoveFromCart as Ht, SurveyPosition as I, trackAddToCart as It, buildRefundEvent as J, superwallOnEvent as Jt, buildBeginCheckoutEvent as K, SuperwallPaywallInfo as Kt, SurveyQuestion as L, trackBeginCheckout as Lt, SubscribeEventParams as M, PurchaseFailedParams as Mt, SurveyAnswer as N, PurchaseParams as Nt, LayersReactNative as O, trackRevenueCatPurchase as Ot, SurveyDefinition$1 as P, RefundParams as Pt, formatFbc as Q, superwallTrackSkip as Qt, SurveyResponse$1 as R, trackOrder as Rt, InitListener as S, RevenueCatCustomerInfo as St, LayersEvent as T, isRevenueCatConnected as Tt, UserProperties$1 as U, trackSubscription as Ut, SurveyType as V, trackRefund as Vt, ViewItemEventParams as W, trackViewProduct as Wt, buildSubscribeEvent as X, superwallTrackPresentation as Xt, buildStartTrialEvent as Y, superwallTrackDismiss as Yt, buildViewItemEvent as Z, superwallTrackPurchase as Zt, FeatureFlagValue$1 as _, tutorialCompleteEvent as _n, BACKGROUND_FLUSH_TASK_NAME as _t, ClipboardAttribution as a, initiateCheckoutEvent as an, parseInstallReferrerUrl as at, GoogleAdvertisingInfo as b, registerExpoBackgroundFlush as bt, DeviceContext$1 as c, loginEvent as cn, shouldTreatAsNewInstall as ct, ErrorListener as d, screenViewEvent as dn, SurveysModuleOptions as dt, StandardEventName as en, getFirstInstallTime as et, EventProperties$1 as f, searchEvent as fn, NavigationTrackingHooks as ft, FeatureFlagDefinition as g, subscribeEvent as gn, BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES as gt, FeatureFlagCondition as h, startTrialEvent as hn, useLayersNavigationTracking as ht, BeginCheckoutEventParams as i, addToWishlistEvent as in, parseDeepLink as it, StartTrialEventParams as j, OrderParams as jt, PurchaseEventParams as k, CartItem as kt, EcommerceItem as l, purchaseEvent as ln, useLayersExpoRouterTracking as lt, FeatureFlagBootstrapData as m, signUpEvent as mn, resolveActiveRoute as mt, BeforeSendEvent as n, StandardEvents as nn, getInstallReferrer as nt, ConsentState$1 as o, levelCompleteEvent as on, readClipboardAttribution as ot, FeatureFlagBootstrap$1 as p, shareEvent as pn, createNavigationListener as pt, buildPurchaseEvent as q, SuperwallProduct as qt, BeforeSendHook$1 as r, addToCartEvent as rn, getOrSetInstallId as rt, DeepLinkData as s, levelStartEvent as sn, setupDeepLinkListener as st, AddToCartEventParams as t, StandardEventPayload as tn, getGoogleAdvertisingId as tt, Environment$1 as u, registerEvent as un, SurveysModule as ut, FeatureFlagVariant as v, viewContentEvent as vn, BackgroundFlushResult as vt, LayersError as w, connectRevenueCat as wt, GroupsState$1 as x, RevenueCatConfig as xt, FeatureFlagsListener$1 as y, viewItemEvent as yn, createBackgroundFlushHandler as yt, SurveyTargeting as z, trackPurchase as zt };
1055
+ //# sourceMappingURL=index-BqcbQZEP.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BqcbQZEP.d.mts","names":[],"sources":["../src/standard-events.ts","../src/superwall.ts","../src/commerce.ts","../src/revenuecat.ts","../src/background-flush.ts","../src/navigation-tracking.ts","../src/surveys.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAcA;AAyBA;AAQA;AAMA;AAOA;AAOgB,cArDH,cAqDmC,EAAA;EAOhC,SAAA,WAAa,EAAA,aAI1B;EAOa,SAAA,QAAc,EAAA,UAA+C;EAQ7D,SAAA,KAAA,EAAA,OAAkB;EAYlB,SAAA,OAAA,EAAA,SAAqB;EAWrB,SAAA,QAAA,EAAe,UAAA;EAQf,SAAA,QAAc,EAAA,kBAI3B;EAQa,SAAA,WAAe,EAAA,aAAiB;EAKhC,SAAA,eAAkB,EAAA,iBAAiC;EAOnD,SAAA,iBAAqB,EAAA,mBAAiB;EAOtC,SAAA,cAAW,EAAA,gBAAuC;EAOlD,SAAA,WAAa,EAAA,aAI1B;EAQa,SAAA,SAAA,EAAgB,WAI7B;EAQa,SAAA,WAAU,EAAA,aAIvB;EAQa,SAAA,cAAe,EAAA,gBAAsC;;;;EC1LpD,SAAA,YAAA,EAAoB,cAAA;EAYpB,SAAA,KAAA,EAAA,OAAkB;EASlB,SAAA,SAAA,EAAgB,kBAAA;EA2BjB,SAAA,WAAgB,EAAA,aAAM;AAwBtC,CAAA;AAkCA;AAuBgB,KDtGJ,iBAAA,GCsG0B,CAAA,ODtGE,cCsGF,CAAA,CAAA,MAAA,ODtG+B,cCsG/B,CAAA;AAC/B,UD/FU,oBAAA,CC+FV;EACQ,KAAA,ED/FN,iBC+FM;EACH,UAAA,ED/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