//#region src/skan.d.ts interface SKANConversionRule { eventName: string; conditions?: Record; conversionValue: number; coarseValue?: 'low' | 'medium' | 'high'; lockWindow?: boolean; priority?: number; description?: string; } interface SKANPresetConfig { name: 'subscriptions' | 'engagement' | 'iap'; rules: SKANConversionRule[]; description: string; maxValue: number; } interface SKANMetrics { isSupported: boolean; version: string; currentValue: number | null; currentPreset: string | null; ruleCount: number; evaluationCount: number; } /** * The subset of the Rust core (`LayersCore`) the SKAN facade delegates to. The * core owns all rule evaluation, presets, and the monotonic floor. */ interface SkanCore { skanSetPreset(preset: string): void; skanSetRules(rulesJson: string): void; skanProcessEvent(eventName: string, properties: Record | null): { fineValue: number; coarseValue: string | null; lockWindow: boolean; } | null; skanRecordConversionResult(value: number, success: boolean): void; skanCurrentValue(): number; skanCurrentPreset(): string | null; skanIsEnabled(): boolean; } interface NativeSKANModule { isAvailable(): Promise; getVersion(): Promise; registerAppForAdNetworkAttribution(): Promise; updateConversionValue(value: number): Promise; updatePostbackConversionValue(value: number, coarseValue?: string, lockWindow?: boolean): Promise; getCurrentConversionValue(): Promise; } /** * Wire the SKAN facade to the SDK's Rust core. Called by the SDK on init so that * a directly-constructed `new SKANManager()` and the SDK's own auto-config both * delegate to the same core engine. */ declare function setSkanCore(core: SkanCore | null): void; /** * Apply a native SKAN conversion update returned by the core, then report the * outcome so the core commits its monotonic floor only on success. Shared by the * facade and the SDK's track/screen forwarding. */ declare function applySkanDecision(core: SkanCore, native: NativeSKANModule | null, decision: { fineValue: number; coarseValue: string | null; lockWindow: boolean; }): Promise; declare class SKANManager { private nativeModule; private core; private evaluationCount; private onConversionUpdate?; constructor(onConversionUpdate?: (data: { event: string; previousValue: number; newValue: number; rule: SKANConversionRule; }) => void, core?: SkanCore | null); /** * Initialize the manager. `arm` controls whether Apple's postback window is * registered — pass `false` on re-config so we don't re-arm mid-session * (re-registering would reset the OS conversion value). Returns `true` only if * the native register was attempted and succeeded (a rejection throws; an * unavailable/no-module case returns false). */ initialize(arm?: boolean): Promise; isSupported(): boolean; /** Load a built-in preset in the core (subscriptions/engagement/iap). */ setPreset(preset: string): void; /** Replace the core's active rules with a custom set. */ setCustomRules(rules: SKANConversionRule[]): void; /** * Evaluate an event via the core. If the core returns an update, apply it to * native SKAdNetwork and report the result back so the core commits its floor * only on success. */ processEvent(eventName: string, properties: Record): Promise; /** The highest SKAN conversion value posted so far (from the core). */ getCurrentValue(): number; /** The active preset name (from the core), or null. */ getCurrentPreset(): string | null; /** * The active rules. The core owns the rule set and does not expose it, so this * returns an empty array; use the core's metrics for introspection. */ getCurrentRules(): SKANConversionRule[]; getMetrics(): SKANMetrics; } //#endregion export { SkanCore as a, SKANPresetConfig as i, SKANManager as n, applySkanDecision as o, SKANMetrics as r, setSkanCore as s, SKANConversionRule as t }; //# sourceMappingURL=skan-DnKHcXAj.d.ts.map