1 | import { EventEmitter, EventSubscription } from 'fbemitter';
|
2 | declare type AdManagerCachePolicy = 'none' | 'icon' | 'image' | 'all';
|
3 | declare class NativeAdsManager {
|
4 |
|
5 | placementId: string;
|
6 |
|
7 | adsToRequest: number;
|
8 |
|
9 | isValid: boolean;
|
10 |
|
11 | eventEmitter: EventEmitter;
|
12 | static registerViewsForInteractionAsync(nativeAdViewTag: number, mediaViewTag: number, adIconViewTag: number, clickable: number[]): Promise<any>;
|
13 | static triggerEvent(nativeAdViewTag: number): any;
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | constructor(placementId: string, adsToRequest?: number);
|
21 | /**
|
22 | * Listens for AdManager state changes and updates internal state. When it changes,
|
23 | * callers will be notified of a change
|
24 | */
|
25 | _listenForStateChanges(): void;
|
26 | /**
|
27 | * Used to listening for state changes
|
28 | *
|
29 | * If manager already became valid, it will call the function w/o registering
|
30 | * handler for events
|
31 | */
|
32 | onAdsLoaded(listener: () => void): EventSubscription;
|
33 | onAdsErrored(listener: (error: Error) => void): EventSubscription;
|
34 | /**
|
35 | * Disables auto refreshing for this native ad manager
|
36 | */
|
37 | disableAutoRefresh(): void;
|
38 | /**
|
39 | * Set the native ads manager caching policy. This controls which media from
|
40 | * the native ads are cached before the onAdsLoaded is called.
|
41 | * The default is to not block on caching.
|
42 | */
|
43 | setMediaCachePolicy(cachePolicy: AdManagerCachePolicy): void;
|
44 | }
|
45 | export default NativeAdsManager;
|