@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,261 @@
|
|
|
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, XmlParser } from '@treeunfe/shared';
|
|
18
|
+
import { BaseNFSe } from '@treeunfe/shared';
|
|
19
|
+
import { Buffer } from 'buffer';
|
|
20
|
+
import { gunzipSync, gzipSync } from 'zlib';
|
|
21
|
+
class NFSeAutorizacaoService extends BaseNFSe {
|
|
22
|
+
constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
|
|
23
|
+
super(environment, utility, xmlBuilder, 'NFSe_Autorizacao', axios, saveFiles, gerarConsulta);
|
|
24
|
+
this.dpsXmlGZipB64 = '';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Gera o ID do DPS conforme regra do schema:
|
|
28
|
+
* "DPS" + Cód.Mun (7) + Tipo de Inscrição Federal (1) + Inscrição Federal (14) + Série DPS (5) + Núm. DPS (15)
|
|
29
|
+
* Total: 45 caracteres
|
|
30
|
+
*
|
|
31
|
+
* Tipo de Inscrição: 1 = CNPJ, 2 = CPF
|
|
32
|
+
*/
|
|
33
|
+
gerarIdDPS(dps) {
|
|
34
|
+
// Código do município (7 dígitos)
|
|
35
|
+
const cLocEmi = dps.infDps.cLocEmi.replace(/\D/g, '').padStart(7, '0').substring(0, 7);
|
|
36
|
+
// Tipo de inscrição e número
|
|
37
|
+
// IMPORTANTE: tpInscFed: 1 = CPF, 2 = CNPJ (invertido do que parece lógico!)
|
|
38
|
+
const prestador = dps.infDps.prest;
|
|
39
|
+
let tipoInscricao;
|
|
40
|
+
let inscricaoFederal;
|
|
41
|
+
if (prestador.CNPJ) {
|
|
42
|
+
tipoInscricao = '2'; // CNPJ = 2
|
|
43
|
+
inscricaoFederal = prestador.CNPJ.replace(/\D/g, '').padStart(14, '0').substring(0, 14);
|
|
44
|
+
}
|
|
45
|
+
else if (prestador.CPF) {
|
|
46
|
+
tipoInscricao = '1'; // CPF = 1
|
|
47
|
+
inscricaoFederal = prestador.CPF.replace(/\D/g, '').padStart(14, '0').substring(0, 14);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
// Fallback: assume CNPJ se não houver nenhum
|
|
51
|
+
tipoInscricao = '2';
|
|
52
|
+
inscricaoFederal = '0'.repeat(14);
|
|
53
|
+
}
|
|
54
|
+
// Série DPS (5 dígitos) - apenas números, se houver letras, converte para números
|
|
55
|
+
// O schema permite até 5 dígitos, mas o ID precisa ter exatamente 5 dígitos com zeros à esquerda
|
|
56
|
+
const serieOriginal = dps.infDps.serie.replace(/\D/g, '');
|
|
57
|
+
const serie = serieOriginal.padStart(5, '0').substring(0, 5);
|
|
58
|
+
// Número DPS (15 dígitos)
|
|
59
|
+
// IMPORTANTE: O schema TSNumDPS não permite números que começam com zero (pattern: [1-9]{1}[0-9]{0,14})
|
|
60
|
+
// Mas o ID precisa ter exatamente 15 dígitos. O servidor faz o padding ao validar.
|
|
61
|
+
// Usamos o valor original sem padding para o XML, mas com padding para o ID
|
|
62
|
+
const nDPSOriginal = dps.infDps.nDPS.replace(/\D/g, '');
|
|
63
|
+
// Garante que não comece com zero (conforme schema) e depois adiciona zeros à esquerda para o ID
|
|
64
|
+
const nDPS = nDPSOriginal.padStart(15, '0').substring(0, 15);
|
|
65
|
+
const idDPS = `DPS${cLocEmi}${tipoInscricao}${inscricaoFederal}${serie}${nDPS}`;
|
|
66
|
+
// Log detalhado para debug
|
|
67
|
+
logger.info('Gerando ID do DPS', {
|
|
68
|
+
context: 'NFSeAutorizacaoService',
|
|
69
|
+
valores: {
|
|
70
|
+
cLocEmi: dps.infDps.cLocEmi,
|
|
71
|
+
cLocEmiFormatado: cLocEmi,
|
|
72
|
+
tipoInscricao,
|
|
73
|
+
inscricaoFederal,
|
|
74
|
+
serieOriginal: dps.infDps.serie,
|
|
75
|
+
serieFormatada: serie,
|
|
76
|
+
nDPSOriginal: dps.infDps.nDPS,
|
|
77
|
+
nDPSFormatado: nDPS,
|
|
78
|
+
idDPS,
|
|
79
|
+
tamanho: idDPS.length
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
// Validação: deve ter exatamente 45 caracteres
|
|
83
|
+
if (idDPS.length !== 45) {
|
|
84
|
+
throw new Error(`ID do DPS deve ter 45 caracteres, mas tem ${idDPS.length}: ${idDPS}`);
|
|
85
|
+
}
|
|
86
|
+
return idDPS;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Monta o XML do DPS a partir do objeto JSON
|
|
90
|
+
*/
|
|
91
|
+
gerarXmlDPS(dps) {
|
|
92
|
+
const config = this.environment.getConfig();
|
|
93
|
+
const ambiente = config.nfse?.ambiente || 2;
|
|
94
|
+
// Gera o ID do DPS se não foi fornecido
|
|
95
|
+
const idDPS = dps.infDps.Id || this.gerarIdDPS(dps);
|
|
96
|
+
// Garante que o ambiente está correto e remove Id do objeto (será colocado como atributo)
|
|
97
|
+
const { Id, ...infDpsDataSemId } = dps.infDps;
|
|
98
|
+
const infDpsData = {
|
|
99
|
+
...infDpsDataSemId,
|
|
100
|
+
tpAmb: ambiente
|
|
101
|
+
};
|
|
102
|
+
// Monta o objeto XML com a estrutura correta
|
|
103
|
+
// O atributo Id deve estar no $ do infDPS (maiúsculas conforme schema)
|
|
104
|
+
// Garantimos que $ seja definido por último para não ser sobrescrito
|
|
105
|
+
const infDPSObject = {
|
|
106
|
+
...infDpsData
|
|
107
|
+
};
|
|
108
|
+
infDPSObject.$ = {
|
|
109
|
+
Id: idDPS
|
|
110
|
+
};
|
|
111
|
+
const dpsObject = {
|
|
112
|
+
$: {
|
|
113
|
+
versao: '1.01',
|
|
114
|
+
xmlns: 'http://www.sped.fazenda.gov.br/nfse'
|
|
115
|
+
},
|
|
116
|
+
infDPS: infDPSObject // Nome exato conforme schema: infDPS (maiúsculas)
|
|
117
|
+
};
|
|
118
|
+
// Gera o XML
|
|
119
|
+
let xml = this.xmlBuilder.gerarXml(dpsObject, 'DPS', this.metodo);
|
|
120
|
+
// Verifica se o atributo Id está presente no XML gerado
|
|
121
|
+
const temIdNoXml = xml.includes(`Id="${idDPS}"`) || xml.includes(`Id='${idDPS}'`);
|
|
122
|
+
// Adiciona a declaração XML com encoding UTF-8 se não existir
|
|
123
|
+
if (!xml.trim().startsWith('<?xml')) {
|
|
124
|
+
xml = '<?xml version="1.0" encoding="UTF-8"?>\n' + xml;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
// Garante que a declaração tenha encoding UTF-8
|
|
128
|
+
xml = xml.replace(/^<\?xml[^>]*\?>/, '<?xml version="1.0" encoding="UTF-8"?>');
|
|
129
|
+
}
|
|
130
|
+
logger.info('XML do DPS gerado', {
|
|
131
|
+
context: 'NFSeAutorizacaoService',
|
|
132
|
+
idDPS,
|
|
133
|
+
tamanho: xml.length,
|
|
134
|
+
comDeclaracao: xml.trim().startsWith('<?xml'),
|
|
135
|
+
temIdNoXml,
|
|
136
|
+
xmlPreview: xml.substring(0, 300)
|
|
137
|
+
});
|
|
138
|
+
if (!temIdNoXml) {
|
|
139
|
+
logger.warn('Atributo Id não encontrado no XML gerado (antes da assinatura)', {
|
|
140
|
+
context: 'NFSeAutorizacaoService',
|
|
141
|
+
idDPS,
|
|
142
|
+
xmlPreview: xml.substring(0, 500)
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
// Assina o XML (usa o nome exato do elemento conforme schema)
|
|
146
|
+
let xmlAssinado = this.xmlBuilder.assinarXML(xml, 'infDPS');
|
|
147
|
+
// Garante que o XML assinado tenha a declaração UTF-8
|
|
148
|
+
if (!xmlAssinado.trim().startsWith('<?xml')) {
|
|
149
|
+
xmlAssinado = '<?xml version="1.0" encoding="UTF-8"?>\n' + xmlAssinado;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
// Garante que a declaração tenha encoding UTF-8
|
|
153
|
+
xmlAssinado = xmlAssinado.replace(/^<\?xml[^>]*\?>/, '<?xml version="1.0" encoding="UTF-8"?>');
|
|
154
|
+
}
|
|
155
|
+
// Verifica se o atributo Id está presente no XML
|
|
156
|
+
const temId = xmlAssinado.includes(`Id="${idDPS}"`) || xmlAssinado.includes(`Id='${idDPS}'`);
|
|
157
|
+
logger.info('XML do DPS assinado', {
|
|
158
|
+
context: 'NFSeAutorizacaoService',
|
|
159
|
+
tamanho: xmlAssinado.length,
|
|
160
|
+
comDeclaracao: xmlAssinado.trim().startsWith('<?xml'),
|
|
161
|
+
declaracao: xmlAssinado.substring(0, 50),
|
|
162
|
+
temId,
|
|
163
|
+
idDPS
|
|
164
|
+
});
|
|
165
|
+
if (!temId) {
|
|
166
|
+
logger.warn('Atributo Id não encontrado no XML assinado', {
|
|
167
|
+
context: 'NFSeAutorizacaoService',
|
|
168
|
+
idDPS,
|
|
169
|
+
xmlPreview: xmlAssinado.substring(0, 500)
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return xmlAssinado;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Processa o DPS: monta XML, assina, compacta e codifica
|
|
176
|
+
*/
|
|
177
|
+
processarDPS(data) {
|
|
178
|
+
// Se já foi fornecido o Base64, usa diretamente
|
|
179
|
+
if (data.dpsXmlGZipB64) {
|
|
180
|
+
return data.dpsXmlGZipB64;
|
|
181
|
+
}
|
|
182
|
+
// Se foi fornecido o JSON, processa
|
|
183
|
+
if (data.DPS) {
|
|
184
|
+
const dpsArray = Array.isArray(data.DPS) ? data.DPS : [data.DPS];
|
|
185
|
+
const xmls = [];
|
|
186
|
+
for (const dps of dpsArray) {
|
|
187
|
+
// Monta e assina o XML
|
|
188
|
+
const xml = this.gerarXmlDPS(dps);
|
|
189
|
+
// Compacta em GZip
|
|
190
|
+
const gzip = gzipSync(Buffer.from(xml, 'utf-8'));
|
|
191
|
+
// Codifica em Base64
|
|
192
|
+
const base64 = gzip.toString('base64');
|
|
193
|
+
xmls.push(base64);
|
|
194
|
+
}
|
|
195
|
+
// Se houver apenas um DPS, retorna o Base64 diretamente
|
|
196
|
+
// Se houver múltiplos, precisaria de um lote (por enquanto, retorna o primeiro)
|
|
197
|
+
return xmls[0];
|
|
198
|
+
}
|
|
199
|
+
throw new Error('É necessário fornecer DPS (JSON) ou dpsXmlGZipB64 (Base64)');
|
|
200
|
+
}
|
|
201
|
+
prepararDados(data) {
|
|
202
|
+
// Processa o DPS antes de enviar
|
|
203
|
+
this.dpsXmlGZipB64 = this.processarDPS(data);
|
|
204
|
+
return {
|
|
205
|
+
dpsXmlGZipB64: this.dpsXmlGZipB64
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
getHttpMethod() {
|
|
209
|
+
return 'POST';
|
|
210
|
+
}
|
|
211
|
+
async Exec(data) {
|
|
212
|
+
try {
|
|
213
|
+
const response = await super.Exec(data);
|
|
214
|
+
let xmls = [];
|
|
215
|
+
// Se a resposta contém NFSe em base64 gzip, descompacta e parseia
|
|
216
|
+
if (response.nfseXmlGZipB64) {
|
|
217
|
+
try {
|
|
218
|
+
const nfseBuffer = Buffer.from(response.nfseXmlGZipB64, 'base64');
|
|
219
|
+
const nfseXml = gunzipSync(nfseBuffer).toString('utf-8');
|
|
220
|
+
// Salva o XML da NFSe descompactado
|
|
221
|
+
const config = this.environment.getConfig();
|
|
222
|
+
if (config.dfe.armazenarXMLAutorizacao && response.chaveAcesso) {
|
|
223
|
+
this.utility.salvaXML({
|
|
224
|
+
data: nfseXml,
|
|
225
|
+
fileName: response.chaveAcesso,
|
|
226
|
+
metodo: this.metodo,
|
|
227
|
+
path: config.dfe.pathXMLAutorizacao,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
const json = new XmlParser();
|
|
231
|
+
const nfseJson = json.convertXmlToJson(nfseXml, 'NFSeAutorizacao');
|
|
232
|
+
xmls.push({
|
|
233
|
+
NFSe: nfseJson
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
// Log como warning ao invés de error, pois a NFSe foi autorizada com sucesso
|
|
238
|
+
// O erro é apenas no processamento do XML descompactado, não na autorização
|
|
239
|
+
logger.warn('Aviso ao processar XML da NFSe descompactada', {
|
|
240
|
+
context: 'NFSeAutorizacaoService',
|
|
241
|
+
message: error.message,
|
|
242
|
+
note: 'A NFSe foi autorizada com sucesso, mas o XML não pôde ser processado automaticamente'
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
247
|
+
success: true,
|
|
248
|
+
response,
|
|
249
|
+
xmls: xmls.length > 0 ? xmls : undefined
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
logger.error('Erro na autorização de NFSe', error, {
|
|
254
|
+
context: 'NFSeAutorizacaoService',
|
|
255
|
+
});
|
|
256
|
+
throw error;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
export default NFSeAutorizacaoService;
|
|
261
|
+
//# sourceMappingURL=NFSeAutorizacaoService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NFSeAutorizacaoService.js","sourceRoot":"","sources":["NFSeAutorizacaoService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAA6C,MAAM,EAA4B,SAAS,EAAmD,MAAM,kBAAkB,CAAC;AAG3K,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAG5C,MAAM,sBAAuB,SAAQ,QAAQ;IAGzC,YAAY,WAAwB,EAAE,OAAgB,EAAE,UAAsB,EAAE,KAAoB,EAAE,SAAwB,EAAE,aAAgC;QAC5J,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAHzF,kBAAa,GAAW,EAAE,CAAC;IAInC,CAAC;IAED;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,CAAC,IAAI,CAAC;wBACN,IAAI,EAAE,QAAsB;qBAC/B,CAAC,CAAC;gBACP,CAAC;gBAAC,OAAO,KAAU,EAAE,CAAC;oBAClB,6EAA6E;oBAC7E,4EAA4E;oBAC5E,MAAM,CAAC,IAAI,CAAC,8CAA8C,EAAE;wBACxD,OAAO,EAAE,wBAAwB;wBACjC,OAAO,EAAE,KAAK,CAAC,OAAO;wBACtB,IAAI,EAAE,sFAAsF;qBAC/F,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YAED,OAAO;gBACH,OAAO,EAAE,IAAI;gBACb,QAAQ;gBACR,IAAI,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;aAC3C,CAAC;QACN,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YAClB,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,EAAE;gBAC/C,OAAO,EAAE,wBAAwB;aACpC,CAAC,CAAC;YACH,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;CACJ;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { XmlBuilder, Environment, Utility } from '@treeunfe/shared';
|
|
2
|
+
import { GerarConsultaImpl, NFSeConsultaServiceImpl, SaveFilesImpl } from '@treeunfe/types/interfaces';
|
|
3
|
+
import { BaseNFSe } from '@treeunfe/shared';
|
|
4
|
+
import { DpsConsultaPorId, DpsConsultaResponse, NFSeConsultaPorChave, NFSeConsultaResponse } from '@treeunfe/types';
|
|
5
|
+
import { AxiosInstance } from 'axios';
|
|
6
|
+
declare class NFSeConsultaService extends BaseNFSe implements NFSeConsultaServiceImpl {
|
|
7
|
+
private consultaTipo;
|
|
8
|
+
constructor(environment: Environment, utility: Utility, xmlBuilder: XmlBuilder, axios: AxiosInstance, saveFiles: SaveFilesImpl, gerarConsulta: GerarConsultaImpl);
|
|
9
|
+
protected prepararDados(data?: any): any;
|
|
10
|
+
protected getHttpMethod(): 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
11
|
+
protected getUrlPath(data?: any): string;
|
|
12
|
+
protected getWebServiceUrl(): string;
|
|
13
|
+
Exec(data: NFSeConsultaPorChave): Promise<NFSeConsultaResponse>;
|
|
14
|
+
ConsultaDPS(data: DpsConsultaPorId): Promise<DpsConsultaResponse>;
|
|
15
|
+
}
|
|
16
|
+
export default NFSeConsultaService;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BaseNFSe } from '@treeunfe/shared';
|
|
2
|
+
class NFSeConsultaService extends BaseNFSe {
|
|
3
|
+
constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
|
|
4
|
+
super(environment, utility, xmlBuilder, 'NFSe_Consulta', axios, saveFiles, gerarConsulta);
|
|
5
|
+
this.consultaTipo = 'NFSe';
|
|
6
|
+
}
|
|
7
|
+
prepararDados(data) {
|
|
8
|
+
return null; // GET request não precisa de body
|
|
9
|
+
}
|
|
10
|
+
getHttpMethod() {
|
|
11
|
+
return 'GET';
|
|
12
|
+
}
|
|
13
|
+
getUrlPath(data) {
|
|
14
|
+
if (this.consultaTipo === 'DPS' && data && 'id' in data) {
|
|
15
|
+
return `/${data.id}`;
|
|
16
|
+
}
|
|
17
|
+
if (data && 'chaveAcesso' in data) {
|
|
18
|
+
return `/${data.chaveAcesso}`;
|
|
19
|
+
}
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
getWebServiceUrl() {
|
|
23
|
+
if (this.consultaTipo === 'DPS') {
|
|
24
|
+
return this.utility.getWebServiceUrlNFSe('NFSe_ConsultaDPS');
|
|
25
|
+
}
|
|
26
|
+
return this.utility.getWebServiceUrlNFSe('NFSe_Consulta');
|
|
27
|
+
}
|
|
28
|
+
async Exec(data) {
|
|
29
|
+
this.consultaTipo = 'NFSe';
|
|
30
|
+
return await super.Exec(data);
|
|
31
|
+
}
|
|
32
|
+
async ConsultaDPS(data) {
|
|
33
|
+
this.consultaTipo = 'DPS';
|
|
34
|
+
return await super.Exec(data);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export default NFSeConsultaService;
|
|
38
|
+
//# sourceMappingURL=NFSeConsultaService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NFSeConsultaService.js","sourceRoot":"","sources":["NFSeConsultaService.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAI5C,MAAM,mBAAoB,SAAQ,QAAQ;IAGtC,YAAY,WAAwB,EAAE,OAAgB,EAAE,UAAsB,EAAE,KAAoB,EAAE,SAAwB,EAAE,aAAgC;QAC5J,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAHtF,iBAAY,GAAmB,MAAM,CAAC;IAI9C,CAAC;IAES,aAAa,CAAC,IAAU;QAC9B,OAAO,IAAI,CAAC,CAAC,kCAAkC;IACnD,CAAC;IAES,aAAa;QACnB,OAAO,KAAK,CAAC;IACjB,CAAC;IAES,UAAU,CAAC,IAAU;QAC3B,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;YACtD,OAAO,IAAK,IAAyB,CAAC,EAAE,EAAE,CAAC;QAC/C,CAAC;QACD,IAAI,IAAI,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;YAChC,OAAO,IAAK,IAA6B,CAAC,WAAW,EAAE,CAAC;QAC5D,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAES,gBAAgB;QACtB,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAA0B;QACjC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;QAC3B,OAAO,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAyB,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAsB;QACpC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,OAAO,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAwB,CAAC;IACzD,CAAC;CACJ;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { XmlBuilder, Environment, Utility } from '@treeunfe/shared';
|
|
2
|
+
import { GerarConsultaImpl, NFSeDistribuicaoServiceImpl, SaveFilesImpl } from '@treeunfe/types/interfaces';
|
|
3
|
+
import { BaseNFSe } from '@treeunfe/shared';
|
|
4
|
+
import { NFSeDistribuicaoPorNSU, NFSeDistribuicaoResponse, NFSeEventosPorChave } from '@treeunfe/types';
|
|
5
|
+
import { AxiosInstance } from 'axios';
|
|
6
|
+
declare class NFSeDistribuicaoService extends BaseNFSe implements NFSeDistribuicaoServiceImpl {
|
|
7
|
+
constructor(environment: Environment, utility: Utility, xmlBuilder: XmlBuilder, axios: AxiosInstance, saveFiles: SaveFilesImpl, gerarConsulta: GerarConsultaImpl);
|
|
8
|
+
protected prepararDados(data?: any): any;
|
|
9
|
+
protected getHttpMethod(): 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
10
|
+
protected getUrlPath(data?: any): string;
|
|
11
|
+
protected getQueryParams(data?: any): Record<string, any>;
|
|
12
|
+
protected getWebServiceUrl(): string;
|
|
13
|
+
DistribuicaoPorNSU(data: NFSeDistribuicaoPorNSU): Promise<NFSeDistribuicaoResponse>;
|
|
14
|
+
EventosPorChave(data: NFSeEventosPorChave): Promise<NFSeDistribuicaoResponse>;
|
|
15
|
+
}
|
|
16
|
+
export default NFSeDistribuicaoService;
|
|
@@ -0,0 +1,251 @@
|
|
|
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 } from '@treeunfe/shared';
|
|
18
|
+
import { BaseNFSe } from '@treeunfe/shared';
|
|
19
|
+
import { gunzipSync } from 'zlib';
|
|
20
|
+
class NFSeDistribuicaoService extends BaseNFSe {
|
|
21
|
+
constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
|
|
22
|
+
super(environment, utility, xmlBuilder, 'NFSe_Distribuicao', axios, saveFiles, gerarConsulta);
|
|
23
|
+
}
|
|
24
|
+
prepararDados(data) {
|
|
25
|
+
return null; // GET request
|
|
26
|
+
}
|
|
27
|
+
getHttpMethod() {
|
|
28
|
+
return 'GET';
|
|
29
|
+
}
|
|
30
|
+
getUrlPath(data) {
|
|
31
|
+
if (data && 'chaveAcesso' in data) {
|
|
32
|
+
return `/${data.chaveAcesso}/Eventos`;
|
|
33
|
+
}
|
|
34
|
+
if (data && 'nsu' in data) {
|
|
35
|
+
return `/${data.nsu}`;
|
|
36
|
+
}
|
|
37
|
+
return '';
|
|
38
|
+
}
|
|
39
|
+
getQueryParams(data) {
|
|
40
|
+
if (data && 'nsu' in data) {
|
|
41
|
+
const nsuData = data;
|
|
42
|
+
const params = {};
|
|
43
|
+
if (nsuData.cnpjConsulta) {
|
|
44
|
+
params.cnpjConsulta = nsuData.cnpjConsulta;
|
|
45
|
+
}
|
|
46
|
+
if (nsuData.lote !== undefined) {
|
|
47
|
+
params.lote = nsuData.lote;
|
|
48
|
+
}
|
|
49
|
+
return params;
|
|
50
|
+
}
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
53
|
+
getWebServiceUrl() {
|
|
54
|
+
if (this.metodo === 'NFSe_EventosPorChave') {
|
|
55
|
+
return this.utility.getWebServiceUrlNFSe('NFSe_EventosPorChave');
|
|
56
|
+
}
|
|
57
|
+
return this.utility.getWebServiceUrlNFSe('NFSe_Distribuicao');
|
|
58
|
+
}
|
|
59
|
+
async DistribuicaoPorNSU(data) {
|
|
60
|
+
const response = await super.Exec(data);
|
|
61
|
+
// Se a resposta contém documentos, processa e salva cada um
|
|
62
|
+
if (response.LoteDFe && Array.isArray(response.LoteDFe) && response.LoteDFe.length > 0) {
|
|
63
|
+
const config = this.environment.getConfig();
|
|
64
|
+
// Processa cada documento retornado
|
|
65
|
+
for (const documento of response.LoteDFe) {
|
|
66
|
+
if (documento.ArquivoXml && documento.ChaveAcesso) {
|
|
67
|
+
try {
|
|
68
|
+
// O ArquivoXml pode estar em dois formatos:
|
|
69
|
+
// 1. Base64 simples → GZip direto
|
|
70
|
+
// 2. Base64 duplo → Base64 → GZip
|
|
71
|
+
let documentoXml;
|
|
72
|
+
try {
|
|
73
|
+
// Tenta primeiro: Base64 simples → GZip direto
|
|
74
|
+
const documentoBuffer = Buffer.from(documento.ArquivoXml, 'base64');
|
|
75
|
+
documentoXml = gunzipSync(documentoBuffer).toString('utf-8');
|
|
76
|
+
}
|
|
77
|
+
catch (gzipError) {
|
|
78
|
+
// Se falhar, tenta: Base64 duplo → Base64 → GZip
|
|
79
|
+
const primeiraDecodificacao = Buffer.from(documento.ArquivoXml, 'base64').toString('utf-8');
|
|
80
|
+
const documentoBuffer = Buffer.from(primeiraDecodificacao, 'base64');
|
|
81
|
+
documentoXml = gunzipSync(documentoBuffer).toString('utf-8');
|
|
82
|
+
}
|
|
83
|
+
// Salva o XML do documento (apenas se estiver configurado)
|
|
84
|
+
// Documentos autorizados devem ser salvos em Autorizacao/NFSe/
|
|
85
|
+
if (config.dfe.armazenarXMLAutorizacao && config.dfe.pathXMLAutorizacao) {
|
|
86
|
+
let fileName;
|
|
87
|
+
let pathCompleto;
|
|
88
|
+
if (documento.TipoDocumento === 'EVENTO' && documento.TipoEvento) {
|
|
89
|
+
// Evento: salva em subpasta do tipo de evento
|
|
90
|
+
const tipoEventoMap = {
|
|
91
|
+
'CANCELAMENTO': 101101,
|
|
92
|
+
'CANCELAMENTO_POR_SUBSTITUICAO': 105102,
|
|
93
|
+
'SOLICITACAO_CANCELAMENTO_ANALISE_FISCAL': 101103,
|
|
94
|
+
'CANCELAMENTO_DEFERIDO_ANALISE_FISCAL': 105104,
|
|
95
|
+
'CANCELAMENTO_INDEFERIDO_ANALISE_FISCAL': 105105,
|
|
96
|
+
'CONFIRMACAO_PRESTADOR': 202201,
|
|
97
|
+
'REJEICAO_PRESTADOR': 202205,
|
|
98
|
+
'CONFIRMACAO_TOMADOR': 203202,
|
|
99
|
+
'REJEICAO_TOMADOR': 203206,
|
|
100
|
+
};
|
|
101
|
+
let tipoEvento;
|
|
102
|
+
if (typeof documento.TipoEvento === 'string') {
|
|
103
|
+
tipoEvento = tipoEventoMap[documento.TipoEvento] || parseInt(documento.TipoEvento, 10) || 101101;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
tipoEvento = documento.TipoEvento;
|
|
107
|
+
}
|
|
108
|
+
const nsu = documento.NSU || 0;
|
|
109
|
+
fileName = `${documento.ChaveAcesso}_evento_${tipoEvento}_${nsu}`;
|
|
110
|
+
pathCompleto = `${config.dfe.pathXMLAutorizacao}/${tipoEvento}`;
|
|
111
|
+
}
|
|
112
|
+
else if (documento.TipoDocumento === 'NFSE') {
|
|
113
|
+
// NFSe: salva na pasta raiz
|
|
114
|
+
fileName = documento.ChaveAcesso;
|
|
115
|
+
pathCompleto = config.dfe.pathXMLAutorizacao;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
// Outro tipo de documento: salva na pasta raiz com prefixo
|
|
119
|
+
const nsu = documento.NSU || 0;
|
|
120
|
+
fileName = `${documento.ChaveAcesso}_${documento.TipoDocumento}_${nsu}`;
|
|
121
|
+
pathCompleto = config.dfe.pathXMLAutorizacao;
|
|
122
|
+
}
|
|
123
|
+
logger.info('Tentando salvar XML do documento de DistribuicaoPorNSU', {
|
|
124
|
+
context: 'NFSeDistribuicaoService',
|
|
125
|
+
fileName: fileName,
|
|
126
|
+
path: pathCompleto,
|
|
127
|
+
tipoDocumento: documento.TipoDocumento,
|
|
128
|
+
tipoEvento: documento.TipoEvento,
|
|
129
|
+
nsu: documento.NSU
|
|
130
|
+
});
|
|
131
|
+
this.utility.salvaXML({
|
|
132
|
+
data: documentoXml,
|
|
133
|
+
fileName: fileName,
|
|
134
|
+
metodo: this.metodo,
|
|
135
|
+
path: pathCompleto,
|
|
136
|
+
});
|
|
137
|
+
logger.info('XML do documento de DistribuicaoPorNSU salvo com sucesso', {
|
|
138
|
+
context: 'NFSeDistribuicaoService',
|
|
139
|
+
fileName: fileName,
|
|
140
|
+
path: pathCompleto,
|
|
141
|
+
tipoDocumento: documento.TipoDocumento
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
logger.error('Erro ao processar XML do documento de DistribuicaoPorNSU', {
|
|
147
|
+
context: 'NFSeDistribuicaoService',
|
|
148
|
+
message: error.message,
|
|
149
|
+
stack: error.stack,
|
|
150
|
+
documento: documento
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return response;
|
|
157
|
+
}
|
|
158
|
+
async EventosPorChave(data) {
|
|
159
|
+
this.metodo = 'NFSe_EventosPorChave';
|
|
160
|
+
const response = await super.Exec(data);
|
|
161
|
+
// Se a resposta contém eventos, processa e salva cada um
|
|
162
|
+
if (response.LoteDFe && Array.isArray(response.LoteDFe) && response.LoteDFe.length > 0) {
|
|
163
|
+
const config = this.environment.getConfig();
|
|
164
|
+
// Processa cada evento retornado
|
|
165
|
+
for (const evento of response.LoteDFe) {
|
|
166
|
+
// Apenas processa eventos (TipoDocumento = 'EVENTO' e TipoEvento presente)
|
|
167
|
+
if (evento.TipoDocumento === 'EVENTO' && evento.TipoEvento) {
|
|
168
|
+
if (evento.ArquivoXml) {
|
|
169
|
+
try {
|
|
170
|
+
// O ArquivoXml pode estar em dois formatos:
|
|
171
|
+
// 1. Base64 simples → GZip direto (EventosPorChave)
|
|
172
|
+
// 2. Base64 duplo → Base64 → GZip (ConsultarEvento)
|
|
173
|
+
let eventoXml;
|
|
174
|
+
try {
|
|
175
|
+
// Tenta primeiro: Base64 simples → GZip direto
|
|
176
|
+
const eventoBuffer = Buffer.from(evento.ArquivoXml, 'base64');
|
|
177
|
+
eventoXml = gunzipSync(eventoBuffer).toString('utf-8');
|
|
178
|
+
}
|
|
179
|
+
catch (gzipError) {
|
|
180
|
+
// Se falhar, tenta: Base64 duplo → Base64 → GZip
|
|
181
|
+
const primeiraDecodificacao = Buffer.from(evento.ArquivoXml, 'base64').toString('utf-8');
|
|
182
|
+
const eventoBuffer = Buffer.from(primeiraDecodificacao, 'base64');
|
|
183
|
+
eventoXml = gunzipSync(eventoBuffer).toString('utf-8');
|
|
184
|
+
}
|
|
185
|
+
// Mapeia o TipoEvento de string para número
|
|
186
|
+
// O TipoEvento vem como string (ex: "CANCELAMENTO") e precisa ser convertido para número (ex: 101101)
|
|
187
|
+
const tipoEventoMap = {
|
|
188
|
+
'CANCELAMENTO': 101101,
|
|
189
|
+
'CANCELAMENTO_POR_SUBSTITUICAO': 105102,
|
|
190
|
+
'SOLICITACAO_CANCELAMENTO_ANALISE_FISCAL': 101103,
|
|
191
|
+
'CANCELAMENTO_DEFERIDO_ANALISE_FISCAL': 105104,
|
|
192
|
+
'CANCELAMENTO_INDEFERIDO_ANALISE_FISCAL': 105105,
|
|
193
|
+
'CONFIRMACAO_PRESTADOR': 202201,
|
|
194
|
+
'REJEICAO_PRESTADOR': 202205,
|
|
195
|
+
'CONFIRMACAO_TOMADOR': 203202,
|
|
196
|
+
'REJEICAO_TOMADOR': 203206,
|
|
197
|
+
};
|
|
198
|
+
// Tenta converter string para número, ou usa o mapeamento
|
|
199
|
+
let tipoEvento;
|
|
200
|
+
if (typeof evento.TipoEvento === 'string') {
|
|
201
|
+
tipoEvento = tipoEventoMap[evento.TipoEvento] || parseInt(evento.TipoEvento, 10) || 101101;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
tipoEvento = evento.TipoEvento;
|
|
205
|
+
}
|
|
206
|
+
// Salva o XML do evento (apenas se estiver configurado)
|
|
207
|
+
// Eventos de NFSe autorizada devem ser salvos em Autorizacao/NFSe/{tipoEvento}/
|
|
208
|
+
if (config.dfe.armazenarXMLAutorizacao && config.dfe.pathXMLAutorizacao && evento.ChaveAcesso) {
|
|
209
|
+
const nsu = evento.NSU || 0;
|
|
210
|
+
const fileName = `${evento.ChaveAcesso}_evento_${tipoEvento}_${nsu}`;
|
|
211
|
+
// Cria o path com a subpasta do tipo de evento em Autorizacao/NFSe
|
|
212
|
+
const pathComTipoEvento = `${config.dfe.pathXMLAutorizacao}/${tipoEvento}`;
|
|
213
|
+
logger.info('Tentando salvar XML do evento de EventosPorChave', {
|
|
214
|
+
context: 'NFSeDistribuicaoService',
|
|
215
|
+
fileName: fileName,
|
|
216
|
+
path: pathComTipoEvento,
|
|
217
|
+
tipoEvento: tipoEvento,
|
|
218
|
+
tipoEventoOriginal: evento.TipoEvento,
|
|
219
|
+
nsu: nsu
|
|
220
|
+
});
|
|
221
|
+
this.utility.salvaXML({
|
|
222
|
+
data: eventoXml,
|
|
223
|
+
fileName: fileName,
|
|
224
|
+
metodo: this.metodo,
|
|
225
|
+
path: pathComTipoEvento,
|
|
226
|
+
});
|
|
227
|
+
logger.info('XML do evento de EventosPorChave salvo com sucesso', {
|
|
228
|
+
context: 'NFSeDistribuicaoService',
|
|
229
|
+
fileName: fileName,
|
|
230
|
+
path: pathComTipoEvento,
|
|
231
|
+
tipoEvento: tipoEvento
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
logger.error('Erro ao processar XML do evento de EventosPorChave', {
|
|
237
|
+
context: 'NFSeDistribuicaoService',
|
|
238
|
+
message: error.message,
|
|
239
|
+
stack: error.stack,
|
|
240
|
+
evento: evento
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return response;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
export default NFSeDistribuicaoService;
|
|
251
|
+
//# sourceMappingURL=NFSeDistribuicaoService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NFSeDistribuicaoService.js","sourceRoot":"","sources":["NFSeDistribuicaoService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAA6C,MAAM,EAAwF,MAAM,kBAAkB,CAAC;AAG3K,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,uBAAwB,SAAQ,QAAQ;IAC1C,YAAY,WAAwB,EAAE,OAAgB,EAAE,UAAsB,EAAE,KAAoB,EAAE,SAAwB,EAAE,aAAgC;QAC5J,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IAClG,CAAC;IAES,aAAa,CAAC,IAAU;QAC9B,OAAO,IAA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