open-nfse / NfseClientConfig
Interface: NfseClientConfig
Defined in: src/client.ts:99
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
ambiente | readonly | Ambiente | - | src/client.ts:100 |
cepValidator? | readonly | CepValidator | Validador de CEP usado nas emissões deste cliente. Se omitido, a lib usa o createViaCepValidator() internamente (consulta viacep.com.br com cache em memória). Passe um custom para trocar o provedor (BrasilAPI, banco local, mock em tests). | src/client.ts:117 |
certificado | readonly | CertificateInput | - | src/client.ts:101 |
dispatcher? | readonly | Dispatcher | Advanced / testing hook. When set, used as the HTTP dispatcher instead of building an mTLS Agent from certificado (e.g. pass undici's MockAgent). Normal consumers should never need this. | src/client.ts:110 |
dpsCounter? | readonly | DpsCounter | Provedor atômico do próximo nDPS. Obrigatório para emitir(params) — o novo fluxo consulta esse provider depois das validações offline passarem. emitirDpsPronta(dps) não usa. | src/client.ts:129 |
emitente? | readonly | EmitenteConfig | - | src/client.ts:102 |
logger? | readonly | Logger | - | src/client.ts:104 |
parametrosCache? | readonly | ParametrosCache | Cache opcional para respostas da API de Parâmetros Municipais. Se omitido e useCache não for false em cada chamada, a lib usa um createInMemoryParametrosCache() implícito. Para cache compartilhada entre processos, passe uma impl de Redis/Memcached. | src/client.ts:136 |
retryStore? | readonly | RetryStore | Store para eventos pendentes de retry. Necessário para emitir() e substituir() persistirem falhas transientes/rollbacks. Se omitido, a lib lança MissingRetryStoreError quando o caminho transiente é acionado. | src/client.ts:123 |
timeoutMs? | readonly | number | - | src/client.ts:103 |