/** * Detector class - Static methods for detecting username availability */ import { type SiteConfig, type FetchResult, type AvailabilityStatus, type RequestMethod } from './types.js'; /** * Static class for availability detection operations */ export declare class Detector { private static readonly regexCache; private static getCompiledRegex; private static getDetectionMethods; private static getErrorCodes; /** * Detect username availability based on site configuration and response */ static detect(config: SiteConfig, result: FetchResult, username: string): AvailabilityStatus; /** * Detect by HTTP status code * Available if status code indicates "not found" (typically 404) */ private static detectByStatusCode; /** * Detect by checking for error message in response body * Available if error message is found in the response */ private static detectByMessage; /** * Detect by checking if response URL matches error URL pattern * Available if redirected to error URL */ private static detectByResponseUrl; private static matchesResponseUrl; /** * Build the URL to check for a username */ static buildUrl(config: SiteConfig, username: string): string; /** * Build the profile URL (for reporting to user) */ static buildProfileUrl(config: SiteConfig, username: string): string; /** * Determine whether redirects should be followed for this site */ static shouldFollowRedirects(config: SiteConfig): boolean; /** * Build request payload if needed (for POST requests) */ static buildPayload(config: SiteConfig, username: string): object | undefined; /** * Recursively replace username placeholders in an object */ private static replaceUsernameInObject; /** * Get the HTTP method for a site request */ static getMethod(config: SiteConfig): RequestMethod; /** * Get merged headers for a site request */ static getHeaders(config: SiteConfig, baseHeaders?: Record): Record; /** * Check if username matches site's regex requirement */ static matchesRegex(config: SiteConfig, username: string): boolean; }