@layers/react-native 3.2.14 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -21
- package/dist/debug-overlay.d.mts +1 -1
- package/dist/debug-overlay.d.ts +1 -1
- package/dist/{index-DDvxoi4_.d.ts → index-BJbKdiVm.d.ts} +135 -8
- package/dist/index-BJbKdiVm.d.ts.map +1 -0
- package/dist/{index-BOpYg0_t.d.mts → index-CQN7IdfN.d.mts} +135 -8
- package/dist/index-CQN7IdfN.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -2
- package/dist/index.mjs +3 -3
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +2 -2
- package/dist/react.mjs +2 -2
- package/dist/{skan-B0F6AX7g.mjs → skan-DO7MLv2w.mjs} +1 -1
- package/dist/{skan-B0F6AX7g.mjs.map → skan-DO7MLv2w.mjs.map} +1 -1
- package/dist/skan.js +1 -1
- package/dist/skan.mjs +1 -1
- package/dist/{src-w1LpkvTi.js → src-B_cCCgWM.js} +314 -39
- package/dist/{src-BByIGgBm.mjs → src-DL5bdg2R.mjs} +287 -42
- package/dist/src-DL5bdg2R.mjs.map +1 -0
- package/ios/LayersATT.m +20 -0
- package/ios/LayersATT.swift +144 -0
- package/ios/PrivacyInfo.xcprivacy +0 -176
- package/layers-react-native.podspec +3 -1
- package/package.json +2 -2
- package/dist/index-BOpYg0_t.d.mts.map +0 -1
- package/dist/index-DDvxoi4_.d.ts.map +0 -1
- package/dist/src-BByIGgBm.mjs.map +0 -1
- /package/dist/{skan-BRhw9sPC.js → skan-qcOYJKzP.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ATTStatus } from "./att-BDPyE-Gs.mjs";
|
|
2
2
|
import { n as SKANManager } from "./skan-BljOFaeU.mjs";
|
|
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";
|
|
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, onboardingCompleteEvent as buildOnboardingCompleteEvent, onboardingStartEvent as buildOnboardingStartEvent, paywallShowEvent as buildPaywallShowEvent, 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
|
|
|
@@ -35,6 +35,9 @@ declare const StandardEvents: {
|
|
|
35
35
|
readonly SHARE: "share";
|
|
36
36
|
readonly DEEP_LINK: "deep_link_opened";
|
|
37
37
|
readonly SCREEN_VIEW: "screen_view";
|
|
38
|
+
readonly ONBOARDING_START: "onboarding_start";
|
|
39
|
+
readonly ONBOARDING_COMPLETE: "onboarding_complete";
|
|
40
|
+
readonly PAYWALL_SHOW: "paywall_show";
|
|
38
41
|
};
|
|
39
42
|
/** Union type of all standard event name strings. */
|
|
40
43
|
type StandardEventName = (typeof StandardEvents)[keyof typeof StandardEvents];
|
|
@@ -76,6 +79,15 @@ declare function viewContentEvent(contentId: string, contentType?: string, name?
|
|
|
76
79
|
declare function shareEvent(contentType: string, method?: string, contentId?: string): StandardEventPayload;
|
|
77
80
|
/** Build a screen-view event. */
|
|
78
81
|
declare function screenViewEvent(name: string, screenClass?: string): StandardEventPayload;
|
|
82
|
+
/** Build an onboarding-start event. `screenName` is the first onboarding screen shown. */
|
|
83
|
+
declare function onboardingStartEvent(screenName?: string): StandardEventPayload;
|
|
84
|
+
/** Build an onboarding-complete event. `screenName` is the screen the user finished on. */
|
|
85
|
+
declare function onboardingCompleteEvent(screenName?: string): StandardEventPayload;
|
|
86
|
+
/**
|
|
87
|
+
* Build a paywall-show event. `placement` names where the paywall appeared
|
|
88
|
+
* (e.g. `onboarding`, `settings`); `productIds` lists the products offered.
|
|
89
|
+
*/
|
|
90
|
+
declare function paywallShowEvent(placement: string, productIds?: string[]): StandardEventPayload;
|
|
79
91
|
//#endregion
|
|
80
92
|
//#region src/superwall.d.ts
|
|
81
93
|
/** Minimal subset of Superwall's PaywallInfo used by this integration. */
|
|
@@ -520,6 +532,58 @@ declare function useLayersNavigationTracking(sdk: NavigationTrackingHooks, navig
|
|
|
520
532
|
*/
|
|
521
533
|
declare function resolveActiveRoute(state: NavigationStateSnapshot | undefined): RouteSnapshot | null;
|
|
522
534
|
//#endregion
|
|
535
|
+
//#region src/exceptions.d.ts
|
|
536
|
+
/**
|
|
537
|
+
* Properties emitted alongside a `$exception` event. Names mirror the
|
|
538
|
+
* `$exception_*` reservation in the wire protocol and the web client.
|
|
539
|
+
*/
|
|
540
|
+
interface ExceptionProperties {
|
|
541
|
+
$exception_type: string;
|
|
542
|
+
$exception_message: string;
|
|
543
|
+
$exception_stack?: string;
|
|
544
|
+
/** Always `false` from this module; see the header. */
|
|
545
|
+
$exception_promise_rejection: boolean;
|
|
546
|
+
/** React Native's `isFatal` flag: `true` when the error takes the app down. */
|
|
547
|
+
$exception_fatal?: boolean;
|
|
548
|
+
[key: string]: unknown;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Sink that the handler delivers `$exception` events to. The SDK passes its
|
|
552
|
+
* own `track()` here; tests pass a spy.
|
|
553
|
+
*/
|
|
554
|
+
type ExceptionSink = (eventName: '$exception', properties: ExceptionProperties) => void;
|
|
555
|
+
interface ExceptionInstallOptions {
|
|
556
|
+
/**
|
|
557
|
+
* Hook for surfacing diagnostic logs from inside the handler. The SDK wires
|
|
558
|
+
* this to its `enableDebug`-gated console.warn.
|
|
559
|
+
*/
|
|
560
|
+
onInternalError?: (message: string, error: unknown) => void;
|
|
561
|
+
/**
|
|
562
|
+
* Runs after the sink for a fatal error. The previous handler, which ends
|
|
563
|
+
* the process in a release build, runs once the returned promise settles or
|
|
564
|
+
* `fatalTimeoutMs` passes, whichever comes first. The SDK uses it to get the
|
|
565
|
+
* event onto disk before the app dies. Errors that are not fatal never wait.
|
|
566
|
+
*/
|
|
567
|
+
onFatal?: () => Promise<void> | void;
|
|
568
|
+
/** Upper bound on how long a fatal error waits for `onFatal`. @default 1000 */
|
|
569
|
+
fatalTimeoutMs?: number;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Describe whatever React Native handed the global handler. Errors carry a
|
|
573
|
+
* name, message and stack; anything else thrown (strings, plain objects) is
|
|
574
|
+
* serialized best-effort. Every field is coerced to a string, since Error
|
|
575
|
+
* subclasses in the wild override `message` with numbers and getters.
|
|
576
|
+
*/
|
|
577
|
+
declare function buildExceptionProperties(error: unknown, isFatal?: boolean): ExceptionProperties;
|
|
578
|
+
/**
|
|
579
|
+
* Install the React Native global error handler.
|
|
580
|
+
*
|
|
581
|
+
* Returns an idempotent uninstall function that restores the previous
|
|
582
|
+
* handler when ours is still the current one. Returns a no-op uninstall when
|
|
583
|
+
* `ErrorUtils` is absent (Node, Jest without the RN preset, web).
|
|
584
|
+
*/
|
|
585
|
+
declare function installExceptionAutoCapture(sink: ExceptionSink, options?: ExceptionInstallOptions): () => void;
|
|
586
|
+
//#endregion
|
|
523
587
|
//#region src/surveys.d.ts
|
|
524
588
|
interface SurveysModuleOptions {
|
|
525
589
|
enabled?: boolean;
|
|
@@ -578,6 +642,12 @@ declare class SurveysModule {
|
|
|
578
642
|
}
|
|
579
643
|
//#endregion
|
|
580
644
|
//#region src/index.d.ts
|
|
645
|
+
/**
|
|
646
|
+
* Partial device-context update accepted by {@link LayersReactNative.setDeviceInfo}.
|
|
647
|
+
* Omitted fields are preserved; an explicitly supplied `undefined` clears the
|
|
648
|
+
* field from the stored context.
|
|
649
|
+
*/
|
|
650
|
+
type DeviceInfoUpdate = { [Key in keyof DeviceContext]?: Exclude<DeviceContext[Key], undefined> | undefined };
|
|
581
651
|
interface LayersRNConfig {
|
|
582
652
|
appId: string;
|
|
583
653
|
environment: Environment;
|
|
@@ -614,6 +684,17 @@ interface LayersRNConfig {
|
|
|
614
684
|
* @default true
|
|
615
685
|
*/
|
|
616
686
|
autoTrackDeepLinks?: boolean;
|
|
687
|
+
/**
|
|
688
|
+
* Whether to install a React Native global error handler
|
|
689
|
+
* (`ErrorUtils.setGlobalHandler`) that turns uncaught JS errors into
|
|
690
|
+
* `$exception` events. The handler that was installed before still runs
|
|
691
|
+
* afterwards, so RedBox in development and the native crash in release are
|
|
692
|
+
* unchanged. Disable if another crash reporter owns the global handler and
|
|
693
|
+
* you do not want both reporting.
|
|
694
|
+
*
|
|
695
|
+
* @default true
|
|
696
|
+
*/
|
|
697
|
+
autoTrackExceptions?: boolean;
|
|
617
698
|
/**
|
|
618
699
|
* Whether to automatically emit `$app_background` / `$app_foreground`
|
|
619
700
|
* lifecycle events on AppState transitions. The flush trigger on
|
|
@@ -698,6 +779,8 @@ declare class LayersReactNative {
|
|
|
698
779
|
private isOnline;
|
|
699
780
|
private readonly enableDebug;
|
|
700
781
|
private appStateSubscription;
|
|
782
|
+
private exceptionUninstall;
|
|
783
|
+
private persistenceSettle;
|
|
701
784
|
private _lifecycleCheckTimer;
|
|
702
785
|
private netInfoUnsubscribe;
|
|
703
786
|
private readonly config;
|
|
@@ -793,6 +876,16 @@ declare class LayersReactNative {
|
|
|
793
876
|
private runInit;
|
|
794
877
|
track(eventName: string, properties?: EventProperties): void;
|
|
795
878
|
screen(screenName: string, properties?: EventProperties): void;
|
|
879
|
+
/**
|
|
880
|
+
* @internal Entry point for auto-capture integrations (the Expo provider's
|
|
881
|
+
* router tracker). Identical to `screen()` except the view is kept out of
|
|
882
|
+
* the SKAN engine: SKAN preset rules key off `screen_name`, and an
|
|
883
|
+
* auto-captured stream of route views would otherwise change an app's iOS
|
|
884
|
+
* conversion values the moment auto-capture turned on. Manual `screen()`
|
|
885
|
+
* calls keep feeding SKAN exactly as before.
|
|
886
|
+
*/
|
|
887
|
+
_screenAutoCaptured(screenName: string, properties?: EventProperties): void;
|
|
888
|
+
private screenImpl;
|
|
796
889
|
setUserProperties(properties: UserProperties): Promise<void>;
|
|
797
890
|
setUserPropertiesOnce(properties: UserProperties): Promise<void>;
|
|
798
891
|
setConsent(consent: ConsentState): Promise<void>;
|
|
@@ -869,7 +962,9 @@ declare class LayersReactNative {
|
|
|
869
962
|
* After the user responds, this method automatically:
|
|
870
963
|
* - Collects IDFA if authorized
|
|
871
964
|
* - Updates device info with IDFA and ATT status
|
|
872
|
-
*
|
|
965
|
+
*
|
|
966
|
+
* ATT controls IDFA availability only. This method does not change Layers
|
|
967
|
+
* consent; use setConsent() explicitly when the app wants to do that.
|
|
873
968
|
*
|
|
874
969
|
* Returns the ATT status string.
|
|
875
970
|
*/
|
|
@@ -897,7 +992,7 @@ declare class LayersReactNative {
|
|
|
897
992
|
getAppUserId(): string | undefined;
|
|
898
993
|
getSessionId(): string;
|
|
899
994
|
getConsentState(): ConsentState;
|
|
900
|
-
setDeviceInfo(deviceInfo:
|
|
995
|
+
setDeviceInfo(deviceInfo: DeviceInfoUpdate): void;
|
|
901
996
|
flush(): Promise<void>;
|
|
902
997
|
/**
|
|
903
998
|
* Flush all queued events synchronously (blocking).
|
|
@@ -1006,6 +1101,15 @@ declare class LayersReactNative {
|
|
|
1006
1101
|
private recordRecentEvent;
|
|
1007
1102
|
private emitError;
|
|
1008
1103
|
shutdown(): void;
|
|
1104
|
+
/**
|
|
1105
|
+
* Make a fatal error's `$exception` durable before React Native's crash
|
|
1106
|
+
* path ends the process. The core's `flush()` snapshots the queue to the
|
|
1107
|
+
* persistence backend, whose AsyncStorage write is otherwise fire-and-
|
|
1108
|
+
* forget; this waits for that write to land. Delivery is left to the next
|
|
1109
|
+
* launch, which re-hydrates the snapshot and sends it, so the crashed app is
|
|
1110
|
+
* held open only for the write.
|
|
1111
|
+
*/
|
|
1112
|
+
private persistForCrash;
|
|
1009
1113
|
/**
|
|
1010
1114
|
* Remove every listener and timer this instance installed, then shut the
|
|
1011
1115
|
* core down. Shared by shutdown() and the mid-init abort path, so it must be
|
|
@@ -1229,16 +1333,39 @@ interface DeepLinkData {
|
|
|
1229
1333
|
}
|
|
1230
1334
|
declare function setupDeepLinkListener(onDeepLink: (data: DeepLinkData) => void): () => void;
|
|
1231
1335
|
declare function parseDeepLink(url: string): DeepLinkData | null;
|
|
1336
|
+
interface ExpoRouterTrackingOptions {
|
|
1337
|
+
/**
|
|
1338
|
+
* `'auto'` marks views recorded by an auto-capture integration (the Expo
|
|
1339
|
+
* provider's router tracker). They are tracked like any screen view but
|
|
1340
|
+
* are kept out of the SKAN engine, so turning auto-capture on cannot change
|
|
1341
|
+
* an app's iOS conversion values. Defaults to `'manual'`.
|
|
1342
|
+
*/
|
|
1343
|
+
source?: 'auto' | 'manual';
|
|
1344
|
+
/**
|
|
1345
|
+
* The resolved pathname (`/profile/lin`) when `usePathname` returns
|
|
1346
|
+
* something else, such as the route pattern the Expo provider names screens
|
|
1347
|
+
* by. It is the deduplication key, so the provider's auto-captured view and
|
|
1348
|
+
* a manual hook call on the same route count once. Defaults to the
|
|
1349
|
+
* `usePathname` value.
|
|
1350
|
+
*/
|
|
1351
|
+
resolvedPath?: string;
|
|
1352
|
+
}
|
|
1232
1353
|
/**
|
|
1233
|
-
* Hook that emits
|
|
1354
|
+
* Hook that emits `screen_view` for every Expo Router pathname change.
|
|
1355
|
+
*
|
|
1356
|
+
* One view per route per SDK instance: the deduplication key is the resolved
|
|
1357
|
+
* pathname alone. A param-only change on the same route (a search box or
|
|
1358
|
+
* filter chips mirrored into the URL) is the same screen and is not
|
|
1359
|
+
* re-tracked, and the Expo provider's auto-captured view and a manual call on
|
|
1360
|
+
* the same route count once, whichever effect runs first.
|
|
1234
1361
|
*
|
|
1235
|
-
* The hook also tracks the previous
|
|
1362
|
+
* The hook also tracks the previous screen name so the emitted event carries
|
|
1236
1363
|
* `previous_screen_name`, matching the React Navigation observer in
|
|
1237
1364
|
* `useLayersNavigationTracking`. This makes funnel analysis trivial
|
|
1238
1365
|
* server-side: every screen event has a self-contained pair `(from, to)`
|
|
1239
1366
|
* — no need to join adjacent rows.
|
|
1240
1367
|
*/
|
|
1241
|
-
declare function useLayersExpoRouterTracking(sdkInstance: LayersReactNative | null | undefined, usePathname: () => string, useGlobalSearchParams: () => Record<string, string | string[]
|
|
1368
|
+
declare function useLayersExpoRouterTracking(sdkInstance: LayersReactNative | null | undefined, usePathname: () => string, useGlobalSearchParams: () => Record<string, string | string[]>, options?: ExpoRouterTrackingOptions): void;
|
|
1242
1369
|
//#endregion
|
|
1243
|
-
export {
|
|
1244
|
-
//# sourceMappingURL=index-
|
|
1370
|
+
export { buildPaywallShowEvent as $, trackRefund as $t, LayersRNConfig as A, startTrialEvent as An, BackgroundFlushResult as At, SurveyQuestion as B, trackRevenueCatPurchase as Bt, GoogleAdvertisingInfo as C, paywallShowEvent as Cn, installExceptionAutoCapture as Ct, LayersError as D, searchEvent as Dn, useLayersNavigationTracking as Dt, InstallReferrerData as E, screenViewEvent as En, resolveActiveRoute as Et, SubscribeEventParams as F, RevenueCatPackage as Ft, TypedEventPayload as G, PurchaseParams as Gt, SurveyTargeting as H, CommerceTracker as Ht, SurveyAnswer as I, connectRevenueCat as It, buildAddToCartEvent as J, trackAddToCart as Jt, UserProperties$1 as K, RefundParams as Kt, SurveyDefinition$1 as L, isRevenueCatConnected as Lt, PurchaseEventParams as M, tutorialCompleteEvent as Mn, registerExpoBackgroundFlush as Mt, RefundEventParams as N, viewContentEvent as Nn, RevenueCatConfig as Nt, LayersEvent as O, shareEvent as On, BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES as Ot, StartTrialEventParams as P, viewItemEvent as Pn, RevenueCatCustomerInfo as Pt, buildOnboardingStartEvent as Q, trackPurchaseFailed as Qt, SurveyDisplay as R, resetRevenueCatForTesting as Rt, FeatureFlagsListener$1 as S, onboardingStartEvent as Sn, buildExceptionProperties as St, InitListener as T, registerEvent as Tn, createNavigationListener as Tt, SurveyTargetingContext as U, OrderParams as Ut, SurveyResponse$1 as V, CartItem as Vt, SurveyType as W, PurchaseFailedParams as Wt, buildInstallReferrerProperties as X, trackOrder as Xt, buildBeginCheckoutEvent as Y, trackBeginCheckout as Yt, buildOnboardingCompleteEvent as Z, trackPurchase as Zt, FeatureFlagBootstrapData as _, initiateCheckoutEvent as _n, SurveysModule as _t, BeginCheckoutEventParams as a, SuperwallProduct as an, formatFbc as at, FeatureFlagValue$1 as b, loginEvent as bn, ExceptionProperties as bt, DeepLinkData as c, superwallTrackPresentation as cn, getGoogleAdvertisingId as ct, EcommerceItem as d, superwallUserAttributes as dn, parseDeepLink as dt, trackRemoveFromCart as en, buildPurchaseEvent as et, Environment$1 as f, StandardEventName as fn, parseInstallReferrerUrl as ft, FeatureFlagBootstrap$1 as g, addToWishlistEvent as gn, useLayersExpoRouterTracking as gt, ExpoRouterTrackingOptions as h, addToCartEvent as hn, shouldTreatAsNewInstall as ht, BeforeSendHook$1 as i, SuperwallPaywallInfo as in, buildViewItemEvent as it, LayersReactNative as j, subscribeEvent as jn, createBackgroundFlushHandler as jt, LayersEventName as k, signUpEvent as kn, BACKGROUND_FLUSH_TASK_NAME as kt, DeviceContext$1 as l, superwallTrackPurchase as ln, getInstallReferrer as lt, EventProperties$1 as m, StandardEvents as mn, setupDeepLinkListener as mt, AppStateLike as n, trackViewProduct as nn, buildStartTrialEvent as nt, ClipboardAttribution as o, superwallOnEvent as on, getAdServicesToken as ot, ErrorListener as p, StandardEventPayload as pn, readClipboardAttribution as pt, ViewItemEventParams as q, SubscriptionParams as qt, BeforeSendEvent as r, SuperwallEventInfo as rn, buildSubscribeEvent as rt, ConsentState$1 as s, superwallTrackDismiss as sn, getFirstInstallTime as st, AddToCartEventParams as t, trackSubscription as tn, buildRefundEvent as tt, DeviceInfoUpdate as u, superwallTrackSkip as un, getOrSetInstallId as ut, FeatureFlagCondition as v, levelCompleteEvent as vn, SurveysModuleOptions as vt, GroupsState$1 as w, purchaseEvent as wn, NavigationTrackingHooks as wt, FeatureFlagVariant as x, onboardingCompleteEvent as xn, ExceptionSink as xt, FeatureFlagDefinition as y, levelStartEvent as yn, ExceptionInstallOptions as yt, SurveyPosition as z, syncRevenueCatAttributes as zt };
|
|
1371
|
+
//# sourceMappingURL=index-CQN7IdfN.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CQN7IdfN.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/exceptions.ts","../src/surveys.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAcA;AA6BA;AAQA;AAMA;AAOA;AAOgB,cAzDH,cAyDmC,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;EAarD,SAAA,iBAAoB,EAAA,mBAAuB;EAO3C,SAAA,MAAA,EAAA,QAAA;EAUA,SAAA,SAAA,EAAgB,WAA4C;;;;EC5N3D,SAAA,WAAA,EAAA,aAAoB;EAYpB,SAAA,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;;;;;;;;;;;;iBA8C3C,8BAAA,WACJ,sBACT;;;;;;iBAqBmB,kBAAA,CAAA,GAAsB,QAAQ;;;;;;;;;;;;;;iBA+BpC,SAAA;UAOC,YAAA;;;;;eAKF;;;iBAIC,qBAAA,oBAAyC;iBA6BzC,aAAA,eAA4B;UA2C3B,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCD,2BAAA,cACD,8FAEgB,6CACpB"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as isATTAvailable, i as getVendorId, n as getATTStatus, o as requestTrackingAuthorization, r as getAdvertisingId, t as ATTStatus } from "./att-BDPyE-Gs.mjs";
|
|
2
2
|
import { i as SKANPresetConfig, n as SKANManager, r as SKANMetrics, t as SKANConversionRule } from "./skan-BljOFaeU.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
export { ATTStatus, AddToCartEventParams, AppStateLike, BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, BACKGROUND_FLUSH_TASK_NAME, BackgroundFlushResult, BeforeSendEvent, BeforeSendHook, BeginCheckoutEventParams, CartItem, ClipboardAttribution, CommerceTracker, ConsentState, DeepLinkData, DeviceContext, EcommerceItem, Environment, ErrorListener, EventProperties, FeatureFlagBootstrap, FeatureFlagBootstrapData, FeatureFlagCondition, FeatureFlagDefinition, FeatureFlagValue, FeatureFlagVariant, FeatureFlagsListener, GoogleAdvertisingInfo, GroupsState, InitListener, InstallReferrerData, LayersError, LayersEvent, LayersEventName, LayersRNConfig, LayersReactNative, NavigationTrackingHooks, OrderParams, PurchaseEventParams, PurchaseFailedParams, PurchaseParams, RefundEventParams, RefundParams, RevenueCatConfig, RevenueCatCustomerInfo, RevenueCatPackage, SKANConversionRule, SKANManager, SKANMetrics, SKANPresetConfig, StandardEventName, StandardEventPayload, StandardEvents, StartTrialEventParams, SubscribeEventParams, SubscriptionParams, SuperwallEventInfo, SuperwallPaywallInfo, SuperwallProduct, SurveyAnswer, SurveyDefinition, SurveyDisplay, SurveyPosition, SurveyQuestion, SurveyResponse, SurveyTargeting, SurveyTargetingContext, SurveyType, SurveysModule, SurveysModuleOptions, TypedEventPayload, UserProperties, ViewItemEventParams, addToCartEvent, addToWishlistEvent, buildAddToCartEvent, buildBeginCheckoutEvent, buildInstallReferrerProperties, buildPurchaseEvent, buildRefundEvent, buildStartTrialEvent, buildSubscribeEvent, buildViewItemEvent, connectRevenueCat, createBackgroundFlushHandler, createNavigationListener, formatFbc, getATTStatus, getAdServicesToken, getAdvertisingId, getFirstInstallTime, getGoogleAdvertisingId, getInstallReferrer, getOrSetInstallId, getVendorId, initiateCheckoutEvent, isATTAvailable, isRevenueCatConnected, levelCompleteEvent, levelStartEvent, loginEvent, parseDeepLink, parseInstallReferrerUrl, purchaseEvent, readClipboardAttribution, registerEvent, registerExpoBackgroundFlush, requestTrackingAuthorization, resetRevenueCatForTesting, resolveActiveRoute, screenViewEvent, searchEvent, setupDeepLinkListener, shareEvent, shouldTreatAsNewInstall, signUpEvent, startTrialEvent, subscribeEvent, superwallOnEvent, superwallTrackDismiss, superwallTrackPresentation, superwallTrackPurchase, superwallTrackSkip, superwallUserAttributes, syncRevenueCatAttributes, trackAddToCart, trackBeginCheckout, trackOrder, trackPurchase, trackPurchaseFailed, trackRefund, trackRemoveFromCart, trackRevenueCatPurchase, trackSubscription, trackViewProduct, tutorialCompleteEvent, useLayersExpoRouterTracking, useLayersNavigationTracking, viewContentEvent, viewItemEvent };
|
|
3
|
+
import { $ as buildPaywallShowEvent, $t as trackRefund, A as LayersRNConfig, An as startTrialEvent, At as BackgroundFlushResult, B as SurveyQuestion, Bt as trackRevenueCatPurchase, C as GoogleAdvertisingInfo, Cn as paywallShowEvent, Ct as installExceptionAutoCapture, D as LayersError, Dn as searchEvent, Dt as useLayersNavigationTracking, E as InstallReferrerData, En as screenViewEvent, Et as resolveActiveRoute, F as SubscribeEventParams, Ft as RevenueCatPackage, G as TypedEventPayload, Gt as PurchaseParams, H as SurveyTargeting, Ht as CommerceTracker, I as SurveyAnswer, It as connectRevenueCat, J as buildAddToCartEvent, Jt as trackAddToCart, K as UserProperties, Kt as RefundParams, L as SurveyDefinition, Lt as isRevenueCatConnected, M as PurchaseEventParams, Mn as tutorialCompleteEvent, Mt as registerExpoBackgroundFlush, N as RefundEventParams, Nn as viewContentEvent, Nt as RevenueCatConfig, O as LayersEvent, On as shareEvent, Ot as BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, P as StartTrialEventParams, Pn as viewItemEvent, Pt as RevenueCatCustomerInfo, Q as buildOnboardingStartEvent, Qt as trackPurchaseFailed, R as SurveyDisplay, Rt as resetRevenueCatForTesting, S as FeatureFlagsListener, Sn as onboardingStartEvent, St as buildExceptionProperties, T as InitListener, Tn as registerEvent, Tt as createNavigationListener, U as SurveyTargetingContext, Ut as OrderParams, V as SurveyResponse, Vt as CartItem, W as SurveyType, Wt as PurchaseFailedParams, X as buildInstallReferrerProperties, Xt as trackOrder, Y as buildBeginCheckoutEvent, Yt as trackBeginCheckout, Z as buildOnboardingCompleteEvent, Zt as trackPurchase, _ as FeatureFlagBootstrapData, _n as initiateCheckoutEvent, _t as SurveysModule, a as BeginCheckoutEventParams, an as SuperwallProduct, at as formatFbc, b as FeatureFlagValue, bn as loginEvent, bt as ExceptionProperties, c as DeepLinkData, cn as superwallTrackPresentation, ct as getGoogleAdvertisingId, d as EcommerceItem, dn as superwallUserAttributes, dt as parseDeepLink, en as trackRemoveFromCart, et as buildPurchaseEvent, f as Environment, fn as StandardEventName, ft as parseInstallReferrerUrl, g as FeatureFlagBootstrap, gn as addToWishlistEvent, gt as useLayersExpoRouterTracking, h as ExpoRouterTrackingOptions, hn as addToCartEvent, ht as shouldTreatAsNewInstall, i as BeforeSendHook, in as SuperwallPaywallInfo, it as buildViewItemEvent, j as LayersReactNative, jn as subscribeEvent, jt as createBackgroundFlushHandler, k as LayersEventName, kn as signUpEvent, kt as BACKGROUND_FLUSH_TASK_NAME, l as DeviceContext, ln as superwallTrackPurchase, lt as getInstallReferrer, m as EventProperties, mn as StandardEvents, mt as setupDeepLinkListener, n as AppStateLike, nn as trackViewProduct, nt as buildStartTrialEvent, o as ClipboardAttribution, on as superwallOnEvent, ot as getAdServicesToken, p as ErrorListener, pn as StandardEventPayload, pt as readClipboardAttribution, q as ViewItemEventParams, qt as SubscriptionParams, r as BeforeSendEvent, rn as SuperwallEventInfo, rt as buildSubscribeEvent, s as ConsentState, sn as superwallTrackDismiss, st as getFirstInstallTime, t as AddToCartEventParams, tn as trackSubscription, tt as buildRefundEvent, u as DeviceInfoUpdate, un as superwallTrackSkip, ut as getOrSetInstallId, v as FeatureFlagCondition, vn as levelCompleteEvent, vt as SurveysModuleOptions, w as GroupsState, wn as purchaseEvent, wt as NavigationTrackingHooks, x as FeatureFlagVariant, xn as onboardingCompleteEvent, xt as ExceptionSink, y as FeatureFlagDefinition, yn as levelStartEvent, yt as ExceptionInstallOptions, z as SurveyPosition, zt as syncRevenueCatAttributes } from "./index-CQN7IdfN.mjs";
|
|
4
|
+
export { ATTStatus, AddToCartEventParams, AppStateLike, BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, BACKGROUND_FLUSH_TASK_NAME, BackgroundFlushResult, BeforeSendEvent, BeforeSendHook, BeginCheckoutEventParams, CartItem, ClipboardAttribution, CommerceTracker, ConsentState, DeepLinkData, DeviceContext, DeviceInfoUpdate, EcommerceItem, Environment, ErrorListener, EventProperties, ExceptionInstallOptions, ExceptionProperties, ExceptionSink, ExpoRouterTrackingOptions, FeatureFlagBootstrap, FeatureFlagBootstrapData, FeatureFlagCondition, FeatureFlagDefinition, FeatureFlagValue, FeatureFlagVariant, FeatureFlagsListener, GoogleAdvertisingInfo, GroupsState, InitListener, InstallReferrerData, LayersError, LayersEvent, LayersEventName, LayersRNConfig, LayersReactNative, NavigationTrackingHooks, OrderParams, PurchaseEventParams, PurchaseFailedParams, PurchaseParams, RefundEventParams, RefundParams, RevenueCatConfig, RevenueCatCustomerInfo, RevenueCatPackage, SKANConversionRule, SKANManager, SKANMetrics, SKANPresetConfig, StandardEventName, StandardEventPayload, StandardEvents, StartTrialEventParams, SubscribeEventParams, SubscriptionParams, SuperwallEventInfo, SuperwallPaywallInfo, SuperwallProduct, SurveyAnswer, SurveyDefinition, SurveyDisplay, SurveyPosition, SurveyQuestion, SurveyResponse, SurveyTargeting, SurveyTargetingContext, SurveyType, SurveysModule, SurveysModuleOptions, TypedEventPayload, UserProperties, ViewItemEventParams, addToCartEvent, addToWishlistEvent, buildAddToCartEvent, buildBeginCheckoutEvent, buildExceptionProperties, buildInstallReferrerProperties, buildOnboardingCompleteEvent, buildOnboardingStartEvent, buildPaywallShowEvent, buildPurchaseEvent, buildRefundEvent, buildStartTrialEvent, buildSubscribeEvent, buildViewItemEvent, connectRevenueCat, createBackgroundFlushHandler, createNavigationListener, formatFbc, getATTStatus, getAdServicesToken, getAdvertisingId, getFirstInstallTime, getGoogleAdvertisingId, getInstallReferrer, getOrSetInstallId, getVendorId, initiateCheckoutEvent, installExceptionAutoCapture, isATTAvailable, isRevenueCatConnected, levelCompleteEvent, levelStartEvent, loginEvent, onboardingCompleteEvent, onboardingStartEvent, parseDeepLink, parseInstallReferrerUrl, paywallShowEvent, purchaseEvent, readClipboardAttribution, registerEvent, registerExpoBackgroundFlush, requestTrackingAuthorization, resetRevenueCatForTesting, resolveActiveRoute, screenViewEvent, searchEvent, setupDeepLinkListener, shareEvent, shouldTreatAsNewInstall, signUpEvent, startTrialEvent, subscribeEvent, superwallOnEvent, superwallTrackDismiss, superwallTrackPresentation, superwallTrackPurchase, superwallTrackSkip, superwallUserAttributes, syncRevenueCatAttributes, trackAddToCart, trackBeginCheckout, trackOrder, trackPurchase, trackPurchaseFailed, trackRefund, trackRemoveFromCart, trackRevenueCatPurchase, trackSubscription, trackViewProduct, tutorialCompleteEvent, useLayersExpoRouterTracking, useLayersNavigationTracking, viewContentEvent, viewItemEvent };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as isATTAvailable, i as getVendorId, n as getATTStatus, o as requestTrackingAuthorization, r as getAdvertisingId, t as ATTStatus } from "./att-BFy6dcWE.js";
|
|
2
2
|
import { i as SKANPresetConfig, n as SKANManager, r as SKANMetrics, t as SKANConversionRule } from "./skan-DnKHcXAj.js";
|
|
3
|
-
import { $ as
|
|
4
|
-
export { ATTStatus, AddToCartEventParams, AppStateLike, BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, BACKGROUND_FLUSH_TASK_NAME, BackgroundFlushResult, BeforeSendEvent, BeforeSendHook, BeginCheckoutEventParams, CartItem, ClipboardAttribution, CommerceTracker, ConsentState, DeepLinkData, DeviceContext, EcommerceItem, Environment, ErrorListener, EventProperties, FeatureFlagBootstrap, FeatureFlagBootstrapData, FeatureFlagCondition, FeatureFlagDefinition, FeatureFlagValue, FeatureFlagVariant, FeatureFlagsListener, GoogleAdvertisingInfo, GroupsState, InitListener, InstallReferrerData, LayersError, LayersEvent, LayersEventName, LayersRNConfig, LayersReactNative, NavigationTrackingHooks, OrderParams, PurchaseEventParams, PurchaseFailedParams, PurchaseParams, RefundEventParams, RefundParams, RevenueCatConfig, RevenueCatCustomerInfo, RevenueCatPackage, SKANConversionRule, SKANManager, SKANMetrics, SKANPresetConfig, StandardEventName, StandardEventPayload, StandardEvents, StartTrialEventParams, SubscribeEventParams, SubscriptionParams, SuperwallEventInfo, SuperwallPaywallInfo, SuperwallProduct, SurveyAnswer, SurveyDefinition, SurveyDisplay, SurveyPosition, SurveyQuestion, SurveyResponse, SurveyTargeting, SurveyTargetingContext, SurveyType, SurveysModule, SurveysModuleOptions, TypedEventPayload, UserProperties, ViewItemEventParams, addToCartEvent, addToWishlistEvent, buildAddToCartEvent, buildBeginCheckoutEvent, buildInstallReferrerProperties, buildPurchaseEvent, buildRefundEvent, buildStartTrialEvent, buildSubscribeEvent, buildViewItemEvent, connectRevenueCat, createBackgroundFlushHandler, createNavigationListener, formatFbc, getATTStatus, getAdServicesToken, getAdvertisingId, getFirstInstallTime, getGoogleAdvertisingId, getInstallReferrer, getOrSetInstallId, getVendorId, initiateCheckoutEvent, isATTAvailable, isRevenueCatConnected, levelCompleteEvent, levelStartEvent, loginEvent, parseDeepLink, parseInstallReferrerUrl, purchaseEvent, readClipboardAttribution, registerEvent, registerExpoBackgroundFlush, requestTrackingAuthorization, resetRevenueCatForTesting, resolveActiveRoute, screenViewEvent, searchEvent, setupDeepLinkListener, shareEvent, shouldTreatAsNewInstall, signUpEvent, startTrialEvent, subscribeEvent, superwallOnEvent, superwallTrackDismiss, superwallTrackPresentation, superwallTrackPurchase, superwallTrackSkip, superwallUserAttributes, syncRevenueCatAttributes, trackAddToCart, trackBeginCheckout, trackOrder, trackPurchase, trackPurchaseFailed, trackRefund, trackRemoveFromCart, trackRevenueCatPurchase, trackSubscription, trackViewProduct, tutorialCompleteEvent, useLayersExpoRouterTracking, useLayersNavigationTracking, viewContentEvent, viewItemEvent };
|
|
3
|
+
import { $ as buildPaywallShowEvent, $t as trackRefund, A as LayersRNConfig, An as startTrialEvent, At as BackgroundFlushResult, B as SurveyQuestion, Bt as trackRevenueCatPurchase, C as GoogleAdvertisingInfo, Cn as paywallShowEvent, Ct as installExceptionAutoCapture, D as LayersError, Dn as searchEvent, Dt as useLayersNavigationTracking, E as InstallReferrerData, En as screenViewEvent, Et as resolveActiveRoute, F as SubscribeEventParams, Ft as RevenueCatPackage, G as TypedEventPayload, Gt as PurchaseParams, H as SurveyTargeting, Ht as CommerceTracker, I as SurveyAnswer, It as connectRevenueCat, J as buildAddToCartEvent, Jt as trackAddToCart, K as UserProperties, Kt as RefundParams, L as SurveyDefinition, Lt as isRevenueCatConnected, M as PurchaseEventParams, Mn as tutorialCompleteEvent, Mt as registerExpoBackgroundFlush, N as RefundEventParams, Nn as viewContentEvent, Nt as RevenueCatConfig, O as LayersEvent, On as shareEvent, Ot as BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, P as StartTrialEventParams, Pn as viewItemEvent, Pt as RevenueCatCustomerInfo, Q as buildOnboardingStartEvent, Qt as trackPurchaseFailed, R as SurveyDisplay, Rt as resetRevenueCatForTesting, S as FeatureFlagsListener, Sn as onboardingStartEvent, St as buildExceptionProperties, T as InitListener, Tn as registerEvent, Tt as createNavigationListener, U as SurveyTargetingContext, Ut as OrderParams, V as SurveyResponse, Vt as CartItem, W as SurveyType, Wt as PurchaseFailedParams, X as buildInstallReferrerProperties, Xt as trackOrder, Y as buildBeginCheckoutEvent, Yt as trackBeginCheckout, Z as buildOnboardingCompleteEvent, Zt as trackPurchase, _ as FeatureFlagBootstrapData, _n as initiateCheckoutEvent, _t as SurveysModule, a as BeginCheckoutEventParams, an as SuperwallProduct, at as formatFbc, b as FeatureFlagValue, bn as loginEvent, bt as ExceptionProperties, c as DeepLinkData, cn as superwallTrackPresentation, ct as getGoogleAdvertisingId, d as EcommerceItem, dn as superwallUserAttributes, dt as parseDeepLink, en as trackRemoveFromCart, et as buildPurchaseEvent, f as Environment, fn as StandardEventName, ft as parseInstallReferrerUrl, g as FeatureFlagBootstrap, gn as addToWishlistEvent, gt as useLayersExpoRouterTracking, h as ExpoRouterTrackingOptions, hn as addToCartEvent, ht as shouldTreatAsNewInstall, i as BeforeSendHook, in as SuperwallPaywallInfo, it as buildViewItemEvent, j as LayersReactNative, jn as subscribeEvent, jt as createBackgroundFlushHandler, k as LayersEventName, kn as signUpEvent, kt as BACKGROUND_FLUSH_TASK_NAME, l as DeviceContext, ln as superwallTrackPurchase, lt as getInstallReferrer, m as EventProperties, mn as StandardEvents, mt as setupDeepLinkListener, n as AppStateLike, nn as trackViewProduct, nt as buildStartTrialEvent, o as ClipboardAttribution, on as superwallOnEvent, ot as getAdServicesToken, p as ErrorListener, pn as StandardEventPayload, pt as readClipboardAttribution, q as ViewItemEventParams, qt as SubscriptionParams, r as BeforeSendEvent, rn as SuperwallEventInfo, rt as buildSubscribeEvent, s as ConsentState, sn as superwallTrackDismiss, st as getFirstInstallTime, t as AddToCartEventParams, tn as trackSubscription, tt as buildRefundEvent, u as DeviceInfoUpdate, un as superwallTrackSkip, ut as getOrSetInstallId, v as FeatureFlagCondition, vn as levelCompleteEvent, vt as SurveysModuleOptions, w as GroupsState, wn as purchaseEvent, wt as NavigationTrackingHooks, x as FeatureFlagVariant, xn as onboardingCompleteEvent, xt as ExceptionSink, y as FeatureFlagDefinition, yn as levelStartEvent, yt as ExceptionInstallOptions, z as SurveyPosition, zt as syncRevenueCatAttributes } from "./index-BJbKdiVm.js";
|
|
4
|
+
export { ATTStatus, AddToCartEventParams, AppStateLike, BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, BACKGROUND_FLUSH_TASK_NAME, BackgroundFlushResult, BeforeSendEvent, BeforeSendHook, BeginCheckoutEventParams, CartItem, ClipboardAttribution, CommerceTracker, ConsentState, DeepLinkData, DeviceContext, DeviceInfoUpdate, EcommerceItem, Environment, ErrorListener, EventProperties, ExceptionInstallOptions, ExceptionProperties, ExceptionSink, ExpoRouterTrackingOptions, FeatureFlagBootstrap, FeatureFlagBootstrapData, FeatureFlagCondition, FeatureFlagDefinition, FeatureFlagValue, FeatureFlagVariant, FeatureFlagsListener, GoogleAdvertisingInfo, GroupsState, InitListener, InstallReferrerData, LayersError, LayersEvent, LayersEventName, LayersRNConfig, LayersReactNative, NavigationTrackingHooks, OrderParams, PurchaseEventParams, PurchaseFailedParams, PurchaseParams, RefundEventParams, RefundParams, RevenueCatConfig, RevenueCatCustomerInfo, RevenueCatPackage, SKANConversionRule, SKANManager, SKANMetrics, SKANPresetConfig, StandardEventName, StandardEventPayload, StandardEvents, StartTrialEventParams, SubscribeEventParams, SubscriptionParams, SuperwallEventInfo, SuperwallPaywallInfo, SuperwallProduct, SurveyAnswer, SurveyDefinition, SurveyDisplay, SurveyPosition, SurveyQuestion, SurveyResponse, SurveyTargeting, SurveyTargetingContext, SurveyType, SurveysModule, SurveysModuleOptions, TypedEventPayload, UserProperties, ViewItemEventParams, addToCartEvent, addToWishlistEvent, buildAddToCartEvent, buildBeginCheckoutEvent, buildExceptionProperties, buildInstallReferrerProperties, buildOnboardingCompleteEvent, buildOnboardingStartEvent, buildPaywallShowEvent, buildPurchaseEvent, buildRefundEvent, buildStartTrialEvent, buildSubscribeEvent, buildViewItemEvent, connectRevenueCat, createBackgroundFlushHandler, createNavigationListener, formatFbc, getATTStatus, getAdServicesToken, getAdvertisingId, getFirstInstallTime, getGoogleAdvertisingId, getInstallReferrer, getOrSetInstallId, getVendorId, initiateCheckoutEvent, installExceptionAutoCapture, isATTAvailable, isRevenueCatConnected, levelCompleteEvent, levelStartEvent, loginEvent, onboardingCompleteEvent, onboardingStartEvent, parseDeepLink, parseInstallReferrerUrl, paywallShowEvent, purchaseEvent, readClipboardAttribution, registerEvent, registerExpoBackgroundFlush, requestTrackingAuthorization, resetRevenueCatForTesting, resolveActiveRoute, screenViewEvent, searchEvent, setupDeepLinkListener, shareEvent, shouldTreatAsNewInstall, signUpEvent, startTrialEvent, subscribeEvent, superwallOnEvent, superwallTrackDismiss, superwallTrackPresentation, superwallTrackPurchase, superwallTrackSkip, superwallUserAttributes, syncRevenueCatAttributes, trackAddToCart, trackBeginCheckout, trackOrder, trackPurchase, trackPurchaseFailed, trackRefund, trackRemoveFromCart, trackRevenueCatPurchase, trackSubscription, trackViewProduct, tutorialCompleteEvent, useLayersExpoRouterTracking, useLayersNavigationTracking, viewContentEvent, viewItemEvent };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
const require_att = require('./att-CauvkIKr.js');
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const require_src = require('./src-B_cCCgWM.js');
|
|
4
|
+
const require_skan = require('./skan-qcOYJKzP.js');
|
|
5
5
|
let __layers_core_wasm = require("@layers/core-wasm");
|
|
6
6
|
__layers_core_wasm = require_chunk.__toESM(__layers_core_wasm);
|
|
7
7
|
|
|
@@ -37,7 +37,26 @@ Object.defineProperty(exports, 'buildBeginCheckoutEvent', {
|
|
|
37
37
|
return __layers_core_wasm.beginCheckoutEvent;
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
+
exports.buildExceptionProperties = require_src.buildExceptionProperties;
|
|
40
41
|
exports.buildInstallReferrerProperties = require_src.buildInstallReferrerProperties;
|
|
42
|
+
Object.defineProperty(exports, 'buildOnboardingCompleteEvent', {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return __layers_core_wasm.onboardingCompleteEvent;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, 'buildOnboardingStartEvent', {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return __layers_core_wasm.onboardingStartEvent;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, 'buildPaywallShowEvent', {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return __layers_core_wasm.paywallShowEvent;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
41
60
|
Object.defineProperty(exports, 'buildPurchaseEvent', {
|
|
42
61
|
enumerable: true,
|
|
43
62
|
get: function () {
|
|
@@ -81,13 +100,17 @@ exports.getInstallReferrer = require_src.getInstallReferrer;
|
|
|
81
100
|
exports.getOrSetInstallId = require_src.getOrSetInstallId;
|
|
82
101
|
exports.getVendorId = require_att.getVendorId;
|
|
83
102
|
exports.initiateCheckoutEvent = require_src.initiateCheckoutEvent;
|
|
103
|
+
exports.installExceptionAutoCapture = require_src.installExceptionAutoCapture;
|
|
84
104
|
exports.isATTAvailable = require_att.isATTAvailable;
|
|
85
105
|
exports.isRevenueCatConnected = require_src.isRevenueCatConnected;
|
|
86
106
|
exports.levelCompleteEvent = require_src.levelCompleteEvent;
|
|
87
107
|
exports.levelStartEvent = require_src.levelStartEvent;
|
|
88
108
|
exports.loginEvent = require_src.loginEvent;
|
|
109
|
+
exports.onboardingCompleteEvent = require_src.onboardingCompleteEvent;
|
|
110
|
+
exports.onboardingStartEvent = require_src.onboardingStartEvent;
|
|
89
111
|
exports.parseDeepLink = require_src.parseDeepLink;
|
|
90
112
|
exports.parseInstallReferrerUrl = require_src.parseInstallReferrerUrl;
|
|
113
|
+
exports.paywallShowEvent = require_src.paywallShowEvent;
|
|
91
114
|
exports.purchaseEvent = require_src.purchaseEvent;
|
|
92
115
|
exports.readClipboardAttribution = require_src.readClipboardAttribution;
|
|
93
116
|
exports.registerEvent = require_src.registerEvent;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as requestTrackingAuthorization, i as isATTAvailable, n as getAdvertisingId, r as getVendorId, t as getATTStatus } from "./att-CnlG_CuV.mjs";
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
2
|
+
import { $ as superwallTrackSkip, A as useLayersNavigationTracking, B as trackAddToCart, C as readClipboardAttribution, Ct as installExceptionAutoCapture, D as SurveysModule, E as useLayersExpoRouterTracking, F as connectRevenueCat, G as trackRefund, H as trackOrder, I as isRevenueCatConnected, J as trackViewProduct, K as trackRemoveFromCart, L as resetRevenueCatForTesting, M as BACKGROUND_FLUSH_TASK_NAME, N as createBackgroundFlushHandler, O as createNavigationListener, P as registerExpoBackgroundFlush, Q as superwallTrackPurchase, R as syncRevenueCatAttributes, S as parseInstallReferrerUrl, St as buildExceptionProperties, T as shouldTreatAsNewInstall, U as trackPurchase, V as trackBeginCheckout, W as trackPurchaseFailed, X as superwallTrackDismiss, Y as superwallOnEvent, Z as superwallTrackPresentation, _ as getFirstInstallTime, _t as startTrialEvent, a as buildBeginCheckoutEvent, at as levelCompleteEvent, b as getOrSetInstallId, bt as viewContentEvent, c as buildOnboardingStartEvent, ct as onboardingCompleteEvent, d as buildRefundEvent, dt as purchaseEvent, et as superwallUserAttributes, f as buildStartTrialEvent, ft as registerEvent, g as getAdServicesToken, gt as signUpEvent, h as formatFbc, ht as shareEvent, i as buildAddToCartEvent, it as initiateCheckoutEvent, j as BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, k as resolveActiveRoute, l as buildPaywallShowEvent, lt as onboardingStartEvent, m as buildViewItemEvent, mt as searchEvent, n as LayersEvent, nt as addToCartEvent, o as buildInstallReferrerProperties, ot as levelStartEvent, p as buildSubscribeEvent, pt as screenViewEvent, q as trackSubscription, r as LayersReactNative, rt as addToWishlistEvent, s as buildOnboardingCompleteEvent, st as loginEvent, t as LayersError, tt as StandardEvents, u as buildPurchaseEvent, ut as paywallShowEvent, v as getGoogleAdvertisingId, vt as subscribeEvent, w as setupDeepLinkListener, x as parseDeepLink, xt as viewItemEvent, y as getInstallReferrer, yt as tutorialCompleteEvent, z as trackRevenueCatPurchase } from "./src-DL5bdg2R.mjs";
|
|
3
|
+
import { t as SKANManager } from "./skan-DO7MLv2w.mjs";
|
|
4
4
|
|
|
5
|
-
export { BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, BACKGROUND_FLUSH_TASK_NAME, LayersError, LayersEvent, LayersReactNative, SKANManager, StandardEvents, SurveysModule, addToCartEvent, addToWishlistEvent, buildAddToCartEvent, buildBeginCheckoutEvent, buildInstallReferrerProperties, buildPurchaseEvent, buildRefundEvent, buildStartTrialEvent, buildSubscribeEvent, buildViewItemEvent, connectRevenueCat, createBackgroundFlushHandler, createNavigationListener, formatFbc, getATTStatus, getAdServicesToken, getAdvertisingId, getFirstInstallTime, getGoogleAdvertisingId, getInstallReferrer, getOrSetInstallId, getVendorId, initiateCheckoutEvent, isATTAvailable, isRevenueCatConnected, levelCompleteEvent, levelStartEvent, loginEvent, parseDeepLink, parseInstallReferrerUrl, purchaseEvent, readClipboardAttribution, registerEvent, registerExpoBackgroundFlush, requestTrackingAuthorization, resetRevenueCatForTesting, resolveActiveRoute, screenViewEvent, searchEvent, setupDeepLinkListener, shareEvent, shouldTreatAsNewInstall, signUpEvent, startTrialEvent, subscribeEvent, superwallOnEvent, superwallTrackDismiss, superwallTrackPresentation, superwallTrackPurchase, superwallTrackSkip, superwallUserAttributes, syncRevenueCatAttributes, trackAddToCart, trackBeginCheckout, trackOrder, trackPurchase, trackPurchaseFailed, trackRefund, trackRemoveFromCart, trackRevenueCatPurchase, trackSubscription, trackViewProduct, tutorialCompleteEvent, useLayersExpoRouterTracking, useLayersNavigationTracking, viewContentEvent, viewItemEvent };
|
|
5
|
+
export { BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, BACKGROUND_FLUSH_TASK_NAME, LayersError, LayersEvent, LayersReactNative, SKANManager, StandardEvents, SurveysModule, addToCartEvent, addToWishlistEvent, buildAddToCartEvent, buildBeginCheckoutEvent, buildExceptionProperties, buildInstallReferrerProperties, buildOnboardingCompleteEvent, buildOnboardingStartEvent, buildPaywallShowEvent, buildPurchaseEvent, buildRefundEvent, buildStartTrialEvent, buildSubscribeEvent, buildViewItemEvent, connectRevenueCat, createBackgroundFlushHandler, createNavigationListener, formatFbc, getATTStatus, getAdServicesToken, getAdvertisingId, getFirstInstallTime, getGoogleAdvertisingId, getInstallReferrer, getOrSetInstallId, getVendorId, initiateCheckoutEvent, installExceptionAutoCapture, isATTAvailable, isRevenueCatConnected, levelCompleteEvent, levelStartEvent, loginEvent, onboardingCompleteEvent, onboardingStartEvent, parseDeepLink, parseInstallReferrerUrl, paywallShowEvent, purchaseEvent, readClipboardAttribution, registerEvent, registerExpoBackgroundFlush, requestTrackingAuthorization, resetRevenueCatForTesting, resolveActiveRoute, screenViewEvent, searchEvent, setupDeepLinkListener, shareEvent, shouldTreatAsNewInstall, signUpEvent, startTrialEvent, subscribeEvent, superwallOnEvent, superwallTrackDismiss, superwallTrackPresentation, superwallTrackPurchase, superwallTrackSkip, superwallUserAttributes, syncRevenueCatAttributes, trackAddToCart, trackBeginCheckout, trackOrder, trackPurchase, trackPurchaseFailed, trackRefund, trackRemoveFromCart, trackRevenueCatPurchase, trackSubscription, trackViewProduct, tutorialCompleteEvent, useLayersExpoRouterTracking, useLayersNavigationTracking, viewContentEvent, viewItemEvent };
|
package/dist/react.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./att-BDPyE-Gs.mjs";
|
|
2
2
|
import "./skan-BljOFaeU.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { A as LayersRNConfig, j as LayersReactNative, m as EventProperties, s as ConsentState } from "./index-CQN7IdfN.mjs";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./att-BFy6dcWE.js";
|
|
2
2
|
import "./skan-DnKHcXAj.js";
|
|
3
|
-
import {
|
|
3
|
+
import { A as LayersRNConfig, j as LayersReactNative, m as EventProperties, s as ConsentState } from "./index-BJbKdiVm.js";
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
|
package/dist/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
require('./att-CauvkIKr.js');
|
|
3
|
-
require('./
|
|
4
|
-
|
|
3
|
+
const require_src = require('./src-B_cCCgWM.js');
|
|
4
|
+
require('./skan-qcOYJKzP.js');
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
package/dist/react.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./att-CnlG_CuV.mjs";
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
2
|
+
import { r as LayersReactNative } from "./src-DL5bdg2R.mjs";
|
|
3
|
+
import "./skan-DO7MLv2w.mjs";
|
|
4
4
|
import { createContext, useCallback, useContext, useEffect, useRef } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skan-B0F6AX7g.mjs","names":["sharedCore: SkanCore | null"],"sources":["../src/skan.ts"],"sourcesContent":["// SKAN Module — iOS-only SKAdNetwork conversion value management.\n//\n// Thin facade over the Rust core's SKAN engine, which is the single source of\n// truth for rule evaluation, presets, the monotonic floor, and persistence. This\n// wrapper only bridges to the native iOS SKAdNetwork APIs (which the core cannot\n// call) and reports the native apply outcome back to the core via\n// `skanRecordConversionResult`. There is no parallel JS rule engine.\n\nexport interface SKANConversionRule {\n eventName: string;\n conditions?: Record<string, unknown>;\n conversionValue: number; // 0-63 for SKAN 3.0, 0-7 fine values in SKAN 4.0\n coarseValue?: 'low' | 'medium' | 'high'; // SKAN 4.0 only\n lockWindow?: boolean; // SKAN 4.0 only\n priority?: number;\n description?: string;\n}\n\nexport interface SKANPresetConfig {\n name: 'subscriptions' | 'engagement' | 'iap';\n rules: SKANConversionRule[];\n description: string;\n maxValue: number;\n}\n\nexport interface SKANMetrics {\n isSupported: boolean;\n version: string;\n currentValue: number | null;\n currentPreset: string | null;\n ruleCount: number;\n evaluationCount: number;\n}\n\n/**\n * The subset of the Rust core (`LayersCore`) the SKAN facade delegates to. The\n * core owns all rule evaluation, presets, and the monotonic floor.\n */\nexport interface SkanCore {\n skanSetPreset(preset: string): void;\n skanSetRules(rulesJson: string): void;\n skanProcessEvent(\n eventName: string,\n properties: Record<string, unknown> | null\n ): { fineValue: number; coarseValue: string | null; lockWindow: boolean } | null;\n skanRecordConversionResult(value: number, success: boolean): void;\n skanCurrentValue(): number;\n skanCurrentPreset(): string | null;\n skanIsEnabled(): boolean;\n}\n\ninterface NativeSKANModule {\n isAvailable(): Promise<boolean>;\n getVersion(): Promise<string>;\n registerAppForAdNetworkAttribution(): Promise<void>;\n updateConversionValue(value: number): Promise<void>;\n updatePostbackConversionValue(\n value: number,\n coarseValue?: string,\n lockWindow?: boolean\n ): Promise<void>;\n getCurrentConversionValue(): Promise<number | null>;\n}\n\nfunction getNativeModule(): NativeSKANModule | null {\n try {\n const { NativeModules, Platform } = require('react-native');\n if (Platform.OS === 'ios' && NativeModules.LayersSKAN) {\n return NativeModules.LayersSKAN as NativeSKANModule;\n }\n } catch {\n // Not available\n }\n return null;\n}\n\nlet sharedCore: SkanCore | null = null;\n\n/**\n * Wire the SKAN facade to the SDK's Rust core. Called by the SDK on init so that\n * a directly-constructed `new SKANManager()` and the SDK's own auto-config both\n * delegate to the same core engine.\n */\nexport function setSkanCore(core: SkanCore | null): void {\n sharedCore = core;\n}\n\n/**\n * Apply a native SKAN conversion update returned by the core, then report the\n * outcome so the core commits its monotonic floor only on success. Shared by the\n * facade and the SDK's track/screen forwarding.\n */\nexport async function applySkanDecision(\n core: SkanCore,\n native: NativeSKANModule | null,\n decision: { fineValue: number; coarseValue: string | null; lockWindow: boolean }\n): Promise<boolean> {\n if (!native) {\n // No native module (Android, or an iOS build without the LayersSKAN\n // bridge): nothing was posted to Apple. Committing the floor here recorded\n // conversion values that never left the device, and because the floor is\n // monotonic it then blocked the real postback if the bridge showed up\n // later. Report the failure so the core leaves the floor where it is.\n core.skanRecordConversionResult(decision.fineValue, false);\n return false;\n }\n try {\n if (decision.coarseValue) {\n await native.updatePostbackConversionValue(\n decision.fineValue,\n decision.coarseValue,\n decision.lockWindow\n );\n } else {\n await native.updateConversionValue(decision.fineValue);\n }\n core.skanRecordConversionResult(decision.fineValue, true);\n return true;\n } catch {\n // Native update failed — the core leaves the floor unchanged so the next\n // matching event re-issues it (no silently-lost value).\n core.skanRecordConversionResult(decision.fineValue, false);\n return false;\n }\n}\n\nexport class SKANManager {\n private nativeModule: NativeSKANModule | null;\n private core: SkanCore | null;\n private evaluationCount = 0;\n private onConversionUpdate?: (data: {\n event: string;\n previousValue: number;\n newValue: number;\n rule: SKANConversionRule;\n }) => void;\n\n constructor(\n onConversionUpdate?: (data: {\n event: string;\n previousValue: number;\n newValue: number;\n rule: SKANConversionRule;\n }) => void,\n core?: SkanCore | null\n ) {\n this.nativeModule = getNativeModule();\n this.core = core ?? sharedCore;\n if (onConversionUpdate) {\n this.onConversionUpdate = onConversionUpdate;\n }\n }\n\n /**\n * Initialize the manager. `arm` controls whether Apple's postback window is\n * registered — pass `false` on re-config so we don't re-arm mid-session\n * (re-registering would reset the OS conversion value). Returns `true` only if\n * the native register was attempted and succeeded (a rejection throws; an\n * unavailable/no-module case returns false).\n */\n async initialize(arm = true): Promise<boolean> {\n if (!this.nativeModule) return false;\n const available = await this.nativeModule.isAvailable();\n if (!available) return false;\n if (arm) {\n await this.nativeModule.registerAppForAdNetworkAttribution();\n return true;\n }\n return false;\n }\n\n isSupported(): boolean {\n return this.nativeModule !== null;\n }\n\n /** Load a built-in preset in the core (subscriptions/engagement/iap). */\n setPreset(preset: string): void {\n this.core?.skanSetPreset(preset);\n }\n\n /** Replace the core's active rules with a custom set. */\n setCustomRules(rules: SKANConversionRule[]): void {\n this.core?.skanSetRules(JSON.stringify(rules));\n }\n\n /**\n * Evaluate an event via the core. If the core returns an update, apply it to\n * native SKAdNetwork and report the result back so the core commits its floor\n * only on success.\n */\n async processEvent(eventName: string, properties: Record<string, unknown>): Promise<void> {\n this.evaluationCount += 1;\n const core = this.core;\n if (!core) return;\n const previousValue = core.skanCurrentValue();\n const decision = core.skanProcessEvent(eventName, properties ?? {});\n if (!decision) return;\n const applied = await applySkanDecision(core, this.nativeModule, decision);\n // Only notify on a confirmed apply — a failed native postback leaves the\n // core's floor un-advanced, so the consumer must not see it as posted.\n if (!applied) return;\n this.onConversionUpdate?.({\n event: eventName,\n previousValue,\n newValue: decision.fineValue,\n rule: {\n eventName,\n conversionValue: decision.fineValue,\n lockWindow: decision.lockWindow,\n ...(decision.coarseValue\n ? { coarseValue: decision.coarseValue as 'low' | 'medium' | 'high' }\n : {})\n }\n });\n }\n\n /** The highest SKAN conversion value posted so far (from the core). */\n getCurrentValue(): number {\n return this.core?.skanCurrentValue() ?? 0;\n }\n\n /** The active preset name (from the core), or null. */\n getCurrentPreset(): string | null {\n return this.core?.skanCurrentPreset() ?? null;\n }\n\n /**\n * The active rules. The core owns the rule set and does not expose it, so this\n * returns an empty array; use the core's metrics for introspection.\n */\n getCurrentRules(): SKANConversionRule[] {\n return [];\n }\n\n getMetrics(): SKANMetrics {\n return {\n isSupported: this.isSupported(),\n version: '4.0',\n currentValue: this.core?.skanCurrentValue() ?? 0,\n currentPreset: this.core?.skanCurrentPreset() ?? null,\n ruleCount: 0,\n evaluationCount: this.evaluationCount\n };\n }\n}\n"],"mappings":";;;AAgEA,SAAS,kBAA2C;AAClD,KAAI;EACF,MAAM,EAAE,eAAe,uBAAqB,eAAe;AAC3D,MAAI,SAAS,OAAO,SAAS,cAAc,WACzC,QAAO,cAAc;SAEjB;AAGR,QAAO;;AAGT,IAAIA,aAA8B;;;;;;AAOlC,SAAgB,YAAY,MAA6B;AACvD,cAAa;;;;;;;AAQf,eAAsB,kBACpB,MACA,QACA,UACkB;AAClB,KAAI,CAAC,QAAQ;AAMX,OAAK,2BAA2B,SAAS,WAAW,MAAM;AAC1D,SAAO;;AAET,KAAI;AACF,MAAI,SAAS,YACX,OAAM,OAAO,8BACX,SAAS,WACT,SAAS,aACT,SAAS,WACV;MAED,OAAM,OAAO,sBAAsB,SAAS,UAAU;AAExD,OAAK,2BAA2B,SAAS,WAAW,KAAK;AACzD,SAAO;SACD;AAGN,OAAK,2BAA2B,SAAS,WAAW,MAAM;AAC1D,SAAO;;;AAIX,IAAa,cAAb,MAAyB;CACvB,AAAQ;CACR,AAAQ;CACR,AAAQ,kBAAkB;CAC1B,AAAQ;CAOR,YACE,oBAMA,MACA;AACA,OAAK,eAAe,iBAAiB;AACrC,OAAK,OAAO,QAAQ;AACpB,MAAI,mBACF,MAAK,qBAAqB;;;;;;;;;CAW9B,MAAM,WAAW,MAAM,MAAwB;AAC7C,MAAI,CAAC,KAAK,aAAc,QAAO;AAE/B,MAAI,CADc,MAAM,KAAK,aAAa,aAAa,CACvC,QAAO;AACvB,MAAI,KAAK;AACP,SAAM,KAAK,aAAa,oCAAoC;AAC5D,UAAO;;AAET,SAAO;;CAGT,cAAuB;AACrB,SAAO,KAAK,iBAAiB;;;CAI/B,UAAU,QAAsB;AAC9B,OAAK,MAAM,cAAc,OAAO;;;CAIlC,eAAe,OAAmC;AAChD,OAAK,MAAM,aAAa,KAAK,UAAU,MAAM,CAAC;;;;;;;CAQhD,MAAM,aAAa,WAAmB,YAAoD;AACxF,OAAK,mBAAmB;EACxB,MAAM,OAAO,KAAK;AAClB,MAAI,CAAC,KAAM;EACX,MAAM,gBAAgB,KAAK,kBAAkB;EAC7C,MAAM,WAAW,KAAK,iBAAiB,WAAW,cAAc,EAAE,CAAC;AACnE,MAAI,CAAC,SAAU;AAIf,MAAI,CAHY,MAAM,kBAAkB,MAAM,KAAK,cAAc,SAAS,CAG5D;AACd,OAAK,qBAAqB;GACxB,OAAO;GACP;GACA,UAAU,SAAS;GACnB,MAAM;IACJ;IACA,iBAAiB,SAAS;IAC1B,YAAY,SAAS;IACrB,GAAI,SAAS,cACT,EAAE,aAAa,SAAS,aAA0C,GAClE,EAAE;IACP;GACF,CAAC;;;CAIJ,kBAA0B;AACxB,SAAO,KAAK,MAAM,kBAAkB,IAAI;;;CAI1C,mBAAkC;AAChC,SAAO,KAAK,MAAM,mBAAmB,IAAI;;;;;;CAO3C,kBAAwC;AACtC,SAAO,EAAE;;CAGX,aAA0B;AACxB,SAAO;GACL,aAAa,KAAK,aAAa;GAC/B,SAAS;GACT,cAAc,KAAK,MAAM,kBAAkB,IAAI;GAC/C,eAAe,KAAK,MAAM,mBAAmB,IAAI;GACjD,WAAW;GACX,iBAAiB,KAAK;GACvB"}
|
|
1
|
+
{"version":3,"file":"skan-DO7MLv2w.mjs","names":["sharedCore: SkanCore | null"],"sources":["../src/skan.ts"],"sourcesContent":["// SKAN Module — iOS-only SKAdNetwork conversion value management.\n//\n// Thin facade over the Rust core's SKAN engine, which is the single source of\n// truth for rule evaluation, presets, the monotonic floor, and persistence. This\n// wrapper only bridges to the native iOS SKAdNetwork APIs (which the core cannot\n// call) and reports the native apply outcome back to the core via\n// `skanRecordConversionResult`. There is no parallel JS rule engine.\n\nexport interface SKANConversionRule {\n eventName: string;\n conditions?: Record<string, unknown>;\n conversionValue: number; // 0-63 for SKAN 3.0, 0-7 fine values in SKAN 4.0\n coarseValue?: 'low' | 'medium' | 'high'; // SKAN 4.0 only\n lockWindow?: boolean; // SKAN 4.0 only\n priority?: number;\n description?: string;\n}\n\nexport interface SKANPresetConfig {\n name: 'subscriptions' | 'engagement' | 'iap';\n rules: SKANConversionRule[];\n description: string;\n maxValue: number;\n}\n\nexport interface SKANMetrics {\n isSupported: boolean;\n version: string;\n currentValue: number | null;\n currentPreset: string | null;\n ruleCount: number;\n evaluationCount: number;\n}\n\n/**\n * The subset of the Rust core (`LayersCore`) the SKAN facade delegates to. The\n * core owns all rule evaluation, presets, and the monotonic floor.\n */\nexport interface SkanCore {\n skanSetPreset(preset: string): void;\n skanSetRules(rulesJson: string): void;\n skanProcessEvent(\n eventName: string,\n properties: Record<string, unknown> | null\n ): { fineValue: number; coarseValue: string | null; lockWindow: boolean } | null;\n skanRecordConversionResult(value: number, success: boolean): void;\n skanCurrentValue(): number;\n skanCurrentPreset(): string | null;\n skanIsEnabled(): boolean;\n}\n\ninterface NativeSKANModule {\n isAvailable(): Promise<boolean>;\n getVersion(): Promise<string>;\n registerAppForAdNetworkAttribution(): Promise<void>;\n updateConversionValue(value: number): Promise<void>;\n updatePostbackConversionValue(\n value: number,\n coarseValue?: string,\n lockWindow?: boolean\n ): Promise<void>;\n getCurrentConversionValue(): Promise<number | null>;\n}\n\nfunction getNativeModule(): NativeSKANModule | null {\n try {\n const { NativeModules, Platform } = require('react-native');\n if (Platform.OS === 'ios' && NativeModules.LayersSKAN) {\n return NativeModules.LayersSKAN as NativeSKANModule;\n }\n } catch {\n // Not available\n }\n return null;\n}\n\nlet sharedCore: SkanCore | null = null;\n\n/**\n * Wire the SKAN facade to the SDK's Rust core. Called by the SDK on init so that\n * a directly-constructed `new SKANManager()` and the SDK's own auto-config both\n * delegate to the same core engine.\n */\nexport function setSkanCore(core: SkanCore | null): void {\n sharedCore = core;\n}\n\n/**\n * Apply a native SKAN conversion update returned by the core, then report the\n * outcome so the core commits its monotonic floor only on success. Shared by the\n * facade and the SDK's track/screen forwarding.\n */\nexport async function applySkanDecision(\n core: SkanCore,\n native: NativeSKANModule | null,\n decision: { fineValue: number; coarseValue: string | null; lockWindow: boolean }\n): Promise<boolean> {\n if (!native) {\n // No native module (Android, or an iOS build without the LayersSKAN\n // bridge): nothing was posted to Apple. Committing the floor here recorded\n // conversion values that never left the device, and because the floor is\n // monotonic it then blocked the real postback if the bridge showed up\n // later. Report the failure so the core leaves the floor where it is.\n core.skanRecordConversionResult(decision.fineValue, false);\n return false;\n }\n try {\n if (decision.coarseValue) {\n await native.updatePostbackConversionValue(\n decision.fineValue,\n decision.coarseValue,\n decision.lockWindow\n );\n } else {\n await native.updateConversionValue(decision.fineValue);\n }\n core.skanRecordConversionResult(decision.fineValue, true);\n return true;\n } catch {\n // Native update failed — the core leaves the floor unchanged so the next\n // matching event re-issues it (no silently-lost value).\n core.skanRecordConversionResult(decision.fineValue, false);\n return false;\n }\n}\n\nexport class SKANManager {\n private nativeModule: NativeSKANModule | null;\n private core: SkanCore | null;\n private evaluationCount = 0;\n private onConversionUpdate?: (data: {\n event: string;\n previousValue: number;\n newValue: number;\n rule: SKANConversionRule;\n }) => void;\n\n constructor(\n onConversionUpdate?: (data: {\n event: string;\n previousValue: number;\n newValue: number;\n rule: SKANConversionRule;\n }) => void,\n core?: SkanCore | null\n ) {\n this.nativeModule = getNativeModule();\n this.core = core ?? sharedCore;\n if (onConversionUpdate) {\n this.onConversionUpdate = onConversionUpdate;\n }\n }\n\n /**\n * Initialize the manager. `arm` controls whether Apple's postback window is\n * registered — pass `false` on re-config so we don't re-arm mid-session\n * (re-registering would reset the OS conversion value). Returns `true` only if\n * the native register was attempted and succeeded (a rejection throws; an\n * unavailable/no-module case returns false).\n */\n async initialize(arm = true): Promise<boolean> {\n if (!this.nativeModule) return false;\n const available = await this.nativeModule.isAvailable();\n if (!available) return false;\n if (arm) {\n await this.nativeModule.registerAppForAdNetworkAttribution();\n return true;\n }\n return false;\n }\n\n isSupported(): boolean {\n return this.nativeModule !== null;\n }\n\n /** Load a built-in preset in the core (subscriptions/engagement/iap). */\n setPreset(preset: string): void {\n this.core?.skanSetPreset(preset);\n }\n\n /** Replace the core's active rules with a custom set. */\n setCustomRules(rules: SKANConversionRule[]): void {\n this.core?.skanSetRules(JSON.stringify(rules));\n }\n\n /**\n * Evaluate an event via the core. If the core returns an update, apply it to\n * native SKAdNetwork and report the result back so the core commits its floor\n * only on success.\n */\n async processEvent(eventName: string, properties: Record<string, unknown>): Promise<void> {\n this.evaluationCount += 1;\n const core = this.core;\n if (!core) return;\n const previousValue = core.skanCurrentValue();\n const decision = core.skanProcessEvent(eventName, properties ?? {});\n if (!decision) return;\n const applied = await applySkanDecision(core, this.nativeModule, decision);\n // Only notify on a confirmed apply — a failed native postback leaves the\n // core's floor un-advanced, so the consumer must not see it as posted.\n if (!applied) return;\n this.onConversionUpdate?.({\n event: eventName,\n previousValue,\n newValue: decision.fineValue,\n rule: {\n eventName,\n conversionValue: decision.fineValue,\n lockWindow: decision.lockWindow,\n ...(decision.coarseValue\n ? { coarseValue: decision.coarseValue as 'low' | 'medium' | 'high' }\n : {})\n }\n });\n }\n\n /** The highest SKAN conversion value posted so far (from the core). */\n getCurrentValue(): number {\n return this.core?.skanCurrentValue() ?? 0;\n }\n\n /** The active preset name (from the core), or null. */\n getCurrentPreset(): string | null {\n return this.core?.skanCurrentPreset() ?? null;\n }\n\n /**\n * The active rules. The core owns the rule set and does not expose it, so this\n * returns an empty array; use the core's metrics for introspection.\n */\n getCurrentRules(): SKANConversionRule[] {\n return [];\n }\n\n getMetrics(): SKANMetrics {\n return {\n isSupported: this.isSupported(),\n version: '4.0',\n currentValue: this.core?.skanCurrentValue() ??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