nfets 0.0.40 → 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.
- package/dist/chunk-4B2F4AVE.mjs +8 -0
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/index.cjs +63 -63
- 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 +63 -63
- package/dist/nfe/index.d.cts +236 -214
- package/dist/nfe/index.d.ts +236 -214
- package/dist/nfe/index.mjs +1 -1
- package/dist/{xml-signer-_YzTA_hV.d.cts → xml-signer-BmpwXTKY.d.cts} +1 -1
- package/dist/{xml-signer-_YzTA_hV.d.ts → xml-signer-BmpwXTKY.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-6GXYTBBS.mjs +0 -8
package/dist/nfe/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as StateCode, j as EnvironmentCode, D as DecimalValue,
|
|
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",
|
|
@@ -945,6 +955,11 @@ interface InfNFe {
|
|
|
945
955
|
infSolicNFF?: InfSolicNFF;
|
|
946
956
|
}
|
|
947
957
|
|
|
958
|
+
interface InfNFeSupl {
|
|
959
|
+
qrCode: string;
|
|
960
|
+
urlChave: string;
|
|
961
|
+
}
|
|
962
|
+
|
|
948
963
|
interface ProtNFeAttributes {
|
|
949
964
|
versao: string;
|
|
950
965
|
}
|
|
@@ -960,7 +975,7 @@ interface InfProt {
|
|
|
960
975
|
cMsg?: string;
|
|
961
976
|
xMsg?: string;
|
|
962
977
|
}
|
|
963
|
-
interface ProtNFe
|
|
978
|
+
interface ProtNFe {
|
|
964
979
|
$: ProtNFeAttributes;
|
|
965
980
|
infProt: InfProt;
|
|
966
981
|
}
|
|
@@ -971,24 +986,55 @@ interface NFeAttributes {
|
|
|
971
986
|
interface NFe$1 {
|
|
972
987
|
$: NFeAttributes;
|
|
973
988
|
infNFe: InfNFe;
|
|
989
|
+
infNFeSupl?: InfNFeSupl;
|
|
974
990
|
}
|
|
975
991
|
interface NFeProc {
|
|
976
992
|
NFe: NFe$1;
|
|
977
|
-
protNFe: ProtNFe
|
|
993
|
+
protNFe: ProtNFe;
|
|
978
994
|
}
|
|
979
995
|
|
|
980
|
-
interface
|
|
981
|
-
|
|
982
|
-
|
|
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;
|
|
983
1002
|
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
infNFeSupl: InfNFeSupl;
|
|
1003
|
+
interface AutorizacaoRequest<E extends NFe$1, T extends E | E[]> {
|
|
1004
|
+
enviNFe: AutorizacaoPayload<E, T>;
|
|
987
1005
|
}
|
|
988
|
-
interface
|
|
989
|
-
|
|
990
|
-
|
|
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
|
+
};
|
|
991
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;
|
|
992
1038
|
|
|
993
1039
|
interface ConsultStatusPayload {
|
|
994
1040
|
tpAmb: EnvironmentCode;
|
|
@@ -1015,64 +1061,58 @@ interface ConsultStatusResponse {
|
|
|
1015
1061
|
};
|
|
1016
1062
|
}
|
|
1017
1063
|
|
|
1018
|
-
interface
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
serie: string;
|
|
1023
|
-
nNFIni: string;
|
|
1024
|
-
nNFFin: string;
|
|
1025
|
-
xJust: string;
|
|
1026
|
-
}
|
|
1027
|
-
interface InfInutAttributes {
|
|
1028
|
-
Id: string;
|
|
1029
|
-
}
|
|
1030
|
-
interface InfInut {
|
|
1031
|
-
$: InfInutAttributes;
|
|
1032
|
-
tpAmb?: EnvironmentCode;
|
|
1033
|
-
xServ?: 'INUTILIZAR';
|
|
1034
|
-
cUF?: StateCode;
|
|
1035
|
-
ano: string;
|
|
1064
|
+
interface ConsultaCadastroPayload {
|
|
1065
|
+
xServ?: 'CONS-CAD';
|
|
1066
|
+
UF: StateAcronym;
|
|
1067
|
+
IE?: string;
|
|
1036
1068
|
CNPJ?: string;
|
|
1037
1069
|
CPF?: string;
|
|
1038
|
-
mod: string;
|
|
1039
|
-
serie: string;
|
|
1040
|
-
nNFIni: string;
|
|
1041
|
-
nNFFin: string;
|
|
1042
|
-
xJust: string;
|
|
1043
|
-
}
|
|
1044
|
-
interface InutNFeAttributes {
|
|
1045
|
-
xmlns: string;
|
|
1046
|
-
}
|
|
1047
|
-
interface InutilizacaoPayload {
|
|
1048
|
-
$: InutNFeAttributes;
|
|
1049
|
-
infInut: InfInut;
|
|
1050
1070
|
}
|
|
1051
|
-
interface
|
|
1052
|
-
|
|
1071
|
+
interface ConsultaCadastroRequest {
|
|
1072
|
+
ConsCad: ConsultaCadastroPayload;
|
|
1053
1073
|
}
|
|
1054
|
-
interface
|
|
1055
|
-
|
|
1074
|
+
interface ConsultaCadastroResponse {
|
|
1075
|
+
retConsCad: {
|
|
1056
1076
|
$: {
|
|
1057
1077
|
versao: string;
|
|
1058
1078
|
};
|
|
1059
|
-
|
|
1060
|
-
$?: {
|
|
1061
|
-
Id?: string;
|
|
1062
|
-
};
|
|
1063
|
-
tpAmb: EnvironmentCode;
|
|
1079
|
+
infCons: {
|
|
1064
1080
|
verAplic: string;
|
|
1065
1081
|
cStat: string;
|
|
1066
1082
|
xMotivo: string;
|
|
1067
|
-
|
|
1068
|
-
|
|
1083
|
+
UF: StateAcronym;
|
|
1084
|
+
IE?: string;
|
|
1069
1085
|
CNPJ?: string;
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
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
|
+
}[];
|
|
1076
1116
|
};
|
|
1077
1117
|
};
|
|
1078
1118
|
}
|
|
@@ -1085,6 +1125,10 @@ interface EventoPayload<T> {
|
|
|
1085
1125
|
idLote: string;
|
|
1086
1126
|
evento: EventoItem<T>;
|
|
1087
1127
|
}
|
|
1128
|
+
interface EventoLotePayload<T> {
|
|
1129
|
+
idLote: string;
|
|
1130
|
+
evento: EventoItem<T>[];
|
|
1131
|
+
}
|
|
1088
1132
|
interface InfEventoAttributes {
|
|
1089
1133
|
Id: string;
|
|
1090
1134
|
}
|
|
@@ -1153,6 +1197,20 @@ interface EventoResponse {
|
|
|
1153
1197
|
retEvento?: RetEvento;
|
|
1154
1198
|
};
|
|
1155
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
|
+
}
|
|
1156
1214
|
|
|
1157
1215
|
interface ConsultaProtocoloPayload {
|
|
1158
1216
|
tpAmb?: EnvironmentCode;
|
|
@@ -1162,24 +1220,6 @@ interface ConsultaProtocoloPayload {
|
|
|
1162
1220
|
interface ConsultaProtocoloRequest {
|
|
1163
1221
|
consSitNFe: ConsultaProtocoloPayload;
|
|
1164
1222
|
}
|
|
1165
|
-
interface ProtNFe {
|
|
1166
|
-
$: {
|
|
1167
|
-
versao: string;
|
|
1168
|
-
};
|
|
1169
|
-
infProt: {
|
|
1170
|
-
tpAmb: string;
|
|
1171
|
-
verAplic: string;
|
|
1172
|
-
chNFe: string;
|
|
1173
|
-
dhRecbto: string;
|
|
1174
|
-
nProt?: string;
|
|
1175
|
-
digVal?: string;
|
|
1176
|
-
cStat: string;
|
|
1177
|
-
xMotivo: string;
|
|
1178
|
-
$?: {
|
|
1179
|
-
Id?: string;
|
|
1180
|
-
};
|
|
1181
|
-
};
|
|
1182
|
-
}
|
|
1183
1223
|
interface RetCancNFe {
|
|
1184
1224
|
$: {
|
|
1185
1225
|
versao: string;
|
|
@@ -1247,38 +1287,70 @@ interface ConsultaProtocoloResponse {
|
|
|
1247
1287
|
};
|
|
1248
1288
|
}
|
|
1249
1289
|
|
|
1250
|
-
interface
|
|
1251
|
-
cUF?: StateCode;
|
|
1290
|
+
interface VoidRangePayload {
|
|
1252
1291
|
tpAmb?: EnvironmentCode;
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1292
|
+
ano?: string;
|
|
1293
|
+
mod: string;
|
|
1294
|
+
serie: string;
|
|
1295
|
+
nNFIni: string;
|
|
1296
|
+
nNFFin: string;
|
|
1297
|
+
xJust: string;
|
|
1256
1298
|
}
|
|
1257
|
-
interface
|
|
1258
|
-
|
|
1299
|
+
interface InfInutAttributes {
|
|
1300
|
+
Id: string;
|
|
1259
1301
|
}
|
|
1260
|
-
interface
|
|
1261
|
-
|
|
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;
|
|
1315
|
+
}
|
|
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: {
|
|
1262
1328
|
$: {
|
|
1263
1329
|
versao: string;
|
|
1264
1330
|
};
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
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;
|
|
1274
1348
|
};
|
|
1275
|
-
protNFe?: ProtNFe;
|
|
1276
1349
|
};
|
|
1277
1350
|
}
|
|
1278
1351
|
|
|
1279
1352
|
interface RetAutorizacaoPayload {
|
|
1280
|
-
tpAmb
|
|
1281
|
-
cUF?: StateCode;
|
|
1353
|
+
tpAmb: EnvironmentCode;
|
|
1282
1354
|
nRec: string;
|
|
1283
1355
|
}
|
|
1284
1356
|
interface RetAutorizacaoRequest {
|
|
@@ -1296,64 +1368,16 @@ interface RetAutorizacaoResponse {
|
|
|
1296
1368
|
xMotivo: string;
|
|
1297
1369
|
cUF: string;
|
|
1298
1370
|
dhRecbto: string;
|
|
1299
|
-
|
|
1371
|
+
cMsg?: string;
|
|
1372
|
+
xMsg?: string;
|
|
1373
|
+
protNFe?: ProtNFe | ProtNFe[];
|
|
1300
1374
|
};
|
|
1301
1375
|
}
|
|
1302
1376
|
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
CNPJ?: string;
|
|
1308
|
-
CPF?: string;
|
|
1309
|
-
}
|
|
1310
|
-
interface ConsultaCadastroRequest {
|
|
1311
|
-
ConsCad: ConsultaCadastroPayload;
|
|
1312
|
-
}
|
|
1313
|
-
interface ConsultaCadastroResponse {
|
|
1314
|
-
retConsCad: {
|
|
1315
|
-
$: {
|
|
1316
|
-
versao: string;
|
|
1317
|
-
};
|
|
1318
|
-
infCons: {
|
|
1319
|
-
verAplic: string;
|
|
1320
|
-
cStat: string;
|
|
1321
|
-
xMotivo: string;
|
|
1322
|
-
UF: StateAcronym;
|
|
1323
|
-
IE?: string;
|
|
1324
|
-
CNPJ?: string;
|
|
1325
|
-
CPF?: string;
|
|
1326
|
-
dhCons: string;
|
|
1327
|
-
cUF: StateCode;
|
|
1328
|
-
infCad?: {
|
|
1329
|
-
IE: string;
|
|
1330
|
-
CNPJ?: string;
|
|
1331
|
-
CPF?: string;
|
|
1332
|
-
UF: StateAcronym;
|
|
1333
|
-
cSit: string;
|
|
1334
|
-
indCredNFe: string;
|
|
1335
|
-
indCredCTe: string;
|
|
1336
|
-
xNome: string;
|
|
1337
|
-
xFant?: string;
|
|
1338
|
-
xRegApur?: string;
|
|
1339
|
-
CNAE?: string;
|
|
1340
|
-
dIniAtiv?: string;
|
|
1341
|
-
dUltSit?: string;
|
|
1342
|
-
dBaixa?: string;
|
|
1343
|
-
IEUnica?: string;
|
|
1344
|
-
IEAtual?: string;
|
|
1345
|
-
ender?: {
|
|
1346
|
-
xLgr?: string;
|
|
1347
|
-
nro?: string;
|
|
1348
|
-
xCpl?: string;
|
|
1349
|
-
xBairro?: string;
|
|
1350
|
-
cMun?: string;
|
|
1351
|
-
xMun?: string;
|
|
1352
|
-
CEP?: string;
|
|
1353
|
-
};
|
|
1354
|
-
}[];
|
|
1355
|
-
};
|
|
1356
|
-
};
|
|
1377
|
+
type NFCe$1 = NFe$1;
|
|
1378
|
+
interface NFCeProc {
|
|
1379
|
+
NFe: NFCe$1;
|
|
1380
|
+
protNFe: ProtNFe;
|
|
1357
1381
|
}
|
|
1358
1382
|
|
|
1359
1383
|
declare const schemas: {
|
|
@@ -1404,7 +1428,7 @@ interface NfeTransmitter extends Transmitter<NfeRemoteClient> {
|
|
|
1404
1428
|
consultStatus(payload: ConsultStatusPayload): Promise<Either<NFeTsError, ConsultStatusResponse>>;
|
|
1405
1429
|
inutilizacao(payload: InutilizacaoPayload): Promise<Either<NFeTsError, InutilizacaoResponse>>;
|
|
1406
1430
|
consultaProtocolo(payload: ConsultaProtocoloPayload): Promise<Either<NFeTsError, ConsultaProtocoloResponse>>;
|
|
1407
|
-
autorizacao(payload: AutorizacaoPayload<
|
|
1431
|
+
autorizacao<E extends NFe$1, T extends SignedEntity<E> | SignedEntity<E>[]>(payload: AutorizacaoPayload<E, T>): Promise<Either<NFeTsError, AutorizacaoResponse>>;
|
|
1408
1432
|
retAutorizacao(payload: RetAutorizacaoPayload): Promise<Either<NFeTsError, RetAutorizacaoResponse>>;
|
|
1409
1433
|
recepcaoEvento<T>(payload: EventoPayload<T>): Promise<Either<NFeTsError, EventoResponse>>;
|
|
1410
1434
|
consultaCadastro(payload: ConsultaCadastroPayload): Promise<Either<NFeTsError, ConsultaCadastroResponse>>;
|
|
@@ -1413,7 +1437,7 @@ interface NfeRemoteClient extends Client {
|
|
|
1413
1437
|
nfeStatusServicoNF(args: ConsultStatusRequest, opt?: RequestConfig): Promise<ConsultStatusResponse>;
|
|
1414
1438
|
nfeInutilizacaoNF(args: InutilizacaoRequest, opt?: RequestConfig): Promise<InutilizacaoResponse>;
|
|
1415
1439
|
nfeConsultaNF(args: ConsultaProtocoloRequest, opt?: RequestConfig): Promise<ConsultaProtocoloResponse>;
|
|
1416
|
-
nfeAutorizacaoLote(args: AutorizacaoRequest<
|
|
1440
|
+
nfeAutorizacaoLote<E extends NFe$1, T extends SignedEntity<E> | SignedEntity<E>[]>(args: AutorizacaoRequest<E, T>, opt?: RequestConfig): Promise<AutorizacaoResponse>;
|
|
1417
1441
|
nfeRetAutorizacaoLote(args: RetAutorizacaoRequest, opt?: RequestConfig): Promise<RetAutorizacaoResponse>;
|
|
1418
1442
|
nfeRecepcaoEvento<T>(args: EventoRequest<T>, opt?: RequestConfig): Promise<EventoResponse>;
|
|
1419
1443
|
consultaCadastro(args: ConsultaCadastroRequest, opt?: RequestConfig): Promise<ConsultaCadastroResponse>;
|
|
@@ -1441,10 +1465,10 @@ interface NfceTransmitterOptions extends NfeTransmitterOptions {
|
|
|
1441
1465
|
}
|
|
1442
1466
|
interface NfceTransmitter extends NfeTransmitter, Transmitter<NfceRemoteClient> {
|
|
1443
1467
|
configure(options: NfceTransmitterOptions): this;
|
|
1444
|
-
autorizacao(payload: AutorizacaoPayload<
|
|
1468
|
+
autorizacao<E extends NFCe$1, T extends SignedEntity<E> | SignedEntity<E>[]>(payload: AutorizacaoPayload<E, T>): Promise<Either<NFeTsError, AutorizacaoResponse>>;
|
|
1445
1469
|
}
|
|
1446
1470
|
interface NfceRemoteClient extends NfeRemoteClient {
|
|
1447
|
-
nfeAutorizacaoLote(args: AutorizacaoRequest<
|
|
1471
|
+
nfeAutorizacaoLote<E extends NFCe$1, T extends SignedEntity<E> | SignedEntity<E>[]>(args: AutorizacaoRequest<E, T>, opt?: RequestConfig): Promise<AutorizacaoResponse>;
|
|
1448
1472
|
}
|
|
1449
1473
|
|
|
1450
1474
|
interface DetBuilder {
|
|
@@ -2988,7 +3012,7 @@ declare class NfeRemoteTransmitter implements NfeTransmitter {
|
|
|
2988
3012
|
consultStatus(payload: ConsultStatusPayload): Promise<Either<NFeTsError, ConsultStatusResponse>>;
|
|
2989
3013
|
inutilizacao(payload: InutilizacaoPayload): Promise<Either<NFeTsError, InutilizacaoResponse>>;
|
|
2990
3014
|
consultaProtocolo(payload: ConsultaProtocoloPayload): Promise<Either<NFeTsError, ConsultaProtocoloResponse>>;
|
|
2991
|
-
autorizacao(payload: AutorizacaoPayload<
|
|
3015
|
+
autorizacao<E extends NFe$1, T extends SignedEntity<E> | SignedEntity<E>[]>(payload: AutorizacaoPayload<E, T>): Promise<Either<NFeTsError, AutorizacaoResponse>>;
|
|
2992
3016
|
retAutorizacao(payload: RetAutorizacaoPayload): Promise<Either<NFeTsError, RetAutorizacaoResponse>>;
|
|
2993
3017
|
recepcaoEvento<T>(payload: EventoRequest<T>['envEvento']): Promise<Either<NFeTsError, EventoResponse>>;
|
|
2994
3018
|
consultaCadastro(payload: ConsultaCadastroPayload): Promise<Either<NFeTsError, ConsultaCadastroResponse>>;
|
|
@@ -3001,57 +3025,17 @@ declare abstract class TransmissionPipeline extends Pipeline {
|
|
|
3001
3025
|
}
|
|
3002
3026
|
|
|
3003
3027
|
declare class NfeAuthorizerPipeline extends TransmissionPipeline {
|
|
3004
|
-
execute(payload: AutorizacaoPayload<
|
|
3005
|
-
protected
|
|
3028
|
+
execute<E extends NFe, T extends E | E[]>(payload: AutorizacaoPayload<E, T>, options?: Pick<NfeTransmitterOptions, 'schema'>): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
|
|
3029
|
+
protected signNfe(certificate: ReadCertificateResponse, NFe: NFe): Promise<Either<NFeTsError, SignedEntity<NFe>>>;
|
|
3030
|
+
protected handleNfeBatch(certificate: ReadCertificateResponse, NFe: NFe | NFe[]): Promise<Left<NFeTsError> | Right<SignedEntity<NFe>[]>>;
|
|
3031
|
+
protected isSyncResponse<E extends NFe, T extends E | E[]>(response: AutorizacaoResponse<E, T>): response is SynchronousAutorizacaoResponse<T>;
|
|
3032
|
+
protected handleAsyncResponse<E extends NFe, T extends E | E[]>(response: AsynchronousAutorizacaoResponse): Promise<Either<NFeTsError, SynchronousAutorizacaoResponse<T>>>;
|
|
3033
|
+
protected contingency(NFe: NFe): {
|
|
3006
3034
|
dhCont: string;
|
|
3007
3035
|
xJust: string;
|
|
3008
3036
|
} | undefined;
|
|
3009
3037
|
}
|
|
3010
3038
|
|
|
3011
|
-
declare class NfceAuthorizerPipeline extends NfeAuthorizerPipeline {
|
|
3012
|
-
protected readonly certificate: ReadCertificateRequest;
|
|
3013
|
-
protected readonly transmitter: NfeRemoteTransmitter;
|
|
3014
|
-
constructor(certificate: ReadCertificateRequest);
|
|
3015
|
-
}
|
|
3016
|
-
|
|
3017
|
-
declare abstract class EventPipeline extends TransmissionPipeline {
|
|
3018
|
-
protected event<T>(tpEvento: TpEvent, payload: Pick<EventoItem<T>['infEvento'], 'nSeqEvento' | 'dhEvento' | 'chNFe' | 'detEvento'>, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoItem<{
|
|
3019
|
-
descEvento: string;
|
|
3020
|
-
} & T>>>;
|
|
3021
|
-
private validated;
|
|
3022
|
-
}
|
|
3023
|
-
|
|
3024
|
-
interface DetEventoCancelamento {
|
|
3025
|
-
xJust: string;
|
|
3026
|
-
nProt: string;
|
|
3027
|
-
}
|
|
3028
|
-
interface EventoCancelamento extends DetEventoCancelamento {
|
|
3029
|
-
chNFe: string;
|
|
3030
|
-
idLote?: string;
|
|
3031
|
-
dhEvento?: string;
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
declare class NfeNfceCancelPipeline extends EventPipeline {
|
|
3035
|
-
execute(payload: EventoCancelamento, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoResponse>>;
|
|
3036
|
-
}
|
|
3037
|
-
|
|
3038
|
-
declare class NfeNfceVoidRangePipeline extends TransmissionPipeline {
|
|
3039
|
-
execute(payload: VoidRangePayload, options: Pick<NfeTransmitterOptions, 'tpAmb' | 'cUF'>): Promise<Either<NFeTsError, InutilizacaoResponse>>;
|
|
3040
|
-
private validated;
|
|
3041
|
-
}
|
|
3042
|
-
|
|
3043
|
-
declare class NfeXmlBuilderPipeline<T extends object> extends Pipeline {
|
|
3044
|
-
protected readonly certificate?: ReadCertificateRequest | undefined;
|
|
3045
|
-
protected readonly schema: Schema;
|
|
3046
|
-
protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
|
|
3047
|
-
constructor(certificate?: ReadCertificateRequest | undefined, schema?: Schema);
|
|
3048
|
-
build(build: (builder: InfNFeBuilder<T> & IdeBuilder<T>) => AssembleNfeBuilder<T>): this;
|
|
3049
|
-
toObject(): Either<NFeTsError, T>;
|
|
3050
|
-
assemble(): Promise<Either<NFeTsError, string>>;
|
|
3051
|
-
protected get nfeXsdSchema(): string;
|
|
3052
|
-
protected assertXmlSignedAndValidated(xml: string): Promise<Left<NFeTsError> | Right<string>>;
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
3039
|
declare const _default: {
|
|
3056
3040
|
readonly AC: {
|
|
3057
3041
|
readonly "2": {
|
|
@@ -4278,13 +4262,6 @@ declare const webservices: {
|
|
|
4278
4262
|
readonly SVRS: "SVRS";
|
|
4279
4263
|
};
|
|
4280
4264
|
|
|
4281
|
-
declare class NFCe implements NFCe$1 {
|
|
4282
|
-
$: NFeAttributes;
|
|
4283
|
-
infNFe: InfNFe;
|
|
4284
|
-
infNFeSupl: InfNFeSupl;
|
|
4285
|
-
Signature?: Signature;
|
|
4286
|
-
}
|
|
4287
|
-
|
|
4288
4265
|
declare class NfceQrcode {
|
|
4289
4266
|
private readonly certificateRepository;
|
|
4290
4267
|
constructor(certificateRepository: CertificateRepository);
|
|
@@ -4575,15 +4552,53 @@ declare class NfceRemoteTransmitter extends NfeRemoteTransmitter implements Nfce
|
|
|
4575
4552
|
readonly version: "200";
|
|
4576
4553
|
readonly url: "http://www.sefaz.to.gov.br/nfce/qrcode";
|
|
4577
4554
|
};
|
|
4578
|
-
autorizacao(payload: AutorizacaoPayload<
|
|
4555
|
+
autorizacao<E extends NFCe$1, T extends SignedEntity<E> | SignedEntity<E>[]>(payload: AutorizacaoPayload<E, T>): Promise<Either<NFeTsError, AutorizacaoResponse>>;
|
|
4579
4556
|
private getUrlConsult;
|
|
4580
|
-
private
|
|
4557
|
+
private attachInfNfeSupl;
|
|
4558
|
+
private attachQrCode;
|
|
4559
|
+
private generateQrCode;
|
|
4560
|
+
}
|
|
4561
|
+
|
|
4562
|
+
declare class NfceAuthorizerPipeline extends NfeAuthorizerPipeline {
|
|
4563
|
+
protected readonly certificate: ReadCertificateRequest;
|
|
4564
|
+
protected readonly qrCode: NfceQrcode;
|
|
4565
|
+
protected readonly transmitter: NfceRemoteTransmitter;
|
|
4566
|
+
constructor(certificate: ReadCertificateRequest);
|
|
4567
|
+
}
|
|
4568
|
+
|
|
4569
|
+
declare abstract class EventPipeline extends TransmissionPipeline {
|
|
4570
|
+
protected event<T>(tpEvento: TpEvent, payload: Pick<EventoItem<T>['infEvento'], 'nSeqEvento' | 'dhEvento' | 'chNFe' | 'detEvento'>, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoItem<{
|
|
4571
|
+
descEvento: string;
|
|
4572
|
+
} & T>>>;
|
|
4573
|
+
private validated;
|
|
4574
|
+
}
|
|
4575
|
+
|
|
4576
|
+
declare class NfeNfceCancelPipeline extends EventPipeline {
|
|
4577
|
+
execute(payload: EventoCancelamento, options: Pick<NfeTransmitterOptions, 'tpAmb'>): Promise<Either<NFeTsError, EventoResponse>>;
|
|
4578
|
+
}
|
|
4579
|
+
|
|
4580
|
+
declare class NfeNfceVoidRangePipeline extends TransmissionPipeline {
|
|
4581
|
+
execute(payload: VoidRangePayload, options: Pick<NfeTransmitterOptions, 'tpAmb' | 'cUF'>): Promise<Either<NFeTsError, InutilizacaoResponse>>;
|
|
4582
|
+
private validated;
|
|
4583
|
+
}
|
|
4584
|
+
|
|
4585
|
+
declare class NfeXmlBuilderPipeline<T extends object> extends Pipeline {
|
|
4586
|
+
protected readonly certificate?: ReadCertificateRequest | undefined;
|
|
4587
|
+
protected readonly schema: Schema;
|
|
4588
|
+
protected readonly builder: (InfNFeBuilder<T> & IdeBuilder<T>) | AssembleNfeBuilder<T>;
|
|
4589
|
+
constructor(certificate?: ReadCertificateRequest | undefined, schema?: Schema);
|
|
4590
|
+
build(build: (builder: InfNFeBuilder<T> & IdeBuilder<T>) => AssembleNfeBuilder<T>): this;
|
|
4591
|
+
toObject(): Either<NFeTsError, T>;
|
|
4592
|
+
assemble(): Promise<Either<NFeTsError, string>>;
|
|
4593
|
+
protected get nfeXsdSchema(): string;
|
|
4594
|
+
protected assertXmlSignedAndValidated(xml: string): Promise<Left<NFeTsError> | Right<string>>;
|
|
4581
4595
|
}
|
|
4582
4596
|
|
|
4583
4597
|
declare class NfeXmlBuilder<T extends object = NFe$1> implements INfeXmlBuilder<T> {
|
|
4584
4598
|
protected readonly builder: XmlToolkit;
|
|
4585
4599
|
protected contingency?: ContingencyOptions | undefined;
|
|
4586
4600
|
protected readonly data: NFe$1;
|
|
4601
|
+
private $data;
|
|
4587
4602
|
protected get entity(): new () => T;
|
|
4588
4603
|
protected readonly root = "NFe";
|
|
4589
4604
|
protected readonly $det: DetBuilderAggregator | undefined;
|
|
@@ -4651,4 +4666,11 @@ declare class NfeDetXmlBuilder implements INfeDetXmlBuilder {
|
|
|
4651
4666
|
assemble(): Det;
|
|
4652
4667
|
}
|
|
4653
4668
|
|
|
4654
|
-
|
|
4669
|
+
declare class NFCe implements NFCe$1 {
|
|
4670
|
+
$: NFeAttributes;
|
|
4671
|
+
infNFe: InfNFe;
|
|
4672
|
+
infNFeSupl: InfNFeSupl;
|
|
4673
|
+
Signature?: Signature;
|
|
4674
|
+
}
|
|
4675
|
+
|
|
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 };
|