nfets 0.0.14 → 0.0.15
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.
- package/dist/{chunk-XYOTPYUB.mjs → chunk-GMWKIB4E.mjs} +44 -44
- package/dist/chunk-V2LFKSE4.mjs +7 -0
- package/dist/core/index.cjs +49 -49
- package/dist/core/index.d.cts +26 -7
- package/dist/core/index.d.ts +26 -7
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +60 -60
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +11 -11
- package/dist/nfe/index.d.cts +89 -73
- package/dist/nfe/index.d.ts +89 -73
- package/dist/nfe/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-VB5FKAWY.mjs +0 -7
package/dist/nfe/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StateCode, EnvironmentCode, DecimalValue, StateAcronym, TransmitterOptions, Transmitter, Client, RequestConfig, SignedEntity, NFeTsError, ReadCertificateResponse, RemoteTransmissionRepository, ReadCertificateRequest, HttpClient, XmlToolkit, CacheAdapter, CertificateRepository } from '@nfets/core/domain';
|
|
1
|
+
import { StateCode, EnvironmentCode, DecimalValue, Signature, StateAcronym, TransmitterOptions, Transmitter, Client, RequestConfig, SignedEntity, NFeTsError, ReadCertificateResponse, RemoteTransmissionRepository, Namespaced, ReadCertificateRequest, HttpClient, XmlToolkit, CacheAdapter, CertificateRepository } from '@nfets/core/domain';
|
|
2
2
|
import { Either } from '@nfets/core/shared/either';
|
|
3
|
-
import { StateCode as StateCode$1, EnvironmentCode as EnvironmentCode$1, StateCodes, StateAcronym as StateAcronym$1, Either as Either$1, CertificateRepository as CertificateRepository$1, SignedEntity as SignedEntity$1 } from '@nfets/core';
|
|
3
|
+
import { StateCode as StateCode$1, EnvironmentCode as EnvironmentCode$1, StateCodes, StateAcronym as StateAcronym$1, Either as Either$1, CertificateRepository as CertificateRepository$1, SignedEntity as SignedEntity$1, Signature as Signature$1 } from '@nfets/core';
|
|
4
4
|
import { Either as Either$2, DeepPartial } from '@nfets/core/shared';
|
|
5
5
|
import { Ide as Ide$1 } from '@nfets/nfe/domain/entities/nfe/inf-nfe/ide';
|
|
6
6
|
import { InfNFeAttributes as InfNFeAttributes$1, InfNFe as InfNFe$1 } from '@nfets/nfe/domain/entities/nfe/inf-nfe';
|
|
@@ -35,13 +35,13 @@ import { INfeXmlBuilder as INfeXmlBuilder$1, InfNFeBuilder as InfNFeBuilder$1, I
|
|
|
35
35
|
import * as _nfets_nfe_domain_entities_services_autorizacao from '@nfets/nfe/domain/entities/services/autorizacao';
|
|
36
36
|
import { AutorizacaoPayload as AutorizacaoPayload$1, AutorizacaoResponse as AutorizacaoResponse$1 } from '@nfets/nfe/domain/entities/services/autorizacao';
|
|
37
37
|
import { L as Left, R as Right, E as Either$3, N as NFeTsError$1 } from '../either-CdHd_Yt7.cjs';
|
|
38
|
-
import { EntitySigner } from '@nfets/core/application';
|
|
39
38
|
import { NfeTransmitter as NfeTransmitter$1, NfeRemoteClient as NfeRemoteClient$1, NfeTransmitterOptions as NfeTransmitterOptions$1, ContingencyOptions as ContingencyOptions$1 } from '@nfets/nfe/domain/entities/transmission/nfe-remote-client';
|
|
40
39
|
import { NFe as NFe$3 } from '@nfets/nfe/infrastructure/dto/nfe/nfe';
|
|
40
|
+
import { EntitySigner } from '@nfets/core/application';
|
|
41
41
|
import * as _nfets_nfe_domain_entities_services_consulta_cadastro from '@nfets/nfe/domain/entities/services/consulta-cadastro';
|
|
42
42
|
import { ConsultaCadastroPayload as ConsultaCadastroPayload$1 } from '@nfets/nfe/domain/entities/services/consulta-cadastro';
|
|
43
43
|
import * as _nfets_nfe_domain_entities_services_evento from '@nfets/nfe/domain/entities/services/evento';
|
|
44
|
-
import {
|
|
44
|
+
import { EventoRequest as EventoRequest$1 } from '@nfets/nfe/domain/entities/services/evento';
|
|
45
45
|
import * as _nfets_nfe_domain_entities_services_ret_autorizacao from '@nfets/nfe/domain/entities/services/ret-autorizacao';
|
|
46
46
|
import { RetAutorizacaoPayload as RetAutorizacaoPayload$1 } from '@nfets/nfe/domain/entities/services/ret-autorizacao';
|
|
47
47
|
import * as _nfets_nfe_domain_entities_services_consulta_protocolo from '@nfets/nfe/domain/entities/services/consulta-protocolo';
|
|
@@ -1018,29 +1018,32 @@ interface ConsultStatusResponse {
|
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
1020
|
|
|
1021
|
-
interface
|
|
1021
|
+
interface InfInutAttributes {
|
|
1022
|
+
Id: string;
|
|
1023
|
+
}
|
|
1024
|
+
interface InfInut {
|
|
1025
|
+
$: InfInutAttributes;
|
|
1022
1026
|
tpAmb?: EnvironmentCode;
|
|
1023
1027
|
xServ?: 'INUTILIZAR';
|
|
1024
1028
|
cUF?: StateCode;
|
|
1025
1029
|
ano: string;
|
|
1026
|
-
CNPJ
|
|
1030
|
+
CNPJ?: string;
|
|
1031
|
+
CPF?: string;
|
|
1027
1032
|
mod: string;
|
|
1028
1033
|
serie: string;
|
|
1029
1034
|
nNFIni: string;
|
|
1030
1035
|
nNFFin: string;
|
|
1031
1036
|
xJust: string;
|
|
1032
1037
|
}
|
|
1038
|
+
interface InutNFeAttributes {
|
|
1039
|
+
xmlns: string;
|
|
1040
|
+
}
|
|
1041
|
+
interface InutilizacaoPayload {
|
|
1042
|
+
$: InutNFeAttributes;
|
|
1043
|
+
infInut: InfInut;
|
|
1044
|
+
}
|
|
1033
1045
|
interface InutilizacaoRequest {
|
|
1034
|
-
inutNFe:
|
|
1035
|
-
$: {
|
|
1036
|
-
versao: string;
|
|
1037
|
-
};
|
|
1038
|
-
infInut: InutilizacaoPayload & {
|
|
1039
|
-
$: {
|
|
1040
|
-
Id: string;
|
|
1041
|
-
};
|
|
1042
|
-
};
|
|
1043
|
-
};
|
|
1046
|
+
inutNFe: InutilizacaoPayload;
|
|
1044
1047
|
}
|
|
1045
1048
|
interface InutilizacaoResponse {
|
|
1046
1049
|
retInutNFe: {
|
|
@@ -1068,39 +1071,67 @@ interface InutilizacaoResponse {
|
|
|
1068
1071
|
};
|
|
1069
1072
|
}
|
|
1070
1073
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
+
declare enum TpEvent {
|
|
1075
|
+
Cancelamento = "110111"
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
interface EventoPayload<T> {
|
|
1074
1079
|
idLote: string;
|
|
1075
|
-
evento: EventoItem
|
|
1080
|
+
evento: EventoItem<T>;
|
|
1081
|
+
}
|
|
1082
|
+
interface InfEventoAttributes {
|
|
1083
|
+
Id: string;
|
|
1084
|
+
}
|
|
1085
|
+
interface InfEvento<T> {
|
|
1086
|
+
$: InfEventoAttributes;
|
|
1087
|
+
cOrgao: StateCode;
|
|
1088
|
+
tpAmb: EnvironmentCode;
|
|
1089
|
+
CNPJ?: string;
|
|
1090
|
+
CPF?: string;
|
|
1091
|
+
chNFe: string;
|
|
1092
|
+
dhEvento: string;
|
|
1093
|
+
tpEvento: TpEvent;
|
|
1094
|
+
nSeqEvento: number;
|
|
1095
|
+
verEvento: string;
|
|
1096
|
+
detEvento: T;
|
|
1097
|
+
}
|
|
1098
|
+
interface EventoItemAttributes {
|
|
1099
|
+
xmlns: string;
|
|
1100
|
+
}
|
|
1101
|
+
interface EventoItem<T> {
|
|
1102
|
+
$: EventoItemAttributes;
|
|
1103
|
+
infEvento: InfEvento<T>;
|
|
1104
|
+
}
|
|
1105
|
+
interface EventoRequest<T> {
|
|
1106
|
+
envEvento: EventoPayload<{
|
|
1107
|
+
descEvento: string;
|
|
1108
|
+
} & T>;
|
|
1076
1109
|
}
|
|
1077
|
-
interface
|
|
1110
|
+
interface RetEvento {
|
|
1078
1111
|
$: {
|
|
1079
1112
|
versao: string;
|
|
1080
1113
|
};
|
|
1081
1114
|
infEvento: {
|
|
1082
|
-
|
|
1083
|
-
Id
|
|
1115
|
+
$?: {
|
|
1116
|
+
Id?: string;
|
|
1084
1117
|
};
|
|
1085
|
-
cOrgao: string;
|
|
1086
1118
|
tpAmb: string;
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1119
|
+
verAplic: string;
|
|
1120
|
+
cOrgao: string;
|
|
1121
|
+
cStat: string;
|
|
1122
|
+
xMotivo: string;
|
|
1123
|
+
chNFe?: string;
|
|
1124
|
+
tpEvento?: string;
|
|
1125
|
+
xEvento?: string;
|
|
1126
|
+
nSeqEvento?: string;
|
|
1127
|
+
cOrgaoAutor?: string;
|
|
1128
|
+
CNPJDest?: string;
|
|
1129
|
+
CPFDest?: string;
|
|
1130
|
+
emailDest?: string;
|
|
1131
|
+
dhRegEvento: string;
|
|
1132
|
+
nProt?: string;
|
|
1100
1133
|
};
|
|
1101
|
-
|
|
1102
|
-
interface EventoRequest {
|
|
1103
|
-
envEvento: EventoPayload;
|
|
1134
|
+
Signature?: Signature;
|
|
1104
1135
|
}
|
|
1105
1136
|
interface EventoResponse {
|
|
1106
1137
|
retEnvEvento: {
|
|
@@ -1113,31 +1144,7 @@ interface EventoResponse {
|
|
|
1113
1144
|
cOrgao: string;
|
|
1114
1145
|
cStat: string;
|
|
1115
1146
|
xMotivo: string;
|
|
1116
|
-
retEvento?:
|
|
1117
|
-
$: {
|
|
1118
|
-
versao: string;
|
|
1119
|
-
};
|
|
1120
|
-
infEvento: {
|
|
1121
|
-
tpAmb: string;
|
|
1122
|
-
verAplic: string;
|
|
1123
|
-
cOrgao: string;
|
|
1124
|
-
cStat: string;
|
|
1125
|
-
xMotivo: string;
|
|
1126
|
-
chNFe?: string;
|
|
1127
|
-
tpEvento?: string;
|
|
1128
|
-
xEvento?: string;
|
|
1129
|
-
nSeqEvento?: string;
|
|
1130
|
-
cOrgaoAutor?: string;
|
|
1131
|
-
CNPJDest?: string;
|
|
1132
|
-
CPFDest?: string;
|
|
1133
|
-
emailDest?: string;
|
|
1134
|
-
dhRegEvento: string;
|
|
1135
|
-
nProt?: string;
|
|
1136
|
-
$?: {
|
|
1137
|
-
Id?: string;
|
|
1138
|
-
};
|
|
1139
|
-
};
|
|
1140
|
-
}[];
|
|
1147
|
+
retEvento?: RetEvento;
|
|
1141
1148
|
};
|
|
1142
1149
|
}
|
|
1143
1150
|
|
|
@@ -1213,7 +1220,7 @@ interface ProcEventoNFe {
|
|
|
1213
1220
|
$: {
|
|
1214
1221
|
versao: string;
|
|
1215
1222
|
};
|
|
1216
|
-
evento: EventoItem
|
|
1223
|
+
evento: EventoItem<unknown>;
|
|
1217
1224
|
retEvento: RetEventoItem;
|
|
1218
1225
|
}
|
|
1219
1226
|
interface ConsultaProtocoloResponse {
|
|
@@ -1387,7 +1394,7 @@ interface NfeTransmitter extends Transmitter<NfeRemoteClient> {
|
|
|
1387
1394
|
consultaProtocolo(payload: ConsultaProtocoloPayload): Promise<Either<NFeTsError, ConsultaProtocoloResponse>>;
|
|
1388
1395
|
autorizacao(payload: AutorizacaoPayload<SignedEntity<NFe$1>>): Promise<Either<NFeTsError, AutorizacaoResponse>>;
|
|
1389
1396
|
retAutorizacao(payload: RetAutorizacaoPayload): Promise<Either<NFeTsError, RetAutorizacaoResponse>>;
|
|
1390
|
-
recepcaoEvento(payload: EventoPayload): Promise<Either<NFeTsError, EventoResponse>>;
|
|
1397
|
+
recepcaoEvento<T>(payload: EventoPayload<T>): Promise<Either<NFeTsError, EventoResponse>>;
|
|
1391
1398
|
consultaCadastro(payload: ConsultaCadastroPayload): Promise<Either<NFeTsError, ConsultaCadastroResponse>>;
|
|
1392
1399
|
}
|
|
1393
1400
|
interface NfeRemoteClient extends Client {
|
|
@@ -1396,7 +1403,7 @@ interface NfeRemoteClient extends Client {
|
|
|
1396
1403
|
nfeConsultaNF(args: ConsultaProtocoloRequest, opt?: RequestConfig): Promise<ConsultaProtocoloResponse>;
|
|
1397
1404
|
nfeAutorizacaoLote(args: AutorizacaoRequest<SignedEntity<NFe$1>>, opt?: RequestConfig): Promise<AutorizacaoResponse>;
|
|
1398
1405
|
nfeRetAutorizacaoLote(args: RetAutorizacaoRequest, opt?: RequestConfig): Promise<RetAutorizacaoResponse>;
|
|
1399
|
-
nfeRecepcaoEvento(args: EventoRequest
|
|
1406
|
+
nfeRecepcaoEvento<T>(args: EventoRequest<T>, opt?: RequestConfig): Promise<EventoResponse>;
|
|
1400
1407
|
consultaCadastro(args: ConsultaCadastroRequest, opt?: RequestConfig): Promise<ConsultaCadastroResponse>;
|
|
1401
1408
|
}
|
|
1402
1409
|
|
|
@@ -2985,24 +2992,25 @@ declare class NfeRemoteTransmitter implements NfeTransmitter$1 {
|
|
|
2985
2992
|
service<WS extends Record<string, unknown> = typeof webservices$1, O extends Record<string, unknown> = typeof _default$1, S extends StateCode = StateCode, E extends EnvironmentCode = EnvironmentCode>(options: ServiceOptions$1<WS, O, S, E>): Webservice;
|
|
2986
2993
|
protected errors(): string[] | undefined;
|
|
2987
2994
|
protected validate<T extends object>(payload: T): Left<NFeTsError> | Right<T>;
|
|
2988
|
-
protected
|
|
2995
|
+
protected ns<T extends object>(payload: Namespaced<T>, version: string): T & {
|
|
2989
2996
|
$: {
|
|
2990
2997
|
xmlns: string;
|
|
2991
2998
|
versao: string;
|
|
2992
2999
|
};
|
|
2993
|
-
}
|
|
3000
|
+
};
|
|
2994
3001
|
protected xsd(name: string): string;
|
|
2995
3002
|
consultStatus(payload: ConsultStatusPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_consult_status.ConsultStatusResponse>>;
|
|
2996
3003
|
inutilizacao(payload: InutilizacaoPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_inutilizacao.InutilizacaoResponse>>;
|
|
2997
3004
|
consultaProtocolo(payload: ConsultaProtocoloPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_consulta_protocolo.ConsultaProtocoloResponse>>;
|
|
2998
3005
|
autorizacao(payload: AutorizacaoPayload$1<SignedEntity<NFe$2>>): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_autorizacao.AutorizacaoResponse>>;
|
|
2999
3006
|
retAutorizacao(payload: RetAutorizacaoPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_ret_autorizacao.RetAutorizacaoResponse>>;
|
|
3000
|
-
recepcaoEvento(payload:
|
|
3007
|
+
recepcaoEvento<T>(payload: EventoRequest$1<T>['envEvento']): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_evento.EventoResponse>>;
|
|
3001
3008
|
consultaCadastro(payload: ConsultaCadastroPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_consulta_cadastro.ConsultaCadastroResponse>>;
|
|
3002
3009
|
}
|
|
3003
3010
|
|
|
3004
|
-
declare class
|
|
3011
|
+
declare abstract class Pipeline {
|
|
3005
3012
|
protected readonly certificate: ReadCertificateRequest;
|
|
3013
|
+
protected readonly xmlns = "http://www.portalfiscal.inf.br/nfe";
|
|
3006
3014
|
protected readonly http: HttpClient;
|
|
3007
3015
|
protected readonly toolkit: XmlToolkit;
|
|
3008
3016
|
protected readonly caching: CacheAdapter;
|
|
@@ -3011,6 +3019,10 @@ declare class NfeAuthorizerPipeline {
|
|
|
3011
3019
|
protected readonly transmitter: NfeRemoteTransmitter;
|
|
3012
3020
|
protected readonly signer: EntitySigner;
|
|
3013
3021
|
constructor(certificate: ReadCertificateRequest);
|
|
3022
|
+
protected errors(): string[] | undefined;
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
declare class NfeAuthorizerPipeline extends Pipeline {
|
|
3014
3026
|
execute(payload: AutorizacaoPayload$1<NFe$3>, options?: Pick<NfeTransmitterOptions$1, 'schema'>): Promise<Either$3<NFeTsError$1, _nfets_nfe_domain_entities_services_autorizacao.AutorizacaoResponse>>;
|
|
3015
3027
|
protected contingency(payload: AutorizacaoPayload$1<NFe$3>): {
|
|
3016
3028
|
dhCont: string;
|
|
@@ -4613,10 +4625,14 @@ declare class NfeDetXmlBuilder implements INfeDetXmlBuilder$1 {
|
|
|
4613
4625
|
declare class NFe implements NFe$2 {
|
|
4614
4626
|
$: NFeAttributes$1;
|
|
4615
4627
|
infNFe: InfNFe$1;
|
|
4628
|
+
Signature?: Signature$1;
|
|
4616
4629
|
}
|
|
4617
4630
|
|
|
4618
|
-
declare class NFCe
|
|
4631
|
+
declare class NFCe implements NFCe$2 {
|
|
4632
|
+
$: NFeAttributes$1;
|
|
4633
|
+
infNFe: InfNFe$1;
|
|
4619
4634
|
infNFeSupl: InfNFeSupl$1;
|
|
4635
|
+
Signature?: Signature;
|
|
4620
4636
|
}
|
|
4621
4637
|
|
|
4622
4638
|
export { type AccessKey, AccessKeyBuilder, type ContingencyOptions, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DetBuilderAggregator, nfeDetXmlBuilder as INfeDetXmlBuilder, nfeXmlBuilder as INfeXmlBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfeAuthorizerPipeline, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, type Schema, type TotalBuilderAggregator, TpEmis, type VerifiedAccessKey, directory };
|
package/dist/nfe/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StateCode, EnvironmentCode, DecimalValue, StateAcronym, TransmitterOptions, Transmitter, Client, RequestConfig, SignedEntity, NFeTsError, ReadCertificateResponse, RemoteTransmissionRepository, ReadCertificateRequest, HttpClient, XmlToolkit, CacheAdapter, CertificateRepository } from '@nfets/core/domain';
|
|
1
|
+
import { StateCode, EnvironmentCode, DecimalValue, Signature, StateAcronym, TransmitterOptions, Transmitter, Client, RequestConfig, SignedEntity, NFeTsError, ReadCertificateResponse, RemoteTransmissionRepository, Namespaced, ReadCertificateRequest, HttpClient, XmlToolkit, CacheAdapter, CertificateRepository } from '@nfets/core/domain';
|
|
2
2
|
import { Either } from '@nfets/core/shared/either';
|
|
3
|
-
import { StateCode as StateCode$1, EnvironmentCode as EnvironmentCode$1, StateCodes, StateAcronym as StateAcronym$1, Either as Either$1, CertificateRepository as CertificateRepository$1, SignedEntity as SignedEntity$1 } from '@nfets/core';
|
|
3
|
+
import { StateCode as StateCode$1, EnvironmentCode as EnvironmentCode$1, StateCodes, StateAcronym as StateAcronym$1, Either as Either$1, CertificateRepository as CertificateRepository$1, SignedEntity as SignedEntity$1, Signature as Signature$1 } from '@nfets/core';
|
|
4
4
|
import { Either as Either$2, DeepPartial } from '@nfets/core/shared';
|
|
5
5
|
import { Ide as Ide$1 } from '@nfets/nfe/domain/entities/nfe/inf-nfe/ide';
|
|
6
6
|
import { InfNFeAttributes as InfNFeAttributes$1, InfNFe as InfNFe$1 } from '@nfets/nfe/domain/entities/nfe/inf-nfe';
|
|
@@ -35,13 +35,13 @@ import { INfeXmlBuilder as INfeXmlBuilder$1, InfNFeBuilder as InfNFeBuilder$1, I
|
|
|
35
35
|
import * as _nfets_nfe_domain_entities_services_autorizacao from '@nfets/nfe/domain/entities/services/autorizacao';
|
|
36
36
|
import { AutorizacaoPayload as AutorizacaoPayload$1, AutorizacaoResponse as AutorizacaoResponse$1 } from '@nfets/nfe/domain/entities/services/autorizacao';
|
|
37
37
|
import { L as Left, R as Right, E as Either$3, N as NFeTsError$1 } from '../either-CdHd_Yt7.js';
|
|
38
|
-
import { EntitySigner } from '@nfets/core/application';
|
|
39
38
|
import { NfeTransmitter as NfeTransmitter$1, NfeRemoteClient as NfeRemoteClient$1, NfeTransmitterOptions as NfeTransmitterOptions$1, ContingencyOptions as ContingencyOptions$1 } from '@nfets/nfe/domain/entities/transmission/nfe-remote-client';
|
|
40
39
|
import { NFe as NFe$3 } from '@nfets/nfe/infrastructure/dto/nfe/nfe';
|
|
40
|
+
import { EntitySigner } from '@nfets/core/application';
|
|
41
41
|
import * as _nfets_nfe_domain_entities_services_consulta_cadastro from '@nfets/nfe/domain/entities/services/consulta-cadastro';
|
|
42
42
|
import { ConsultaCadastroPayload as ConsultaCadastroPayload$1 } from '@nfets/nfe/domain/entities/services/consulta-cadastro';
|
|
43
43
|
import * as _nfets_nfe_domain_entities_services_evento from '@nfets/nfe/domain/entities/services/evento';
|
|
44
|
-
import {
|
|
44
|
+
import { EventoRequest as EventoRequest$1 } from '@nfets/nfe/domain/entities/services/evento';
|
|
45
45
|
import * as _nfets_nfe_domain_entities_services_ret_autorizacao from '@nfets/nfe/domain/entities/services/ret-autorizacao';
|
|
46
46
|
import { RetAutorizacaoPayload as RetAutorizacaoPayload$1 } from '@nfets/nfe/domain/entities/services/ret-autorizacao';
|
|
47
47
|
import * as _nfets_nfe_domain_entities_services_consulta_protocolo from '@nfets/nfe/domain/entities/services/consulta-protocolo';
|
|
@@ -1018,29 +1018,32 @@ interface ConsultStatusResponse {
|
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
1020
|
|
|
1021
|
-
interface
|
|
1021
|
+
interface InfInutAttributes {
|
|
1022
|
+
Id: string;
|
|
1023
|
+
}
|
|
1024
|
+
interface InfInut {
|
|
1025
|
+
$: InfInutAttributes;
|
|
1022
1026
|
tpAmb?: EnvironmentCode;
|
|
1023
1027
|
xServ?: 'INUTILIZAR';
|
|
1024
1028
|
cUF?: StateCode;
|
|
1025
1029
|
ano: string;
|
|
1026
|
-
CNPJ
|
|
1030
|
+
CNPJ?: string;
|
|
1031
|
+
CPF?: string;
|
|
1027
1032
|
mod: string;
|
|
1028
1033
|
serie: string;
|
|
1029
1034
|
nNFIni: string;
|
|
1030
1035
|
nNFFin: string;
|
|
1031
1036
|
xJust: string;
|
|
1032
1037
|
}
|
|
1038
|
+
interface InutNFeAttributes {
|
|
1039
|
+
xmlns: string;
|
|
1040
|
+
}
|
|
1041
|
+
interface InutilizacaoPayload {
|
|
1042
|
+
$: InutNFeAttributes;
|
|
1043
|
+
infInut: InfInut;
|
|
1044
|
+
}
|
|
1033
1045
|
interface InutilizacaoRequest {
|
|
1034
|
-
inutNFe:
|
|
1035
|
-
$: {
|
|
1036
|
-
versao: string;
|
|
1037
|
-
};
|
|
1038
|
-
infInut: InutilizacaoPayload & {
|
|
1039
|
-
$: {
|
|
1040
|
-
Id: string;
|
|
1041
|
-
};
|
|
1042
|
-
};
|
|
1043
|
-
};
|
|
1046
|
+
inutNFe: InutilizacaoPayload;
|
|
1044
1047
|
}
|
|
1045
1048
|
interface InutilizacaoResponse {
|
|
1046
1049
|
retInutNFe: {
|
|
@@ -1068,39 +1071,67 @@ interface InutilizacaoResponse {
|
|
|
1068
1071
|
};
|
|
1069
1072
|
}
|
|
1070
1073
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
+
declare enum TpEvent {
|
|
1075
|
+
Cancelamento = "110111"
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
interface EventoPayload<T> {
|
|
1074
1079
|
idLote: string;
|
|
1075
|
-
evento: EventoItem
|
|
1080
|
+
evento: EventoItem<T>;
|
|
1081
|
+
}
|
|
1082
|
+
interface InfEventoAttributes {
|
|
1083
|
+
Id: string;
|
|
1084
|
+
}
|
|
1085
|
+
interface InfEvento<T> {
|
|
1086
|
+
$: InfEventoAttributes;
|
|
1087
|
+
cOrgao: StateCode;
|
|
1088
|
+
tpAmb: EnvironmentCode;
|
|
1089
|
+
CNPJ?: string;
|
|
1090
|
+
CPF?: string;
|
|
1091
|
+
chNFe: string;
|
|
1092
|
+
dhEvento: string;
|
|
1093
|
+
tpEvento: TpEvent;
|
|
1094
|
+
nSeqEvento: number;
|
|
1095
|
+
verEvento: string;
|
|
1096
|
+
detEvento: T;
|
|
1097
|
+
}
|
|
1098
|
+
interface EventoItemAttributes {
|
|
1099
|
+
xmlns: string;
|
|
1100
|
+
}
|
|
1101
|
+
interface EventoItem<T> {
|
|
1102
|
+
$: EventoItemAttributes;
|
|
1103
|
+
infEvento: InfEvento<T>;
|
|
1104
|
+
}
|
|
1105
|
+
interface EventoRequest<T> {
|
|
1106
|
+
envEvento: EventoPayload<{
|
|
1107
|
+
descEvento: string;
|
|
1108
|
+
} & T>;
|
|
1076
1109
|
}
|
|
1077
|
-
interface
|
|
1110
|
+
interface RetEvento {
|
|
1078
1111
|
$: {
|
|
1079
1112
|
versao: string;
|
|
1080
1113
|
};
|
|
1081
1114
|
infEvento: {
|
|
1082
|
-
|
|
1083
|
-
Id
|
|
1115
|
+
$?: {
|
|
1116
|
+
Id?: string;
|
|
1084
1117
|
};
|
|
1085
|
-
cOrgao: string;
|
|
1086
1118
|
tpAmb: string;
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1119
|
+
verAplic: string;
|
|
1120
|
+
cOrgao: string;
|
|
1121
|
+
cStat: string;
|
|
1122
|
+
xMotivo: string;
|
|
1123
|
+
chNFe?: string;
|
|
1124
|
+
tpEvento?: string;
|
|
1125
|
+
xEvento?: string;
|
|
1126
|
+
nSeqEvento?: string;
|
|
1127
|
+
cOrgaoAutor?: string;
|
|
1128
|
+
CNPJDest?: string;
|
|
1129
|
+
CPFDest?: string;
|
|
1130
|
+
emailDest?: string;
|
|
1131
|
+
dhRegEvento: string;
|
|
1132
|
+
nProt?: string;
|
|
1100
1133
|
};
|
|
1101
|
-
|
|
1102
|
-
interface EventoRequest {
|
|
1103
|
-
envEvento: EventoPayload;
|
|
1134
|
+
Signature?: Signature;
|
|
1104
1135
|
}
|
|
1105
1136
|
interface EventoResponse {
|
|
1106
1137
|
retEnvEvento: {
|
|
@@ -1113,31 +1144,7 @@ interface EventoResponse {
|
|
|
1113
1144
|
cOrgao: string;
|
|
1114
1145
|
cStat: string;
|
|
1115
1146
|
xMotivo: string;
|
|
1116
|
-
retEvento?:
|
|
1117
|
-
$: {
|
|
1118
|
-
versao: string;
|
|
1119
|
-
};
|
|
1120
|
-
infEvento: {
|
|
1121
|
-
tpAmb: string;
|
|
1122
|
-
verAplic: string;
|
|
1123
|
-
cOrgao: string;
|
|
1124
|
-
cStat: string;
|
|
1125
|
-
xMotivo: string;
|
|
1126
|
-
chNFe?: string;
|
|
1127
|
-
tpEvento?: string;
|
|
1128
|
-
xEvento?: string;
|
|
1129
|
-
nSeqEvento?: string;
|
|
1130
|
-
cOrgaoAutor?: string;
|
|
1131
|
-
CNPJDest?: string;
|
|
1132
|
-
CPFDest?: string;
|
|
1133
|
-
emailDest?: string;
|
|
1134
|
-
dhRegEvento: string;
|
|
1135
|
-
nProt?: string;
|
|
1136
|
-
$?: {
|
|
1137
|
-
Id?: string;
|
|
1138
|
-
};
|
|
1139
|
-
};
|
|
1140
|
-
}[];
|
|
1147
|
+
retEvento?: RetEvento;
|
|
1141
1148
|
};
|
|
1142
1149
|
}
|
|
1143
1150
|
|
|
@@ -1213,7 +1220,7 @@ interface ProcEventoNFe {
|
|
|
1213
1220
|
$: {
|
|
1214
1221
|
versao: string;
|
|
1215
1222
|
};
|
|
1216
|
-
evento: EventoItem
|
|
1223
|
+
evento: EventoItem<unknown>;
|
|
1217
1224
|
retEvento: RetEventoItem;
|
|
1218
1225
|
}
|
|
1219
1226
|
interface ConsultaProtocoloResponse {
|
|
@@ -1387,7 +1394,7 @@ interface NfeTransmitter extends Transmitter<NfeRemoteClient> {
|
|
|
1387
1394
|
consultaProtocolo(payload: ConsultaProtocoloPayload): Promise<Either<NFeTsError, ConsultaProtocoloResponse>>;
|
|
1388
1395
|
autorizacao(payload: AutorizacaoPayload<SignedEntity<NFe$1>>): Promise<Either<NFeTsError, AutorizacaoResponse>>;
|
|
1389
1396
|
retAutorizacao(payload: RetAutorizacaoPayload): Promise<Either<NFeTsError, RetAutorizacaoResponse>>;
|
|
1390
|
-
recepcaoEvento(payload: EventoPayload): Promise<Either<NFeTsError, EventoResponse>>;
|
|
1397
|
+
recepcaoEvento<T>(payload: EventoPayload<T>): Promise<Either<NFeTsError, EventoResponse>>;
|
|
1391
1398
|
consultaCadastro(payload: ConsultaCadastroPayload): Promise<Either<NFeTsError, ConsultaCadastroResponse>>;
|
|
1392
1399
|
}
|
|
1393
1400
|
interface NfeRemoteClient extends Client {
|
|
@@ -1396,7 +1403,7 @@ interface NfeRemoteClient extends Client {
|
|
|
1396
1403
|
nfeConsultaNF(args: ConsultaProtocoloRequest, opt?: RequestConfig): Promise<ConsultaProtocoloResponse>;
|
|
1397
1404
|
nfeAutorizacaoLote(args: AutorizacaoRequest<SignedEntity<NFe$1>>, opt?: RequestConfig): Promise<AutorizacaoResponse>;
|
|
1398
1405
|
nfeRetAutorizacaoLote(args: RetAutorizacaoRequest, opt?: RequestConfig): Promise<RetAutorizacaoResponse>;
|
|
1399
|
-
nfeRecepcaoEvento(args: EventoRequest
|
|
1406
|
+
nfeRecepcaoEvento<T>(args: EventoRequest<T>, opt?: RequestConfig): Promise<EventoResponse>;
|
|
1400
1407
|
consultaCadastro(args: ConsultaCadastroRequest, opt?: RequestConfig): Promise<ConsultaCadastroResponse>;
|
|
1401
1408
|
}
|
|
1402
1409
|
|
|
@@ -2985,24 +2992,25 @@ declare class NfeRemoteTransmitter implements NfeTransmitter$1 {
|
|
|
2985
2992
|
service<WS extends Record<string, unknown> = typeof webservices$1, O extends Record<string, unknown> = typeof _default$1, S extends StateCode = StateCode, E extends EnvironmentCode = EnvironmentCode>(options: ServiceOptions$1<WS, O, S, E>): Webservice;
|
|
2986
2993
|
protected errors(): string[] | undefined;
|
|
2987
2994
|
protected validate<T extends object>(payload: T): Left<NFeTsError> | Right<T>;
|
|
2988
|
-
protected
|
|
2995
|
+
protected ns<T extends object>(payload: Namespaced<T>, version: string): T & {
|
|
2989
2996
|
$: {
|
|
2990
2997
|
xmlns: string;
|
|
2991
2998
|
versao: string;
|
|
2992
2999
|
};
|
|
2993
|
-
}
|
|
3000
|
+
};
|
|
2994
3001
|
protected xsd(name: string): string;
|
|
2995
3002
|
consultStatus(payload: ConsultStatusPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_consult_status.ConsultStatusResponse>>;
|
|
2996
3003
|
inutilizacao(payload: InutilizacaoPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_inutilizacao.InutilizacaoResponse>>;
|
|
2997
3004
|
consultaProtocolo(payload: ConsultaProtocoloPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_consulta_protocolo.ConsultaProtocoloResponse>>;
|
|
2998
3005
|
autorizacao(payload: AutorizacaoPayload$1<SignedEntity<NFe$2>>): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_autorizacao.AutorizacaoResponse>>;
|
|
2999
3006
|
retAutorizacao(payload: RetAutorizacaoPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_ret_autorizacao.RetAutorizacaoResponse>>;
|
|
3000
|
-
recepcaoEvento(payload:
|
|
3007
|
+
recepcaoEvento<T>(payload: EventoRequest$1<T>['envEvento']): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_evento.EventoResponse>>;
|
|
3001
3008
|
consultaCadastro(payload: ConsultaCadastroPayload$1): Promise<Either$3<NFeTsError, _nfets_nfe_domain_entities_services_consulta_cadastro.ConsultaCadastroResponse>>;
|
|
3002
3009
|
}
|
|
3003
3010
|
|
|
3004
|
-
declare class
|
|
3011
|
+
declare abstract class Pipeline {
|
|
3005
3012
|
protected readonly certificate: ReadCertificateRequest;
|
|
3013
|
+
protected readonly xmlns = "http://www.portalfiscal.inf.br/nfe";
|
|
3006
3014
|
protected readonly http: HttpClient;
|
|
3007
3015
|
protected readonly toolkit: XmlToolkit;
|
|
3008
3016
|
protected readonly caching: CacheAdapter;
|
|
@@ -3011,6 +3019,10 @@ declare class NfeAuthorizerPipeline {
|
|
|
3011
3019
|
protected readonly transmitter: NfeRemoteTransmitter;
|
|
3012
3020
|
protected readonly signer: EntitySigner;
|
|
3013
3021
|
constructor(certificate: ReadCertificateRequest);
|
|
3022
|
+
protected errors(): string[] | undefined;
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
declare class NfeAuthorizerPipeline extends Pipeline {
|
|
3014
3026
|
execute(payload: AutorizacaoPayload$1<NFe$3>, options?: Pick<NfeTransmitterOptions$1, 'schema'>): Promise<Either$3<NFeTsError$1, _nfets_nfe_domain_entities_services_autorizacao.AutorizacaoResponse>>;
|
|
3015
3027
|
protected contingency(payload: AutorizacaoPayload$1<NFe$3>): {
|
|
3016
3028
|
dhCont: string;
|
|
@@ -4613,10 +4625,14 @@ declare class NfeDetXmlBuilder implements INfeDetXmlBuilder$1 {
|
|
|
4613
4625
|
declare class NFe implements NFe$2 {
|
|
4614
4626
|
$: NFeAttributes$1;
|
|
4615
4627
|
infNFe: InfNFe$1;
|
|
4628
|
+
Signature?: Signature$1;
|
|
4616
4629
|
}
|
|
4617
4630
|
|
|
4618
|
-
declare class NFCe
|
|
4631
|
+
declare class NFCe implements NFCe$2 {
|
|
4632
|
+
$: NFeAttributes$1;
|
|
4633
|
+
infNFe: InfNFe$1;
|
|
4619
4634
|
infNFeSupl: InfNFeSupl$1;
|
|
4635
|
+
Signature?: Signature;
|
|
4620
4636
|
}
|
|
4621
4637
|
|
|
4622
4638
|
export { type AccessKey, AccessKeyBuilder, type ContingencyOptions, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DetBuilderAggregator, nfeDetXmlBuilder as INfeDetXmlBuilder, nfeXmlBuilder as INfeXmlBuilder, type NFCe$1 as NFCe, NFCe as NFCeDto, type NFe$1 as NFe, type NFeAttributes, NFe as NFeDto, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfeAuthorizerPipeline, NfeDetXmlBuilder, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, type Schema, type TotalBuilderAggregator, TpEmis, type VerifiedAccessKey, directory };
|
package/dist/nfe/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-V2LFKSE4.mjs";import"../chunk-3WPW27WV.mjs";import"../chunk-W6MRGYXP.mjs";export{c as AccessKeyBuilder,d as DefaultDetBuilderAggregator,e as DefaultTotalBuilderAggregator,n as NFCeDto,f as NFeDto,j as NfceQrcode,i as NfceRemoteTransmitter,l as NfceXmlBuilder,h as NfeAuthorizerPipeline,m as NfeDetXmlBuilder,g as NfeRemoteTransmitter,k as NfeXmlBuilder,a as TpEmis,b as directory};
|