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
« prev ^ index » next coverage.py v7.15.2, created at 2026-08-24 12:44 +0000
1"""
2Base protocol for verification providers
3"""
5from typing import Protocol
7from ..core.models import VerificationResult
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) -> VerificationResult:
17 """
18 Verify a phone number's line type, DNC status, and litigator status.
20 Args:
21 phone: E.164 formatted phone number
23 Returns:
24 VerificationResult of (line_type, dnc, known_litigator)
26 Raises:
27 ValueError: If phone format is invalid
28 ProviderError: For upstream provider failures (API errors, network issues)
29 """
30 ...