/** * Ad-specific types for BigCrunch Mobile Ads SDK */ import { BannerSize, CustomSize, AdRequestOptions, AdEventListener, EventSubscription } from './index'; /** * Banner view props for React component */ export interface BigCrunchBannerViewProps { /** Placement ID configured in BigCrunch dashboard */ placementId: string; /** Banner size (optional, will use placement config if not specified) */ size?: BannerSize | CustomSize; /** Whether to load ad automatically when component mounts */ autoLoad?: boolean; /** Auto-refresh interval in seconds (0 = disabled) */ refreshInterval?: number; /** Custom targeting parameters */ customTargeting?: Record; /** Style for the banner container */ style?: any; /** Callback when ad loads successfully */ onAdLoaded?: () => void; /** Callback when ad fails to load */ onAdFailedToLoad?: (error: AdError) => void; /** Callback when ad impression is recorded */ onAdImpression?: () => void; /** Callback when ad is clicked */ onAdClicked?: () => void; /** Callback when ad opens overlay */ onAdOpened?: () => void; /** Callback when ad closes overlay */ onAdClosed?: () => void; /** Callback when ad revenue is received */ onAdRevenue?: (revenue: AdRevenue) => void; } /** * Interstitial ad interface */ export interface InterstitialAd { /** Load an interstitial ad */ load(options: AdRequestOptions): Promise; /** Show the loaded interstitial */ show(): Promise; /** Check if ad is loaded and ready to show */ isLoaded(): Promise; /** Destroy the ad instance */ destroy(): void; /** Add event listener */ addEventListener( eventType: T['type'], listener: AdEventListener ): EventSubscription; /** Remove all event listeners */ removeAllListeners(): void; } /** * Rewarded ad interface */ export interface RewardedAd { /** Load a rewarded ad */ load(options: AdRequestOptions): Promise; /** Show the loaded rewarded ad */ show(): Promise; /** Check if ad is loaded and ready to show */ isLoaded(): Promise; /** Destroy the ad instance */ destroy(): void; /** Add event listener */ addEventListener( eventType: T['type'], listener: AdEventListener ): EventSubscription; /** Remove all event listeners */ removeAllListeners(): void; } /** * Native ad data */ export interface NativeAdData { /** Placement ID */ placementId: string; /** Headline text */ headline?: string; /** Body text */ body?: string; /** Call to action text */ callToAction?: string; /** Icon image URL */ icon?: string; /** Main image URL */ image?: string; /** Advertiser name */ advertiser?: string; /** Star rating */ starRating?: number; /** Price text */ price?: string; /** Store name */ store?: string; /** Ad choices icon URL */ adChoicesIcon?: string; } /** * Import required types */ import { AdError, AdRevenue, AdEvent } from './index';