{"version":3,"sources":["../src/reachability.ts"],"sourcesContent":["import type { PhoneNumber } from './types.js';\n\n// Live-lookup counterpart to metadata.ts's static country data: this is\n// the plugin point for real-time telephony intelligence (HLR-style\n// reachability, carrier/porting/roaming status, CNAM, fraud/risk scoring)\n// that static regex patterns fundamentally can't provide - e.g. `parse()`\n// can never resolve `PhoneNumber.type` past 'UNKNOWN' for countries where\n// mobile and fixed-line share the same numbering pattern, but a live\n// lookup can. DialSense ships the interface, not an implementation -\n// consumers plug in their own provider.\nexport interface ReachabilityResult {\n  reachable: boolean | null;\n  lineType: 'MOBILE' | 'FIXED' | 'VOIP' | 'UNKNOWN';\n  carrierName: string | null;\n  ported: boolean | null;\n  roaming: boolean | null;\n  callerName: string | null;\n  riskScore: number | null;\n}\n\nexport interface IReachabilityProvider {\n  lookup(phoneNumber: PhoneNumber): Promise<ReachabilityResult>;\n}\n\nlet _provider: IReachabilityProvider | null = null;\n\nexport const configure = (config: { provider: IReachabilityProvider | null }) => {\n  _provider = config.provider;\n};\n\nexport const getProvider = (): IReachabilityProvider | null => _provider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBA,IAAI,YAA0C;AAEvC,IAAM,YAAY,CAAC,WAAuD;AAC/E,cAAY,OAAO;AACrB;AAEO,IAAM,cAAc,MAAoC;","names":[]}