UNPKG

@apiverve/bimivalidator

Version:

BIMI Validator checks if a domain has a valid BIMI record published in DNS. BIMI enables domain owners to display verified logos in supported email clients.

42 lines (35 loc) 1.22 kB
declare module '@apiverve/bimivalidator' { export interface bimivalidatorOptions { api_key: string; secure?: boolean; } export interface bimivalidatorResponse { status: string; error: string | null; data: BIMIRecordValidatorData; code?: number; } interface BIMIRecordValidatorData { bimiHost: string; bimiRecord: string; bimiRecordsCount: number; hasBimiRecord: boolean; host: string; svgLogo: SVGLogo; valid: boolean; version: string; vmcCertificate: SVGLogo; } interface SVGLogo { fileSizeBytes?: number; statusCode: number; url: string; valid: boolean; } export default class bimivalidatorWrapper { constructor(options: bimivalidatorOptions); execute(callback: (error: any, data: bimivalidatorResponse | null) => void): Promise<bimivalidatorResponse>; execute(query: Record<string, any>, callback: (error: any, data: bimivalidatorResponse | null) => void): Promise<bimivalidatorResponse>; execute(query?: Record<string, any>): Promise<bimivalidatorResponse>; } }