nfets 0.0.41 → 0.0.42

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, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, G as RequestConfig, O as SignedEntity, Y as Either, x as NFeTsError, a as ReadCertificateResponse, R as ReadCertificateRequest, J as HttpClient, w as XmlToolkit, y as CacheAdapter, z as CertificateRepository, L as RemoteTransmissionRepository, U as EntitySigner, V as XmlSigner, Z as Left, _ as Right, N as Namespaced } from '../xml-signer-BmpwXTKY.cjs';
1
+ import { h as StateCode, j as EnvironmentCode, D as DecimalValue, i as StateAcronym, l as Signature, f as StateCodes, p as TransmitterOptions, q as Transmitter, m as Client, G as RequestConfig, O as SignedEntity, Y as Either, x as NFeTsError, a as ReadCertificateResponse, R as ReadCertificateRequest, J as HttpClient, w as XmlToolkit, y as CacheAdapter, z as CertificateRepository, L as RemoteTransmissionRepository, U as EntitySigner, V as XmlSigner, Z as Left, _ as Right, N as Namespaced } from '../xml-signer-BmpwXTKY.cjs';
2
2
  import 'node:crypto';
3
3
 
4
4
  type DeepPartial<T> = {
@@ -20,6 +20,16 @@ interface VerifiedAccessKey extends AccessKey {
20
20
  vd: string;
21
21
  }
22
22
 
23
+ interface DetEventoCancelamento {
24
+ xJust: string;
25
+ nProt: string;
26
+ }
27
+ interface EventoCancelamento extends DetEventoCancelamento {
28
+ chNFe: string;
29
+ idLote?: string;
30
+ dhEvento?: string;
31
+ }
32
+
23
33
  declare enum TpEmis {
24
34
  Normal = "1",
25
35
  EPEC = "4",
@@ -983,11 +993,48 @@ interface NFeProc {
983
993
  protNFe: ProtNFe;
984
994
  }
985
995
 
986
- type NFCe$1 = NFe$1;
987
- interface NFCeProc {
988
- NFe: NFCe$1;
989
- protNFe: ProtNFe;
996
+ interface AutorizacaoPayload<E extends NFe$1, T extends E | E[]> {
997
+ cUF?: StateCode;
998
+ tpAmb?: EnvironmentCode;
999
+ idLote?: string;
1000
+ indSinc?: '0' | '1';
1001
+ NFe: T;
990
1002
  }
1003
+ interface AutorizacaoRequest<E extends NFe$1, T extends E | E[]> {
1004
+ enviNFe: AutorizacaoPayload<E, T>;
1005
+ }
1006
+ interface SynchronousAutorizacaoResponse<T extends NFe$1 | NFe$1[] = NFe$1 | NFe$1[]> {
1007
+ retEnviNFe: {
1008
+ $: {
1009
+ versao: string;
1010
+ };
1011
+ tpAmb: string;
1012
+ verAplic: string;
1013
+ cStat: string;
1014
+ xMotivo: string;
1015
+ cUF: string;
1016
+ dhRecbto: string;
1017
+ protNFe: T extends NFe$1[] ? ProtNFe[] : ProtNFe;
1018
+ };
1019
+ }
1020
+ interface AsynchronousAutorizacaoResponse {
1021
+ retEnviNFe: {
1022
+ $: {
1023
+ versao: string;
1024
+ };
1025
+ tpAmb: EnvironmentCode;
1026
+ verAplic: string;
1027
+ cStat: string;
1028
+ xMotivo: string;
1029
+ cUF: StateCode;
1030
+ dhRecbto: string;
1031
+ infRec: {
1032
+ nRec: string;
1033
+ tMed: string;
1034
+ };
1035
+ };
1036
+ }
1037
+ type AutorizacaoResponse<E extends NFe$1 = NFe$1, T extends E | E[] = E | E[]> = SynchronousAutorizacaoResponse<T> | AsynchronousAutorizacaoResponse;
991
1038
 
992
1039
  interface ConsultStatusPayload {
993
1040
  tpAmb: EnvironmentCode;
@@ -1014,64 +1061,58 @@ interface ConsultStatusResponse {
1014
1061
  };
1015
1062
  }
1016
1063
 
1017
- interface VoidRangePayload {
1018
- tpAmb?: EnvironmentCode;
1019
- ano?: string;
1020
- mod: string;
1021
- serie: string;
1022
- nNFIni: string;
1023
- nNFFin: string;
1024
- xJust: string;
1025
- }
1026
- interface InfInutAttributes {
1027
- Id: string;
1028
- }
1029
- interface InfInut {
1030
- $: InfInutAttributes;
1031
- tpAmb?: EnvironmentCode;
1032
- xServ?: 'INUTILIZAR';
1033
- cUF?: StateCode;
1034
- ano: string;
1064
+ interface ConsultaCadastroPayload {
1065
+ xServ?: 'CONS-CAD';
1066
+ UF: StateAcronym;
1067
+ IE?: string;
1035
1068
  CNPJ?: string;
1036
1069
  CPF?: string;
1037
- mod: string;
1038
- serie: string;
1039
- nNFIni: string;
1040
- nNFFin: string;
1041
- xJust: string;
1042
- }
1043
- interface InutNFeAttributes {
1044
- xmlns: string;
1045
- }
1046
- interface InutilizacaoPayload {
1047
- $: InutNFeAttributes;
1048
- infInut: InfInut;
1049
1070
  }
1050
- interface InutilizacaoRequest {
1051
- inutNFe: InutilizacaoPayload;
1071
+ interface ConsultaCadastroRequest {
1072
+ ConsCad: ConsultaCadastroPayload;
1052
1073
  }
1053
- interface InutilizacaoResponse {
1054
- retInutNFe: {
1074
+ interface ConsultaCadastroResponse {
1075
+ retConsCad: {
1055
1076
  $: {
1056
1077
  versao: string;
1057
1078
  };
1058
- infInut: {
1059
- $?: {
1060
- Id?: string;
1061
- };
1062
- tpAmb: EnvironmentCode;
1079
+ infCons: {
1063
1080
  verAplic: string;
1064
1081
  cStat: string;
1065
1082
  xMotivo: string;
1066
- cUF: string;
1067
- ano?: string;
1083
+ UF: StateAcronym;
1084
+ IE?: string;
1068
1085
  CNPJ?: string;
1069
- mod?: string;
1070
- serie?: string;
1071
- nNFIni?: string;
1072
- nNFFin?: string;
1073
- dhRecbto: string;
1074
- nProt?: string;
1086
+ CPF?: string;
1087
+ dhCons: string;
1088
+ cUF: StateCode;
1089
+ infCad?: {
1090
+ IE: string;
1091
+ CNPJ?: string;
1092
+ CPF?: string;
1093
+ UF: StateAcronym;
1094
+ cSit: string;
1095
+ indCredNFe: string;
1096
+ indCredCTe: string;
1097
+ xNome: string;
1098
+ xFant?: string;
1099
+ xRegApur?: string;
1100
+ CNAE?: string;
1101
+ dIniAtiv?: string;
1102
+ dUltSit?: string;
1103
+ dBaixa?: string;
1104
+ IEUnica?: string;
1105
+ IEAtual?: string;
1106
+ ender?: {
1107
+ xLgr?: string;
1108
+ nro?: string;
1109
+ xCpl?: string;
1110
+ xBairro?: string;
1111
+ cMun?: string;
1112
+ xMun?: string;
1113
+ CEP?: string;
1114
+ };
1115
+ }[];
1075
1116
  };
1076
1117
  };
1077
1118
  }
@@ -1084,6 +1125,10 @@ interface EventoPayload<T> {
1084
1125
  idLote: string;
1085
1126
  evento: EventoItem<T>;
1086
1127
  }
1128
+ interface EventoLotePayload<T> {
1129
+ idLote: string;
1130
+ evento: EventoItem<T>[];
1131
+ }
1087
1132
  interface InfEventoAttributes {
1088
1133
  Id: string;
1089
1134
  }
@@ -1152,6 +1197,20 @@ interface EventoResponse {
1152
1197
  retEvento?: RetEvento;
1153
1198
  };
1154
1199
  }
1200
+ interface EventoLoteResponse {
1201
+ retEnvEvento: {
1202
+ $: {
1203
+ versao: string;
1204
+ };
1205
+ idLote: string;
1206
+ tpAmb: string;
1207
+ verAplic: string;
1208
+ cOrgao: string;
1209
+ cStat: string;
1210
+ xMotivo: string;
1211
+ retEvento?: RetEvento[];
1212
+ };
1213
+ }
1155
1214
 
1156
1215
  interface ConsultaProtocoloPayload {
1157
1216
  tpAmb?: EnvironmentCode;
@@ -1228,48 +1287,67 @@ interface ConsultaProtocoloResponse {
1228
1287
  };
1229
1288
  }
1230
1289
 
1231
- interface AutorizacaoPayload<E extends NFe$1, T extends E | E[]> {
1232
- cUF?: StateCode;
1290
+ interface VoidRangePayload {
1233
1291
  tpAmb?: EnvironmentCode;
1234
- idLote?: string;
1235
- indSinc?: '0' | '1';
1236
- NFe: T;
1292
+ ano?: string;
1293
+ mod: string;
1294
+ serie: string;
1295
+ nNFIni: string;
1296
+ nNFFin: string;
1297
+ xJust: string;
1237
1298
  }
1238
- interface AutorizacaoRequest<E extends NFe$1, T extends E | E[]> {
1239
- enviNFe: AutorizacaoPayload<E, T>;
1299
+ interface InfInutAttributes {
1300
+ Id: string;
1240
1301
  }
1241
- interface SynchronousAutorizacaoResponse<T extends NFe$1 | NFe$1[] = NFe$1 | NFe$1[]> {
1242
- retEnviNFe: {
1243
- $: {
1244
- versao: string;
1245
- };
1246
- tpAmb: string;
1247
- verAplic: string;
1248
- cStat: string;
1249
- xMotivo: string;
1250
- cUF: string;
1251
- dhRecbto: string;
1252
- protNFe: T extends NFe$1[] ? ProtNFe[] : ProtNFe;
1253
- };
1302
+ interface InfInut {
1303
+ $: InfInutAttributes;
1304
+ tpAmb?: EnvironmentCode;
1305
+ xServ?: 'INUTILIZAR';
1306
+ cUF?: StateCode;
1307
+ ano: string;
1308
+ CNPJ?: string;
1309
+ CPF?: string;
1310
+ mod: string;
1311
+ serie: string;
1312
+ nNFIni: string;
1313
+ nNFFin: string;
1314
+ xJust: string;
1254
1315
  }
1255
- interface AsynchronousAutorizacaoResponse {
1256
- retEnviNFe: {
1316
+ interface InutNFeAttributes {
1317
+ xmlns: string;
1318
+ }
1319
+ interface InutilizacaoPayload {
1320
+ $: InutNFeAttributes;
1321
+ infInut: InfInut;
1322
+ }
1323
+ interface InutilizacaoRequest {
1324
+ inutNFe: InutilizacaoPayload;
1325
+ }
1326
+ interface InutilizacaoResponse {
1327
+ retInutNFe: {
1257
1328
  $: {
1258
1329
  versao: string;
1259
1330
  };
1260
- tpAmb: EnvironmentCode;
1261
- verAplic: string;
1262
- cStat: string;
1263
- xMotivo: string;
1264
- cUF: StateCode;
1265
- dhRecbto: string;
1266
- infRec: {
1267
- nRec: string;
1268
- tMed: string;
1331
+ infInut: {
1332
+ $?: {
1333
+ Id?: string;
1334
+ };
1335
+ tpAmb: EnvironmentCode;
1336
+ verAplic: string;
1337
+ cStat: string;
1338
+ xMotivo: string;
1339
+ cUF: string;
1340
+ ano?: string;
1341
+ CNPJ?: string;
1342
+ mod?: string;
1343
+ serie?: string;
1344
+ nNFIni?: string;
1345
+ nNFFin?: string;
1346
+ dhRecbto: string;
1347
+ nProt?: string;
1269
1348
  };
1270
1349
  };
1271
1350
  }
1272
- type AutorizacaoResponse<E extends NFe$1 = NFe$1, T extends E | E[] = E | E[]> = SynchronousAutorizacaoResponse<T> | AsynchronousAutorizacaoResponse;
1273
1351
 
1274
1352
  interface RetAutorizacaoPayload {
1275
1353
  tpAmb: EnvironmentCode;
@@ -1296,60 +1374,10 @@ interface RetAutorizacaoResponse {
1296
1374
  };
1297
1375
  }
1298
1376
 
1299
- interface ConsultaCadastroPayload {
1300
- xServ?: 'CONS-CAD';
1301
- UF: StateAcronym;
1302
- IE?: string;
1303
- CNPJ?: string;
1304
- CPF?: string;
1305
- }
1306
- interface ConsultaCadastroRequest {
1307
- ConsCad: ConsultaCadastroPayload;
1308
- }
1309
- interface ConsultaCadastroResponse {
1310
- retConsCad: {
1311
- $: {
1312
- versao: string;
1313
- };
1314
- infCons: {
1315
- verAplic: string;
1316
- cStat: string;
1317
- xMotivo: string;
1318
- UF: StateAcronym;
1319
- IE?: string;
1320
- CNPJ?: string;
1321
- CPF?: string;
1322
- dhCons: string;
1323
- cUF: StateCode;
1324
- infCad?: {
1325
- IE: string;
1326
- CNPJ?: string;
1327
- CPF?: string;
1328
- UF: StateAcronym;
1329
- cSit: string;
1330
- indCredNFe: string;
1331
- indCredCTe: string;
1332
- xNome: string;
1333
- xFant?: string;
1334
- xRegApur?: string;
1335
- CNAE?: string;
1336
- dIniAtiv?: string;
1337
- dUltSit?: string;
1338
- dBaixa?: string;
1339
- IEUnica?: string;
1340
- IEAtual?: string;
1341
- ender?: {
1342
- xLgr?: string;
1343
- nro?: string;
1344
- xCpl?: string;
1345
- xBairro?: string;
1346
- cMun?: string;
1347
- xMun?: string;
1348
- CEP?: string;
1349
- };
1350
- }[];
1351
- };
1352
- };
1377
+ type NFCe$1 = NFe$1;
1378
+ interface NFCeProc {
1379
+ NFe: NFCe$1;
1380
+ protNFe: ProtNFe;
1353
1381
  }
1354
1382
 
1355
1383
  declare const schemas: {
@@ -4545,16 +4573,6 @@ declare abstract class EventPipeline extends TransmissionPipeline {
4545
4573
  private validated;
4546
4574
  }
4547
4575
 
4548
- interface DetEventoCancelamento {
4549
- xJust: string;
4550
- nProt: string;
4551
- }
4552
- interface EventoCancelamento extends DetEventoCancelamento {
4553
- chNFe: string;
4554
- idLote?: string;
4555
- dhEvento?: string;
4556
- }
4557
-
4558
4576
  declare class NfeNfceCancelPipeline extends EventPipeline {
4559
4577
  execute(payload: EventoCancelamento, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoResponse>>;
4560
4578
  }
@@ -4655,4 +4673,4 @@ declare class NFCe implements NFCe$1 {
4655
4673
  Signature?: Signature;
4656
4674
  }
4657
4675
 
4658
- export { type AccessKey, AccessKeyBuilder, type AssembleDetXmlBuilder, type AssembleNfeBuilder, type AutXMLBuilder, type AvulsaBuilder, type CanaBuilder, type CobrBuilder, type CofinsBuilder, type CofinsStBuilder, type CompraBuilder, type ContingencyOptions, DefaultDetBuilderAggregator, DefaultTotalBuilderAggregator, type DestBuilder, type DetBuilder, type DetBuilderAggregator, type DetGroupBuilder, type EmitBuilder, type EntregaBuilder, type ExportaBuilder, type IIBuilder, type INfeDetXmlBuilder, type INfeXmlBuilder, type IcmsBuilder, type IcmsIpiBuilder, type IcmsOrIssQnBuilder, type IcmsufdestBuilder, type IdeBuilder, type ImpostoBuilder, type InfAdicBuilder, type InfIntermedBuilder, type InfNFeBuilder, type InfRespTecBuilder, type InfSolicNFFBuilder, 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, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfeAuthorizerPipeline, NfeDetXmlBuilder, NfeNfceCancelPipeline, NfeNfceVoidRangePipeline, type NfeRemoteClient, NfeRemoteTransmitter, type NfeTransmitter, type NfeTransmitterOptions, NfeXmlBuilder, NfeXmlBuilderPipeline, type OptionalSharedImpostoBuilder, type PagBuilder, type PisBuilder, type PisStBuilder, type ProdBuilder, type RetiradaBuilder, type Schema, type TotalBuilder, type TotalBuilderAggregator, TpEmis, type TranspBuilder, type VerifiedAccessKey, directory };
4676
+ 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, 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, NfceQrcode, type NfceQrcodeOptions, type NfceQrcodeOptions200, type NfceQrcodeOptions300, type NfceQrcodeOptionsBase, type NfceRemoteClient, NfceRemoteTransmitter, type NfceTransmitter, type NfceTransmitterOptions, NfceXmlBuilder, NfeAuthorizerPipeline, 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, directory };