open-nfse / PendingEmission
Interface: PendingEmission
Defined in: src/retry/store.ts:49
Emissão pendente — SEFIN deduplica via infDPS.Id em retries.
Extends
PendingBase
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
attempts? | readonly | number | Number of attempts made so far (including the one that just failed). 1 after the first persist, 2 after the first replay attempt, etc. Passed to RetryPolicy.computeNotBefore via RetryContext.attempt so custom policies can implement attempt-based backoff (exponential, linear, etc.). undefined is treated as 1 for entries persisted before this field existed. | PendingBase.attempts | src/retry/store.ts:40 |
emitenteCnpj | readonly | string | CNPJ do emitente, para introspecção/filtros. | - | src/retry/store.ts:54 |
firstAttemptAt | readonly | Date | - | PendingBase.firstAttemptAt | src/retry/store.ts:21 |
id | readonly | string | Chave estável de deduplicação no store. | PendingBase.id | src/retry/store.ts:12 |
idDps | readonly | string | infDPS.Id (45 chars). Chave de idempotência server-side. | - | src/retry/store.ts:52 |
kind | readonly | "emission" | - | - | src/retry/store.ts:50 |
lastAttemptAt | readonly | Date | - | PendingBase.lastAttemptAt | src/retry/store.ts:22 |
lastError | readonly | { errorName: string; message: string; transient: boolean; } | - | PendingBase.lastError | src/retry/store.ts:41 |
lastError.errorName | readonly | string | - | - | src/retry/store.ts:43 |
lastError.message | readonly | string | - | - | src/retry/store.ts:42 |
lastError.transient | readonly | boolean | - | - | src/retry/store.ts:44 |
nDPS | readonly | string | - | - | src/retry/store.ts:56 |
notBefore? | readonly | Date | Earliest moment this entry is eligible for replay. When set, replayPendingEvents skips entries with notBefore > now. Populated from RetryPolicy.computeNotBefore (e.g., respecting a 429 / 503 Retry-After header). undefined means the entry is eligible on the next replay tick — current behavior for all entries created before this field existed. | PendingBase.notBefore | src/retry/store.ts:31 |
serie | readonly | string | - | - | src/retry/store.ts:55 |
xmlAssinado | readonly | string | XML assinado (XMLDSig) pronto para re-POST sem re-assinatura. replayPendingEvents envia este XML diretamente ao SEFIN; persistir XML sem assinatura causa rejeição imediata na retentativa. SEFIN deduplica via infDPS.Id (emissão) ou chave + tipoEvento (eventos), então retentar é idempotente quando o XML é íntegro. | PendingBase.xmlAssinado | src/retry/store.ts:20 |