@emailcheck/email-validator-js
Version:
Advanced email validation with MX records, SMTP verification, disposable email detection, batch processing, and caching. Production-ready with TypeScript support.
34 lines (33 loc) • 1.17 kB
TypeScript
export interface AzureHttpRequest {
method: string;
url: string;
headers: {
get(name: string): string | null;
} | Record<string, string | undefined>;
query: {
get(name: string): string | null;
} | Record<string, string | undefined>;
json(): Promise<unknown>;
text?: () => Promise<string>;
}
export interface AzureInvocationContext {
invocationId?: string;
functionName?: string;
log?: (...args: unknown[]) => void;
error?: (...args: unknown[]) => void;
}
export interface AzureHttpResponseInit {
status: number;
headers: Record<string, string>;
jsonBody?: unknown;
body?: string;
}
/** Routed Azure Functions v4 handler. */
export declare function azureHandler(req: AzureHttpRequest, _context?: AzureInvocationContext): Promise<AzureHttpResponseInit>;
/** Single-route convenience — infers single vs. batch from the body. */
export declare function azureFunction(req: AzureHttpRequest, _context?: AzureInvocationContext): Promise<AzureHttpResponseInit>;
declare const _default: {
azureHandler: typeof azureHandler;
azureFunction: typeof azureFunction;
};
export default _default;