nfets 0.0.47 → 0.0.48

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.
@@ -989,8 +989,13 @@ interface NFe$1 {
989
989
  infNFe: InfNFe;
990
990
  infNFeSupl?: InfNFeSupl;
991
991
  }
992
- interface NFeProc {
993
- NFe: NFe$1;
992
+ interface NFeProcAttributes {
993
+ xmlns: 'http://www.portalfiscal.inf.br/nfe';
994
+ versao: string;
995
+ }
996
+ interface NFeProc<T extends object = NFe$1> {
997
+ NFe: T;
998
+ $: NFeProcAttributes;
994
999
  protNFe: ProtNFe;
995
1000
  }
996
1001
 
@@ -1036,6 +1041,13 @@ interface AsynchronousAutorizacaoResponse {
1036
1041
  };
1037
1042
  }
1038
1043
  type AutorizacaoResponse<E extends NFe$1 = NFe$1, T extends E | E[] = E | E[]> = SynchronousAutorizacaoResponse<T> | AsynchronousAutorizacaoResponse;
1044
+ type PipelineAuthorizerResponse<E extends NFe$1, T extends E | E[]> = T extends E[] ? {
1045
+ xml: string[];
1046
+ response: SynchronousAutorizacaoResponse<T>;
1047
+ } : {
1048
+ xml: string;
1049
+ response: SynchronousAutorizacaoResponse<T>;
1050
+ };
1039
1051
 
1040
1052
  interface ConsultStatusPayload {
1041
1053
  tpAmb: EnvironmentCode;
@@ -3031,11 +3043,13 @@ declare abstract class TransmissionPipeline extends Pipeline {
3031
3043
  }
3032
3044
 
3033
3045
  declare class NfeAuthorizerPipeline extends TransmissionPipeline {
3034
- execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
3046
+ execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
3047
+ protected protocol(NFe: NFe, protNFe: ProtNFe): Promise<string>;
3048
+ protected response<E extends NFe, T extends E | E[]>(NFe: SignedEntity<E> | SignedEntity<E>[], response: SynchronousAutorizacaoResponse<T>): Promise<PipelineAuthorizerResponse<E, T>>;
3035
3049
  protected signNfe(certificate: ReadCertificateResponse, NFe: NFe): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
3036
3050
  protected handleNfeBatch(certificate: ReadCertificateResponse, NFe: NFe | NFe[]): Promise<Left<NFeTsError> | Right<SignedEntity<NFe>[]>>;
3037
3051
  protected isSyncResponse<E extends NFe, T extends E | E[]>(response: AutorizacaoResponse<E, T>): response is SynchronousAutorizacaoResponse<T>;
3038
- protected handleAsyncResponse<E extends NFe, T extends E | E[]>(response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
3052
+ protected handleAsyncResponse<E extends NFe, T extends E | E[]>(NFe: SignedEntity<NFe> | SignedEntity<NFe>[], response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
3039
3053
  protected contingency(NFe: NFe): {
3040
3054
  dhCont: string;
3041
3055
  xJust: string;
@@ -4816,4 +4830,4 @@ declare class NFCe implements NFCe$1 {
4816
4830
  Signature?: Signature;
4817
4831
  }
4818
4832
 
4819
- export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, 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 IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, 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, NfceAuthorizerPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeConsultStatusPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, 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, schemas };
4833
+ export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, 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 IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, 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, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeConsultStatusPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, 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, schemas };
@@ -989,8 +989,13 @@ interface NFe$1 {
989
989
  infNFe: InfNFe;
990
990
  infNFeSupl?: InfNFeSupl;
991
991
  }
992
- interface NFeProc {
993
- NFe: NFe$1;
992
+ interface NFeProcAttributes {
993
+ xmlns: 'http://www.portalfiscal.inf.br/nfe';
994
+ versao: string;
995
+ }
996
+ interface NFeProc<T extends object = NFe$1> {
997
+ NFe: T;
998
+ $: NFeProcAttributes;
994
999
  protNFe: ProtNFe;
995
1000
  }
996
1001
 
@@ -1036,6 +1041,13 @@ interface AsynchronousAutorizacaoResponse {
1036
1041
  };
1037
1042
  }
1038
1043
  type AutorizacaoResponse<E extends NFe$1 = NFe$1, T extends E | E[] = E | E[]> = SynchronousAutorizacaoResponse<T> | AsynchronousAutorizacaoResponse;
1044
+ type PipelineAuthorizerResponse<E extends NFe$1, T extends E | E[]> = T extends E[] ? {
1045
+ xml: string[];
1046
+ response: SynchronousAutorizacaoResponse<T>;
1047
+ } : {
1048
+ xml: string;
1049
+ response: SynchronousAutorizacaoResponse<T>;
1050
+ };
1039
1051
 
1040
1052
  interface ConsultStatusPayload {
1041
1053
  tpAmb: EnvironmentCode;
@@ -3031,11 +3043,13 @@ declare abstract class TransmissionPipeline extends Pipeline {
3031
3043
  }
3032
3044
 
3033
3045
  declare class NfeAuthorizerPipeline extends TransmissionPipeline {
3034
- execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
3046
+ execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
3047
+ protected protocol(NFe: NFe, protNFe: ProtNFe): Promise<string>;
3048
+ protected response<E extends NFe, T extends E | E[]>(NFe: SignedEntity<E> | SignedEntity<E>[], response: SynchronousAutorizacaoResponse<T>): Promise<PipelineAuthorizerResponse<E, T>>;
3035
3049
  protected signNfe(certificate: ReadCertificateResponse, NFe: NFe): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
3036
3050
  protected handleNfeBatch(certificate: ReadCertificateResponse, NFe: NFe | NFe[]): Promise<Left<NFeTsError> | Right<SignedEntity<NFe>[]>>;
3037
3051
  protected isSyncResponse<E extends NFe, T extends E | E[]>(response: AutorizacaoResponse<E, T>): response is SynchronousAutorizacaoResponse<T>;
3038
- protected handleAsyncResponse<E extends NFe, T extends E | E[]>(response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
3052
+ protected handleAsyncResponse<E extends NFe, T extends E | E[]>(NFe: SignedEntity<NFe> | SignedEntity<NFe>[], response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, PipelineAuthorizerResponse<E, T>>>;
3039
3053
  protected contingency(NFe: NFe): {
3040
3054
  dhCont: string;
3041
3055
  xJust: string;
@@ -4816,4 +4830,4 @@ declare class NFCe implements NFCe$1 {
4816
4830
  Signature?: Signature;
4817
4831
  }
4818
4832
 
4819
- export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, 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 IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, 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, NfceAuthorizerPipeline, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeConsultStatusPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, 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, schemas };
4833
+ export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AsynchronousAutorizacaoResponse, type AutXMLBuilder, type AutorizacaoPayload, type AutorizacaoRequest, type AutorizacaoResponse, type AvulsaBuilder, 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 IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, 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, NfceConsultStatusPipeline, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfceXmlBuilderPipeline, NfeAuthorizationResponsePipeline, NfeAuthorizerPipeline, NfeConsultStatusPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, 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, schemas };
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y}from"../chunk-NIXT5RTQ.mjs";import"../chunk-Q47VIRPG.mjs";import"../chunk-W6MRGYXP.mjs";export{d as AccessKeyBuilder,x as DanfceDefaultPdfDocument,y as DanfceReducedPdfDocument,e as DefaultDetBuilderAggregator,f as DefaultTotalBuilderAggregator,u as NFCeDto,q as NFeDto,k as NfceAuthorizerPipeline,m as NfceConsultStatusPipeline,j as NfceQrcode,i as NfceRemoteTransmitter,v as NfceXmlBuilder,w as NfceXmlBuilderPipeline,n as NfeAuthorizationResponsePipeline,h as NfeAuthorizerPipeline,l as NfeConsultStatusPipeline,r as NfeDetXmlBuilder,o as NfeNfceCancelPipeline,p as NfeNfceVoidRangePipeline,g as NfeRemoteTransmitter,s as NfeXmlBuilder,t as NfeXmlBuilderPipeline,a as TpEmis,b as TpEvent,c as schemas};
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y}from"../chunk-CAMDTF2T.mjs";import"../chunk-Q47VIRPG.mjs";import"../chunk-W6MRGYXP.mjs";export{d as AccessKeyBuilder,x as DanfceDefaultPdfDocument,y as DanfceReducedPdfDocument,e as DefaultDetBuilderAggregator,f as DefaultTotalBuilderAggregator,u as NFCeDto,q as NFeDto,k as NfceAuthorizerPipeline,m as NfceConsultStatusPipeline,j as NfceQrcode,i as NfceRemoteTransmitter,v as NfceXmlBuilder,w as NfceXmlBuilderPipeline,n as NfeAuthorizationResponsePipeline,h as NfeAuthorizerPipeline,l as NfeConsultStatusPipeline,r as NfeDetXmlBuilder,o as NfeNfceCancelPipeline,p as NfeNfceVoidRangePipeline,g as NfeRemoteTransmitter,s as NfeXmlBuilder,t as NfeXmlBuilderPipeline,a as TpEmis,b as TpEvent,c as schemas};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nfets",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "description": "typescript libraries for Brazilian's SEFAZ standards",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",