@treeunfe/nfce 1.0.5
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/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/adapters/CTe.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/adapters/CTe.js +40 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/adapters/CTe.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/index.d.ts +3 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/index.js +23 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFe.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFe.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFe.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFePorNSU.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFePorNSU.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFePorNSU.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFePorUltNSU.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFePorUltNSU.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/CTEDistribuicaoDFe/CTEDistribuicaoDFePorUltNSU.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/index.d.ts +3 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/index.js +20 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/operations/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFePorNSU.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFePorNSU.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFePorNSU.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFePorUltNSU.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFePorUltNSU.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFePorUltNSU.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFeService.d.ts +18 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFeService.js +115 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/CTEDistribuicaoDFeService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/util/DistribuicaoHandler.d.ts +21 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/util/DistribuicaoHandler.js +131 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/CTEDistribuicaoDFe/util/DistribuicaoHandler.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/index.d.ts +3 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/index.js +20 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/cte/src/services/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/danfe/src/index.d.ts +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/danfe/src/index.js +19 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/danfe/src/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/adapters/NFe.d.ts +44 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/adapters/NFe.js +114 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/adapters/NFe.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/index.d.ts +3 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/index.js +23 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEAutorizacao/NFEAutorizacao.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEAutorizacao/NFEAutorizacao.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEAutorizacao/NFEAutorizacao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEConsultaProtocolo/NFEconsultaProtocolo.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEConsultaProtocolo/NFEconsultaProtocolo.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEConsultaProtocolo/NFEconsultaProtocolo.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFe.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFe.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFe.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorChave.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorChave.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorChave.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorNSU.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorNSU.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorNSU.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorUltNSU.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorUltNSU.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEDistribuicaoDFe/NFEDistribuicaoDFePorUltNSU.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEInutilizacao/NFEInutilizacao.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEInutilizacao/NFEInutilizacao.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEInutilizacao/NFEInutilizacao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECancelamento.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECancelamento.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECancelamento.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECartaDeCorrecao.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECartaDeCorrecao.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECartaDeCorrecao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECienciaDaOperacao.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECienciaDaOperacao.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFECienciaDaOperacao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEConfirmacaoDaOperacao.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEConfirmacaoDaOperacao.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEConfirmacaoDaOperacao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEDesconhecimentoDaOperacao.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEDesconhecimentoDaOperacao.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEDesconhecimentoDaOperacao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEEpec.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEEpec.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEEpec.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEOperacaoNaoRealizada.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEOperacaoNaoRealizada.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFEOperacaoNaoRealizada.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFERecepcaoEvento.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFERecepcaoEvento.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERecepcaoEvento/NFERecepcaoEvento.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERetornoAutorizacao/NFERetornoAutorizacao.d.ts +17 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERetornoAutorizacao/NFERetornoAutorizacao.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFERetornoAutorizacao/NFERetornoAutorizacao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEStatusServico/NFEStatusServico.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEStatusServico/NFEStatusServico.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/NFEStatusServico/NFEStatusServico.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/index.d.ts +17 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/index.js +34 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/operations/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEAutorizacao/NFEAutorizacaoService.d.ts +31 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEAutorizacao/NFEAutorizacaoService.js +371 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEAutorizacao/NFEAutorizacaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEConsultaProtocolo/NFEconsultaProtocoloService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEConsultaProtocolo/NFEconsultaProtocoloService.js +40 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEConsultaProtocolo/NFEconsultaProtocoloService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorChave.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorChave.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorChave.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorNSU.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorNSU.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorNSU.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorUltNSU.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorUltNSU.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFePorUltNSU.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFeService.d.ts +17 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFeService.js +114 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/NFEDistribuicaoDFeService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/util/DistribuicaoHandler.d.ts +20 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/util/DistribuicaoHandler.js +115 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEDistribuicaoDFe/util/DistribuicaoHandler.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEInutilizacao/NFEInutilizacaoService.d.ts +21 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEInutilizacao/NFEInutilizacaoService.js +87 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEInutilizacao/NFEInutilizacaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECancelamentoService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECancelamentoService.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECancelamentoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECartaDeCorrecaoService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECartaDeCorrecaoService.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECartaDeCorrecaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECienciaDaOperacaoService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECienciaDaOperacaoService.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFECienciaDaOperacaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEConfirmacaoDaOperacaoService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEConfirmacaoDaOperacaoService.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEConfirmacaoDaOperacaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEDesconhecimentoDaOperacaoService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEDesconhecimentoDaOperacaoService.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEDesconhecimentoDaOperacaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEEpecService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEEpecService.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEEpecService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEOperacaoNaoRealizadaService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEOperacaoNaoRealizadaService.js +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFEOperacaoNaoRealizadaService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFERecepcaoEventoService.d.ts +39 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFERecepcaoEventoService.js +280 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERecepcaoEvento/NFERecepcaoEventoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERetornoAutorizacao/NFERetornoAutorizacaoService.d.ts +48 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERetornoAutorizacao/NFERetornoAutorizacaoService.js +150 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFERetornoAutorizacao/NFERetornoAutorizacaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEStatusServico/NFEStatusServicoService.d.ts +8 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEStatusServico/NFEStatusServicoService.js +41 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/NFEStatusServico/NFEStatusServicoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/TreeunfeDFe/TreeunfeDFeService.d.ts +139 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/TreeunfeDFe/TreeunfeDFeService.js +782 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/TreeunfeDFe/TreeunfeDFeService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/index.d.ts +18 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/index.js +35 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfe/src/services/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/adapters/NFSe.d.ts +65 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/adapters/NFSe.js +123 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/adapters/NFSe.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/index.d.ts +3 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/index.js +23 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeAutorizacao/NFSeAutorizacao.d.ts +14 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeAutorizacao/NFSeAutorizacao.js +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeAutorizacao/NFSeAutorizacao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeConsulta/NFSeConsulta.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeConsulta/NFSeConsulta.js +13 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeConsulta/NFSeConsulta.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeDistribuicao/NFSeDistribuicao.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeDistribuicao/NFSeDistribuicao.js +13 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeDistribuicao/NFSeDistribuicao.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeEventos/NFSeEventos.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeEventos/NFSeEventos.js +13 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeEventos/NFSeEventos.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeParametrosMunicipais/NFSeParametrosMunicipais.d.ts +14 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeParametrosMunicipais/NFSeParametrosMunicipais.js +28 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/NFSeParametrosMunicipais/NFSeParametrosMunicipais.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/index.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/index.js +22 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/operations/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeAutorizacao/NFSeAutorizacaoService.d.ts +35 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeAutorizacao/NFSeAutorizacaoService.js +261 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeAutorizacao/NFSeAutorizacaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeConsulta/NFSeConsultaService.d.ts +16 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeConsulta/NFSeConsultaService.js +38 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeConsulta/NFSeConsultaService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeDistribuicao/NFSeDistribuicaoService.d.ts +16 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeDistribuicao/NFSeDistribuicaoService.js +251 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeDistribuicao/NFSeDistribuicaoService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeEventos/NFSeEventosService.d.ts +36 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeEventos/NFSeEventosService.js +374 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeEventos/NFSeEventosService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeParametrosMunicipais/NFSeParametrosMunicipaisService.d.ts +20 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeParametrosMunicipais/NFSeParametrosMunicipaisService.js +104 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/NFSeParametrosMunicipais/NFSeParametrosMunicipaisService.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/index.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/index.js +22 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/nfse/src/services/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/GerarConsultaImpl.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/GerarConsultaImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/GerarConsultaImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/HttpClient.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/HttpClient.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/HttpClient.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/SaveFilesImpl.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/SaveFilesImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/SaveFilesImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/TreeunfeDFeImpl.d.ts +50 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/TreeunfeDFeImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/TreeunfeDFeImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/TreeunfeDFeServiceImpl.d.ts +57 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/TreeunfeDFeServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/TreeunfeDFeServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/index.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/index.js +22 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/common/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/cte/CTEDistribuicaoDFeServiceImpl.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/cte/CTEDistribuicaoDFeServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/cte/CTEDistribuicaoDFeServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/cte/index.d.ts +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/cte/index.js +18 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/cte/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/index.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/index.js +23 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/NFCEAutorizacaoServiceImpl.d.ts +11 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/NFCEAutorizacaoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/NFCEAutorizacaoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/NFCERetornoAutorizacaoServiceImpl.d.ts +13 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/NFCERetornoAutorizacaoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/NFCERetornoAutorizacaoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/index.d.ts +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/index.js +19 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfce/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEAutorizacaoServiceImpl.d.ts +11 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEAutorizacaoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEAutorizacaoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEDistribuicaoDFeServiceImpl.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEDistribuicaoDFeServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEDistribuicaoDFeServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEInutilizacaoServiceImpl.d.ts +3 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEInutilizacaoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEInutilizacaoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFERecepcaoEventoServiceImpl.d.ts +9 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFERecepcaoEventoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFERecepcaoEventoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFERetornoAutorizacaoServiceImpl.d.ts +13 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFERetornoAutorizacaoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFERetornoAutorizacaoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEStatusServicoServiceImpl.d.ts +3 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEStatusServicoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEStatusServicoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEconsultaProtocoloServiceImpl.d.ts +3 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEconsultaProtocoloServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/NFEconsultaProtocoloServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/index.d.ts +7 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/index.js +24 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfe/index.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeAutorizacaoServiceImpl.d.ts +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeAutorizacaoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeAutorizacaoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeConsultaServiceImpl.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeConsultaServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeConsultaServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeDistribuicaoServiceImpl.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeDistribuicaoServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeDistribuicaoServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeEventosServiceImpl.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeEventosServiceImpl.js +2 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeEventosServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeParametrosMunicipaisServiceImpl.d.ts +10 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeParametrosMunicipaisServiceImpl.js +18 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/NFSeParametrosMunicipaisServiceImpl.js.map +1 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/index.d.ts +5 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/index.js +22 -0
- package/.rollup.cache/home/juniortrojilio/github.com/treeunfe/treeunfe-dfe/packages/treeunfe-dfe/src/interfaces/nfse/index.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/adapters/NFCe.d.ts +22 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/adapters/NFCe.js +85 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/adapters/NFCe.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/adapters/index.d.ts +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/adapters/index.js +18 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/adapters/index.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/index.d.ts +4 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/index.js +25 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/index.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/NFCEAutorizacao/NFCEAutorizacao.d.ts +7 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/NFCEAutorizacao/NFCEAutorizacao.js +10 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/NFCEAutorizacao/NFCEAutorizacao.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/NFCERetornoAutorizacao/NFCERetornoAutorizacao.d.ts +17 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/NFCERetornoAutorizacao/NFCERetornoAutorizacao.js +10 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/NFCERetornoAutorizacao/NFCERetornoAutorizacao.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/index.d.ts +2 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/index.js +19 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/operations/index.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCEAutorizacao/NFCEAutorizacaoService.d.ts +32 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCEAutorizacao/NFCEAutorizacaoService.js +424 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCEAutorizacao/NFCEAutorizacaoService.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCEAutorizacao/util/NFCEQRCode.d.ts +3 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCEAutorizacao/util/NFCEQRCode.js +38 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCEAutorizacao/util/NFCEQRCode.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCERetornoAutorizacao/NFCERetornoAutorizacaoService.d.ts +52 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCERetornoAutorizacao/NFCERetornoAutorizacaoService.js +141 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/NFCERetornoAutorizacao/NFCERetornoAutorizacaoService.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/index.d.ts +2 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/index.js +19 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/src/services/index.js.map +1 -0
- package/.rollup.cache/home/runner/work/treeunfe-dfe/treeunfe-dfe/packages/nfce/dist/tsconfig.tsbuildinfo +1 -0
- package/.turbo/turbo-build.log +15 -0
- package/CHANGELOG.md +36 -0
- package/LICENSE.txt +221 -0
- package/dist/index.cjs +713 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.mjs +701 -0
- package/dist/index.mjs.map +1 -0
- package/dist/src/adapters/NFCe.d.ts +22 -0
- package/dist/src/adapters/index.d.ts +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/operations/NFCEAutorizacao/NFCEAutorizacao.d.ts +7 -0
- package/dist/src/operations/NFCERetornoAutorizacao/NFCERetornoAutorizacao.d.ts +17 -0
- package/dist/src/operations/index.d.ts +2 -0
- package/dist/src/services/NFCEAutorizacao/NFCEAutorizacaoService.d.ts +32 -0
- package/dist/src/services/NFCEAutorizacao/util/NFCEQRCode.d.ts +3 -0
- package/dist/src/services/NFCERetornoAutorizacao/NFCERetornoAutorizacaoService.d.ts +52 -0
- package/dist/src/services/index.d.ts +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +61 -0
- package/rollup.config.js +187 -0
- package/src/adapters/NFCe.ts +104 -0
- package/src/adapters/index.ts +18 -0
- package/src/index.ts +28 -0
- package/src/operations/NFCEAutorizacao/NFCEAutorizacao.ts +32 -0
- package/src/operations/NFCERetornoAutorizacao/NFCERetornoAutorizacao.ts +42 -0
- package/src/operations/index.ts +19 -0
- package/src/services/NFCEAutorizacao/NFCEAutorizacaoService.ts +532 -0
- package/src/services/NFCEAutorizacao/util/NFCEQRCode.ts +68 -0
- package/src/services/NFCERetornoAutorizacao/NFCERetornoAutorizacaoService.ts +189 -0
- package/src/services/index.ts +19 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of Treeunfe DFe.
|
|
3
|
+
*
|
|
4
|
+
* Treeunfe DFe is free software: you can redistribute it and/or modify
|
|
5
|
+
* it under the terms of the GNU General Public License as published by
|
|
6
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
* (at your option) any later version.
|
|
8
|
+
*
|
|
9
|
+
* Treeunfe DFe is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License
|
|
15
|
+
* along with Treeunfe DFe. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
import { logger, BaseNFe, mountCOFINS, mountICMS, mountPIS, ValidaCPFCNPJ, XmlParser } from '@treeunfe/shared';
|
|
18
|
+
import { format } from 'date-fns';
|
|
19
|
+
import xml2js, { Builder } from 'xml2js';
|
|
20
|
+
import NFCERetornoAutorizacao from '../../operations/NFCERetornoAutorizacao/NFCERetornoAutorizacao.js';
|
|
21
|
+
import NFCERetornoAutorizacaoService from '../NFCERetornoAutorizacao/NFCERetornoAutorizacaoService.js';
|
|
22
|
+
import { generateQRCodeURLOffline, generateQRCodeURLOnline } from './util/NFCEQRCode.js';
|
|
23
|
+
class NFCEAutorizacaoService extends BaseNFe {
|
|
24
|
+
constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
|
|
25
|
+
super(environment, utility, xmlBuilder, 'NFEAutorizacao', axios, saveFiles, gerarConsulta);
|
|
26
|
+
this.xmlNFe = [];
|
|
27
|
+
}
|
|
28
|
+
gerarXml(data) {
|
|
29
|
+
return this.gerarXmlNFCEAutorizacao(data);
|
|
30
|
+
}
|
|
31
|
+
salvaArquivos(_xmlConsulta, responseInJson, _xmlRetorno, options) {
|
|
32
|
+
// Recupera configuração do ambiente para verificar se os arquivos gerados serão gravados em disco
|
|
33
|
+
const config = this.environment.getConfig();
|
|
34
|
+
let dateAndTimeInFileName = config.incluirTimestampNoNomeDosArquivos;
|
|
35
|
+
const createFileName = (prefix, includeMethodName) => {
|
|
36
|
+
const dtaTime = dateAndTimeInFileName ? `-${format(new Date(), 'dd-MM-yyyy-HHmm')}` : '';
|
|
37
|
+
const baseFileName = includeMethodName ? `${this.metodo}` : '';
|
|
38
|
+
const prefixPart = prefix ? includeMethodName ? `-${prefix}` : `${prefix}` : '';
|
|
39
|
+
const nfePart = responseInJson.chNFe ? `-${responseInJson.chNFe}` : '';
|
|
40
|
+
const dateTimePart = dtaTime;
|
|
41
|
+
return `${baseFileName}${prefixPart}${nfePart}${dateTimePart}`;
|
|
42
|
+
};
|
|
43
|
+
const salvarArquivo = (data, prefix, path, fileType, includeMethodName) => {
|
|
44
|
+
const fileName = createFileName(prefix, includeMethodName);
|
|
45
|
+
const method = fileType === 'xml' ? 'salvaXML' : 'salvaJSON';
|
|
46
|
+
this.utility[method]({
|
|
47
|
+
data: data,
|
|
48
|
+
fileName,
|
|
49
|
+
metodo: this.metodo,
|
|
50
|
+
path,
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
let xmlAutorizacaoInJson = {};
|
|
54
|
+
let xMotivoPorXml = [];
|
|
55
|
+
let xmlsInJson = [];
|
|
56
|
+
if (options) {
|
|
57
|
+
const { xmlAutorizacao } = options;
|
|
58
|
+
const json = new XmlParser();
|
|
59
|
+
for (let i = 0; i < xmlAutorizacao.length; i++) {
|
|
60
|
+
xmlAutorizacaoInJson = json.convertXmlToJson(xmlAutorizacao[i], 'NFCEAutorizacaoFinal');
|
|
61
|
+
xmlsInJson.push(xmlAutorizacaoInJson);
|
|
62
|
+
const chNFe = xmlAutorizacaoInJson.protNFe.infProt.chNFe;
|
|
63
|
+
const xMotivo = xmlAutorizacaoInJson.protNFe.infProt.xMotivo;
|
|
64
|
+
const cStat = xmlAutorizacaoInJson.protNFe.infProt.cStat;
|
|
65
|
+
xMotivoPorXml.push({
|
|
66
|
+
chNFe,
|
|
67
|
+
xMotivo,
|
|
68
|
+
cStat,
|
|
69
|
+
});
|
|
70
|
+
if (config.armazenarXMLAutorizacao) {
|
|
71
|
+
salvarArquivo(xmlAutorizacao[i], chNFe, config.pathXMLAutorizacao, 'xml', false);
|
|
72
|
+
salvarArquivo(xmlAutorizacaoInJson, chNFe, config.pathXMLAutorizacao, 'json', false);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
success: true,
|
|
77
|
+
xMotivo: xMotivoPorXml,
|
|
78
|
+
response: xmlsInJson,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
success: true,
|
|
83
|
+
xMotivo: xMotivoPorXml,
|
|
84
|
+
response: xmlsInJson,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
async trataRetorno(xmlRetorno, indSinc, _responseInJson) {
|
|
88
|
+
try {
|
|
89
|
+
/**
|
|
90
|
+
* Captura o valor nRec e protNFe
|
|
91
|
+
*/
|
|
92
|
+
const { nRec, protNFe } = this.utility.getProtNFe(xmlRetorno);
|
|
93
|
+
/**
|
|
94
|
+
* 0 - assíncrona
|
|
95
|
+
* 1 - síncrona
|
|
96
|
+
*/
|
|
97
|
+
let tipoEmissao = 0;
|
|
98
|
+
if (indSinc === 1 && protNFe) {
|
|
99
|
+
tipoEmissao = 1;
|
|
100
|
+
}
|
|
101
|
+
const nfeRetornoAutService = new NFCERetornoAutorizacaoService(this.environment, this.utility, this.xmlBuilder, this.axios, this.saveFiles, this.gerarConsulta);
|
|
102
|
+
const nfeRetornoAut = new NFCERetornoAutorizacao(nfeRetornoAutService);
|
|
103
|
+
const retorno = await nfeRetornoAut.getXmlRetorno({
|
|
104
|
+
tipoEmissao,
|
|
105
|
+
nRec,
|
|
106
|
+
protNFe,
|
|
107
|
+
xmlNFe: this.xmlNFe
|
|
108
|
+
});
|
|
109
|
+
return retorno;
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
throw new Error(error.message);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Método utilitário para criação do XML a partir de um Objeto
|
|
117
|
+
*/
|
|
118
|
+
anoMesEmissao(dhEmi) {
|
|
119
|
+
// Lógica para obter o ano e mês de emissão (AAMM)
|
|
120
|
+
const dataAtual = new Date(dhEmi);
|
|
121
|
+
const ano = dataAtual.getFullYear().toString().slice(-2);
|
|
122
|
+
const mes = (dataAtual.getMonth() + 1).toString().padStart(2, '0');
|
|
123
|
+
return ano + mes;
|
|
124
|
+
}
|
|
125
|
+
diaEmissao(dhEmi) {
|
|
126
|
+
// Converte a string para uma data
|
|
127
|
+
const dataAtual = new Date(dhEmi);
|
|
128
|
+
// Extrai o dia com dois dígitos
|
|
129
|
+
const dia = dataAtual.getDate().toString().padStart(2, '0');
|
|
130
|
+
// Retorna o dia
|
|
131
|
+
return dia;
|
|
132
|
+
}
|
|
133
|
+
calcularModulo11(sequencia) {
|
|
134
|
+
const pesos = [4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
135
|
+
let somatoria = 0;
|
|
136
|
+
for (let i = 0; i < sequencia.length; i++) {
|
|
137
|
+
somatoria += parseInt(sequencia.charAt(i)) * pesos[i];
|
|
138
|
+
}
|
|
139
|
+
const restoDivisao = somatoria % 11;
|
|
140
|
+
const digitoVerificador = restoDivisao === 0 || restoDivisao === 1 ? 0 : 11 - restoDivisao;
|
|
141
|
+
return digitoVerificador;
|
|
142
|
+
}
|
|
143
|
+
calcularDigitoVerificador(data) {
|
|
144
|
+
const { infNFe: { Id, ide: { cUF, mod, serie, nNF, tpEmis, cNF, dhEmi }, emit: { CNPJCPF }, }, } = data;
|
|
145
|
+
if (Id) {
|
|
146
|
+
this.chaveNfe = Id;
|
|
147
|
+
return {
|
|
148
|
+
chaveAcesso: `NFe${Id}`,
|
|
149
|
+
dv: parseInt(Id.charAt(Id.length - 1), 10),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
const anoMes = this.anoMesEmissao(dhEmi);
|
|
153
|
+
// Montando a sequência para o cálculo do dígito verificador
|
|
154
|
+
const sequencia = `${cUF}${anoMes}${CNPJCPF}${mod}${String(serie).padStart(3, '0')}${String(nNF).padStart(9, '0')}${tpEmis}${cNF}`;
|
|
155
|
+
// Calculando o dígito verificador
|
|
156
|
+
const dv = this.calcularModulo11(sequencia);
|
|
157
|
+
// Montando a chave de acesso
|
|
158
|
+
const chaveAcesso = `NFe${sequencia}` + dv;
|
|
159
|
+
this.chaveNfe = `${sequencia}${dv}`;
|
|
160
|
+
return {
|
|
161
|
+
chaveAcesso,
|
|
162
|
+
dv
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
validaDocumento(doc, campo) {
|
|
166
|
+
// Valida se CPF ou CNPJ
|
|
167
|
+
const nfeAutorizacaoHandler = new ValidaCPFCNPJ();
|
|
168
|
+
const { documentoValido, tipoDoDocumento } = nfeAutorizacaoHandler.validarCpfCnpj(doc);
|
|
169
|
+
if (!documentoValido || tipoDoDocumento === 'Desconhecido') {
|
|
170
|
+
const message = tipoDoDocumento === 'Desconhecido'
|
|
171
|
+
? `Documento do ${campo} ausente ou inválido`
|
|
172
|
+
: `${tipoDoDocumento} do ${campo} é inválido`;
|
|
173
|
+
throw new Error(message);
|
|
174
|
+
}
|
|
175
|
+
return tipoDoDocumento;
|
|
176
|
+
}
|
|
177
|
+
extrairDigestValue(xmlAssinado) {
|
|
178
|
+
const match = xmlAssinado.match(/<DigestValue>([^<]+)<\/DigestValue>/);
|
|
179
|
+
if (match && match[1]) {
|
|
180
|
+
return match[1];
|
|
181
|
+
}
|
|
182
|
+
throw new Error('DigestValue não encontrado no XML assinado.');
|
|
183
|
+
}
|
|
184
|
+
gerarXmlNFCEAutorizacao(data) {
|
|
185
|
+
logger.info('Montando estrutuda do XML em JSON', {
|
|
186
|
+
context: 'NFCEAutorizacaoService',
|
|
187
|
+
});
|
|
188
|
+
const createXML = (NFe) => {
|
|
189
|
+
// Verificando se existe mais de um produto
|
|
190
|
+
if (NFe?.infNFe?.det instanceof Array) {
|
|
191
|
+
// Adicionando indice ao item
|
|
192
|
+
const formatedItens = NFe.infNFe.det.map((det, index) => {
|
|
193
|
+
if (det.imposto.ICMS?.dadosICMS) {
|
|
194
|
+
const icms = mountICMS(det.imposto.ICMS.dadosICMS);
|
|
195
|
+
det.imposto.ICMS = icms;
|
|
196
|
+
}
|
|
197
|
+
if (det.imposto.PIS?.dadosPIS) {
|
|
198
|
+
const pis = mountPIS(det.imposto.PIS.dadosPIS);
|
|
199
|
+
det.imposto.PIS = pis;
|
|
200
|
+
}
|
|
201
|
+
if (det.imposto.COFINS?.dadosCOFINS) {
|
|
202
|
+
const cofins = mountCOFINS(det.imposto.COFINS.dadosCOFINS);
|
|
203
|
+
det.imposto.COFINS = cofins;
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
$: {
|
|
207
|
+
nItem: index + 1,
|
|
208
|
+
},
|
|
209
|
+
...det,
|
|
210
|
+
};
|
|
211
|
+
});
|
|
212
|
+
NFe.infNFe.det = formatedItens;
|
|
213
|
+
}
|
|
214
|
+
// Cria chave da nota e grava digito verificador
|
|
215
|
+
const { chaveAcesso, dv } = this.calcularDigitoVerificador(NFe);
|
|
216
|
+
NFe.infNFe.ide.cDV = dv;
|
|
217
|
+
NFe.infNFe.ide.verProc = NFe.infNFe.ide.verProc || '1.0.0.0';
|
|
218
|
+
// Valida Documento do emitente
|
|
219
|
+
NFe.infNFe.emit = Object.assign({ [this.validaDocumento(String(NFe.infNFe.emit.CNPJCPF), 'emitente')]: NFe.infNFe.emit.CNPJCPF }, NFe.infNFe.emit);
|
|
220
|
+
delete NFe.infNFe.emit.CNPJCPF;
|
|
221
|
+
// Valida Documento do destinatário
|
|
222
|
+
if (NFe.infNFe.dest) {
|
|
223
|
+
const tipoDocDest = this.validaDocumento(String(NFe.infNFe.dest?.CNPJCPF || ''), 'destinatário');
|
|
224
|
+
const cnpjcpfValue = NFe.infNFe.dest?.CNPJCPF || '';
|
|
225
|
+
const xNomeValue = NFe.infNFe.ide.tpAmb === 2
|
|
226
|
+
? 'NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL'
|
|
227
|
+
: NFe.infNFe.dest.xNome;
|
|
228
|
+
// Reconstrói o objeto dest mantendo a ordem correta
|
|
229
|
+
const { CNPJCPF, xNome, ...restoDest } = NFe.infNFe.dest;
|
|
230
|
+
NFe.infNFe.dest = {
|
|
231
|
+
[tipoDocDest]: cnpjcpfValue,
|
|
232
|
+
...(xNomeValue && { xNome: xNomeValue }),
|
|
233
|
+
...restoDest
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
// Valida Documento do transportador
|
|
237
|
+
if (NFe.infNFe.transp.transporta) {
|
|
238
|
+
NFe.infNFe.transp.transporta = Object.assign({ [this.validaDocumento(String(NFe.infNFe.transp.transporta?.CNPJCPF), 'transportador')]: NFe.infNFe.transp.transporta?.CNPJCPF }, NFe.infNFe.transp.transporta);
|
|
239
|
+
delete NFe.infNFe.transp.transporta?.CNPJCPF;
|
|
240
|
+
}
|
|
241
|
+
// Valida Documento do produtor rural
|
|
242
|
+
if (NFe.infNFe?.NFref instanceof Array) {
|
|
243
|
+
const NFrefArray = NFe.infNFe.NFref;
|
|
244
|
+
if (NFrefArray && NFrefArray.length > 0) {
|
|
245
|
+
NFe.infNFe.NFref = NFrefArray.map(NFref => {
|
|
246
|
+
if (NFref.refNFP) {
|
|
247
|
+
NFref.refNFP = Object.assign({ [this.validaDocumento(String(NFref.refNFP.CNPJCPF), 'produtor rural')]: NFref.refNFP.CNPJCPF }, NFref.refNFP);
|
|
248
|
+
delete NFref.refNFP.CNPJCPF;
|
|
249
|
+
}
|
|
250
|
+
return NFref;
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
if (NFe.infNFe.NFref && NFe.infNFe.NFref.refNFP) {
|
|
256
|
+
NFe.infNFe.NFref.refNFP = Object.assign({ [this.validaDocumento(String(NFe.infNFe.NFref.refNFP.CNPJCPF), 'produtor rural')]: NFe.infNFe.NFref.refNFP.CNPJCPF }, NFe.infNFe.NFref.refNFP);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
const { idCSRT, tokenCSC } = this.environment.getConfig();
|
|
260
|
+
if (!idCSRT) {
|
|
261
|
+
throw new Error('idCSRT não configurado. É necessário configurar o idCSRT nas configurações para gerar o QR Code da NFCe.');
|
|
262
|
+
}
|
|
263
|
+
let qrCode = '';
|
|
264
|
+
if (![4, 9].includes(NFe.infNFe.ide.tpEmis)) {
|
|
265
|
+
qrCode = generateQRCodeURLOnline(chaveAcesso, '2', NFe.infNFe.ide.tpAmb, Number(idCSRT), String(tokenCSC), this.utility);
|
|
266
|
+
}
|
|
267
|
+
const urlConsultaNFCe = this.utility.getUrlNFCe('URL-ConsultaNFCe', false, '');
|
|
268
|
+
const nfeWithQrCode = {
|
|
269
|
+
...NFe,
|
|
270
|
+
infNFeSupl: {
|
|
271
|
+
qrCode: qrCode,
|
|
272
|
+
urlChave: urlConsultaNFCe,
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
NFe = nfeWithQrCode;
|
|
276
|
+
const xmlObject = {
|
|
277
|
+
$: {
|
|
278
|
+
xmlns: 'http://www.portalfiscal.inf.br/nfe'
|
|
279
|
+
},
|
|
280
|
+
infNFe: {
|
|
281
|
+
$: {
|
|
282
|
+
versao: "4.00",
|
|
283
|
+
Id: chaveAcesso,
|
|
284
|
+
},
|
|
285
|
+
...NFe.infNFe
|
|
286
|
+
},
|
|
287
|
+
infNFeSupl: {
|
|
288
|
+
...NFe.infNFeSupl
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
const eventoXML = this.xmlBuilder.gerarXml(xmlObject, 'NFe', this.metodo);
|
|
292
|
+
let xmlAssinado = this.xmlBuilder.assinarXML(eventoXML, 'infNFe');
|
|
293
|
+
if ([4, 9].includes(NFe.infNFe.ide.tpEmis)) {
|
|
294
|
+
// capturar digestValue
|
|
295
|
+
const digestValue = this.extrairDigestValue(xmlAssinado);
|
|
296
|
+
// substituir tag qrcode
|
|
297
|
+
const tpAmb = NFe.infNFe.ide.tpAmb;
|
|
298
|
+
const valNF = NFe.infNFe.total.ICMSTot.vNF;
|
|
299
|
+
const diaEmissao = this.diaEmissao(NFe.infNFe.ide.dhEmi);
|
|
300
|
+
qrCode = generateQRCodeURLOffline(chaveAcesso, '2', tpAmb, diaEmissao, valNF, digestValue, Number(idCSRT), String(tokenCSC), this.utility);
|
|
301
|
+
xml2js.parseString(xmlAssinado, (err, result) => {
|
|
302
|
+
if (err) {
|
|
303
|
+
throw new Error('Erro ao parsear o XML para atualização do qrCode:');
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
if (result.NFe?.infNFeSupl[0]?.qrCode) {
|
|
307
|
+
result.NFe.infNFeSupl[0].qrCode[0] = qrCode;
|
|
308
|
+
const builder = new Builder({
|
|
309
|
+
headless: true, renderOpts: {
|
|
310
|
+
pretty: false
|
|
311
|
+
},
|
|
312
|
+
});
|
|
313
|
+
xmlAssinado = builder.buildObject(result);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
throw new Error('Tag qrCode não encontrada no XML.');
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
this.xmlNFe.push(xmlAssinado);
|
|
322
|
+
};
|
|
323
|
+
if (data.NFe instanceof Array) {
|
|
324
|
+
for (let i = 0; i < data.NFe.length; i++) {
|
|
325
|
+
const NFe = data.NFe[i];
|
|
326
|
+
createXML(NFe);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
createXML(data.NFe);
|
|
331
|
+
}
|
|
332
|
+
// Base do XML
|
|
333
|
+
const baseXML = {
|
|
334
|
+
$: {
|
|
335
|
+
versao: "4.00",
|
|
336
|
+
xmlns: 'http://www.portalfiscal.inf.br/nfe'
|
|
337
|
+
},
|
|
338
|
+
idLote: data.idLote,
|
|
339
|
+
indSinc: data.indSinc,
|
|
340
|
+
_: '[XML]'
|
|
341
|
+
};
|
|
342
|
+
// Gera base do XML
|
|
343
|
+
const xml = this.xmlBuilder.gerarXml(baseXML, 'enviNFe', this.metodo);
|
|
344
|
+
return xml.replace('[XML]', this.xmlNFe.join(''));
|
|
345
|
+
}
|
|
346
|
+
async callWebService(xmlConsulta, webServiceUrl, ContentType, action, agent) {
|
|
347
|
+
const startTime = Date.now();
|
|
348
|
+
const { tokenCSC } = this.environment.getConfig();
|
|
349
|
+
const headers = {
|
|
350
|
+
'Content-Type': ContentType,
|
|
351
|
+
'SOAPAction': action,
|
|
352
|
+
'CSC': tokenCSC,
|
|
353
|
+
};
|
|
354
|
+
logger.http('Iniciando comunicação com o webservice', {
|
|
355
|
+
context: `NFCEAutorizacaoService`,
|
|
356
|
+
method: this.metodo,
|
|
357
|
+
url: webServiceUrl,
|
|
358
|
+
action,
|
|
359
|
+
headers,
|
|
360
|
+
});
|
|
361
|
+
const response = await this.axios.post(webServiceUrl, xmlConsulta, {
|
|
362
|
+
headers,
|
|
363
|
+
httpsAgent: agent
|
|
364
|
+
});
|
|
365
|
+
const duration = Date.now() - startTime;
|
|
366
|
+
logger.http('Comunicação concluída com sucesso', {
|
|
367
|
+
context: `NFCEAutorizacaoService`,
|
|
368
|
+
method: this.metodo,
|
|
369
|
+
duration: `${duration}ms`,
|
|
370
|
+
responseSize: response.data ? JSON.stringify(response.data).length : 0
|
|
371
|
+
});
|
|
372
|
+
return response;
|
|
373
|
+
}
|
|
374
|
+
async Exec(data) {
|
|
375
|
+
let xmlConsulta = '';
|
|
376
|
+
let xmlConsultaSoap = '';
|
|
377
|
+
// webServiceUrlTmp não é usado, mas mantido para compatibilidade
|
|
378
|
+
// let webServiceUrlTmp: string = '';
|
|
379
|
+
let xmlRetorno = {};
|
|
380
|
+
let responseInJson = undefined;
|
|
381
|
+
const ContentType = this.setContentType();
|
|
382
|
+
try {
|
|
383
|
+
// Gerando XML para consulta de Status do Serviço
|
|
384
|
+
xmlConsulta = this.gerarXmlNFCEAutorizacao(data);
|
|
385
|
+
const { xmlFormated, agent, webServiceUrl, action } = await this.gerarConsulta.gerarConsulta(xmlConsulta, this.metodo, false, '', 'NFCe');
|
|
386
|
+
xmlConsultaSoap = xmlFormated;
|
|
387
|
+
// webServiceUrlTmp não é usado, mas mantido para compatibilidade
|
|
388
|
+
// webServiceUrlTmp = webServiceUrl;
|
|
389
|
+
// Efetua requisição para o webservice NFEStatusServico
|
|
390
|
+
xmlRetorno = await this.callWebService(xmlFormated, webServiceUrl, ContentType, action, agent);
|
|
391
|
+
/**
|
|
392
|
+
* Verifica se houve rejeição no processamento do lote
|
|
393
|
+
*/
|
|
394
|
+
responseInJson = this.utility.verificaRejeicao(xmlRetorno.data, this.metodo);
|
|
395
|
+
const retorno = await this.trataRetorno(xmlRetorno.data, data.indSinc, responseInJson);
|
|
396
|
+
const xmlFinal = this.salvaArquivos(xmlConsulta, responseInJson, xmlRetorno.data, {
|
|
397
|
+
xmlAutorizacao: retorno.data,
|
|
398
|
+
xMotivo: retorno.message
|
|
399
|
+
});
|
|
400
|
+
xmlFinal.xMotivo = xmlFinal.xMotivo.map((item) => ({
|
|
401
|
+
...item,
|
|
402
|
+
xMotivo: item.xMotivo.replace('NF-e', 'NFC-e')
|
|
403
|
+
}));
|
|
404
|
+
logger.info('NFCe transmitida com sucesso', {
|
|
405
|
+
context: 'NFCEAutorizacaoService',
|
|
406
|
+
});
|
|
407
|
+
return {
|
|
408
|
+
success: true,
|
|
409
|
+
xMotivo: xmlFinal.xMotivo,
|
|
410
|
+
xmls: xmlFinal.response,
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
finally {
|
|
414
|
+
// Salva XML de Consulta
|
|
415
|
+
this.utility.salvaConsulta(xmlConsulta, xmlConsultaSoap, this.metodo);
|
|
416
|
+
// Salva XML de Retorno
|
|
417
|
+
if (responseInJson) {
|
|
418
|
+
this.utility.salvaRetorno(xmlRetorno.data, responseInJson, this.metodo);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
export default NFCEAutorizacaoService;
|
|
424
|
+
//# sourceMappingURL=NFCEAutorizacaoService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NFCEAut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AAE,CAAC,CAAC;gBACpD,GAAG,IAAI;gBACP,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;aACjD,CAAC,CAAC,CAAC;YAEJ,MAAM,CAAC,IAAI,CAAC,8BAA8B,EAAE;gBACxC,OAAO,EAAE,wBAAwB;aACpC,CAAC,CAAC;YAEH,OAAO;gBACH,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,IAAI,EAAE,QAAQ,CAAC,QAAQ;aAC1B,CAAA;QAEL,CAAC;gBAAS,CAAC;YACP,wBAAwB;YACxB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAEtE,uBAAuB;YACvB,IAAI,cAAc,EAAE,CAAC;gBACjB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5E,CAAC;QACL,CAAC;IACL,CAAC;CAEJ;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Utility } from '@treeunfe/shared';
|
|
2
|
+
export declare function generateQRCodeURLOnline(chaveAcesso: string, versaoQRCode: string, tipoAmbiente: number, identificadorCSC: number, csc: string, utility: Utility): string;
|
|
3
|
+
export declare function generateQRCodeURLOffline(chaveAcesso: string, versaoQRCode: string, tipoAmbiente: number, diaDataEmissao: string, valorTotalNfce: string, digVal: string, identificadorCSC: number, csc: string, utility: Utility): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createHash } from 'crypto';
|
|
2
|
+
import sha1 from 'sha1';
|
|
3
|
+
// Função para gerar o hash SHA-1 em formato hexadecimal
|
|
4
|
+
function generateSHA1Hash(input) {
|
|
5
|
+
return createHash('sha1').update(input).digest('hex');
|
|
6
|
+
}
|
|
7
|
+
function calcularDigestValueHex(digVal) {
|
|
8
|
+
return Buffer.from(digVal).toString('hex');
|
|
9
|
+
}
|
|
10
|
+
// Função para gerar a URL do QR Code para emissão ONLINE
|
|
11
|
+
export function generateQRCodeURLOnline(chaveAcesso, versaoQRCode, tipoAmbiente, identificadorCSC, csc, utility) {
|
|
12
|
+
const urlQRCodeNFCe = utility.getUrlNFCe('URL-QRCode', false, '');
|
|
13
|
+
chaveAcesso = chaveAcesso.replace('NFe', '');
|
|
14
|
+
// Passo 1: Concatenar parâmetros
|
|
15
|
+
const baseString = `${chaveAcesso}|${versaoQRCode}|${tipoAmbiente}|${identificadorCSC}`;
|
|
16
|
+
// Passo 2: Adicionar o CSC
|
|
17
|
+
const stringToHash = `${baseString}${csc}`;
|
|
18
|
+
// Passo 3: Gerar o hash
|
|
19
|
+
const codigoHash = generateSHA1Hash(stringToHash);
|
|
20
|
+
// Montar a URL final
|
|
21
|
+
return `${urlQRCodeNFCe}?p=${baseString}|${codigoHash}`;
|
|
22
|
+
}
|
|
23
|
+
// Função para gerar a URL do QR Code para emissão OFFLINE
|
|
24
|
+
export function generateQRCodeURLOffline(chaveAcesso, versaoQRCode, tipoAmbiente, diaDataEmissao, valorTotalNfce, digVal, identificadorCSC, csc, utility) {
|
|
25
|
+
const urlQRCodeNFCe = utility.getUrlNFCe('URL-QRCode', false, '');
|
|
26
|
+
chaveAcesso = chaveAcesso.replace('NFe', '');
|
|
27
|
+
// Passo 1: Converter DigestValue para HEXA
|
|
28
|
+
const digestValueHex = calcularDigestValueHex(digVal);
|
|
29
|
+
// Passo 2: Concatenar parâmetros
|
|
30
|
+
const baseString = `${chaveAcesso}|${versaoQRCode}|${tipoAmbiente}|${diaDataEmissao}|${valorTotalNfce}|${digestValueHex}|${identificadorCSC}`;
|
|
31
|
+
// Passo 3: Adicionar o CSC
|
|
32
|
+
const stringToHash = `${baseString}${csc}`;
|
|
33
|
+
// Passo 4: Gerar o hash
|
|
34
|
+
const hash = sha1(stringToHash).toUpperCase();
|
|
35
|
+
// Montar URL
|
|
36
|
+
return `${urlQRCodeNFCe}?p=${baseString}|${hash}`;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=NFCEQRCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NFCEQRCode.js","sourceRoot":"","sources":["../../../../../src/services/NFCEAutorizacao/util/NFCEQRCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,wDAAwD;AACxD,SAAS,gBAAgB,CAAC,KAAa;IACnC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,sBAAsB,CAAC,MAAc;IAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,uBAAuB,CACnC,WAAmB,EACnB,YAAoB,EACpB,YAAoB,EACpB,gBAAwB,EACxB,GAAW,EACX,OAAgB;IAEhB,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAClE,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAE7C,iCAAiC;IACjC,MAAM,UAAU,GAAG,GAAG,WAAW,IAAI,YAAY,IAAI,YAAY,IAAI,gBAAgB,EAAE,CAAC;IAExF,2BAA2B;IAC3B,MAAM,YAAY,GAAG,GAAG,UAAU,GAAG,GAAG,EAAE,CAAC;IAE3C,wBAAwB;IACxB,MAAM,UAAU,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAElD,qBAAqB;IACrB,OAAO,GAAG,aAAa,MAAM,UAAU,IAAI,UAAU,EAAE,CAAC;AAC5D,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,wBAAwB,CACpC,WAAmB,EACnB,YAAoB,EACpB,YAAoB,EACpB,cAAsB,EACtB,cAAsB,EACtB,MAAc,EACd,gBAAwB,EACxB,GAAW,EACX,OAAgB;IAEhB,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAClE,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAE7C,2CAA2C;IAC3C,MAAM,cAAc,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAA;IAErD,iCAAiC;IACjC,MAAM,UAAU,GAAG,GAAG,WAAW,IAAI,YAAY,IAAI,YAAY,IAAI,cAAc,IAAI,cAAc,IAAI,cAAc,IAAI,gBAAgB,EAAE,CAAC;IAE9I,2BAA2B;IAC3B,MAAM,YAAY,GAAG,GAAG,UAAU,GAAG,GAAG,EAAE,CAAC;IAE3C,wBAAwB;IACxB,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC;IAE9C,aAAa;IACb,OAAO,GAAG,aAAa,MAAM,UAAU,IAAI,IAAI,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { XmlBuilder, BaseNFe, Environment, Utility } from '@treeunfe/shared';
|
|
2
|
+
import { GerarConsultaImpl, NFCERetornoAutorizacaoServiceImpl, SaveFilesImpl } from '@treeunfe/types/interfaces';
|
|
3
|
+
import { ProtNFe } from '@treeunfe/types';
|
|
4
|
+
import { AxiosInstance } from 'axios';
|
|
5
|
+
declare class NFCERetornoAutorizacaoService extends BaseNFe implements NFCERetornoAutorizacaoServiceImpl {
|
|
6
|
+
constructor(environment: Environment, utility: Utility, xmlBuilder: XmlBuilder, axios: AxiosInstance, saveFiles: SaveFilesImpl, gerarConsulta: GerarConsultaImpl);
|
|
7
|
+
protected gerarXml(data: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Busca o retorno da Autorização pelo número do recibo (nRec)
|
|
10
|
+
*
|
|
11
|
+
* @param {string} nRec - Número do recibo retornado pela SEFAZ ao emitir uma NFe em modo assíncrono.
|
|
12
|
+
* @param {any} xmlNFe - Array contendo as NFe do lote enviado à SEFAZ.
|
|
13
|
+
* @returns {Promise<string>} XML completo da NFe (já com protocolo de autorização).
|
|
14
|
+
*/
|
|
15
|
+
getRetornoRecibo(nRec: string, xmlNFe: string[]): Promise<{
|
|
16
|
+
success: boolean;
|
|
17
|
+
message: any;
|
|
18
|
+
data: string[];
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Agrega o protNFe ao restante da NFe gerada na emissão.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} protNFe - Tag protNFe do XML em formato JSON.
|
|
24
|
+
* @param {any} xmlNFe - Array contendo as NFe do lote enviado à SEFAZ.
|
|
25
|
+
* @returns {} XML completo da NFe (já com protocolo de autorização).
|
|
26
|
+
*/
|
|
27
|
+
getXmlRetornoAutorizacao(protNFe: ProtNFe[], xmlNFe: string[]): {
|
|
28
|
+
success: boolean;
|
|
29
|
+
message: any;
|
|
30
|
+
data: string[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Retorna o XML completo da Autorização (já com o protocolo de autorização)
|
|
34
|
+
*
|
|
35
|
+
* @param {number} tipoEmissao - Informa se o tipo emissão foi síncrona ou assíncrona (0- Não / 1 - Sim).
|
|
36
|
+
* @param {string | undefined} nRec - Número do recibo retornado pela SEFAZ ao emitir uma NFe em modo assíncrono.
|
|
37
|
+
* @param {ProtNFe | undefined} protNFe - Tag protNFe do XML em formato JSON.
|
|
38
|
+
* @param {string[]} xmlNFe - Array contendo as NFe do lote enviado à SEFAZ.
|
|
39
|
+
* @returns {Promise<string>} XML completo da NFe (já com protocolo de autorização).
|
|
40
|
+
*/
|
|
41
|
+
getXmlRetorno({ tipoEmissao, nRec, protNFe, xmlNFe }: {
|
|
42
|
+
tipoEmissao: number;
|
|
43
|
+
nRec?: string;
|
|
44
|
+
protNFe?: ProtNFe[];
|
|
45
|
+
xmlNFe: string[];
|
|
46
|
+
}): Promise<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
message: any;
|
|
49
|
+
data: string[];
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
52
|
+
export default NFCERetornoAutorizacaoService;
|