import type { IHttpClient } from '../http'; import type { Track } from '../report'; export type AdsDisplayPermission = 'BLOCK_INITIAL' | 'BANNED_FOR_SESSION' | 'HOLDING_HIGH_FREQ' | 'NETWORK_NOT_OK' | 'WAITING_BANNED_RELEASE' | 'BANNED_FOR_TIME' | 'ALLOWED'; export interface IAdsAntiCheatingConfig { maxAllowedAdsForTime?: number; banForTimeThreshold?: number; bannedReleaseTime?: number; initialThreshold?: number; maxAllowedAdsForSession?: number; banForSessionThreshold?: number; highFreqThreshold?: number; } declare global { interface Window { __joliboxLocalStorage__: Storage; } } export declare class AdsAntiCheating { readonly track: Track; readonly httpClient: IHttpClient; readonly checkNetwork: () => boolean; private checkShouldBanInitial; private checkShouldBanHighFreq; private checkShouldBanForTime; private checkShouldBanForSession; constructor(track: Track, httpClient: IHttpClient, checkNetwork: () => boolean, config?: IAdsAntiCheatingConfig); checkAdsDisplayPermission: (type: 'reward' | 'interstitial') => { reason: AdsDisplayPermission; info?: { count: number; }; }; /** * Report an ad display permission issue. * Report to both event tracking system and the business backend system. * @param reason */ report(reason: AdsDisplayPermission, count?: number): void; }