nfets 0.0.120 → 0.0.122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { h as StateCode, j as EnvironmentCode, D as DecimalValue, l as Signature, i as StateAcronym, x as NFeTsError, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, a1 as RequestConfig, a6 as SignedEntity, ab as Either, a as ReadCertificateResponse, O as RowBuilderOptions, V as PdfBuilder, ag as DeepPartial, R as ReadCertificateRequest, a3 as HttpClient, w as XmlToolkit, W as CacheAdapter, Y as CertificateRepository, a4 as RemoteTransmissionRepository, a9 as EntitySigner, aa as XmlSigner, ac as Left, ad as Right, N as Namespaced, d as SignatureAlgorithm } from '../types-BvZKQyK3.cjs';
1
+ import { h as StateCode, j as EnvironmentCode, D as DecimalValue, l as Signature, i as StateAcronym, x as NFeTsError, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, a1 as RequestConfig, a6 as SignedEntity, ab as Either, a as ReadCertificateResponse, O as RowBuilderOptions, V as PdfBuilder, ag as DeepPartial, w as XmlToolkit, R as ReadCertificateRequest, a3 as HttpClient, W as CacheAdapter, Y as CertificateRepository, a4 as RemoteTransmissionRepository, a9 as EntitySigner, aa as XmlSigner, ac as Left, ad as Right, N as Namespaced, d as SignatureAlgorithm } from '../types-BlTnVW8U.cjs';
2
2
  import { Writable } from 'node:stream';
3
3
  import 'node:crypto';
4
4
 
@@ -1448,7 +1448,8 @@ interface ConsultaCadastroResponse {
1448
1448
  }
1449
1449
 
1450
1450
  declare enum TpEvent {
1451
- Cancelamento = "110111"
1451
+ Cancelamento = "110111",
1452
+ CancelamentoSubstituicao = "110112"
1452
1453
  }
1453
1454
 
1454
1455
  interface EventoPayload<T> {
@@ -1477,6 +1478,7 @@ interface InfEvento<T> {
1477
1478
  }
1478
1479
  interface EventoItemAttributes {
1479
1480
  xmlns: string;
1481
+ versao?: string;
1480
1482
  }
1481
1483
  interface EventoItem<T> {
1482
1484
  $: EventoItemAttributes;
@@ -1541,6 +1543,10 @@ interface EventoLoteResponse {
1541
1543
  retEvento?: RetEvento[];
1542
1544
  };
1543
1545
  }
1546
+ interface PipelineEventResponse {
1547
+ xml: string;
1548
+ response: EventoResponse;
1549
+ }
1544
1550
 
1545
1551
  interface ConsultaProtocoloPayload {
1546
1552
  tpAmb: EnvironmentCode;
@@ -1595,6 +1601,7 @@ interface RetEventoItem {
1595
1601
  interface ProcEventoNFe {
1596
1602
  $: {
1597
1603
  versao: string;
1604
+ xmlns?: string;
1598
1605
  };
1599
1606
  evento: EventoItem<unknown>;
1600
1607
  retEvento: RetEventoItem;
@@ -1645,6 +1652,7 @@ interface InfInut {
1645
1652
  }
1646
1653
  interface InutNFeAttributes {
1647
1654
  xmlns: string;
1655
+ versao?: string;
1648
1656
  }
1649
1657
  interface InutilizacaoPayload {
1650
1658
  $: InutNFeAttributes;
@@ -1653,30 +1661,43 @@ interface InutilizacaoPayload {
1653
1661
  interface InutilizacaoRequest {
1654
1662
  inutNFe: InutilizacaoPayload;
1655
1663
  }
1656
- interface InutilizacaoResponse {
1657
- retInutNFe: {
1658
- $: {
1659
- versao: string;
1660
- };
1661
- infInut: {
1662
- $?: {
1663
- Id?: string;
1664
- };
1665
- tpAmb: EnvironmentCode;
1666
- verAplic: string;
1667
- cStat: string;
1668
- xMotivo: string;
1669
- cUF: string;
1670
- ano?: string;
1671
- CNPJ?: string;
1672
- mod?: string;
1673
- serie?: string;
1674
- nNFIni?: string;
1675
- nNFFin?: string;
1676
- dhRecbto: string;
1677
- nProt?: string;
1664
+ interface RetInutNFe {
1665
+ $: {
1666
+ versao: string;
1667
+ };
1668
+ infInut: {
1669
+ $?: {
1670
+ Id?: string;
1678
1671
  };
1672
+ tpAmb: EnvironmentCode;
1673
+ verAplic: string;
1674
+ cStat: string;
1675
+ xMotivo: string;
1676
+ cUF: string;
1677
+ ano?: string;
1678
+ CNPJ?: string;
1679
+ mod?: string;
1680
+ serie?: string;
1681
+ nNFIni?: string;
1682
+ nNFFin?: string;
1683
+ dhRecbto: string;
1684
+ nProt?: string;
1685
+ };
1686
+ }
1687
+ interface InutilizacaoResponse {
1688
+ retInutNFe: RetInutNFe;
1689
+ }
1690
+ interface ProcInutNFe {
1691
+ $: {
1692
+ versao: string;
1693
+ xmlns?: string;
1679
1694
  };
1695
+ inutNFe: InutilizacaoPayload;
1696
+ retInutNFe: RetInutNFe;
1697
+ }
1698
+ interface PipelineInutilizacaoResponse {
1699
+ xml: string;
1700
+ response: InutilizacaoResponse;
1680
1701
  }
1681
1702
 
1682
1703
  interface RetAutorizacaoPayload {
@@ -1710,6 +1731,19 @@ declare class XmlValidationError extends NFeTsError {
1710
1731
  constructor(message: string, xml: string, options?: ErrorOptions);
1711
1732
  }
1712
1733
 
1734
+ declare enum EventoCstatToProtocol {
1735
+ RegistradoEVinculado = "135"
1736
+ }
1737
+ declare enum EventoCstatToCancelRegister {
1738
+ RegistradoEVinculado = "135",
1739
+ RegistradoNaoVinculado = "136",
1740
+ CancelamentoHomologadoForaPrazo = "155"
1741
+ }
1742
+
1743
+ declare enum InutCstatToProtocol {
1744
+ InutilizacaoHomologada = "102"
1745
+ }
1746
+
1713
1747
  type NFCe$1 = NFe$1;
1714
1748
  interface NFCeProc {
1715
1749
  NFe: NFCe$1;
@@ -1955,6 +1989,13 @@ declare class AccessKeyBuilder {
1955
1989
  private verifyingDigit;
1956
1990
  }
1957
1991
 
1992
+ declare class NfeComplements {
1993
+ private readonly toolkit;
1994
+ constructor(toolkit?: XmlToolkit);
1995
+ cancelRegister(nfe: string, cancellation: string): Either<NFeTsError, string>;
1996
+ private findMatchingRetEvento;
1997
+ }
1998
+
1958
1999
  interface DetBuilderAggregator {
1959
2000
  prod(payload: Prod): void;
1960
2001
  issqn(payload: ISSQN): void;
@@ -3394,14 +3435,19 @@ declare abstract class TransmissionPipeline extends Pipeline {
3394
3435
  }
3395
3436
 
3396
3437
  declare abstract class EventPipeline extends TransmissionPipeline {
3397
- protected event<T>(tpEvento: TpEvent, payload: Pick<EventoItem<T>['infEvento'], 'nSeqEvento' | 'dhEvento' | 'chNFe' | 'detEvento'>, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoItem<{
3438
+ protected event<T>(tpEvento: TpEvent, payload: Pick<EventoItem<T>['infEvento'], 'nSeqEvento' | 'dhEvento' | 'chNFe' | 'detEvento'>, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, SignedEntity<EventoItem<{
3398
3439
  descEvento: string;
3399
- } & T>>>;
3440
+ } & T>>>>;
3441
+ protected versionedEvent<T>(evento: SignedEntity<EventoItem<T>>, version: string): SignedEntity<EventoItem<T>>;
3442
+ protected protocol<T>(evento: SignedEntity<EventoItem<T>>, retEvento: RetEvento, version: string): Promise<string>;
3400
3443
  private validated;
3401
3444
  }
3402
3445
 
3403
3446
  declare class NfeCancelPipeline extends EventPipeline {
3404
- execute(payload: EventoCancelamento, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoResponse>>;
3447
+ execute(payload: EventoCancelamento, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Left<NFeTsError> | Right<{
3448
+ xml: string;
3449
+ response: EventoResponse;
3450
+ }>>;
3405
3451
  }
3406
3452
 
3407
3453
  declare class NFe implements NFe$1 {
@@ -3442,7 +3488,12 @@ declare class NfeAuthorizerPipeline extends TransmissionPipeline {
3442
3488
  }
3443
3489
 
3444
3490
  declare class NfeVoidRangePipeline extends TransmissionPipeline {
3445
- execute(payload: VoidRangePayload, options: Pick<NfeTransmitterOptions, 'tpAmb' | 'cUF'>): Promise<Either<NFeTsError, InutilizacaoResponse>>;
3491
+ execute(payload: VoidRangePayload, options: Pick<NfeTransmitterOptions, 'tpAmb' | 'cUF'>): Promise<Left<NFeTsError> | Right<{
3492
+ xml: string;
3493
+ response: InutilizacaoResponse;
3494
+ }>>;
3495
+ protected versionedInutNFe(inutNFe: SignedEntity<InutilizacaoPayload>, version: string): SignedEntity<InutilizacaoPayload>;
3496
+ protected protocol(inutNFe: SignedEntity<InutilizacaoPayload>, retInutNFe: RetInutNFe, version: string): Promise<string>;
3446
3497
  private validated;
3447
3498
  }
3448
3499
 
@@ -5057,4 +5108,4 @@ declare class NFCe implements NFCe$1 {
5057
5108
  Signature?: Signature;
5058
5109
  }
5059
5110
 
5060
- export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type Builder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ConsultStatusPayload, type ConsultStatusRequest, type ConsultStatusResponse, type ConsultaCadastroPayload, type ConsultaCadastroRequest, type ConsultaCadastroResponse, type ConsultaProtocoloPayload, type ConsultaProtocoloRequest, type ConsultaProtocoloResponse, type ContingencyOptions, DanfceDefaultPdfDocument, DanfceReducedPdfDocument, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetEventoCancelamento, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type EventoCancelamento, type EventoItem, type EventoItemAttributes, type EventoLotePayload, type EventoLoteResponse, type EventoPayload, type EventoRequest, type EventoResponse, type ExportaBuilder, type ICMS, type ICMS00, type ICMS02, type ICMS10, type ICMS15, type ICMS20, type ICMS30, type ICMS40, type ICMS51, type ICMS53, type ICMS60, type ICMS61, type ICMS70, type ICMS90, type ICMSPart, type ICMSSN, type ICMSSN101, type ICMSSN102, type ICMSSN201, type ICMSSN202, type ICMSSN500, type ICMSSN900, type ICMSST, type ICMSStandard, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IbscbsBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfEvento, type InfEventoAttributes, type InfIntermedBuilder, type InfInut, type InfInutAttributes, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, type InutNFeAttributes, type InutilizacaoPayload, type InutilizacaoRequest, type InutilizacaoResponse, type IssIpiBuilder, type IssQnBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFCeProc, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, type NFeProc, type NFeProcAttributes, NfceAuthorizerPipeline, NfceCancelPipeline, NfceConsultProtocoloPipeline, NfceConsultStatusPipeline, NfceContingencyXmlAuthorizerPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceVoidRangePipeline, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, type NfeAuthorizerPayload, NfeAuthorizerPipeline, NfeCancelPipeline, NfeConsultProtocoloPipeline, NfeConsultStatusPipeline, NfeCstatToProtocol, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeVoidRangePipeline, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PipelineAuthorizerResponse, type PisBuilder, type PisStBuilder, type ProcEventoNFe, type ProdBuilder, type RetAutorizacaoPayload, type RetAutorizacaoRequest, type RetAutorizacaoResponse, type RetCancNFe, type RetEvento, type RetEventoItem, type RetiradaBuilder, type Schema, type SynchronousAutorizacaoResponse, type TotalBuilder, type TotalBuilderAggregator, TpEmis, TpEvent, type TranspBuilder, type VerifiedAccessKey, type VoidRangePayload, XmlValidationError, schemas, type vItemBuilder };
5111
+ export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type Builder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ConsultStatusPayload, type ConsultStatusRequest, type ConsultStatusResponse, type ConsultaCadastroPayload, type ConsultaCadastroRequest, type ConsultaCadastroResponse, type ConsultaProtocoloPayload, type ConsultaProtocoloRequest, type ConsultaProtocoloResponse, type ContingencyOptions, DanfceDefaultPdfDocument, DanfceReducedPdfDocument, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetEventoCancelamento, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type EventoCancelamento, EventoCstatToCancelRegister, EventoCstatToProtocol, type EventoItem, type EventoItemAttributes, type EventoLotePayload, type EventoLoteResponse, type EventoPayload, type EventoRequest, type EventoResponse, type ExportaBuilder, type ICMS, type ICMS00, type ICMS02, type ICMS10, type ICMS15, type ICMS20, type ICMS30, type ICMS40, type ICMS51, type ICMS53, type ICMS60, type ICMS61, type ICMS70, type ICMS90, type ICMSPart, type ICMSSN, type ICMSSN101, type ICMSSN102, type ICMSSN201, type ICMSSN202, type ICMSSN500, type ICMSSN900, type ICMSST, type ICMSStandard, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IbscbsBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfEvento, type InfEventoAttributes, type InfIntermedBuilder, type InfInut, type InfInutAttributes, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, InutCstatToProtocol, type InutNFeAttributes, type InutilizacaoPayload, type InutilizacaoRequest, type InutilizacaoResponse, type IssIpiBuilder, type IssQnBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFCeProc, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, type NFeProc, type NFeProcAttributes, NfceAuthorizerPipeline, NfceCancelPipeline, NfceConsultProtocoloPipeline, NfceConsultStatusPipeline, NfceContingencyXmlAuthorizerPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceVoidRangePipeline, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, type NfeAuthorizerPayload, NfeAuthorizerPipeline, NfeCancelPipeline, NfeComplements, NfeConsultProtocoloPipeline, NfeConsultStatusPipeline, NfeCstatToProtocol, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeVoidRangePipeline, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PipelineAuthorizerResponse, type PipelineEventResponse, type PipelineInutilizacaoResponse, type PisBuilder, type PisStBuilder, type ProcEventoNFe, type ProcInutNFe, type ProdBuilder, type RetAutorizacaoPayload, type RetAutorizacaoRequest, type RetAutorizacaoResponse, type RetCancNFe, type RetEvento, type RetEventoItem, type RetInutNFe, type RetiradaBuilder, type Schema, type SynchronousAutorizacaoResponse, type TotalBuilder, type TotalBuilderAggregator, TpEmis, TpEvent, type TranspBuilder, type VerifiedAccessKey, type VoidRangePayload, XmlValidationError, schemas, type vItemBuilder };
@@ -1,4 +1,4 @@
1
- import { h as StateCode, j as EnvironmentCode, D as DecimalValue, l as Signature, i as StateAcronym, x as NFeTsError, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, a1 as RequestConfig, a6 as SignedEntity, ab as Either, a as ReadCertificateResponse, O as RowBuilderOptions, V as PdfBuilder, ag as DeepPartial, R as ReadCertificateRequest, a3 as HttpClient, w as XmlToolkit, W as CacheAdapter, Y as CertificateRepository, a4 as RemoteTransmissionRepository, a9 as EntitySigner, aa as XmlSigner, ac as Left, ad as Right, N as Namespaced, d as SignatureAlgorithm } from '../types-BvZKQyK3.js';
1
+ import { h as StateCode, j as EnvironmentCode, D as DecimalValue, l as Signature, i as StateAcronym, x as NFeTsError, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, a1 as RequestConfig, a6 as SignedEntity, ab as Either, a as ReadCertificateResponse, O as RowBuilderOptions, V as PdfBuilder, ag as DeepPartial, w as XmlToolkit, R as ReadCertificateRequest, a3 as HttpClient, W as CacheAdapter, Y as CertificateRepository, a4 as RemoteTransmissionRepository, a9 as EntitySigner, aa as XmlSigner, ac as Left, ad as Right, N as Namespaced, d as SignatureAlgorithm } from '../types-BlTnVW8U.js';
2
2
  import { Writable } from 'node:stream';
3
3
  import 'node:crypto';
4
4
 
@@ -1448,7 +1448,8 @@ interface ConsultaCadastroResponse {
1448
1448
  }
1449
1449
 
1450
1450
  declare enum TpEvent {
1451
- Cancelamento = "110111"
1451
+ Cancelamento = "110111",
1452
+ CancelamentoSubstituicao = "110112"
1452
1453
  }
1453
1454
 
1454
1455
  interface EventoPayload<T> {
@@ -1477,6 +1478,7 @@ interface InfEvento<T> {
1477
1478
  }
1478
1479
  interface EventoItemAttributes {
1479
1480
  xmlns: string;
1481
+ versao?: string;
1480
1482
  }
1481
1483
  interface EventoItem<T> {
1482
1484
  $: EventoItemAttributes;
@@ -1541,6 +1543,10 @@ interface EventoLoteResponse {
1541
1543
  retEvento?: RetEvento[];
1542
1544
  };
1543
1545
  }
1546
+ interface PipelineEventResponse {
1547
+ xml: string;
1548
+ response: EventoResponse;
1549
+ }
1544
1550
 
1545
1551
  interface ConsultaProtocoloPayload {
1546
1552
  tpAmb: EnvironmentCode;
@@ -1595,6 +1601,7 @@ interface RetEventoItem {
1595
1601
  interface ProcEventoNFe {
1596
1602
  $: {
1597
1603
  versao: string;
1604
+ xmlns?: string;
1598
1605
  };
1599
1606
  evento: EventoItem<unknown>;
1600
1607
  retEvento: RetEventoItem;
@@ -1645,6 +1652,7 @@ interface InfInut {
1645
1652
  }
1646
1653
  interface InutNFeAttributes {
1647
1654
  xmlns: string;
1655
+ versao?: string;
1648
1656
  }
1649
1657
  interface InutilizacaoPayload {
1650
1658
  $: InutNFeAttributes;
@@ -1653,30 +1661,43 @@ interface InutilizacaoPayload {
1653
1661
  interface InutilizacaoRequest {
1654
1662
  inutNFe: InutilizacaoPayload;
1655
1663
  }
1656
- interface InutilizacaoResponse {
1657
- retInutNFe: {
1658
- $: {
1659
- versao: string;
1660
- };
1661
- infInut: {
1662
- $?: {
1663
- Id?: string;
1664
- };
1665
- tpAmb: EnvironmentCode;
1666
- verAplic: string;
1667
- cStat: string;
1668
- xMotivo: string;
1669
- cUF: string;
1670
- ano?: string;
1671
- CNPJ?: string;
1672
- mod?: string;
1673
- serie?: string;
1674
- nNFIni?: string;
1675
- nNFFin?: string;
1676
- dhRecbto: string;
1677
- nProt?: string;
1664
+ interface RetInutNFe {
1665
+ $: {
1666
+ versao: string;
1667
+ };
1668
+ infInut: {
1669
+ $?: {
1670
+ Id?: string;
1678
1671
  };
1672
+ tpAmb: EnvironmentCode;
1673
+ verAplic: string;
1674
+ cStat: string;
1675
+ xMotivo: string;
1676
+ cUF: string;
1677
+ ano?: string;
1678
+ CNPJ?: string;
1679
+ mod?: string;
1680
+ serie?: string;
1681
+ nNFIni?: string;
1682
+ nNFFin?: string;
1683
+ dhRecbto: string;
1684
+ nProt?: string;
1685
+ };
1686
+ }
1687
+ interface InutilizacaoResponse {
1688
+ retInutNFe: RetInutNFe;
1689
+ }
1690
+ interface ProcInutNFe {
1691
+ $: {
1692
+ versao: string;
1693
+ xmlns?: string;
1679
1694
  };
1695
+ inutNFe: InutilizacaoPayload;
1696
+ retInutNFe: RetInutNFe;
1697
+ }
1698
+ interface PipelineInutilizacaoResponse {
1699
+ xml: string;
1700
+ response: InutilizacaoResponse;
1680
1701
  }
1681
1702
 
1682
1703
  interface RetAutorizacaoPayload {
@@ -1710,6 +1731,19 @@ declare class XmlValidationError extends NFeTsError {
1710
1731
  constructor(message: string, xml: string, options?: ErrorOptions);
1711
1732
  }
1712
1733
 
1734
+ declare enum EventoCstatToProtocol {
1735
+ RegistradoEVinculado = "135"
1736
+ }
1737
+ declare enum EventoCstatToCancelRegister {
1738
+ RegistradoEVinculado = "135",
1739
+ RegistradoNaoVinculado = "136",
1740
+ CancelamentoHomologadoForaPrazo = "155"
1741
+ }
1742
+
1743
+ declare enum InutCstatToProtocol {
1744
+ InutilizacaoHomologada = "102"
1745
+ }
1746
+
1713
1747
  type NFCe$1 = NFe$1;
1714
1748
  interface NFCeProc {
1715
1749
  NFe: NFCe$1;
@@ -1955,6 +1989,13 @@ declare class AccessKeyBuilder {
1955
1989
  private verifyingDigit;
1956
1990
  }
1957
1991
 
1992
+ declare class NfeComplements {
1993
+ private readonly toolkit;
1994
+ constructor(toolkit?: XmlToolkit);
1995
+ cancelRegister(nfe: string, cancellation: string): Either<NFeTsError, string>;
1996
+ private findMatchingRetEvento;
1997
+ }
1998
+
1958
1999
  interface DetBuilderAggregator {
1959
2000
  prod(payload: Prod): void;
1960
2001
  issqn(payload: ISSQN): void;
@@ -3394,14 +3435,19 @@ declare abstract class TransmissionPipeline extends Pipeline {
3394
3435
  }
3395
3436
 
3396
3437
  declare abstract class EventPipeline extends TransmissionPipeline {
3397
- protected event<T>(tpEvento: TpEvent, payload: Pick<EventoItem<T>['infEvento'], 'nSeqEvento' | 'dhEvento' | 'chNFe' | 'detEvento'>, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoItem<{
3438
+ protected event<T>(tpEvento: TpEvent, payload: Pick<EventoItem<T>['infEvento'], 'nSeqEvento' | 'dhEvento' | 'chNFe' | 'detEvento'>, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, SignedEntity<EventoItem<{
3398
3439
  descEvento: string;
3399
- } & T>>>;
3440
+ } & T>>>>;
3441
+ protected versionedEvent<T>(evento: SignedEntity<EventoItem<T>>, version: string): SignedEntity<EventoItem<T>>;
3442
+ protected protocol<T>(evento: SignedEntity<EventoItem<T>>, retEvento: RetEvento, version: string): Promise<string>;
3400
3443
  private validated;
3401
3444
  }
3402
3445
 
3403
3446
  declare class NfeCancelPipeline extends EventPipeline {
3404
- execute(payload: EventoCancelamento, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoResponse>>;
3447
+ execute(payload: EventoCancelamento, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Left<NFeTsError> | Right<{
3448
+ xml: string;
3449
+ response: EventoResponse;
3450
+ }>>;
3405
3451
  }
3406
3452
 
3407
3453
  declare class NFe implements NFe$1 {
@@ -3442,7 +3488,12 @@ declare class NfeAuthorizerPipeline extends TransmissionPipeline {
3442
3488
  }
3443
3489
 
3444
3490
  declare class NfeVoidRangePipeline extends TransmissionPipeline {
3445
- execute(payload: VoidRangePayload, options: Pick<NfeTransmitterOptions, 'tpAmb' | 'cUF'>): Promise<Either<NFeTsError, InutilizacaoResponse>>;
3491
+ execute(payload: VoidRangePayload, options: Pick<NfeTransmitterOptions, 'tpAmb' | 'cUF'>): Promise<Left<NFeTsError> | Right<{
3492
+ xml: string;
3493
+ response: InutilizacaoResponse;
3494
+ }>>;
3495
+ protected versionedInutNFe(inutNFe: SignedEntity<InutilizacaoPayload>, version: string): SignedEntity<InutilizacaoPayload>;
3496
+ protected protocol(inutNFe: SignedEntity<InutilizacaoPayload>, retInutNFe: RetInutNFe, version: string): Promise<string>;
3446
3497
  private validated;
3447
3498
  }
3448
3499
 
@@ -5057,4 +5108,4 @@ declare class NFCe implements NFCe$1 {
5057
5108
  Signature?: Signature;
5058
5109
  }
5059
5110
 
5060
- export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type Builder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ConsultStatusPayload, type ConsultStatusRequest, type ConsultStatusResponse, type ConsultaCadastroPayload, type ConsultaCadastroRequest, type ConsultaCadastroResponse, type ConsultaProtocoloPayload, type ConsultaProtocoloRequest, type ConsultaProtocoloResponse, type ContingencyOptions, DanfceDefaultPdfDocument, DanfceReducedPdfDocument, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetEventoCancelamento, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type EventoCancelamento, type EventoItem, type EventoItemAttributes, type EventoLotePayload, type EventoLoteResponse, type EventoPayload, type EventoRequest, type EventoResponse, type ExportaBuilder, type ICMS, type ICMS00, type ICMS02, type ICMS10, type ICMS15, type ICMS20, type ICMS30, type ICMS40, type ICMS51, type ICMS53, type ICMS60, type ICMS61, type ICMS70, type ICMS90, type ICMSPart, type ICMSSN, type ICMSSN101, type ICMSSN102, type ICMSSN201, type ICMSSN202, type ICMSSN500, type ICMSSN900, type ICMSST, type ICMSStandard, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IbscbsBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfEvento, type InfEventoAttributes, type InfIntermedBuilder, type InfInut, type InfInutAttributes, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, type InutNFeAttributes, type InutilizacaoPayload, type InutilizacaoRequest, type InutilizacaoResponse, type IssIpiBuilder, type IssQnBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFCeProc, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, type NFeProc, type NFeProcAttributes, NfceAuthorizerPipeline, NfceCancelPipeline, NfceConsultProtocoloPipeline, NfceConsultStatusPipeline, NfceContingencyXmlAuthorizerPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceVoidRangePipeline, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, type NfeAuthorizerPayload, NfeAuthorizerPipeline, NfeCancelPipeline, NfeConsultProtocoloPipeline, NfeConsultStatusPipeline, NfeCstatToProtocol, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeVoidRangePipeline, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PipelineAuthorizerResponse, type PisBuilder, type PisStBuilder, type ProcEventoNFe, type ProdBuilder, type RetAutorizacaoPayload, type RetAutorizacaoRequest, type RetAutorizacaoResponse, type RetCancNFe, type RetEvento, type RetEventoItem, type RetiradaBuilder, type Schema, type SynchronousAutorizacaoResponse, type TotalBuilder, type TotalBuilderAggregator, TpEmis, TpEvent, type TranspBuilder, type VerifiedAccessKey, type VoidRangePayload, XmlValidationError, schemas, type vItemBuilder };
5111
+ export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, type Builder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ConsultStatusPayload, type ConsultStatusRequest, type ConsultStatusResponse, type ConsultaCadastroPayload, type ConsultaCadastroRequest, type ConsultaCadastroResponse, type ConsultaProtocoloPayload, type ConsultaProtocoloRequest, type ConsultaProtocoloResponse, type ContingencyOptions, DanfceDefaultPdfDocument, DanfceReducedPdfDocument, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetEventoCancelamento, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type EventoCancelamento, EventoCstatToCancelRegister, EventoCstatToProtocol, type EventoItem, type EventoItemAttributes, type EventoLotePayload, type EventoLoteResponse, type EventoPayload, type EventoRequest, type EventoResponse, type ExportaBuilder, type ICMS, type ICMS00, type ICMS02, type ICMS10, type ICMS15, type ICMS20, type ICMS30, type ICMS40, type ICMS51, type ICMS53, type ICMS60, type ICMS61, type ICMS70, type ICMS90, type ICMSPart, type ICMSSN, type ICMSSN101, type ICMSSN102, type ICMSSN201, type ICMSSN202, type ICMSSN500, type ICMSSN900, type ICMSST, type ICMSStandard, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IbscbsBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfEvento, type InfEventoAttributes, type InfIntermedBuilder, type InfInut, type InfInutAttributes, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, InutCstatToProtocol, type InutNFeAttributes, type InutilizacaoPayload, type InutilizacaoRequest, type InutilizacaoResponse, type IssIpiBuilder, type IssQnBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFCeProc, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, type NFeProc, type NFeProcAttributes, NfceAuthorizerPipeline, NfceCancelPipeline, NfceConsultProtocoloPipeline, NfceConsultStatusPipeline, NfceContingencyXmlAuthorizerPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceVoidRangePipeline, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, type NfeAuthorizerPayload, NfeAuthorizerPipeline, NfeCancelPipeline, NfeComplements, NfeConsultProtocoloPipeline, NfeConsultStatusPipeline, NfeCstatToProtocol, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeVoidRangePipeline, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PipelineAuthorizerResponse, type PipelineEventResponse, type PipelineInutilizacaoResponse, type PisBuilder, type PisStBuilder, type ProcEventoNFe, type ProcInutNFe, type ProdBuilder, type RetAutorizacaoPayload, type RetAutorizacaoRequest, type RetAutorizacaoResponse, type RetCancNFe, type RetEvento, type RetEventoItem, type RetInutNFe, type RetiradaBuilder, type Schema, type SynchronousAutorizacaoResponse, type TotalBuilder, type TotalBuilderAggregator, TpEmis, TpEvent, type TranspBuilder, type VerifiedAccessKey, type VoidRangePayload, XmlValidationError, schemas, type vItemBuilder };