import { RTCIceCandidatePair } from '../connection/IConnectionObserver';
import { HMSException, HMSTrack, HMSUpdateListener } from '../internal';
export declare enum ConnectivityState {
    STARTING = 0,
    INIT_FETCHED = 1,
    SIGNAL_CONNECTED = 2,
    ICE_ESTABLISHED = 3,
    MEDIA_CAPTURED = 4,
    MEDIA_PUBLISHED = 5,
    COMPLETED = 6
}
export interface HMSDiagnosticsConnectivityListener extends HMSUpdateListener {
    onInitSuccess(websocketURL: string): void;
    onSignallingSuccess(): void;
    onICESuccess(isPublish: boolean): void;
    onMediaPublished(track: HMSTrack): void;
    onICECandidate(candidate: RTCIceCandidate, isPublish: boolean): void;
    onSelectedICECandidatePairChange(candidatePair: RTCIceCandidatePair, isPublish: boolean): void;
}
export interface MediaPermissionCheck {
    audio?: boolean;
    video?: boolean;
}
export interface HMSDiagnosticsInterface {
    requestPermission(check: MediaPermissionCheck): Promise<MediaPermissionCheck>;
    checkBrowserSupport(): void;
    startMicCheck(args: {
        inputDevice?: string;
        onError?: (error: Error) => void;
        onStop?: () => void;
        time?: number;
    }): Promise<void>;
    getRecordedAudio(): string | undefined;
    stopMicCheck(): void;
    startCameraCheck(inputDevice?: string): Promise<void>;
    stopCameraCheck(): void;
    startConnectivityCheck(progress: (state: ConnectivityState) => void, completed: (result: ConnectivityCheckResult) => void, region?: string): Promise<void>;
    stopConnectivityCheck(): Promise<void>;
}
export interface ConnectivityCheckResult {
    testTimestamp: number;
    connectivityState?: ConnectivityState;
    signallingReport?: SignallingReport;
    mediaServerReport?: MediaServerReport;
    errors?: Array<HMSException>;
}
export interface SignallingReport {
    isConnected: boolean;
    isInitConnected: boolean;
    websocketUrl?: string;
}
export interface MediaServerReport {
    stats?: DiagnosticsRTCStatsReport;
    isPublishICEConnected: boolean;
    isSubscribeICEConnected: boolean;
    connectionQualityScore?: number;
    publishIceCandidatesGathered?: Array<RTCIceCandidate>;
    subscribeIceCandidatesGathered: Array<RTCIceCandidate>;
    publishICECandidatePairSelected?: RTCIceCandidatePair;
    subscribeICECandidatePairSelected?: RTCIceCandidatePair;
}
export interface DiagnosticsRTCStatsReport {
    combined: DiagnosticsRTCStats;
    audio: DiagnosticsRTCStats;
    video: DiagnosticsRTCStats;
}
export interface DiagnosticsRTCStats {
    bytesSent: number;
    bytesReceived: number;
    packetsReceived: number;
    packetsLost: number;
    bitrateSent: number;
    bitrateReceived: number;
    roundTripTime: number;
}
