UNPKG

@mikkelscheike/email-provider-links

Version:

TypeScript library for email provider detection with 93 providers (207 domains), concurrent DNS resolution, optimized performance, 94.65% test coverage, and enterprise security for login and password reset flows

48 lines 1.32 kB
/** * URL Security Validation Module * * Provides validation and allowlisting for email provider URLs to prevent * malicious redirects and supply chain attacks. */ export interface URLValidationResult { isValid: boolean; reason?: string; domain?: string; normalizedUrl?: string; } /** * Validates if a URL is safe for email provider redirects * * @param url - The URL to validate * @returns Validation result with details */ export declare function validateEmailProviderUrl(url: string): URLValidationResult; /** * Validates all URLs in an email providers array * * @param providers - Array of email providers to validate * @returns Array of validation results */ export declare function validateAllProviderUrls(providers: any[]): Array<{ provider: string; url: string; validation: URLValidationResult; }>; /** * Security audit function to check all provider URLs * * @param providers - Array of email providers to audit * @returns Security audit report */ export declare function auditProviderSecurity(providers: any[]): { total: number; valid: number; invalid: number; invalidProviders: { provider: string; url: string; validation: URLValidationResult; }[]; report: string; }; //# sourceMappingURL=url-validator.d.ts.map