Coverage for src/ai_lls_lib/providers/base.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-08-24 12:44 +0000

1""" 

2Base protocol for verification providers 

3""" 

4 

5from typing import Protocol 

6 

7from ..core.models import VerificationResult 

8 

9 

10class VerificationProvider(Protocol): 

11 """ 

12 Protocol for phone verification providers. 

13 All providers must implement this interface. 

14 """ 

15 

16 def verify_phone(self, phone: str) -> VerificationResult: 

17 """ 

18 Verify a phone number's line type, DNC status, and litigator status. 

19 

20 Args: 

21 phone: E.164 formatted phone number 

22 

23 Returns: 

24 VerificationResult of (line_type, dnc, known_litigator) 

25 

26 Raises: 

27 ValueError: If phone format is invalid 

28 ProviderError: For upstream provider failures (API errors, network issues) 

29 """ 

30 ...