nfewizard-io 1.0.1 → 1.0.3

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.
Files changed (36) hide show
  1. package/README.md +313 -0
  2. package/dist/index.cjs +76 -76
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/src/MailAdapter.d.ts +10 -0
  5. package/dist/src/index.d.ts +0 -2
  6. package/dist/src/nfe/operations/NFEAutorizacao/NFEAutorizacao.d.ts +7 -0
  7. package/dist/src/nfe/operations/NFEConsultaProtocolo/NFEconsultaProtocolo.d.ts +7 -0
  8. package/dist/src/nfe/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFe.d.ts +7 -0
  9. package/dist/src/nfe/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorChave.d.ts +7 -0
  10. package/dist/src/nfe/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorNSU.d.ts +7 -0
  11. package/dist/src/nfe/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorUltNSU.d.ts +7 -0
  12. package/dist/src/nfe/operations/NFEInutilizacao/NFEInutilizacao.d.ts +7 -0
  13. package/dist/src/nfe/operations/NFERecepcaoEvento/NFECancelamento.d.ts +7 -0
  14. package/dist/src/nfe/operations/NFERecepcaoEvento/NFECartaDeCorrecao.d.ts +7 -0
  15. package/dist/src/nfe/operations/NFERecepcaoEvento/NFECienciaDaOperacao.d.ts +7 -0
  16. package/dist/src/nfe/operations/NFERecepcaoEvento/NFEConfirmacaoDaOperacao.d.ts +7 -0
  17. package/dist/src/nfe/operations/NFERecepcaoEvento/NFEDesconhecimentoDaOperacao.d.ts +7 -0
  18. package/dist/src/nfe/operations/NFERecepcaoEvento/NFEEpec.d.ts +7 -0
  19. package/dist/src/nfe/operations/NFERecepcaoEvento/NFEOperacaoNaoRealizada.d.ts +7 -0
  20. package/dist/src/nfe/operations/NFERecepcaoEvento/NFERecepcaoEvento.d.ts +7 -0
  21. package/dist/src/nfe/operations/NFEStatusServico/NFEStatusServico.d.ts +7 -0
  22. package/dist/src/nfe/services/NFEConsultaProtocolo/NFEconsultaProtocoloService.d.ts +11 -0
  23. package/dist/src/nfe/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorChave.d.ts +10 -0
  24. package/dist/src/nfe/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorNSU.d.ts +10 -0
  25. package/dist/src/nfe/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorUltNSU.d.ts +10 -0
  26. package/dist/src/nfe/services/NFERecepcaoEvento/NFECancelamentoService.d.ts +10 -0
  27. package/dist/src/nfe/services/NFERecepcaoEvento/NFECartaDeCorrecaoService.d.ts +10 -0
  28. package/dist/src/nfe/services/NFERecepcaoEvento/NFECienciaDaOperacaoService.d.ts +10 -0
  29. package/dist/src/nfe/services/NFERecepcaoEvento/NFEConfirmacaoDaOperacaoService.d.ts +10 -0
  30. package/dist/src/nfe/services/NFERecepcaoEvento/NFEDesconhecimentoDaOperacaoService.d.ts +10 -0
  31. package/dist/src/nfe/services/NFERecepcaoEvento/NFEEpecService.d.ts +10 -0
  32. package/dist/src/nfe/services/NFERecepcaoEvento/NFEOperacaoNaoRealizadaService.d.ts +10 -0
  33. package/dist/src/nfe/services/NFERetornoAutorizacao/NFERetornoAutorizacaoService.d.ts +48 -0
  34. package/dist/src/nfe/services/NFEStatusServico/NFEStatusServicoService.d.ts +8 -0
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/package.json +6 -6
package/dist/index.cjs CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var shared$1 = require('@nfewizard/types/shared');
5
+ var shared = require('@nfewizard/types/shared');
6
6
  var nfe = require('@nfewizard/types/nfe');
7
- var shared = require('@nfewizard/shared');
7
+ var shared$1 = require('@nfewizard/shared');
8
8
  var nodemailer = require('nodemailer');
9
9
  var dateFns = require('date-fns');
10
10
  var pako = require('pako');
@@ -174,12 +174,12 @@ class NFEEpec {
174
174
  * along with NFeWizard-io. If not, see <https://www.gnu.org/licenses/>.
175
175
  */
176
176
  const METHOD_NAME = 'NFEStatusServico';
177
- class NFEStatusServicoService extends shared.BaseNFE {
177
+ class NFEStatusServicoService extends shared$1.BaseNFE {
178
178
  constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
179
179
  super(environment, utility, xmlBuilder, METHOD_NAME, axios, saveFiles, gerarConsulta);
180
180
  }
181
181
  gerarXml() {
182
- shared.logger.info('Montando estrutuda do XML em JSON', {
182
+ shared$1.logger.info('Montando estrutuda do XML em JSON', {
183
183
  context: 'NFEStatusServicoService',
184
184
  });
185
185
  const { nfe: { ambiente, versaoDF }, dfe: { UF } } = this.environment.getConfig();
@@ -189,7 +189,7 @@ class NFEStatusServicoService extends shared.BaseNFE {
189
189
  xmlns: 'http://www.portalfiscal.inf.br/nfe'
190
190
  },
191
191
  tpAmb: ambiente,
192
- cUF: shared.getCodIBGE(UF),
192
+ cUF: shared$1.getCodIBGE(UF),
193
193
  xServ: 'STATUS',
194
194
  };
195
195
  return this.xmlBuilder.gerarXml(xmlObject, 'consStatServ', this.metodo);
@@ -268,7 +268,7 @@ class MailController {
268
268
  * You should have received a copy of the GNU General Public License
269
269
  * along with NFeWizard-io. If not, see <https://www.gnu.org/licenses/>.
270
270
  */
271
- class NFERetornoAutorizacaoService extends shared.BaseNFE {
271
+ class NFERetornoAutorizacaoService extends shared$1.BaseNFE {
272
272
  constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
273
273
  super(environment, utility, xmlBuilder, 'NFERetAutorizacao', axios, saveFiles, gerarConsulta);
274
274
  }
@@ -401,7 +401,7 @@ class NFERetornoAutorizacaoService extends shared.BaseNFE {
401
401
  }
402
402
 
403
403
  const T_MED = 5; // Tempo médio de resposta padrão em segundos
404
- class NFEAutorizacaoService extends shared.BaseNFE {
404
+ class NFEAutorizacaoService extends shared$1.BaseNFE {
405
405
  constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
406
406
  super(environment, utility, xmlBuilder, 'NFEAutorizacao', axios, saveFiles, gerarConsulta);
407
407
  this.xmlNFe = [];
@@ -436,7 +436,7 @@ class NFEAutorizacaoService extends shared.BaseNFE {
436
436
  let xmlsInJson = [];
437
437
  if (options) {
438
438
  const { xmlAutorizacao } = options;
439
- const json = new shared.XmlParser();
439
+ const json = new shared$1.XmlParser();
440
440
  for (let i = 0; i < xmlAutorizacao.length; i++) {
441
441
  xmlAutorizacaoInJson = json.convertXmlToJson(xmlAutorizacao[i], 'NFEAutorizacaoFinal');
442
442
  xmlsInJson.push(xmlAutorizacaoInJson);
@@ -542,7 +542,7 @@ class NFEAutorizacaoService extends shared.BaseNFE {
542
542
  }
543
543
  validaDocumento(doc, campo) {
544
544
  // Valida se CPF ou CNPJ
545
- const nfeAutorizacaoHandler = new shared.ValidaCPFCNPJ();
545
+ const nfeAutorizacaoHandler = new shared$1.ValidaCPFCNPJ();
546
546
  const { documentoValido, tipoDoDocumento } = nfeAutorizacaoHandler.validarCpfCnpj(doc);
547
547
  console.log({ documentoValido, tipoDoDocumento });
548
548
  if (!documentoValido || tipoDoDocumento === 'Desconhecido') {
@@ -554,7 +554,7 @@ class NFEAutorizacaoService extends shared.BaseNFE {
554
554
  return tipoDoDocumento;
555
555
  }
556
556
  gerarXmlNFeAutorizacao(data) {
557
- shared.logger.info('Montando estrutuda do XML em JSON', {
557
+ shared$1.logger.info('Montando estrutuda do XML em JSON', {
558
558
  context: 'NFEAutorizacaoService',
559
559
  });
560
560
  const createXML = (NFe) => {
@@ -563,15 +563,15 @@ class NFEAutorizacaoService extends shared.BaseNFE {
563
563
  // Adicionando indice ao item
564
564
  const formatedItens = NFe.infNFe.det.map((det, index) => {
565
565
  if (det.imposto?.ICMS?.dadosICMS) {
566
- const icms = shared.mountICMS(det.imposto.ICMS.dadosICMS);
566
+ const icms = shared$1.mountICMS(det.imposto.ICMS.dadosICMS);
567
567
  det.imposto.ICMS = icms;
568
568
  }
569
569
  if (det.imposto.PIS?.dadosPIS) {
570
- const pis = shared.mountPIS(det.imposto.PIS.dadosPIS);
570
+ const pis = shared$1.mountPIS(det.imposto.PIS.dadosPIS);
571
571
  det.imposto.PIS = pis;
572
572
  }
573
573
  if (det.imposto.COFINS?.dadosCOFINS) {
574
- const cofins = shared.mountCOFINS(det.imposto.COFINS.dadosCOFINS);
574
+ const cofins = shared$1.mountCOFINS(det.imposto.COFINS.dadosCOFINS);
575
575
  det.imposto.COFINS = cofins;
576
576
  }
577
577
  return {
@@ -678,7 +678,7 @@ class NFEAutorizacaoService extends shared.BaseNFE {
678
678
  const headers = {
679
679
  'Content-Type': ContentType,
680
680
  };
681
- shared.logger.http('Iniciando comunicação com o webservice', {
681
+ shared$1.logger.http('Iniciando comunicação com o webservice', {
682
682
  context: `NFEAutorizacaoService`,
683
683
  method: this.metodo,
684
684
  url: webServiceUrl,
@@ -690,7 +690,7 @@ class NFEAutorizacaoService extends shared.BaseNFE {
690
690
  httpsAgent: agent
691
691
  });
692
692
  const duration = Date.now() - startTime;
693
- shared.logger.http('Comunicação concluída com sucesso', {
693
+ shared$1.logger.http('Comunicação concluída com sucesso', {
694
694
  context: `NFEAutorizacaoService`,
695
695
  method: this.metodo,
696
696
  duration: `${duration}ms`,
@@ -720,7 +720,7 @@ class NFEAutorizacaoService extends shared.BaseNFE {
720
720
  xmlAutorizacao: retorno.data,
721
721
  xMotivo: retorno.message
722
722
  });
723
- shared.logger.info('NFe transmitida com sucesso', {
723
+ shared$1.logger.info('NFe transmitida com sucesso', {
724
724
  context: 'NFEAutorizacaoService',
725
725
  });
726
726
  return {
@@ -738,12 +738,12 @@ class NFEAutorizacaoService extends shared.BaseNFE {
738
738
  }
739
739
  }
740
740
 
741
- class NFEconsultaProtocoloService extends shared.BaseNFE {
741
+ class NFEconsultaProtocoloService extends shared$1.BaseNFE {
742
742
  constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
743
743
  super(environment, utility, xmlBuilder, 'NFEConsultaProtocolo', axios, saveFiles, gerarConsulta);
744
744
  }
745
745
  gerarXml(chave) {
746
- shared.logger.info('Montando estrutuda do XML em JSON', {
746
+ shared$1.logger.info('Montando estrutuda do XML em JSON', {
747
747
  context: 'NFEconsultaProtocoloService',
748
748
  });
749
749
  const { nfe: { ambiente, versaoDF } } = this.environment.getConfig();
@@ -769,7 +769,7 @@ class NFERecepcaoEvento {
769
769
  }
770
770
  }
771
771
 
772
- class NFERecepcaoEventoService extends shared.BaseNFE {
772
+ class NFERecepcaoEventoService extends shared$1.BaseNFE {
773
773
  constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
774
774
  super(environment, utility, xmlBuilder, 'RecepcaoEvento', axios, saveFiles, gerarConsulta);
775
775
  this.tpEvento = '';
@@ -851,7 +851,7 @@ class NFERecepcaoEventoService extends shared.BaseNFE {
851
851
  }
852
852
  }
853
853
  separaEventosPorAmbiente(evento) {
854
- shared.logger.info('Dividindo eventos por ambiente', {
854
+ shared$1.logger.info('Dividindo eventos por ambiente', {
855
855
  context: 'NFERecepcaoEventoService',
856
856
  });
857
857
  const nacional = evento.filter(event => ['210210', '210200', '210220', '210240', '110140'].includes(event.tpEvento));
@@ -923,7 +923,7 @@ class NFERecepcaoEventoService extends shared.BaseNFE {
923
923
  return xml.replace('[XML]', this.xmlEventosRegionais.join(''));
924
924
  }
925
925
  trataRetorno(responseInJson) {
926
- shared.logger.info('Tratando retorno dos eventos', {
926
+ shared$1.logger.info('Tratando retorno dos eventos', {
927
927
  context: 'NFERecepcaoEventoService',
928
928
  });
929
929
  const retornoEventos = this.utility.findInObj(responseInJson, 'retEvento');
@@ -960,7 +960,7 @@ class NFERecepcaoEventoService extends shared.BaseNFE {
960
960
  'Content-Type': ContentType,
961
961
  'SOAPAction': action,
962
962
  };
963
- shared.logger.http('Iniciando comunicação com o webservice', {
963
+ shared$1.logger.http('Iniciando comunicação com o webservice', {
964
964
  context: `BaseNFE`,
965
965
  method: this.metodo,
966
966
  url: webServiceUrl,
@@ -972,7 +972,7 @@ class NFERecepcaoEventoService extends shared.BaseNFE {
972
972
  httpsAgent: agent
973
973
  });
974
974
  const duration = Date.now() - startTime;
975
- shared.logger.http('Comunicação concluída com sucesso', {
975
+ shared$1.logger.http('Comunicação concluída com sucesso', {
976
976
  context: `BaseNFE`,
977
977
  method: this.metodo,
978
978
  duration: `${duration}ms`,
@@ -1110,10 +1110,10 @@ class DistribuicaoHandler {
1110
1110
  }
1111
1111
  }
1112
1112
  deCompressDFeXML(loteDistDFeInt, metodo, _xmlConsulta) {
1113
- shared.logger.info('Descomprimindo XML', {
1113
+ shared$1.logger.info('Descomprimindo XML', {
1114
1114
  context: 'DistribuicaoHandler',
1115
1115
  });
1116
- const json = new shared.XmlParser();
1116
+ const json = new shared$1.XmlParser();
1117
1117
  const files = [];
1118
1118
  xml2js.parseString(loteDistDFeInt, (err, result) => {
1119
1119
  if (err) {
@@ -1142,7 +1142,7 @@ class DistribuicaoHandler {
1142
1142
  return files;
1143
1143
  }
1144
1144
  decodeDocZip(docZip) {
1145
- shared.logger.info('Decodificando DocZip', {
1145
+ shared$1.logger.info('Decodificando DocZip', {
1146
1146
  context: 'DistribuicaoHandler',
1147
1147
  });
1148
1148
  const base64String = docZip['_'];
@@ -1192,7 +1192,7 @@ class DistribuicaoHandler {
1192
1192
  }
1193
1193
  }
1194
1194
 
1195
- class NFEDistribuicaoDFeService extends shared.BaseNFE {
1195
+ class NFEDistribuicaoDFeService extends shared$1.BaseNFE {
1196
1196
  constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
1197
1197
  super(environment, utility, xmlBuilder, 'NFeDistribuicaoDFe', axios, saveFiles, gerarConsulta);
1198
1198
  }
@@ -1200,7 +1200,7 @@ class NFEDistribuicaoDFeService extends shared.BaseNFE {
1200
1200
  return this.gerarXmlNFeDistribuicaoDFe(data);
1201
1201
  }
1202
1202
  gerarXmlNFeDistribuicaoDFe(data) {
1203
- shared.logger.info('Montando estrutuda do XML em JSON', {
1203
+ shared$1.logger.info('Montando estrutuda do XML em JSON', {
1204
1204
  context: 'NFEDistribuicaoDFeService',
1205
1205
  });
1206
1206
  const { nfe: { ambiente } } = this.environment.getConfig();
@@ -1220,7 +1220,7 @@ class NFEDistribuicaoDFeService extends shared.BaseNFE {
1220
1220
  const headers = {
1221
1221
  'Content-Type': ContentType,
1222
1222
  };
1223
- shared.logger.http('Iniciando comunicação com o webservice', {
1223
+ shared$1.logger.http('Iniciando comunicação com o webservice', {
1224
1224
  context: `NFEDistribuicaoDFeService`,
1225
1225
  method: this.metodo,
1226
1226
  url: webServiceUrl,
@@ -1232,7 +1232,7 @@ class NFEDistribuicaoDFeService extends shared.BaseNFE {
1232
1232
  httpsAgent: agent
1233
1233
  });
1234
1234
  const duration = Date.now() - startTime;
1235
- shared.logger.http('Comunicação concluída com sucesso', {
1235
+ shared$1.logger.http('Comunicação concluída com sucesso', {
1236
1236
  context: `NFEDistribuicaoDFeService`,
1237
1237
  method: this.metodo,
1238
1238
  duration: `${duration}ms`,
@@ -1303,7 +1303,7 @@ class NFEDistribuicaoDFePorChaveService extends NFEDistribuicaoDFeService {
1303
1303
  }
1304
1304
  }
1305
1305
 
1306
- class NFEInutilizacaoService extends shared.BaseNFE {
1306
+ class NFEInutilizacaoService extends shared$1.BaseNFE {
1307
1307
  constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
1308
1308
  super(environment, utility, xmlBuilder, 'NFEInutilizacao', axios, saveFiles, gerarConsulta);
1309
1309
  }
@@ -1330,7 +1330,7 @@ class NFEInutilizacaoService extends shared.BaseNFE {
1330
1330
  * Método utilitário para criação do XML a partir de um Objeto
1331
1331
  */
1332
1332
  gerarXmlNFeInutilizacao(data) {
1333
- shared.logger.info('Montando estrutuda do XML em JSON', {
1333
+ shared$1.logger.info('Montando estrutuda do XML em JSON', {
1334
1334
  context: 'NFEInutilizacaoService',
1335
1335
  });
1336
1336
  const { nfe: { ambiente } } = this.environment.getConfig();
@@ -1421,21 +1421,21 @@ class NFeWizardService {
1421
1421
  try {
1422
1422
  this.config = config;
1423
1423
  // Carrega Ambiente
1424
- this.environment = new shared.Environment(this.config);
1424
+ this.environment = new shared$1.Environment(this.config);
1425
1425
  const { axios } = await this.environment.loadEnvironment();
1426
1426
  this.axios = axios;
1427
1427
  // Inicia método de Utilitários
1428
- this.utility = new shared.Utility(this.environment);
1429
- this.saveFiles = new shared.SaveFiles(this.environment, this.utility);
1428
+ this.utility = new shared$1.Utility(this.environment);
1429
+ this.saveFiles = new shared$1.SaveFiles(this.environment, this.utility);
1430
1430
  // Inicia método de geração de XML
1431
- this.xmlBuilder = new shared.XmlBuilder(this.environment);
1432
- this.gerarConsulta = new shared.GerarConsulta(this.environment, this.utility, this.xmlBuilder);
1431
+ this.xmlBuilder = new shared$1.XmlBuilder(this.environment);
1432
+ this.gerarConsulta = new shared$1.GerarConsulta(this.environment, this.utility, this.xmlBuilder);
1433
1433
  // console.log('===================================');
1434
1434
  // console.log('Biblioteca Inicializada com Sucesso');
1435
1435
  // console.log('===================================');
1436
1436
  }
1437
1437
  catch (error) {
1438
- shared.logger.error(``, error, { context: 'NFE_LoadEnvironment', });
1438
+ shared$1.logger.error(``, error, { context: 'NFE_LoadEnvironment', });
1439
1439
  throw new Error(`Erro ao inicializar a lib: ${error}`);
1440
1440
  }
1441
1441
  }
@@ -1453,7 +1453,7 @@ class NFeWizardService {
1453
1453
  return response;
1454
1454
  }
1455
1455
  catch (error) {
1456
- shared.logger.error(``, error, { context: 'NFE_ConsultaStatusServico', });
1456
+ shared$1.logger.error(``, error, { context: 'NFE_ConsultaStatusServico', });
1457
1457
  throw new Error(`NFE_ConsultaStatusServico: ${error.message}`);
1458
1458
  }
1459
1459
  }
@@ -1471,7 +1471,7 @@ class NFeWizardService {
1471
1471
  return response;
1472
1472
  }
1473
1473
  catch (error) {
1474
- shared.logger.error(``, error, { context: 'NFE_ConsultaProtocolo', });
1474
+ shared$1.logger.error(``, error, { context: 'NFE_ConsultaProtocolo', });
1475
1475
  throw new Error(`NFE_ConsultaProtocolo: ${error.message}`);
1476
1476
  }
1477
1477
  }
@@ -1489,7 +1489,7 @@ class NFeWizardService {
1489
1489
  return response.response;
1490
1490
  }
1491
1491
  catch (error) {
1492
- shared.logger.error(``, error, { context: 'NFE_RecepcaoEvento', });
1492
+ shared$1.logger.error(``, error, { context: 'NFE_RecepcaoEvento', });
1493
1493
  throw new Error(`NFE_RecepcaoEvento: ${error.message}`);
1494
1494
  }
1495
1495
  }
@@ -1504,7 +1504,7 @@ class NFeWizardService {
1504
1504
  return response.response;
1505
1505
  }
1506
1506
  catch (error) {
1507
- shared.logger.error(``, error, { context: 'NFE_EventoPrevioDeEmissaoEmContingencia', });
1507
+ shared$1.logger.error(``, error, { context: 'NFE_EventoPrevioDeEmissaoEmContingencia', });
1508
1508
  throw new Error(`NFEEpec: ${error.message}`);
1509
1509
  }
1510
1510
  }
@@ -1519,7 +1519,7 @@ class NFeWizardService {
1519
1519
  return response.response;
1520
1520
  }
1521
1521
  catch (error) {
1522
- shared.logger.error(``, error, { context: 'NFE_Cancelamento', });
1522
+ shared$1.logger.error(``, error, { context: 'NFE_Cancelamento', });
1523
1523
  throw new Error(`NFE_Cancelamento: ${error.message}`);
1524
1524
  }
1525
1525
  }
@@ -1534,7 +1534,7 @@ class NFeWizardService {
1534
1534
  return response.response;
1535
1535
  }
1536
1536
  catch (error) {
1537
- shared.logger.error(``, error, { context: 'NFE_CienciaDaOperacao', });
1537
+ shared$1.logger.error(``, error, { context: 'NFE_CienciaDaOperacao', });
1538
1538
  throw new Error(`NFE_CienciaDaOperacao: ${error.message}`);
1539
1539
  }
1540
1540
  }
@@ -1549,7 +1549,7 @@ class NFeWizardService {
1549
1549
  return response.response;
1550
1550
  }
1551
1551
  catch (error) {
1552
- shared.logger.error(``, error, { context: 'NFE_ConfirmacaoDaOperacao', });
1552
+ shared$1.logger.error(``, error, { context: 'NFE_ConfirmacaoDaOperacao', });
1553
1553
  throw new Error(`NFE_ConfirmacaoDaOperacao: ${error.message}`);
1554
1554
  }
1555
1555
  }
@@ -1564,7 +1564,7 @@ class NFeWizardService {
1564
1564
  return response.response;
1565
1565
  }
1566
1566
  catch (error) {
1567
- shared.logger.error(``, error, { context: 'NFE_OperacaoNaoRealizada', });
1567
+ shared$1.logger.error(``, error, { context: 'NFE_OperacaoNaoRealizada', });
1568
1568
  throw new Error(`NFE_OperacaoNaoRealizada: ${error.message}`);
1569
1569
  }
1570
1570
  }
@@ -1579,7 +1579,7 @@ class NFeWizardService {
1579
1579
  return response.response;
1580
1580
  }
1581
1581
  catch (error) {
1582
- shared.logger.error(``, error, { context: 'NFE_CartaDeCorrecao', });
1582
+ shared$1.logger.error(``, error, { context: 'NFE_CartaDeCorrecao', });
1583
1583
  throw new Error(`NFE_CartaDeCorrecao: ${error.message}`);
1584
1584
  }
1585
1585
  }
@@ -1594,7 +1594,7 @@ class NFeWizardService {
1594
1594
  return response.response;
1595
1595
  }
1596
1596
  catch (error) {
1597
- shared.logger.error(``, error, { context: 'NFE_DesconhecimentoDaOperacao', });
1597
+ shared$1.logger.error(``, error, { context: 'NFE_DesconhecimentoDaOperacao', });
1598
1598
  throw new Error(`NFE_DesconhecimentoDaOperacao: ${error.message}`);
1599
1599
  }
1600
1600
  }
@@ -1612,7 +1612,7 @@ class NFeWizardService {
1612
1612
  return response.data;
1613
1613
  }
1614
1614
  catch (error) {
1615
- shared.logger.error(``, error, { context: 'NFE_DistribuicaoDFe', });
1615
+ shared$1.logger.error(``, error, { context: 'NFE_DistribuicaoDFe', });
1616
1616
  throw new Error(`NFE_DistribuicaoDFe: ${error.message}`);
1617
1617
  }
1618
1618
  }
@@ -1627,7 +1627,7 @@ class NFeWizardService {
1627
1627
  return response.data;
1628
1628
  }
1629
1629
  catch (error) {
1630
- shared.logger.error(``, error, { context: 'NFE_DistribuicaoDFePorUltNSU', });
1630
+ shared$1.logger.error(``, error, { context: 'NFE_DistribuicaoDFePorUltNSU', });
1631
1631
  throw new Error(`NFE_DistribuicaoDFePorUltNSU: ${error.message}`);
1632
1632
  }
1633
1633
  }
@@ -1642,7 +1642,7 @@ class NFeWizardService {
1642
1642
  return response.data;
1643
1643
  }
1644
1644
  catch (error) {
1645
- shared.logger.error(``, error, { context: 'NFE_DistribuicaoDFePorNSU', });
1645
+ shared$1.logger.error(``, error, { context: 'NFE_DistribuicaoDFePorNSU', });
1646
1646
  throw new Error(`NFE_DistribuicaoDFePorNSU: ${error.message}`);
1647
1647
  }
1648
1648
  }
@@ -1657,7 +1657,7 @@ class NFeWizardService {
1657
1657
  return response.data;
1658
1658
  }
1659
1659
  catch (error) {
1660
- shared.logger.error(``, error, { context: 'NFE_DistribuicaoDFePorChave', });
1660
+ shared$1.logger.error(``, error, { context: 'NFE_DistribuicaoDFePorChave', });
1661
1661
  throw new Error(`NFE_DistribuicaoDFePorChave: ${error.message}`);
1662
1662
  }
1663
1663
  }
@@ -1675,7 +1675,7 @@ class NFeWizardService {
1675
1675
  return response.xmls;
1676
1676
  }
1677
1677
  catch (error) {
1678
- shared.logger.error(``, error, { context: 'NFE_Autorizacao', });
1678
+ shared$1.logger.error(``, error, { context: 'NFE_Autorizacao', });
1679
1679
  throw new Error(`NFE_Autorizacao: ${error.message}`);
1680
1680
  }
1681
1681
  }
@@ -1693,7 +1693,7 @@ class NFeWizardService {
1693
1693
  return response;
1694
1694
  }
1695
1695
  catch (error) {
1696
- shared.logger.error(``, error, { context: 'NFE_Inutilizacao', });
1696
+ shared$1.logger.error(``, error, { context: 'NFE_Inutilizacao', });
1697
1697
  throw new Error(`NFE_Inutilizacao: ${error.message}`);
1698
1698
  }
1699
1699
  }
@@ -1729,7 +1729,7 @@ class NFeWizardService {
1729
1729
  return response;
1730
1730
  }
1731
1731
  catch (error) {
1732
- shared.logger.error(``, error, { context: 'NFE_EnviaEmail', });
1732
+ shared$1.logger.error(``, error, { context: 'NFE_EnviaEmail', });
1733
1733
  throw new Error(`NFE_EnviaEmail: ${error.message}`);
1734
1734
  }
1735
1735
  }
@@ -1969,79 +1969,79 @@ class NFeWizard {
1969
1969
 
1970
1970
  Object.defineProperty(exports, "AxiosHttpClient", {
1971
1971
  enumerable: true,
1972
- get: function () { return shared.AxiosHttpClient; }
1972
+ get: function () { return shared$1.AxiosHttpClient; }
1973
1973
  });
1974
1974
  Object.defineProperty(exports, "BaseNFE", {
1975
1975
  enumerable: true,
1976
- get: function () { return shared.BaseNFE; }
1976
+ get: function () { return shared$1.BaseNFE; }
1977
1977
  });
1978
1978
  Object.defineProperty(exports, "Environment", {
1979
1979
  enumerable: true,
1980
- get: function () { return shared.Environment; }
1980
+ get: function () { return shared$1.Environment; }
1981
1981
  });
1982
1982
  Object.defineProperty(exports, "GerarConsulta", {
1983
1983
  enumerable: true,
1984
- get: function () { return shared.GerarConsulta; }
1984
+ get: function () { return shared$1.GerarConsulta; }
1985
1985
  });
1986
1986
  Object.defineProperty(exports, "HttpClientBuilder", {
1987
1987
  enumerable: true,
1988
- get: function () { return shared.HttpClientBuilder; }
1988
+ get: function () { return shared$1.HttpClientBuilder; }
1989
1989
  });
1990
1990
  Object.defineProperty(exports, "LoadCertificate", {
1991
1991
  enumerable: true,
1992
- get: function () { return shared.LoadCertificate; }
1992
+ get: function () { return shared$1.LoadCertificate; }
1993
1993
  });
1994
1994
  Object.defineProperty(exports, "SaveFiles", {
1995
1995
  enumerable: true,
1996
- get: function () { return shared.SaveFiles; }
1996
+ get: function () { return shared$1.SaveFiles; }
1997
1997
  });
1998
1998
  Object.defineProperty(exports, "Utility", {
1999
1999
  enumerable: true,
2000
- get: function () { return shared.Utility; }
2000
+ get: function () { return shared$1.Utility; }
2001
2001
  });
2002
2002
  Object.defineProperty(exports, "ValidaCPFCNPJ", {
2003
2003
  enumerable: true,
2004
- get: function () { return shared.ValidaCPFCNPJ; }
2004
+ get: function () { return shared$1.ValidaCPFCNPJ; }
2005
2005
  });
2006
2006
  Object.defineProperty(exports, "ValidateEnvironment", {
2007
2007
  enumerable: true,
2008
- get: function () { return shared.ValidateEnvironment; }
2008
+ get: function () { return shared$1.ValidateEnvironment; }
2009
2009
  });
2010
2010
  Object.defineProperty(exports, "XmlBuilder", {
2011
2011
  enumerable: true,
2012
- get: function () { return shared.XmlBuilder; }
2012
+ get: function () { return shared$1.XmlBuilder; }
2013
2013
  });
2014
2014
  Object.defineProperty(exports, "XmlParser", {
2015
2015
  enumerable: true,
2016
- get: function () { return shared.XmlParser; }
2016
+ get: function () { return shared$1.XmlParser; }
2017
2017
  });
2018
2018
  Object.defineProperty(exports, "getCodIBGE", {
2019
2019
  enumerable: true,
2020
- get: function () { return shared.getCodIBGE; }
2020
+ get: function () { return shared$1.getCodIBGE; }
2021
2021
  });
2022
2022
  Object.defineProperty(exports, "getDesTipoPag", {
2023
2023
  enumerable: true,
2024
- get: function () { return shared.getDesTipoPag; }
2024
+ get: function () { return shared$1.getDesTipoPag; }
2025
2025
  });
2026
2026
  Object.defineProperty(exports, "getSchema", {
2027
2027
  enumerable: true,
2028
- get: function () { return shared.getSchema; }
2028
+ get: function () { return shared$1.getSchema; }
2029
2029
  });
2030
2030
  Object.defineProperty(exports, "logger", {
2031
2031
  enumerable: true,
2032
- get: function () { return shared.logger; }
2032
+ get: function () { return shared$1.logger; }
2033
2033
  });
2034
2034
  Object.defineProperty(exports, "mountCOFINS", {
2035
2035
  enumerable: true,
2036
- get: function () { return shared.mountCOFINS; }
2036
+ get: function () { return shared$1.mountCOFINS; }
2037
2037
  });
2038
2038
  Object.defineProperty(exports, "mountICMS", {
2039
2039
  enumerable: true,
2040
- get: function () { return shared.mountICMS; }
2040
+ get: function () { return shared$1.mountICMS; }
2041
2041
  });
2042
2042
  Object.defineProperty(exports, "mountPIS", {
2043
2043
  enumerable: true,
2044
- get: function () { return shared.mountPIS; }
2044
+ get: function () { return shared$1.mountPIS; }
2045
2045
  });
2046
2046
  exports.NFEAutorizacao = NFEAutorizacao;
2047
2047
  exports.NFECancelamento = NFECancelamento;
@@ -2061,10 +2061,10 @@ exports.NFERetornoAutorizacao = NFERetornoAutorizacao;
2061
2061
  exports.NFEStatusServico = NFEStatusServico;
2062
2062
  exports.NFeWizard = NFeWizard;
2063
2063
  exports.default = NFeWizard;
2064
- Object.keys(shared$1).forEach(function (k) {
2064
+ Object.keys(shared).forEach(function (k) {
2065
2065
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
2066
2066
  enumerable: true,
2067
- get: function () { return shared$1[k]; }
2067
+ get: function () { return shared[k]; }
2068
2068
  });
2069
2069
  });
2070
2070
  Object.keys(nfe).forEach(function (k) {