type ModuleName = "visibility" | "focus" | "keyboard" | "clipboard" | "mouse" | "resize" | "fullscreen" | "face";
type RiskLevel = "low" | "medium" | "high" | "review_required";
type Severity = "low" | "medium" | "high";
type EventType = "page_visibility_changed" | "window_blur" | "window_focus" | "keyboard_event" | "clipboard_event" | "context_menu_opened" | "cursor_left_viewport" | "cursor_inactive" | "mouse_move" | "window_resized" | "fullscreen_changed" | "face_missing" | "multiple_faces_detected" | "face_out_of_frame" | "face_detector_unavailable" | "module_error";
interface EventEvidence {
    [key: string]: unknown;
}
interface ProctorEvent {
    eventId: string;
    sessionId: string;
    interviewId: string;
    candidateIdHash: string;
    module: ModuleName;
    type: EventType;
    severity: Severity;
    occurredAt: string;
    sequenceNo: number;
    durationMs?: number;
    scoreDelta?: number;
    evidence: EventEvidence;
    sdkVersion: string;
}
interface ModuleOptions {
    enabled: boolean;
}
interface FaceModuleOptions {
    fps?: number;
    maxAllowedFaces?: number;
    faceMissingMs?: number;
    multipleFaceMs?: number;
    outOfFrameMs?: number;
    minDetectionConfidence?: number;
    edgeMarginRatio?: number;
}
type StreamEnvelopeType = "session_started" | "events" | "session_ended";
type StreamHeaders = Record<string, string>;
type StreamHeadersProvider = () => StreamHeaders | Promise<StreamHeaders>;
interface StreamSessionContext {
    sessionId: string;
    interviewId: string;
    candidateIdHash: string;
}
interface StreamEnvelope {
    type: StreamEnvelopeType;
    sentAt: string;
    sdkVersion: string;
    session: StreamSessionContext;
    events: ProctorEvent[];
    summary: Record<string, unknown>;
}
interface ProctorSDKInitConfig {
    streamEndpoint: string;
    interviewId: string;
    candidateIdHash: string;
    face?: FaceModuleOptions;
    headers?: StreamHeaders | StreamHeadersProvider;
    sdkVersion?: string;
    sessionId?: string;
    flushIntervalMs?: number;
    batchSize?: number;
    onEvent?: (event: ProctorEvent) => void;
    onViolation?: (event: ProctorEvent) => void;
    onBatchSent?: (events: ProctorEvent[]) => void;
    onError?: (error: Error, context: {
        phase: string;
    }) => void;
    modules?: {
        visibility?: boolean | Partial<ModuleOptions>;
        focus?: boolean | Partial<ModuleOptions>;
        keyboard?: boolean | Partial<ModuleOptions>;
        clipboard?: boolean | Partial<ModuleOptions>;
        mouse?: boolean | Partial<ModuleOptions>;
        resize?: boolean | Partial<ModuleOptions>;
        fullscreen?: boolean | Partial<ModuleOptions>;
        /**
         * Toggle the camera face-detection module on or off. Defaults to `true`.
         * Detection thresholds are still configured through the top-level `face` option.
         */
        face?: boolean | Partial<ModuleOptions>;
    };
}
interface QueueItem {
    id: string;
    payload: ProctorEvent;
    attempts: number;
}
interface BatchEventPayload {
    sessionId: string;
    events: ProctorEvent[];
    flushedAt: string;
}
interface ProctorSDKState {
    started: boolean;
    sessionId: string;
    riskLevel: RiskLevel;
    riskScore: number;
    lastFlushAt?: string;
}

declare class ProctorSDK {
    private readonly core;
    private constructor();
    static init(config: ProctorSDKInitConfig): Promise<ProctorSDK>;
    start(): Promise<void>;
    stop(): Promise<void>;
    destroy(): Promise<void>;
    flush(): Promise<void>;
    end(): Promise<void>;
    getCurrentRiskScore(): ProctorSDKState;
    get sessionId(): string;
    /** @deprecated Use sessionId. Kept for backward compatibility. */
    get session_id(): string;
}

export { type BatchEventPayload, type EventEvidence, type EventType, type FaceModuleOptions, type ModuleName, type ModuleOptions, type ProctorEvent, ProctorSDK, type ProctorSDKInitConfig, type ProctorSDKState, type QueueItem, type RiskLevel, type Severity, type StreamEnvelope, type StreamEnvelopeType, type StreamHeaders, type StreamHeadersProvider, type StreamSessionContext };
