ngxsmk-tel-input
Version:
Angular international telephone input (intl-tel-input UI + libphonenumber-js validation). ControlValueAccessor. SSR-safe.
47 lines • 1.49 kB
TypeScript
import { CountryCode, NumberType } from 'libphonenumber-js';
import * as i0 from "@angular/core";
export interface CarrierInfo {
country: CountryCode;
carrier?: string;
type: NumberType | 'UNKNOWN';
isMobile: boolean;
isLandline: boolean;
isTollFree: boolean;
isPremiumRate: boolean;
isVoip: boolean;
}
export interface FormatSuggestion {
original: string;
suggested: string;
confidence: number;
reason: string;
}
export declare class PhoneIntelligenceService {
/**
* Detect carrier and number type
*/
detectCarrierAndType(phoneNumber: string, country: CountryCode): CarrierInfo | null;
/**
* Get number type description
*/
getNumberTypeDescription(type: NumberType | 'UNKNOWN'): string;
/**
* Suggest format corrections
*/
suggestFormatCorrection(input: string, country: CountryCode): FormatSuggestion | null;
/**
* Fix common formatting issues
*/
private fixCommonFormattingIssues;
/**
* Get timezone for phone number
*/
getTimezone(phoneNumber: string, country: CountryCode): string | null;
/**
* Check if number is likely spam (basic heuristic)
*/
isLikelySpam(phoneNumber: string, country: CountryCode): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneIntelligenceService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<PhoneIntelligenceService>;
}
//# sourceMappingURL=phone-intelligence.service.d.ts.map