@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,280 @@
|
|
|
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 { BaseNFe, logger } from '@treeunfe/shared';
|
|
18
|
+
class NFERecepcaoEventoService extends BaseNFe {
|
|
19
|
+
constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
|
|
20
|
+
super(environment, utility, xmlBuilder, 'RecepcaoEvento', axios, saveFiles, gerarConsulta);
|
|
21
|
+
this.tpEvento = '';
|
|
22
|
+
this.modelo = 'NFe';
|
|
23
|
+
this.xmlEventosNacionais = [];
|
|
24
|
+
this.xmlEventosRegionais = [];
|
|
25
|
+
this.xMotivoPorEvento = [];
|
|
26
|
+
console.log('constructor recepcao evento service');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Método para gerar o Id do evento
|
|
30
|
+
*/
|
|
31
|
+
getID(evento) {
|
|
32
|
+
const { tpEvento, chNFe, nSeqEvento } = evento;
|
|
33
|
+
// Validação do tipo do evento (tpEvento)
|
|
34
|
+
if (typeof tpEvento !== 'string' || !/^\d{6}$/.test(tpEvento)) {
|
|
35
|
+
throw new Error('tpEvento deve ser uma string com 6 dígitos.');
|
|
36
|
+
}
|
|
37
|
+
// Validação da chave da NF-e (chNFe)
|
|
38
|
+
if (typeof chNFe !== 'string' || !/^\d{44}$/.test(chNFe)) {
|
|
39
|
+
throw new Error('chNFe deve ser uma string com 44 dígitos.');
|
|
40
|
+
}
|
|
41
|
+
// Validação do número sequencial do evento (nSeqEvento)
|
|
42
|
+
if (!Number.isInteger(nSeqEvento) || nSeqEvento < 1 || nSeqEvento > 99) {
|
|
43
|
+
throw new Error('nSeqEvento deve ser um número entre 1 e 99.');
|
|
44
|
+
}
|
|
45
|
+
// Preenchendo o número sequencial do evento com zeros à esquerda
|
|
46
|
+
const nSeqEventoPadded = nSeqEvento.toString().padStart(2, '0');
|
|
47
|
+
// Construção do ID
|
|
48
|
+
const id = `ID${tpEvento}${chNFe}${nSeqEventoPadded}`;
|
|
49
|
+
// Verificação do comprimento do ID
|
|
50
|
+
if (id.length !== 54) {
|
|
51
|
+
throw new Error('O ID construído não tem 54 caracteres.');
|
|
52
|
+
}
|
|
53
|
+
return id; // Retorna o ID validado
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Verifica se o evento será disparado para o ambiente nacional ou para o estado pré-definido
|
|
57
|
+
*/
|
|
58
|
+
isAmbienteNacional(tpEvento) {
|
|
59
|
+
switch (tpEvento) {
|
|
60
|
+
case '210210':
|
|
61
|
+
return true;
|
|
62
|
+
case '210200':
|
|
63
|
+
return true;
|
|
64
|
+
case '210220':
|
|
65
|
+
return true;
|
|
66
|
+
case '210240':
|
|
67
|
+
return true;
|
|
68
|
+
case '110140':
|
|
69
|
+
return true;
|
|
70
|
+
case '110110':
|
|
71
|
+
return false;
|
|
72
|
+
default:
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Retorna o nome do Evento
|
|
78
|
+
*/
|
|
79
|
+
getTipoEventoName(tpEvento) {
|
|
80
|
+
switch (tpEvento) {
|
|
81
|
+
case '210210':
|
|
82
|
+
return 'Ciência da Operação';
|
|
83
|
+
case '210200':
|
|
84
|
+
return 'Confirmação da Operaçã';
|
|
85
|
+
case '210220':
|
|
86
|
+
return 'Desconhecimento da Operação';
|
|
87
|
+
case '210240':
|
|
88
|
+
return 'Operação não Realizada';
|
|
89
|
+
case '110110':
|
|
90
|
+
return 'Carta de Correção';
|
|
91
|
+
case '110111':
|
|
92
|
+
return 'Cancelamento';
|
|
93
|
+
case '110140':
|
|
94
|
+
return 'EPEC';
|
|
95
|
+
default:
|
|
96
|
+
return 'Desconhecido';
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
separaEventosPorAmbiente(evento) {
|
|
100
|
+
logger.info('Dividindo eventos por ambiente', {
|
|
101
|
+
context: 'NFERecepcaoEventoService',
|
|
102
|
+
});
|
|
103
|
+
const nacional = evento.filter(event => ['210210', '210200', '210220', '210240', '110140'].includes(event.tpEvento));
|
|
104
|
+
const regional = evento.filter(event => !['210210', '210200', '210220', '210240', '110140'].includes(event.tpEvento));
|
|
105
|
+
return { nacional, regional };
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Criação do XML
|
|
109
|
+
*/
|
|
110
|
+
gerarXmlRecepcaoEvento(evento, idLote, ambienteNacional) {
|
|
111
|
+
const { nfe: { ambiente, versaoDF }, dfe: { UF } } = this.environment.getConfig();
|
|
112
|
+
for (let i = 0; i < evento.length; i++) {
|
|
113
|
+
const eventoProps = evento[i];
|
|
114
|
+
const { tpAmb, cOrgao, tpEvento, chNFe, nSeqEvento, CNPJ, CPF, detEvento, dhEvento, verEvento } = eventoProps;
|
|
115
|
+
const idEvento = this.getID(eventoProps);
|
|
116
|
+
// const ambienteNacional = this.isAmbienteNacional(tpEvento);
|
|
117
|
+
const orgao = ambienteNacional ? 91 : cOrgao;
|
|
118
|
+
this.tpEvento = tpEvento;
|
|
119
|
+
// XML parte 1
|
|
120
|
+
const eventoObject = {
|
|
121
|
+
$: {
|
|
122
|
+
versao: "1.00",
|
|
123
|
+
xmlns: 'http://www.portalfiscal.inf.br/nfe'
|
|
124
|
+
},
|
|
125
|
+
infEvento: {
|
|
126
|
+
$: {
|
|
127
|
+
Id: idEvento,
|
|
128
|
+
},
|
|
129
|
+
cOrgao: orgao,
|
|
130
|
+
tpAmb: ambiente,
|
|
131
|
+
...(CNPJ ? { CNPJ } : { CPF }),
|
|
132
|
+
chNFe: chNFe,
|
|
133
|
+
dhEvento: dhEvento,
|
|
134
|
+
tpEvento: tpEvento,
|
|
135
|
+
nSeqEvento: nSeqEvento,
|
|
136
|
+
verEvento: verEvento,
|
|
137
|
+
detEvento: {
|
|
138
|
+
$: {
|
|
139
|
+
versao: "1.00",
|
|
140
|
+
},
|
|
141
|
+
...detEvento,
|
|
142
|
+
},
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
// Gera primeira parte do XML
|
|
146
|
+
const eventoXML = this.xmlBuilder.gerarXml(eventoObject, 'evento', this.metodo);
|
|
147
|
+
const xmlAssinado = this.xmlBuilder.assinarXML(eventoXML, 'infEvento');
|
|
148
|
+
if (ambienteNacional) {
|
|
149
|
+
this.xmlEventosNacionais.push(xmlAssinado);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
this.xmlEventosRegionais.push(xmlAssinado);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
// XML parte 2
|
|
156
|
+
const envEvento = {
|
|
157
|
+
$: {
|
|
158
|
+
versao: "1.00",
|
|
159
|
+
xmlns: 'http://www.portalfiscal.inf.br/nfe'
|
|
160
|
+
},
|
|
161
|
+
idLote,
|
|
162
|
+
_: '[XML]'
|
|
163
|
+
};
|
|
164
|
+
// Gera Segunda parte do XML
|
|
165
|
+
const xml = this.xmlBuilder.gerarXml(envEvento, 'envEvento', this.metodo);
|
|
166
|
+
if (ambienteNacional) {
|
|
167
|
+
return xml.replace('[XML]', this.xmlEventosNacionais.join(''));
|
|
168
|
+
}
|
|
169
|
+
return xml.replace('[XML]', this.xmlEventosRegionais.join(''));
|
|
170
|
+
}
|
|
171
|
+
trataRetorno(responseInJson) {
|
|
172
|
+
logger.info('Tratando retorno dos eventos', {
|
|
173
|
+
context: 'NFERecepcaoEventoService',
|
|
174
|
+
});
|
|
175
|
+
const retornoEventos = this.utility.findInObj(responseInJson, 'retEvento');
|
|
176
|
+
if (retornoEventos instanceof Array) {
|
|
177
|
+
for (let i = 0; i < retornoEventos.length; i++) {
|
|
178
|
+
const chNFe = retornoEventos[i].infEvento.chNFe;
|
|
179
|
+
const xMotivo = retornoEventos[i].infEvento.xMotivo;
|
|
180
|
+
const cStat = retornoEventos[i].infEvento.cStat;
|
|
181
|
+
const tipoEvento = this.getTipoEventoName(retornoEventos[i].infEvento.tpEvento);
|
|
182
|
+
this.xMotivoPorEvento.push({
|
|
183
|
+
chNFe,
|
|
184
|
+
xMotivo,
|
|
185
|
+
cStat,
|
|
186
|
+
tipoEvento
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
return this.xMotivoPorEvento;
|
|
190
|
+
}
|
|
191
|
+
const chNFe = retornoEventos.infEvento.chNFe;
|
|
192
|
+
const xMotivo = retornoEventos.infEvento.xMotivo;
|
|
193
|
+
const cStat = retornoEventos.infEvento.cStat;
|
|
194
|
+
const tipoEvento = this.getTipoEventoName(retornoEventos.infEvento.tpEvento);
|
|
195
|
+
this.xMotivoPorEvento.push({
|
|
196
|
+
chNFe,
|
|
197
|
+
xMotivo,
|
|
198
|
+
cStat,
|
|
199
|
+
tipoEvento
|
|
200
|
+
});
|
|
201
|
+
return this.xMotivoPorEvento;
|
|
202
|
+
}
|
|
203
|
+
async callWebService(xmlConsulta, webServiceUrl, ContentType, action, agent) {
|
|
204
|
+
const startTime = Date.now();
|
|
205
|
+
const headers = {
|
|
206
|
+
'Content-Type': ContentType,
|
|
207
|
+
'SOAPAction': action,
|
|
208
|
+
};
|
|
209
|
+
logger.http('Iniciando comunicação com o webservice', {
|
|
210
|
+
context: `BaseNFe`,
|
|
211
|
+
method: this.metodo,
|
|
212
|
+
url: webServiceUrl,
|
|
213
|
+
action,
|
|
214
|
+
headers,
|
|
215
|
+
});
|
|
216
|
+
const response = await this.axios.post(webServiceUrl, xmlConsulta, {
|
|
217
|
+
headers,
|
|
218
|
+
httpsAgent: agent
|
|
219
|
+
});
|
|
220
|
+
const duration = Date.now() - startTime;
|
|
221
|
+
logger.http('Comunicação concluída com sucesso', {
|
|
222
|
+
context: `BaseNFe`,
|
|
223
|
+
method: this.metodo,
|
|
224
|
+
duration: `${duration}ms`,
|
|
225
|
+
responseSize: response.data ? JSON.stringify(response.data).length : 0
|
|
226
|
+
});
|
|
227
|
+
return response;
|
|
228
|
+
}
|
|
229
|
+
async enviaEvento(evento, idLote, tipoAmbiente) {
|
|
230
|
+
let xmlConsulta = '';
|
|
231
|
+
let xmlConsultaSoap = '';
|
|
232
|
+
let webServiceUrlTmp = '';
|
|
233
|
+
const ContentType = this.setContentType();
|
|
234
|
+
const ambienteNacional = tipoAmbiente === 0 ? true : false;
|
|
235
|
+
try {
|
|
236
|
+
// Gerando XML para consulta de Status do Serviço
|
|
237
|
+
xmlConsulta = this.gerarXmlRecepcaoEvento(evento, idLote, ambienteNacional);
|
|
238
|
+
const { xmlFormated, agent, webServiceUrl, action } = await this.gerarConsulta.gerarConsulta(xmlConsulta, this.metodo, ambienteNacional || this.isAmbienteNacional(this.tpEvento), '', this.modelo);
|
|
239
|
+
xmlConsultaSoap = xmlFormated;
|
|
240
|
+
webServiceUrlTmp = webServiceUrl;
|
|
241
|
+
const xmlRetorno = await this.callWebService(xmlFormated, webServiceUrl, ContentType, action, agent);
|
|
242
|
+
return xmlRetorno.data;
|
|
243
|
+
}
|
|
244
|
+
finally {
|
|
245
|
+
// Salva XML de Consulta
|
|
246
|
+
const fileName = ambienteNacional ? 'RecepcaoEvento[Nacional]-consulta' : 'RecepcaoEvento[Regional]-consulta';
|
|
247
|
+
this.utility.salvaConsulta(xmlConsulta, xmlConsultaSoap, this.metodo, fileName);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
async Exec(data) {
|
|
251
|
+
const { evento, idLote, modelo } = data;
|
|
252
|
+
const { nacional, regional } = this.separaEventosPorAmbiente(evento);
|
|
253
|
+
if (modelo === '65')
|
|
254
|
+
this.modelo = 'NFCe';
|
|
255
|
+
// Enviar eventos ambiente nacional e regional separadamente
|
|
256
|
+
let responseNacionalInJson, responseRegionalInJson = null;
|
|
257
|
+
let finalResponseInJson = [];
|
|
258
|
+
if (nacional.length > 0) {
|
|
259
|
+
const retornoNacional = await this.enviaEvento(nacional, idLote, 0);
|
|
260
|
+
responseNacionalInJson = this.utility.verificaRejeicao(retornoNacional, this.metodo);
|
|
261
|
+
this.utility.salvaRetorno(retornoNacional, responseNacionalInJson, this.metodo, 'RecepcaoEvento[Nacional]-retorno');
|
|
262
|
+
this.trataRetorno(responseNacionalInJson);
|
|
263
|
+
finalResponseInJson.push(responseNacionalInJson);
|
|
264
|
+
}
|
|
265
|
+
if (regional.length > 0) {
|
|
266
|
+
const retornoRegional = await this.enviaEvento(regional, idLote, 1);
|
|
267
|
+
responseRegionalInJson = this.utility.verificaRejeicao(retornoRegional, this.metodo);
|
|
268
|
+
this.utility.salvaRetorno(retornoRegional, responseRegionalInJson, this.metodo, 'RecepcaoEvento[Regional]-retorno');
|
|
269
|
+
this.trataRetorno(responseRegionalInJson);
|
|
270
|
+
finalResponseInJson.push(responseRegionalInJson);
|
|
271
|
+
}
|
|
272
|
+
return {
|
|
273
|
+
success: true,
|
|
274
|
+
xMotivos: this.xMotivoPorEvento,
|
|
275
|
+
response: finalResponseInJson,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
export default NFERecepcaoEventoService;
|
|
280
|
+
//# sourceMappingURL=NFERecepcaoEventoService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NFERecepcaoEventoService.js","sourceRoot":"","sources":["NFERecepcaoEventoService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAoC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAMrF,MAAM,wBAAyB,SAAQ,OAAO;IAO1C,YAAY,WAAwB,EAAE,OAAgB,EAAE,UAAsB,EAAE,KAAoB,EAAE,SAAwB,EAAE,aAAgC;QAC5J,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAC3F,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC;QAC9B,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC;QAC9B,IAAI,C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1,48 @@
|
|
|
1
|
+
import { XmlBuilder, BaseNFe, Environment, Utility } from '@treeunfe/shared';
|
|
2
|
+
import { GerarConsultaImpl, NFERetornoAutorizacaoServiceImpl, SaveFilesImpl } from '@treeunfe/types/interfaces';
|
|
3
|
+
import { ProtNFe } from '@treeunfe/types';
|
|
4
|
+
import { AxiosInstance } from 'axios';
|
|
5
|
+
declare class NFERetornoAutorizacaoService extends BaseNFe implements NFERetornoAutorizacaoServiceImpl {
|
|
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
|
+
private getXmlRetornoAutorizacao;
|
|
28
|
+
/**
|
|
29
|
+
* Retorna o XML completo da Autorização (já com o protocolo de autorização)
|
|
30
|
+
*
|
|
31
|
+
* @param {number} tipoEmissao - Informa se o tipo emissão foi síncrona ou assíncrona (0- Não / 1 - Sim).
|
|
32
|
+
* @param {string | undefined} nRec - Número do recibo retornado pela SEFAZ ao emitir uma NFe em modo assíncrono.
|
|
33
|
+
* @param {ProtNFe | undefined} protNFe - Tag protNFe do XML em formato JSON.
|
|
34
|
+
* @param {string[]} xmlNFe - Array contendo as NFe do lote enviado à SEFAZ.
|
|
35
|
+
* @returns {Promise<string>} XML completo da NFe (já com protocolo de autorização).
|
|
36
|
+
*/
|
|
37
|
+
getXmlRetorno({ tipoEmissao, nRec, protNFe, xmlNFe }: {
|
|
38
|
+
tipoEmissao: number;
|
|
39
|
+
nRec?: string;
|
|
40
|
+
protNFe?: ProtNFe[];
|
|
41
|
+
xmlNFe: string[];
|
|
42
|
+
}): Promise<{
|
|
43
|
+
success: boolean;
|
|
44
|
+
message: any;
|
|
45
|
+
data: string[];
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
48
|
+
export default NFERetornoAutorizacaoService;
|
|
@@ -0,0 +1,150 @@
|
|
|
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 { BaseNFe } from '@treeunfe/shared';
|
|
18
|
+
class NFERetornoAutorizacaoService extends BaseNFe {
|
|
19
|
+
constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
|
|
20
|
+
super(environment, utility, xmlBuilder, 'NFERetAutorizacao', axios, saveFiles, gerarConsulta);
|
|
21
|
+
}
|
|
22
|
+
gerarXml(data) {
|
|
23
|
+
const { nfe: { ambiente } } = this.environment.getConfig();
|
|
24
|
+
const xmlObject = {
|
|
25
|
+
$: {
|
|
26
|
+
xmlns: 'http://www.portalfiscal.inf.br/nfe',
|
|
27
|
+
versao: "4.00",
|
|
28
|
+
},
|
|
29
|
+
tpAmb: ambiente,
|
|
30
|
+
nRec: data
|
|
31
|
+
};
|
|
32
|
+
return this.xmlBuilder.gerarXml(xmlObject, 'consReciNFe', this.metodo);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Busca o retorno da Autorização pelo número do recibo (nRec)
|
|
36
|
+
*
|
|
37
|
+
* @param {string} nRec - Número do recibo retornado pela SEFAZ ao emitir uma NFe em modo assíncrono.
|
|
38
|
+
* @param {any} 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
|
+
async getRetornoRecibo(nRec, xmlNFe) {
|
|
42
|
+
// try {
|
|
43
|
+
/**
|
|
44
|
+
* Gera o XML para consulta de acordo com o número do recibo da emissão (nRec)
|
|
45
|
+
*/
|
|
46
|
+
const xmlConsulta = this.gerarXml(nRec);
|
|
47
|
+
const { xmlFormated, agent, webServiceUrl, action } = await this.gerarConsulta.gerarConsulta(xmlConsulta, this.metodo);
|
|
48
|
+
// Salva XML de Consulta
|
|
49
|
+
this.utility.salvaConsulta(xmlConsulta, xmlFormated, this.metodo);
|
|
50
|
+
// Efetua requisição para o webservice NFEStatusServico
|
|
51
|
+
const xmlRetorno = await this.axios.post(webServiceUrl, xmlFormated, {
|
|
52
|
+
headers: {
|
|
53
|
+
'Content-Type': this.setContentType(),
|
|
54
|
+
'SOAPAction': action,
|
|
55
|
+
},
|
|
56
|
+
httpsAgent: agent
|
|
57
|
+
});
|
|
58
|
+
const responseInJson = this.utility.verificaRejeicao(xmlRetorno.data, this.metodo);
|
|
59
|
+
// Salva XML de Retorno
|
|
60
|
+
this.utility.salvaRetorno(xmlRetorno.data, responseInJson, this.metodo);
|
|
61
|
+
const { protNFe } = this.utility.getProtNFe(xmlRetorno.data);
|
|
62
|
+
if (!protNFe) {
|
|
63
|
+
throw new Error(`Não foi possível encontrar a tag 'protNFe'. Talvez a NFe ainda não tenha sido processada.`);
|
|
64
|
+
}
|
|
65
|
+
return this.getXmlRetornoAutorizacao(protNFe, xmlNFe);
|
|
66
|
+
// } catch (error: any) {
|
|
67
|
+
// throw new Error(error.message)
|
|
68
|
+
// }
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Agrega o protNFe ao restante da NFe gerada na emissão.
|
|
72
|
+
*
|
|
73
|
+
* @param {string} protNFe - Tag protNFe do XML em formato JSON.
|
|
74
|
+
* @param {any} xmlNFe - Array contendo as NFe do lote enviado à SEFAZ.
|
|
75
|
+
* @returns {} XML completo da NFe (já com protocolo de autorização).
|
|
76
|
+
*/
|
|
77
|
+
getXmlRetornoAutorizacao(protNFe, xmlNFe) {
|
|
78
|
+
// try {
|
|
79
|
+
/**
|
|
80
|
+
* Cria o Obj base da NFe já processada (nfeProc)
|
|
81
|
+
*/
|
|
82
|
+
const XMLs = [];
|
|
83
|
+
for (let i = 0; i < protNFe.length; i++) {
|
|
84
|
+
const baseXML = {
|
|
85
|
+
$: {
|
|
86
|
+
versao: "4.00",
|
|
87
|
+
xmlns: 'http://www.portalfiscal.inf.br/nfe'
|
|
88
|
+
},
|
|
89
|
+
_: '[XML]'
|
|
90
|
+
};
|
|
91
|
+
let xml = this.xmlBuilder.gerarXml(baseXML, 'nfeProc', this.metodo);
|
|
92
|
+
/**
|
|
93
|
+
* Converte a tag protNFe do formato JSON para XML e armazena na string protTag.
|
|
94
|
+
* Adiciona a tag protNFe (armazenada na string protTag) ao array contendo os dados das NFe.
|
|
95
|
+
*/
|
|
96
|
+
// Expressão regular para capturar o valor do atributo Id
|
|
97
|
+
const formatedProtNFe = protNFe;
|
|
98
|
+
const xmlCompleto = xmlNFe.find((item) => item.indexOf(formatedProtNFe[i].infProt[0].chNFe[0]) !== -1);
|
|
99
|
+
if (xmlCompleto) {
|
|
100
|
+
const protTag = this.xmlBuilder.gerarXml(protNFe[i], 'protNFe', this.metodo);
|
|
101
|
+
const xmlFinal = [xmlCompleto];
|
|
102
|
+
xmlFinal.push(protTag);
|
|
103
|
+
/**
|
|
104
|
+
* Substitui o "[XML]" com as tags NFe e a tag protNFe
|
|
105
|
+
*/
|
|
106
|
+
xml = xml.replace('[XML]', xmlFinal.join(''));
|
|
107
|
+
xml = `<?xml version="1.0" encoding="UTF-8"?>${xml}`;
|
|
108
|
+
XMLs.push(xml);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
success: true,
|
|
113
|
+
message: 'xMotivo',
|
|
114
|
+
data: XMLs
|
|
115
|
+
};
|
|
116
|
+
// } catch (error: any) {
|
|
117
|
+
// throw new Error(error.message)
|
|
118
|
+
// }
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Retorna o XML completo da Autorização (já com o protocolo de autorização)
|
|
122
|
+
*
|
|
123
|
+
* @param {number} tipoEmissao - Informa se o tipo emissão foi síncrona ou assíncrona (0- Não / 1 - Sim).
|
|
124
|
+
* @param {string | undefined} nRec - Número do recibo retornado pela SEFAZ ao emitir uma NFe em modo assíncrono.
|
|
125
|
+
* @param {ProtNFe | undefined} protNFe - Tag protNFe do XML em formato JSON.
|
|
126
|
+
* @param {string[]} xmlNFe - Array contendo as NFe do lote enviado à SEFAZ.
|
|
127
|
+
* @returns {Promise<string>} XML completo da NFe (já com protocolo de autorização).
|
|
128
|
+
*/
|
|
129
|
+
async getXmlRetorno({ tipoEmissao, nRec, protNFe, xmlNFe }) {
|
|
130
|
+
// try {
|
|
131
|
+
/**
|
|
132
|
+
* Trata retorno Síncrono
|
|
133
|
+
*/
|
|
134
|
+
if (tipoEmissao === 1 && protNFe) {
|
|
135
|
+
return this.getXmlRetornoAutorizacao(protNFe, xmlNFe);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Trata retorno Assíncrono
|
|
139
|
+
*/
|
|
140
|
+
if (tipoEmissao === 0 && nRec) {
|
|
141
|
+
return this.getRetornoRecibo(nRec, xmlNFe);
|
|
142
|
+
}
|
|
143
|
+
throw new Error('Não foi possível buscar o retorno da autorização.');
|
|
144
|
+
// } catch (error: any) {
|
|
145
|
+
// throw new Error(error.message)
|
|
146
|
+
// }
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
export default NFERetornoAutorizacaoService;
|
|
150
|
+
//# sourceMappingURL=NFERetornoAutorizacaoService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NFERetornoAutorizacaoService.js","sourceRoot":"","sources":["NFERetornoAutorizacaoService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAc,OAAO,EAAwB,MAAM,kBAAkB,CAAC;AAK7E,MAAM,4BAA6B,SAAQ,OAAO;IAC9C,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,QAAQ,CAAC,IAAY;QAC3B,MAAM,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;QAE3D,MAAM,SAAS,GAAG;YACd,CAAC,EAAE;gBACC,KAAK,EAAE,oCAAoC;gBAC3C,MAAM,EAAE,MAAM;aACjB;YACD,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,IAAI;SACb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,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC9C,GAAG,GAAG,yCAAyC,GAAG,EAAE,CAAC;gBAErD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YAClB,CAAC;QACL,CAAC;QACD,OAAO;YACH,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,IAAI;SACb,CAAA;QACD,yBAAyB;QACzB,qCAAqC;QACrC,IAAI;IAER,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,aAAa,CAAC,EAChB,WAAW,EACX,IAAI,EACJ,OAAO,EACP,MAAM,EAMT;QAKG,QAAQ;QAER;;WAEG;QACH,IAAI,WAAW,KAAK,CAAC,IAAI,OAAO,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC1D,CAAC;QAED;;WAEG;QACH,IAAI,WAAW,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QAErE,yBAAyB;QACzB,qCAAqC;QACrC,IAAI;IACR,CAAC;CACJ;AAED,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { XmlBuilder, BaseNFe, Environment, Utility } from '@treeunfe/shared';
|
|
2
|
+
import { GerarConsultaImpl, NFEStatusServicoServiceImpl, SaveFilesImpl } from '@treeunfe/types/interfaces';
|
|
3
|
+
import { AxiosInstance } from 'axios';
|
|
4
|
+
declare class NFEStatusServicoService extends BaseNFe implements NFEStatusServicoServiceImpl {
|
|
5
|
+
constructor(environment: Environment, utility: Utility, xmlBuilder: XmlBuilder, axios: AxiosInstance, saveFiles: SaveFilesImpl, gerarConsulta: GerarConsultaImpl);
|
|
6
|
+
protected gerarXml(): string;
|
|
7
|
+
}
|
|
8
|
+
export default NFEStatusServicoService;
|
|
@@ -0,0 +1,41 @@
|
|
|
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, getCodIBGE } from '@treeunfe/shared';
|
|
18
|
+
const METHOD_NAME = 'NFEStatusServico';
|
|
19
|
+
class NFEStatusServicoService extends BaseNFe {
|
|
20
|
+
constructor(environment, utility, xmlBuilder, axios, saveFiles, gerarConsulta) {
|
|
21
|
+
super(environment, utility, xmlBuilder, METHOD_NAME, axios, saveFiles, gerarConsulta);
|
|
22
|
+
}
|
|
23
|
+
gerarXml() {
|
|
24
|
+
logger.info('Montando estrutuda do XML em JSON', {
|
|
25
|
+
context: 'NFEStatusServicoService',
|
|
26
|
+
});
|
|
27
|
+
const { nfe: { ambiente, versaoDF }, dfe: { UF } } = this.environment.getConfig();
|
|
28
|
+
const xmlObject = {
|
|
29
|
+
$: {
|
|
30
|
+
versao: versaoDF,
|
|
31
|
+
xmlns: 'http://www.portalfiscal.inf.br/nfe'
|
|
32
|
+
},
|
|
33
|
+
tpAmb: ambiente,
|
|
34
|
+
cUF: getCodIBGE(UF),
|
|
35
|
+
xServ: 'STATUS',
|
|
36
|
+
};
|
|
37
|
+
return this.xmlBuilder.gerarXml(xmlObject, 'consStatServ', this.metodo);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export default NFEStatusServicoService;
|
|
41
|
+
//# sourceMappingURL=NFEStatusServicoService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NFEStatusServicoService.js","sourceRoot":"","sources":["NFEStatusServicoService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAc,MAAM,EAAE,OAAO,EAAwB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAIjG,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAEvC,MAAM,uBAAwB,SAAQ,OAAO;IACzC,YAAY,WAAwB,EAAE,OAAgB,EAAE,UAAsB,EAAE,KAAoB,EAAE,SAAwB,EAAE,aAAgC;QAC5J,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IAC1F,CAAC;IAES,QAAQ;QACd,MAAM,CAAC,IAAI,CAAC,mCAAmC,EAAE;YAC7C,OAAO,EAAE,yBAAyB;SACrC,CAAC,CAAC;QACH,MAAM,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;QAElF,MAAM,SAAS,GAAG;YACd,CAAC,EAAE;gBACC,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,oCAAoC;aAC9C;YACD,KAAK,EAAE,QAAQ;YACf,GAAG,EAAE,UAAU,CAAC,EAAE,CAAC;YACnB,KAAK,EAAE,QAAQ;SAClB,CAAA;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,EAAE,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAE3E,CAAC;CACJ;AAED,eAAe,uBAAuB,CAAC"}
|