node-sped-nfe 1.1.0 → 1.1.1

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/README.md CHANGED
@@ -37,5 +37,7 @@ Seja bem-vindo(a) à **Biblioteca de Emissão de NF-e** — sua parceira definit
37
37
  ## 📌 Informações
38
38
  Toda a documentação completa com guias, exemplos, status SEFAZ e muito mais está disponível aqui:
39
39
  <div align="center">
40
- [🧾 **Documentação oficial no GitHub**](https://github.com/kalmonv/node-sped-nfe/tree/main/docs)
40
+ <a href="https://github.com/kalmonv/node-sped-nfe/tree/main/docs">
41
+ 🧾 <strong>Documentação oficial no GitHub</strong>
42
+ </a>
41
43
  </div>
@@ -121,13 +121,13 @@ const urlEventos400 = {
121
121
  "NFeConsultaCadastro": "https://nfe.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4"
122
122
  },
123
123
  "homologacao": {
124
- "NFeStatusServico": "https://homolog.sefaz.go.gov.br/nfe/services/NFeStatusServico4",
125
- "NFeAutorizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeAutorizacao4",
126
- "NFeConsultaProtocolo": "https://homolog.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4",
127
- "NFeInutilizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeInutilizacao4",
128
- "NFeRetAutorizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4",
129
- "RecepcaoEvento": "https://homolog.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4",
130
- "NFeConsultaCadastro": "https://homolog.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4"
124
+ "NFeStatusServico": "https://homolog.sefaz.go.gov.br/nfe/services/NFeStatusServico4?wsdl",
125
+ "NFeAutorizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeAutorizacao4?wsdl",
126
+ "NFeConsultaProtocolo": "https://homolog.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4?wsdl",
127
+ "NFeInutilizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeInutilizacao4?wsdl",
128
+ "NFeRetAutorizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4?wsdl",
129
+ "RecepcaoEvento": "https://homolog.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4?wsdl",
130
+ "NFeConsultaCadastro": "https://homolog.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4?wsdl"
131
131
  }
132
132
  },
133
133
  "mod65": {
@@ -255,7 +255,20 @@ const impEstrutura = (imposto) => {
255
255
  };
256
256
  //Configurar valores
257
257
  let configStruct = async (el, struc) => {
258
- return el;
258
+ Object.keys(struc).forEach(key => {
259
+ if (typeof el[key] == "undefined") { //Não foi definido pelo usuario!
260
+ if (struc[key]["@obrig"]) { //Obrigatorio?
261
+ return struc; //Retonar estrutura
262
+ }
263
+ }
264
+ });
265
+ Object.keys(struc).forEach(key => {
266
+ if (typeof el[key]["@next"][`${key}_${el[key].value}`] != "undefined") { //Não foi definido pelo usuario!
267
+ }
268
+ });
269
+ if (el["@next"]) {
270
+ }
271
+ return configStruct(imposto, gStruct);
259
272
  };
260
273
  imposto = configStruct(imposto, gStruct);
261
274
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sped-nfe",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "author": "Kalmon V. Tavares",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -123,13 +123,13 @@ const urlEventos400: { [key: string]: any } = {
123
123
  "NFeConsultaCadastro": "https://nfe.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4"
124
124
  },
125
125
  "homologacao": {
126
- "NFeStatusServico": "https://homolog.sefaz.go.gov.br/nfe/services/NFeStatusServico4",
127
- "NFeAutorizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeAutorizacao4",
128
- "NFeConsultaProtocolo": "https://homolog.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4",
129
- "NFeInutilizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeInutilizacao4",
130
- "NFeRetAutorizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4",
131
- "RecepcaoEvento": "https://homolog.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4",
132
- "NFeConsultaCadastro": "https://homolog.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4"
126
+ "NFeStatusServico": "https://homolog.sefaz.go.gov.br/nfe/services/NFeStatusServico4?wsdl",
127
+ "NFeAutorizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeAutorizacao4?wsdl",
128
+ "NFeConsultaProtocolo": "https://homolog.sefaz.go.gov.br/nfe/services/NFeConsultaProtocolo4?wsdl",
129
+ "NFeInutilizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeInutilizacao4?wsdl",
130
+ "NFeRetAutorizacao": "https://homolog.sefaz.go.gov.br/nfe/services/NFeRetAutorizacao4?wsdl",
131
+ "RecepcaoEvento": "https://homolog.sefaz.go.gov.br/nfe/services/NFeRecepcaoEvento4?wsdl",
132
+ "NFeConsultaCadastro": "https://homolog.sefaz.go.gov.br/nfe/services/CadConsultaCadastro4?wsdl"
133
133
  }
134
134
  },
135
135
  "mod65": {
@@ -273,8 +273,24 @@ const impEstrutura = (imposto: any) => {
273
273
 
274
274
  //Configurar valores
275
275
  let configStruct = async (el: any, struc: any) => {
276
+ Object.keys(struc).forEach(key=>{
277
+ if(typeof el[key] == "undefined"){ //Não foi definido pelo usuario!
278
+ if(struc[key]["@obrig"]){ //Obrigatorio?
279
+ return struc; //Retonar estrutura
280
+ }
281
+ }
282
+ })
283
+
284
+ Object.keys(struc).forEach(key=>{
285
+ if(typeof el[key]["@next"][`${key}_${el[key].value}`] != "undefined"){ //Não foi definido pelo usuario!
286
+
287
+ }
288
+ })
276
289
 
277
- return el;
290
+ if(el["@next"]){
291
+
292
+ }
293
+ return configStruct(imposto, gStruct);
278
294
  };
279
295
 
280
296
  imposto = configStruct(imposto, gStruct)