UNPKG

@nativescript/google-mobile-ads

Version:
124 lines (123 loc) 5.76 kB
import { IMobileAds, AdEventListener, RequestConfiguration, AdShowOptions, IInterstitialAd, RequestOptions, IRewardedAd, IRewardedInterstitialAd, IRewardedItem, ServerSideVerificationOptions, AdapterStatus } from '.'; import { AdEventType, BannerAdBase, MaxAdContentRating, BannerAdSizeBase } from './common'; export { MaxAdContentRating, AdEventType }; import { MobileAdsError } from './error'; export { MobileAdsError }; export * from './adsconsent'; export * from './nativead'; export declare class AdRequest { _native: com.google.android.gms.ads.AdRequest; static fromNative(request: com.google.android.gms.ads.AdRequest): AdRequest; get contentUrl(): string; get keywords(): string[]; get neighboringContentUrls(): string[]; isTestDevice(): boolean; get native(): com.google.android.gms.ads.AdRequest; get android(): com.google.android.gms.ads.AdRequest; } export declare class InterstitialAd implements IInterstitialAd { _native: com.google.android.gms.ads.interstitial.InterstitialAd; _adUnitId: string; _requestOptions?: RequestOptions; _loaded: boolean; _nativeRequest: com.google.android.gms.ads.AdRequest; static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions): InterstitialAd; get adUnitId(): string; _setNative(value: any): void; _setLoaded(value: any): void; _onAdEvent?: AdEventListener; get loaded(): boolean; load(): void; onAdEvent(listener: AdEventListener): void; show(showOptions?: AdShowOptions): void; get native(): com.google.android.gms.ads.interstitial.InterstitialAd; get android(): com.google.android.gms.ads.interstitial.InterstitialAd; get request(): AdRequest; } export declare class RewardedInterstitialAd implements IRewardedInterstitialAd { _native: com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAd; _adUnitId: string; _requestOptions?: RequestOptions; _loaded: boolean; _nativeRequest: com.google.android.gms.ads.AdRequest; static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions): RewardedInterstitialAd; get adUnitId(): string; _setNative(value: any): void; _setLoaded(value: any): void; get loaded(): boolean; load(): void; _onAdEvent: AdEventListener; onAdEvent(listener: AdEventListener): void; show(showOptions?: AdShowOptions): void; setServerSideVerificationOptions(options: ServerSideVerificationOptions): void; get native(): com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAd; get android(): com.google.android.gms.ads.rewardedinterstitial.RewardedInterstitialAd; get request(): AdRequest; } export declare class RewardedAd implements IRewardedAd { _native: com.google.android.gms.ads.rewarded.RewardedAd; _adUnitId: string; _requestOptions?: RequestOptions; _loaded: boolean; _nativeRequest: com.google.android.gms.ads.AdRequest; static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions): RewardedAd; get adUnitId(): string; get loaded(): boolean; _setNative(value: any): void; _setLoaded(value: any): void; load(): void; _onAdEvent: AdEventListener; onAdEvent(listener: AdEventListener): void; show(showOptions?: AdShowOptions): void; setServerSideVerificationOptions(options: ServerSideVerificationOptions): void; get native(): com.google.android.gms.ads.rewarded.RewardedAd; get android(): com.google.android.gms.ads.rewarded.RewardedAd; get request(): AdRequest; } export declare class RewardedItem implements IRewardedItem { _native: com.google.android.gms.ads.rewarded.RewardItem; static fromNative(reward: com.google.android.gms.ads.rewarded.RewardItem): RewardedItem; get amount(): number; get type(): string; get native(): com.google.android.gms.ads.rewarded.RewardItem; get android(): com.google.android.gms.ads.rewarded.RewardItem; } export declare class BannerAdSize extends BannerAdSizeBase { _native: com.google.android.gms.ads.AdSize; constructor(width?: number, height?: number); static fromNative(size: com.google.android.gms.ads.AdSize): BannerAdSize; static get BANNER(): BannerAdSize; static get FULL_BANNER(): BannerAdSize; static get LARGE_BANNER(): BannerAdSize; static get LEADERBOARD(): BannerAdSize; static get MEDIUM_RECTANGLE(): BannerAdSize; static createAnchoredAdaptiveBanner(width: number, orientation?: 'portrait' | 'landscape' | 'device'): BannerAdSize; static createInLineAdaptiveBanner(width: number, maxHeight?: number, orientation?: 'portrait' | 'landscape' | 'device'): BannerAdSize; static get FLUID(): BannerAdSize; static get WIDE_SKYSCRAPER(): BannerAdSize; static get INVALID(): BannerAdSize; get native(): com.google.android.gms.ads.AdSize; get android(): com.google.android.gms.ads.AdSize; } export declare class BannerAd extends BannerAdBase { _native: com.google.android.gms.ads.AdView; _listener: any; _nativeRequest: com.google.android.gms.ads.AdRequest; createNativeView(): com.google.android.gms.ads.AdView; initNativeView(): void; load(options?: RequestOptions): void; isLoading(): boolean; get request(): AdRequest; } export declare class MobileAds implements IMobileAds { private static _instance; static init(): Promise<{ [key: string]: AdapterStatus; }>; static getInstance(): MobileAds; set requestConfiguration(requestConfiguration: RequestConfiguration); get requestConfiguration(): RequestConfiguration; setRequestConfiguration(requestConfiguration: RequestConfiguration): void; getRequestConfiguration(): RequestConfiguration; get app(): any; }