import * as plugins from '../../plugins.js'; /** * IP reputation result data */ export interface IIPReputationData { score: number; isSpam: boolean; isProxy: boolean; isTor: boolean; isVPN: boolean; country?: string; asn?: string; org?: string; blacklists?: string[]; } /** * CachedIPReputation - Stores IP reputation lookup results * * Caches the results of IP reputation checks to avoid repeated * external API calls. Default TTL is 24 hours. */ export declare class CachedIPReputation extends plugins.smartdata.SmartdataCachedDocument { /** * IP address (unique identifier) */ ipAddress: string; /** * Reputation score (0-100, higher = better) */ score: number; /** * Whether the IP is flagged as spam source */ isSpam: boolean; /** * Whether the IP is a known proxy */ isProxy: boolean; /** * Whether the IP is a Tor exit node */ isTor: boolean; /** * Whether the IP is a VPN endpoint */ isVPN: boolean; /** * Country code (ISO 3166-1 alpha-2) */ country: string; /** * Autonomous System Number */ asn: string; /** * Organization name */ org: string; /** * List of blacklists the IP appears on */ blacklists: string[]; /** * Number of times this IP has been checked */ checkCount: number; /** * Number of connections from this IP */ connectionCount: number; /** * Number of emails received from this IP */ emailCount: number; /** * Number of spam emails from this IP */ spamCount: number; constructor(); /** * Create from reputation data */ static fromReputationData(ipAddress: string, data: IIPReputationData): CachedIPReputation; /** * Convert to reputation data object */ toReputationData(): IIPReputationData; /** * Find by IP address */ static findByIP(ipAddress: string): Promise; /** * Find all IPs flagged as spam */ static findSpamIPs(): Promise; /** * Find IPs with score below threshold */ static findLowScoreIPs(threshold: number): Promise; /** * Record a connection from this IP */ recordConnection(): void; /** * Record an email from this IP */ recordEmail(isSpam?: boolean): void; /** * Update the reputation data */ updateReputation(data: IIPReputationData): void; /** * Check if this IP should be blocked */ shouldBlock(): boolean; }