@layers/react-native 2.2.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-BlYXUV-h.d.mts → index-BqcbQZEP.d.mts} +323 -47
  16. package/dist/index-BqcbQZEP.d.mts.map +1 -0
  17. package/dist/{index-BaaQSCs5.d.ts → index-fU6euPnq.d.ts} +323 -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-8aNaNJz3.mjs → src-BNoj1E-e.mjs} +677 -90
  28. package/dist/src-BNoj1E-e.mjs.map +1 -0
  29. package/dist/{src-CP6aZ_iI.js → src-ym3bM4JE.js} +704 -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-BaaQSCs5.d.ts.map +0 -1
  41. package/dist/index-BlYXUV-h.d.mts.map +0 -1
  42. package/dist/src-8aNaNJz3.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
 
@@ -117,54 +117,54 @@ interface SuperwallProduct {
117
117
  *
118
118
  * Superwall.instance.setDelegate({
119
119
  * handleSuperwallEvent(eventInfo) {
120
- * superwallOnEvent(layers, eventInfo);
120
+ * superwallOnEvent(sdk, eventInfo);
121
121
  * }
122
122
  * });
123
123
  * ```
124
124
  */
125
- declare function superwallOnEvent(layers: LayersReactNative, eventInfo: SuperwallEventInfo): void;
125
+ declare function superwallOnEvent(sdk: LayersReactNative, eventInfo: SuperwallEventInfo): void;
126
126
  /**
127
127
  * Track that a paywall was presented to the user.
128
128
  *
129
129
  * ```ts
130
- * superwallTrackPresentation(layers, paywallInfo);
130
+ * superwallTrackPresentation(sdk, paywallInfo);
131
131
  * ```
132
132
  */
133
- declare function superwallTrackPresentation(layers: LayersReactNative, paywallInfo: SuperwallPaywallInfo): void;
133
+ declare function superwallTrackPresentation(sdk: LayersReactNative, paywallInfo: SuperwallPaywallInfo): void;
134
134
  /**
135
135
  * Track that a paywall was dismissed.
136
136
  *
137
137
  * ```ts
138
- * superwallTrackDismiss(layers, paywallInfo);
138
+ * superwallTrackDismiss(sdk, paywallInfo);
139
139
  * ```
140
140
  */
141
- declare function superwallTrackDismiss(layers: LayersReactNative, paywallInfo: SuperwallPaywallInfo): void;
141
+ declare function superwallTrackDismiss(sdk: LayersReactNative, paywallInfo: SuperwallPaywallInfo): void;
142
142
  /**
143
143
  * Track a purchase initiated from a Superwall paywall.
144
144
  *
145
145
  * ```ts
146
- * superwallTrackPurchase(layers, paywallInfo, product);
146
+ * superwallTrackPurchase(sdk, paywallInfo, product);
147
147
  * ```
148
148
  */
149
- declare function superwallTrackPurchase(layers: LayersReactNative, paywallInfo: SuperwallPaywallInfo, product?: SuperwallProduct): void;
149
+ declare function superwallTrackPurchase(sdk: LayersReactNative, paywallInfo: SuperwallPaywallInfo, product?: SuperwallProduct): void;
150
150
  /**
151
151
  * Track that a paywall was skipped (e.g. holdout, no rule match).
152
152
  *
153
153
  * ```ts
154
- * superwallTrackSkip(layers, paywallInfo, 'holdout');
154
+ * superwallTrackSkip(sdk, paywallInfo, 'holdout');
155
155
  * ```
156
156
  */
157
- declare function superwallTrackSkip(layers: LayersReactNative, paywallInfo: SuperwallPaywallInfo | null, reason: string): void;
157
+ declare function superwallTrackSkip(sdk: LayersReactNative, paywallInfo: SuperwallPaywallInfo | null, reason: string): void;
158
158
  /**
159
159
  * Get Layers attribution data formatted as Superwall user attributes.
160
160
  *
161
161
  * Pass the returned object to `Superwall.instance.setUserAttributes()`:
162
162
  * ```ts
163
- * const attrs = superwallUserAttributes(layers);
163
+ * const attrs = superwallUserAttributes(sdk);
164
164
  * Superwall.instance.setUserAttributes(attrs);
165
165
  * ```
166
166
  */
167
- declare function superwallUserAttributes(layers: LayersReactNative): Record<string, string>;
167
+ declare function superwallUserAttributes(sdk: LayersReactNative): Record<string, string>;
168
168
  //#endregion
169
169
  //#region src/commerce.d.ts
170
170
  /** Minimal Layers SDK interface required by the commerce module. */
@@ -239,7 +239,7 @@ interface PurchaseFailedParams {
239
239
  * ```ts
240
240
  * import { trackPurchase } from '@layers/react-native';
241
241
  *
242
- * trackPurchase(layers, {
242
+ * trackPurchase(sdk, {
243
243
  * productId: 'premium_monthly',
244
244
  * price: 9.99,
245
245
  * currency: 'USD',
@@ -247,18 +247,18 @@ interface PurchaseFailedParams {
247
247
  * });
248
248
  * ```
249
249
  */
250
- declare function trackPurchase(layers: CommerceTracker, params: PurchaseParams): void;
250
+ declare function trackPurchase(sdk: CommerceTracker, params: PurchaseParams): void;
251
251
  /**
252
252
  * Track a failed purchase attempt.
253
253
  */
254
- declare function trackPurchaseFailed(layers: CommerceTracker, params: PurchaseFailedParams): void;
254
+ declare function trackPurchaseFailed(sdk: CommerceTracker, params: PurchaseFailedParams): void;
255
255
  /**
256
256
  * Track a subscription purchase or renewal.
257
257
  *
258
258
  * ```ts
259
259
  * import { trackSubscription } from '@layers/react-native';
260
260
  *
261
- * trackSubscription(layers, {
261
+ * trackSubscription(sdk, {
262
262
  * productId: 'pro_annual',
263
263
  * price: 49.99,
264
264
  * currency: 'USD',
@@ -266,31 +266,31 @@ declare function trackPurchaseFailed(layers: CommerceTracker, params: PurchaseFa
266
266
  * });
267
267
  * ```
268
268
  */
269
- declare function trackSubscription(layers: CommerceTracker, params: SubscriptionParams): void;
269
+ declare function trackSubscription(sdk: CommerceTracker, params: SubscriptionParams): void;
270
270
  /**
271
271
  * Track a completed order with multiple line items.
272
272
  */
273
- declare function trackOrder(layers: CommerceTracker, params: OrderParams): void;
273
+ declare function trackOrder(sdk: CommerceTracker, params: OrderParams): void;
274
274
  /**
275
275
  * Track an item being added to the cart.
276
276
  */
277
- declare function trackAddToCart(layers: CommerceTracker, item: CartItem, properties?: EventProperties): void;
277
+ declare function trackAddToCart(sdk: CommerceTracker, item: CartItem, properties?: EventProperties): void;
278
278
  /**
279
279
  * Track an item being removed from the cart.
280
280
  */
281
- declare function trackRemoveFromCart(layers: CommerceTracker, item: CartItem, properties?: EventProperties): void;
281
+ declare function trackRemoveFromCart(sdk: CommerceTracker, item: CartItem, properties?: EventProperties): void;
282
282
  /**
283
283
  * Track beginning the checkout flow.
284
284
  */
285
- 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;
286
286
  /**
287
287
  * Track viewing a product detail page.
288
288
  */
289
- 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;
290
290
  /**
291
291
  * Track a refund.
292
292
  */
293
- declare function trackRefund(layers: CommerceTracker, params: RefundParams): void;
293
+ declare function trackRefund(sdk: CommerceTracker, params: RefundParams): void;
294
294
  //#endregion
295
295
  //#region src/revenuecat.d.ts
296
296
  /**
@@ -316,7 +316,7 @@ interface RevenueCatPackage {
316
316
  */
317
317
  interface RevenueCatConfig {
318
318
  /** The Layers SDK instance to bridge events to. */
319
- layers: LayersReactNative;
319
+ sdk: LayersReactNative;
320
320
  /**
321
321
  * Callback invoked when a new subscription is detected.
322
322
  * By default, new subscriptions are tracked as `subscription_start` events.
@@ -335,16 +335,16 @@ interface RevenueCatConfig {
335
335
  * import Purchases from 'react-native-purchases';
336
336
  * import { LayersReactNative, connectRevenueCat } from '@layers/react-native';
337
337
  *
338
- * const layers = new LayersReactNative();
338
+ * const sdk = new LayersReactNative();
339
339
  * await layers.init({ appId: 'your-app-id', environment: 'production' });
340
340
  *
341
341
  * connectRevenueCat({
342
- * layers,
342
+ * sdk,
343
343
  * purchases: Purchases,
344
344
  * });
345
345
  * ```
346
346
  *
347
- * @param config - Configuration including the Layers instance.
347
+ * @param config - Configuration including the SDK instance.
348
348
  * @param purchases - The RevenueCat Purchases instance (duck-typed to avoid hard dependency).
349
349
  */
350
350
  declare function connectRevenueCat(config: RevenueCatConfig, purchases: {
@@ -362,17 +362,17 @@ declare function connectRevenueCat(config: RevenueCatConfig, purchases: {
362
362
  * ```ts
363
363
  * const offerings = await Purchases.getOfferings();
364
364
  * const pkg = offerings.current?.availablePackages[0];
365
- * if (pkg) trackRevenueCatPurchase(layers, pkg);
365
+ * if (pkg) trackRevenueCatPurchase(sdk, pkg);
366
366
  * ```
367
367
  */
368
- declare function trackRevenueCatPurchase(layers: LayersReactNative, rcPackage: RevenueCatPackage, store?: string): void;
368
+ declare function trackRevenueCatPurchase(sdk: LayersReactNative, rcPackage: RevenueCatPackage, store?: string): void;
369
369
  /**
370
370
  * Manually sync RevenueCat subscriber attributes to Layers user properties.
371
371
  *
372
372
  * This is called automatically when using `connectRevenueCat()`, but can also
373
373
  * be called manually if needed.
374
374
  */
375
- declare function syncRevenueCatAttributes(layers: LayersReactNative, customerInfo: RevenueCatCustomerInfo): void;
375
+ declare function syncRevenueCatAttributes(sdk: LayersReactNative, customerInfo: RevenueCatCustomerInfo): void;
376
376
  /**
377
377
  * Reset RevenueCat integration state. For testing only.
378
378
  */
@@ -415,16 +415,16 @@ interface BackgroundFlushResult {
415
415
  * will flush any queued events via the Layers SDK. It is safe to call even
416
416
  * if the SDK is not initialized (it will silently no-op).
417
417
  *
418
- * @param getLayers - A getter that returns the current LayersReactNative
418
+ * @param getSDK - A getter that returns the current LayersReactNative
419
419
  * instance, or `null` if the SDK is not yet initialized.
420
420
  * @returns An async handler suitable for use with background task libraries.
421
421
  *
422
422
  * @example
423
423
  * ```typescript
424
- * const handler = createBackgroundFlushHandler(() => myLayersInstance);
424
+ * const handler = createBackgroundFlushHandler(() => mySDKInstance);
425
425
  * ```
426
426
  */
427
- declare function createBackgroundFlushHandler(getLayers: () => LayersReactNative | null): () => Promise<BackgroundFlushResult>;
427
+ declare function createBackgroundFlushHandler(getSDK: () => LayersReactNative | null): () => Promise<BackgroundFlushResult>;
428
428
  /**
429
429
  * Registers a background flush task with `expo-task-manager`.
430
430
  *
@@ -432,7 +432,7 @@ declare function createBackgroundFlushHandler(getLayers: () => LayersReactNative
432
432
  * `expo-task-manager` requires tasks to be defined before the app mounts.
433
433
  *
434
434
  * @param taskManager - The `expo-task-manager` module (import * as TaskManager from 'expo-task-manager').
435
- * @param getLayers - A getter that returns the current LayersReactNative
435
+ * @param getSDK - A getter that returns the current LayersReactNative
436
436
  * instance, or `null` if the SDK is not yet initialized.
437
437
  *
438
438
  * @example
@@ -440,24 +440,158 @@ declare function createBackgroundFlushHandler(getLayers: () => LayersReactNative
440
440
  * import * as TaskManager from 'expo-task-manager';
441
441
  * import { registerExpoBackgroundFlush } from '@layers/expo';
442
442
  *
443
- * let layers: LayersReactNative | null = null;
444
- * registerExpoBackgroundFlush(TaskManager, () => layers);
443
+ * let sdk: LayersReactNative | null = null;
444
+ * registerExpoBackgroundFlush(TaskManager, () => sdk);
445
445
  *
446
446
  * // Later, in your app initialization:
447
- * layers = new LayersReactNative({ appId: '...', environment: 'production' });
447
+ * sdk = new LayersReactNative({ appId: '...', environment: 'production' });
448
448
  * await layers.init();
449
449
  * ```
450
450
  */
451
451
  declare function registerExpoBackgroundFlush(taskManager: {
452
452
  defineTask: (taskName: string, handler: () => Promise<void>) => void;
453
- }, 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
+ }
454
579
  //#endregion
455
580
  //#region src/index.d.ts
456
581
  interface LayersRNConfig {
457
582
  appId: string;
458
583
  environment: Environment;
459
584
  appUserId?: string;
585
+ /** Verbose console logging. @default false */
460
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;
461
595
  baseUrl?: string;
462
596
  flushIntervalMs?: number;
463
597
  flushThreshold?: number;
@@ -480,6 +614,40 @@ interface LayersRNConfig {
480
614
  * @default true
481
615
  */
482
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;
483
651
  }
484
652
  type ErrorListener = (error: Error) => void;
485
653
  /**
@@ -511,6 +679,7 @@ declare class LayersReactNative {
511
679
  private static readonly CONFIG_POLL_INTERVAL_MS;
512
680
  private _adServicesToken;
513
681
  private _installReferrer;
682
+ private _installReferrerParams;
514
683
  private _hadPriorSdkState;
515
684
  private _attributionDeeplinkId;
516
685
  private _attributionGclid;
@@ -532,6 +701,74 @@ declare class LayersReactNative {
532
701
  setUserProperties(properties: UserProperties): Promise<void>;
533
702
  setUserPropertiesOnce(properties: UserProperties): Promise<void>;
534
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;
535
772
  /**
536
773
  * Request App Tracking Transparency authorization (iOS only).
537
774
  * After the user responds, this method automatically:
@@ -549,12 +786,12 @@ declare class LayersReactNative {
549
786
  setAppUserId(appUserId: string): void;
550
787
  clearAppUserId(): void;
551
788
  /**
552
- * Reset the SDK state: clears the user ID, unlocks set-user-once,
553
- * 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.
554
792
  *
555
- * After reset(), the SDK behaves as if no user has been identified.
556
- * A new anonymous session is started. Events tracked after reset()
557
- * 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.
558
795
  */
559
796
  reset(): void;
560
797
  /**
@@ -624,6 +861,15 @@ declare class LayersReactNative {
624
861
  get appId(): string;
625
862
  /** Number of events currently queued. */
626
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;
627
873
  /** Current device context from the core. */
628
874
  getDeviceContext(): DeviceContext;
629
875
  /** Whether the SDK believes the device is online. */
@@ -635,6 +881,21 @@ declare class LayersReactNative {
635
881
  * Each entry is a formatted string like "12:34:56 event_name (3 props)".
636
882
  */
637
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;
638
899
  /**
639
900
  * Fire-and-forget POST to /users/properties.
640
901
  * Best-effort: errors are silently swallowed.
@@ -743,6 +1004,12 @@ interface InstallReferrerData {
743
1004
  referrerClickTimestamp?: number;
744
1005
  installBeginTimestamp?: number;
745
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>;
746
1013
  /**
747
1014
  * Fetch the Google Play install referrer on Android via NativeModules.
748
1015
  * Requires the `com.android.installreferrer` library on the native side.
@@ -773,7 +1040,16 @@ interface DeepLinkData {
773
1040
  }
774
1041
  declare function setupDeepLinkListener(onDeepLink: (data: DeepLinkData) => void): () => void;
775
1042
  declare function parseDeepLink(url: string): DeepLinkData | null;
776
- 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;
777
1053
  //#endregion
778
- 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 };
779
- //# sourceMappingURL=index-BlYXUV-h.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/FE,eC+FF;;AA6BZ;AA6BgB,iBDrJA,UAAA,CCqJuB,MAAM,CAAA,EAAA,MAAA,CAAA,EDrJA,oBCqJ0B;;iBD9IvD,WAAA,mBAA8B;;AEhD7B,iBFuDD,aAAA,CEtDoB,MAAe,CAAf,EAAA,MAAe,CAAA,EFsDH,oBEtDG;A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