/** * BigCrunch Mobile Ads SDK for React Native * Main API class */ import type { InitializationOptions, Environment, AccountType, SessionInfo, DeviceContext, AppConfig, EventSubscription, ScreenViewOptions } from './types'; /** * Main entry point for BigCrunch Mobile Ads SDK */ export declare class BigCrunchAds { private static isInitializedFlag; private static initializationPromise; /** * Initialize the BigCrunch Ads SDK * Must be called before using any other SDK features * * @param propertyId - Your BigCrunch property ID * @param environment - Environment to use (default: 'production') * @param options - Additional initialization options * * @example * ```typescript * await BigCrunchAds.initialize( * 'your-property-id', * 'production' * ); * ``` */ static initialize(propertyId: string, environment?: Environment, options?: Partial): Promise; /** * Check if the SDK is initialized */ static isInitialized(): Promise; /** * Track a screen view for analytics * * @param screenName - Name of the screen being viewed * @param options - Optional overrides for page URL, content metadata, and custom dimensions * * @example * ```typescript * // Simple usage * BigCrunchAds.trackScreenView('HomeScreen'); * * // With options * BigCrunchAds.trackScreenView('ArticlePage', { * pageUrl: 'https://example.com/articles/123', * pageMeta: { * title: 'My Article Title', * author: 'Jane Smith', * articleSection: 'Technology', * keywords: 'tech,mobile,apps', * }, * customDimensions: { * content_type: 'article', * content_id: '123', * }, * }); * ``` */ static trackScreenView(screenName: string, options?: ScreenViewOptions): Promise; /** * Get the current app configuration * Returns null if config hasn't been loaded yet */ static getAppConfig(): Promise; /** * Force refresh the app configuration from backend */ static refreshConfig(): Promise; /** * Get current session information */ static getSessionInfo(): Promise; /** * Start a new session (usually handled automatically) */ static startNewSession(): Promise; /** * Get device context information */ static getDeviceContext(): Promise; /** * Set GDPR consent string * * @param consent - GDPR consent string */ static setGdprConsent(consent: string): Promise; /** * Set CCPA compliance string * * @param ccpaString - CCPA string (e.g., "1YNN") */ static setCcpaString(ccpaString: string): Promise; /** * Set COPPA compliance * * @param isCompliant - Whether the app is COPPA compliant */ static setCoppaCompliant(isCompliant: boolean): Promise; /** * Set the account type for the current user * * This value is included in all analytics events (pageviews, impressions, revenue, etc.) * and persists until changed. Defaults to 'guest' if not set. * * @param accountType - The user's account type * * @example * ```typescript * BigCrunchAds.setAccountType('subscriber'); * ``` */ static setAccountType(accountType: AccountType): Promise; /** * Enable or disable debug mode * * @param enabled - Whether to enable debug mode */ static setDebugMode(enabled: boolean): Promise; /** * Add a test device ID for testing ads * * @param deviceId - Device ID to add as test device */ static addTestDevice(deviceId: string): Promise; /** * Remove a test device ID * * @param deviceId - Device ID to remove from test devices */ static removeTestDevice(deviceId: string): Promise; /** * Get list of test device IDs */ static getTestDevices(): Promise; /** * Set UTM parameters for attribution tracking * * These parameters are persisted and used for all analytics events. * Typically set from deep link parameters. * * @param params - UTM parameters object * * @example * ```typescript * BigCrunchAds.setUTMParameters({ * source: 'google', * medium: 'cpc', * campaign: 'summer_sale', * term: 'running shoes', * content: 'variant_a' * }); * ``` */ static setUTMParameters(params: { source?: string; medium?: string; campaign?: string; term?: string; content?: string; }): Promise; /** * Clear UTM parameters */ static clearUTMParameters(): Promise; /** * Add a global event listener * * @param eventName - Native event name to listen to * @param listener - Callback function * @returns Subscription object with remove() method */ static addEventListener(eventName: string, listener: (event: any) => void): EventSubscription; /** * Listen for configuration updates */ static onConfigUpdated(listener: (config: AppConfig) => void): EventSubscription; /** * Listen for configuration failures */ static onConfigFailed(listener: (error: Error) => void): EventSubscription; /** * Listen for session start events */ static onSessionStarted(listener: (session: SessionInfo) => void): EventSubscription; /** * Listen for session end events * * Note: the native SDKs do not currently emit this event; the listener is * accepted but will not fire until session-end detection is implemented natively. */ static onSessionEnded(listener: (session: SessionInfo) => void): EventSubscription; /** * Ensure SDK is initialized before calling methods * @private */ private static ensureInitialized; } export default BigCrunchAds; //# sourceMappingURL=BigCrunchAds.d.ts.map