export type SKANCoarseValue = 'low' | 'medium' | 'high'; export interface SKANConversionResult { fineValue: number; coarseValue: SKANCoarseValue; lockWindow: boolean; priority: number; } export interface PostbackUpdateResponse { success: boolean; framework: 'AdAttributionKit' | 'SKAdNetwork'; fineValue: number; coarseValue: string; lockWindow: boolean; type?: 'reengagement'; } export interface AttributionFrameworkInfo { framework: 'AdAttributionKit' | 'SKAdNetwork' | 'none'; version: string; reengagement_available: boolean; overlapping_windows: boolean; fine_value_range: { min: number; max: number; }; coarse_values: string[]; } export interface EnhancedAttributionInfo extends AttributionFrameworkInfo { geo_postback_available: boolean; development_postbacks: boolean; features: string[]; } export interface PostbackEnvironmentResponse { environment: 'production' | 'sandbox'; isSandbox: boolean; note: string; } export interface OverlappingWindowPostbackResponse { success: boolean; framework: string; version: string; fineValue: number; coarseValue: string; lockWindow: boolean; windowIndex: number; overlappingWindows: boolean; note?: string; } export declare class SKAdNetworkBridge { private static _isSKAN4Available; /** * SKAN 3.0 - Update conversion value (0-63) * @deprecated Use updatePostbackConversionValue for iOS 16.1+ */ static updateConversionValue(value: number): Promise; /** * SKAN 4.0 - Update postback conversion value with coarse value and lock window * Falls back to SKAN 3.0 on iOS 14.0-16.0 */ static updatePostbackConversionValue(result: SKANConversionResult): Promise; /** * Check if SKAN 4.0 is available (iOS 16.1+) */ static isSKAN4Available(): Promise; static isAvailable(): boolean; /** * Check if AdAttributionKit is available (iOS 17.4+) * AdAttributionKit is Apple's replacement for SKAdNetwork with enhanced features */ private static _isAdAttributionKitAvailable; static isAdAttributionKitAvailable(): Promise; /** * Register for ad network attribution * Uses AdAttributionKit on iOS 17.4+, SKAdNetwork on earlier versions */ static registerForAttribution(): Promise<{ framework: string; registered: boolean; } | null>; /** * Get attribution framework info * Returns details about which framework is being used and its capabilities */ static getAttributionInfo(): Promise; /** * Check if overlapping conversion windows are available (iOS 18.4+) * Overlapping windows allow multiple conversion windows to be active simultaneously */ private static _isOverlappingWindowsAvailable; static isOverlappingWindowsAvailable(): Promise; /** * Update conversion value for re-engagement attribution (AdAttributionKit iOS 17.4+ only) * Re-engagement tracks users who return to the app via an ad after initial install. * * @param result - Conversion result with fine value (0-63), coarse value, and lock window * @returns Response with framework info, or null if not supported */ static updateReengagementConversionValue(result: SKANConversionResult): Promise; /** * Get a summary of attribution capabilities for the current device */ static getCapabilitiesSummary(): Promise<{ skadnetwork3: boolean; skadnetwork4: boolean; adAttributionKit: boolean; reengagement: boolean; overlappingWindows: boolean; geoPostback: boolean; developmentPostbacks: boolean; framework: string; }>; /** * Check if geo-level postback data is available (iOS 18.4+) * Geo postbacks include country code information for regional analytics */ private static _isGeoPostbackAvailable; static isGeoPostbackAvailable(): Promise; /** * Set postback environment for testing (iOS 18.4+) * Note: Actual sandbox mode requires Developer Mode enabled in iOS Settings * * @param environment - 'production' or 'sandbox' */ static setPostbackEnvironment(environment: 'production' | 'sandbox'): Promise; /** * Get enhanced attribution info including iOS 18.4+ features * Returns details about geo postbacks, development mode, and all available features */ static getEnhancedAttributionInfo(): Promise; /** * Update postback with overlapping window support (iOS 18.4+) * Allows tracking conversions across multiple time windows simultaneously * * @param result - Conversion result with fine value, coarse value, and lock window * @param windowIndex - Window index: 0 (0-2 days), 1 (3-7 days), 2 (8-35 days) */ static updatePostbackWithWindow(result: SKANConversionResult, windowIndex: 0 | 1 | 2): Promise; /** * Enable development/sandbox mode for testing attribution * Convenience method that sets sandbox environment */ static enableDevelopmentMode(): Promise; /** * Disable development mode (switch to production) */ static disableDevelopmentMode(): Promise; }