Coverage for src / ai_lls_lib / providers / base.py: 100%
4 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-06 23:45 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-06 23:45 +0000
1"""
2Base protocol for verification providers
3"""
5from typing import Protocol
7from ..core.models import LineType
10class VerificationProvider(Protocol):
11 """
12 Protocol for phone verification providers.
13 All providers must implement this interface.
14 """
16 def verify_phone(self, phone: str) -> tuple[LineType, bool]:
17 """
18 Verify a phone number's line type and DNC status.
20 Args:
21 phone: E.164 formatted phone number
23 Returns:
24 Tuple of (line_type, is_on_dnc_list)
26 Raises:
27 ValueError: If phone format is invalid
28 ProviderError: For upstream provider failures (API errors, network issues)
29 """
30 ...