/**
 * Geographic Anomaly Detector
 *
 * Detects impossible travel scenarios by analyzing geographic locations
 * of user logins and calculating travel speed between them using the
 * Haversine formula.
 *
 * Flags suspicious activity when:
 * - Travel speed between logins exceeds maximum plausible speed (1200 km/h)
 * - Access from high-risk countries
 * - Potential VPN/proxy usage detected
 *
 * @packageDocumentation
 * @module security/anomaly/detectors/geographic
 */
import type { Detector, DetectionResult, SecurityEvent, GeoLocation, GeographicDetectorConfig } from '../types.js';
/**
 * Calculate the great-circle distance between two points using the Haversine formula
 *
 * @param lat1 - Latitude of first point in decimal degrees
 * @param lon1 - Longitude of first point in decimal degrees
 * @param lat2 - Latitude of second point in decimal degrees
 * @param lon2 - Longitude of second point in decimal degrees
 * @returns Distance in kilometers
 */
export declare function calculateHaversineDistance(lat1: number, lon1: number, lat2: number, lon2: number): number;
/**
 * Calculate travel speed between two locations given timestamps
 *
 * @param loc1 - First location
 * @param time1 - Timestamp of first location
 * @param loc2 - Second location
 * @param time2 - Timestamp of second location
 * @returns Speed in km/h, or null if time difference is zero
 */
export declare function calculateTravelSpeed(loc1: GeoLocation, time1: Date, loc2: GeoLocation, time2: Date): number | null;
/**
 * Geographic anomaly detector implementing impossible travel detection
 */
export declare class GeographicDetector implements Detector {
    readonly name = "geographic";
    readonly description = "Detects impossible travel and geographic anomalies based on login locations";
    private readonly config;
    private readonly redis;
    private readonly keyPrefix;
    constructor(config?: Partial<GeographicDetectorConfig>, keyPrefix?: string);
    /**
     * Analyze an event for geographic anomalies
     */
    detect(event: SecurityEvent): Promise<DetectionResult>;
    /**
     * Learn from an event by storing location history
     */
    learn(event: SecurityEvent): Promise<void>;
    /**
     * Reset all learned location history
     */
    reset(): Promise<void>;
    /**
     * Get location history for a user
     */
    private getLocationHistory;
    /**
     * Get Redis key for user's location history
     */
    private getHistoryKey;
    /**
     * Check for impossible travel between current location and history
     */
    private checkImpossibleTravel;
    /**
     * Check if country is in high-risk list
     */
    private checkHighRiskCountry;
    /**
     * Calculate weight based on travel speed excess
     */
    private calculateTravelWeight;
    /**
     * Calculate severity based on confidence and indicators
     */
    private calculateSeverity;
    /**
     * Generate human-readable description
     */
    private generateDescription;
    /**
     * Format location for display
     */
    private formatLocation;
    /**
     * Create a detection result
     */
    private createResult;
}
/**
 * Create a new geographic detector instance
 */
export declare function createGeographicDetector(config?: Partial<GeographicDetectorConfig>, keyPrefix?: string): GeographicDetector;
//# sourceMappingURL=geographic.d.ts.map