UNPKG

phone-validator-net

Version:

A wrapper for the phone-validator.net API

18 lines (17 loc) 712 B
export interface IPhoneInput { countrycode?: string; mode?: 'extensive' | 'express'; phone: string; } declare type EStatus = 'VALID_CONFIRMED' | 'VALID_UNCONFIRMED' | 'INVALID' | 'RATE_LIMIT_EXCEEDED' | 'API_KEY_INVALID_OR_DEPLETED'; declare type ELinetype = 'FIXED_LINE' | 'MOBILE' | 'VOIP' | 'TOLL_FREE' | 'PREMIUM_RATE' | 'SHARED_COST' | 'PERSONAL_NUMBER' | 'PAGER' | 'UAN' | 'VOICEMAIL'; export interface IPhoneResponse { status: EStatus; linetype: ELinetype; location: string; countrycode: string; formatnational: string; formatinternational: string; } declare const _default: (apiKey: string) => (phone: IPhoneInput) => Promise<IPhoneResponse>; export default _default;