Pular para conteúdo

Contract: CRP Provider Adapter

lookup({ documentType, documentValue, forceRefresh? }) returns normalized zero, one or many records with region, number, type and official status.

Outcomes: success, not_found, invalid_inactive, unavailable, malformed_response.

  • Production uses the configured CRP Info endpoint with bounded timeout.
  • Local/test never calls external network and returns deterministic local-unverified behavior.
  • Provider payload is untrusted and never persisted or logged raw.
  • CPF/CNPJ are redacted from logs and attempt history.