"""Layer-neutral AEAT authentication provider contracts.The closed provider kind and provider-readiness description are shared byconfiguration, application services, domain preflight, and outbound adapters.Keeping both contracts in core gives every layer one typed authority withoutan application-layer import or a duplicate settings-only enumeration."""from__future__importannotationsfromdatetimeimportdatefromenumimportStrEnumfrompydanticimportBaseModel,Fieldfrom.modelsimportSTRICT_FROZEN_CONFIG
[docs]classAuthProviderKind(StrEnum):"""Closed enumeration of supported AEAT authentication providers."""CERTIFICATE="certificate"CLAVE_MOVIL="clave_movil"CLAVE_PERMANENTE="clave_permanente"
[docs]classAuthProviderDescription(BaseModel):"""Safe operator-facing readiness description for one auth provider."""model_config=STRICT_FROZEN_CONFIGkind:AuthProviderKindlabel:str=Field(min_length=1)configured:boolavailable:boolidentity_nif:str|None=Nonesubject:str|None=Noneexpires_on:date|None=Nonehealth_severity:str|None=Nonedays_until_expiry:int|None=Nonehealth_summary:str|None=None