node-sped-nfe 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +34 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +3 -0
  4. package/dist/tsconfig.tsbuildinfo +1 -0
  5. package/dist/utils/eventos.d.ts +4 -0
  6. package/{utils → dist/utils}/eventos.js +30 -32
  7. package/dist/utils/make.d.ts +81 -0
  8. package/dist/utils/make.js +682 -0
  9. package/dist/utils/sefaz.d.ts +1 -0
  10. package/dist/utils/sefaz.js +64 -0
  11. package/dist/utils/tools.d.ts +20 -0
  12. package/dist/utils/tools.js +283 -0
  13. package/dist/utils/xmllint.d.ts +4 -0
  14. package/dist/utils/xmllint.js +234520 -0
  15. package/package.json +24 -8
  16. package/saida.txt +0 -0
  17. package/{index.js → src/index.ts} +4 -5
  18. package/src/utils/eventos.ts +32 -0
  19. package/{utils/make.js → src/utils/make.ts} +77 -93
  20. package/src/utils/schemas/consReciNFe_v4.00.xsd +9 -0
  21. package/src/utils/schemas/consSitNFe_v4.00.xsd +9 -0
  22. package/src/utils/schemas/consStatServ_v4.00.xsd +9 -0
  23. package/src/utils/schemas/enviNFe_v4.00.xsd +9 -0
  24. package/src/utils/schemas/inutNFe_v4.00.xsd +9 -0
  25. package/src/utils/schemas/leiauteConsSitNFe_v4.00.xsd +502 -0
  26. package/src/utils/schemas/leiauteConsStatServ_v4.00.xsd +98 -0
  27. package/src/utils/schemas/leiauteInutNFe_v4.00.xsd +193 -0
  28. package/src/utils/schemas/leiauteNFe_v4.00.xsd +7412 -0
  29. package/src/utils/schemas/nfe_v4.00.xsd +9 -0
  30. package/src/utils/schemas/procInutNFe_v4.00.xsd +9 -0
  31. package/src/utils/schemas/procNFe_v4.00.xsd +9 -0
  32. package/src/utils/schemas/retConsReciNFe_v4.00.xsd +9 -0
  33. package/src/utils/schemas/retConsSitNFe_v4.00.xsd +9 -0
  34. package/src/utils/schemas/retConsStatServ_v4.00.xsd +9 -0
  35. package/src/utils/schemas/retEnviNFe_v4.00.xsd +9 -0
  36. package/src/utils/schemas/retInutNFe_v4.00.xsd +9 -0
  37. package/src/utils/schemas/tiposBasico_v4.00.xsd +598 -0
  38. package/src/utils/schemas/xmldsig-core-schema_v1.01.xsd +98 -0
  39. package/{utils/tools.js → src/utils/tools.ts} +70 -35
  40. package/testes/nfe.js +3 -3
  41. package/tsconfig.json +16 -0
  42. package/testes/nfe.xml +0 -292
  43. package/testes/nfe_guara.xml +0 -1
  44. package/testes/nfe_guara_sign.xml +0 -1
  45. package/testes/nfe_guara_sign_lote.xml +0 -1
  46. package/utils/sefaz.js +0 -84
  47. package/utils/xmllint.js +0 -244195
  48. /package/{utils/schemas → schemas}/consReciNFe_v4.00.xsd +0 -0
  49. /package/{utils/schemas → schemas}/consSitNFe_v4.00.xsd +0 -0
  50. /package/{utils/schemas → schemas}/consStatServ_v4.00.xsd +0 -0
  51. /package/{utils/schemas → schemas}/enviNFe_v4.00.xsd +0 -0
  52. /package/{utils/schemas → schemas}/inutNFe_v4.00.xsd +0 -0
  53. /package/{utils/schemas → schemas}/leiauteConsSitNFe_v4.00.xsd +0 -0
  54. /package/{utils/schemas → schemas}/leiauteConsStatServ_v4.00.xsd +0 -0
  55. /package/{utils/schemas → schemas}/leiauteInutNFe_v4.00.xsd +0 -0
  56. /package/{utils/schemas → schemas}/leiauteNFe_v4.00.xsd +0 -0
  57. /package/{utils/schemas → schemas}/nfe_v4.00.xsd +0 -0
  58. /package/{utils/schemas → schemas}/procInutNFe_v4.00.xsd +0 -0
  59. /package/{utils/schemas → schemas}/procNFe_v4.00.xsd +0 -0
  60. /package/{utils/schemas → schemas}/retConsReciNFe_v4.00.xsd +0 -0
  61. /package/{utils/schemas → schemas}/retConsSitNFe_v4.00.xsd +0 -0
  62. /package/{utils/schemas → schemas}/retConsStatServ_v4.00.xsd +0 -0
  63. /package/{utils/schemas → schemas}/retEnviNFe_v4.00.xsd +0 -0
  64. /package/{utils/schemas → schemas}/retInutNFe_v4.00.xsd +0 -0
  65. /package/{utils/schemas → schemas}/tiposBasico_v4.00.xsd +0 -0
  66. /package/{utils/schemas → schemas}/xmldsig-core-schema_v1.01.xsd +0 -0
package/package.json CHANGED
@@ -1,17 +1,33 @@
1
1
  {
2
2
  "name": "node-sped-nfe",
3
- "version": "1.0.1",
4
- "main": "index.js",
3
+ "version": "1.0.3",
4
+ "author": "Kalmon V. Tavares",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
5
15
  "scripts": {
6
- "teste": "set NODE_OPTIONS='--openssl-legacy-provider' && node testes/nfe.js"
16
+ "build": "tsc > saida.txt",
17
+ "test:nfe": "node testes/nfe.js"
18
+ },
19
+ "devDependencies": {
20
+ "@types/axios": "^0.9.36",
21
+ "@types/node": "^22.14.0",
22
+ "@types/node-forge": "^1.3.11",
23
+ "@types/pem": "^1.14.4",
24
+ "@types/tmp": "^0.2.6",
25
+ "typescript": "^5.0.0"
7
26
  },
8
- "author": "",
9
- "type": "module",
10
- "license": "ISC",
11
- "description": "",
12
27
  "dependencies": {
13
28
  "crypto": "^1.0.1",
14
29
  "fast-xml-parser": "^4.5.1",
30
+ "node-forge": "^1.3.1",
15
31
  "pem": "^1.14.8",
16
32
  "tmp": "^0.2.3",
17
33
  "xml-crypto": "^6.0.0"
@@ -20,4 +36,4 @@
20
36
  "type": "git",
21
37
  "url": "https://github.com/kalmonv/node-sped-nfe.git"
22
38
  }
23
- }
39
+ }
package/saida.txt ADDED
File without changes
@@ -1,5 +1,4 @@
1
- import { Tools } from "./utils/tools.js"
2
- import { Make } from "./utils/make.js"
3
-
4
- export { Make, Tools }
5
- export default { Make, Tools }
1
+ import { Tools } from "./utils/tools.js"
2
+ import { Make } from "./utils/make.js"
3
+
4
+ export { Tools, Make }
@@ -0,0 +1,32 @@
1
+ /*
2
+ NFe Producao: https://www.nfe.fazenda.gov.br/portal/webservices.aspx
3
+ NFe Homologacao: https://hom.nfe.fazenda.gov.br/portal/webServices.aspx
4
+ */
5
+ const urlServicos: { [key: string]: any } = {
6
+ "51": {
7
+ "nome": "Mato Grosso",
8
+ "mod_65": {
9
+ "NFeAutorizacao": {
10
+ "producao": "https://nfce.sefaz.mt.gov.br/nfcews/services/NfeAutorizacao4",
11
+ "homologacao": "https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeAutorizacao4"
12
+ },
13
+ "NfeStatusServico": {
14
+ "producao": "https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeStatusServico4?wsdl",
15
+ "homologacao": "https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeStatusServico4?wsdl"
16
+ }
17
+ },
18
+ "mod_55": {
19
+ "NFeAutorizacao": {
20
+ "producao": "https://nfe.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao4",
21
+ "homologacao": "https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeAutorizacao4"
22
+ },
23
+ "NfeStatusServico": {
24
+ "producao": "https://nfce.sefaz.mt.gov.br/nfcews/services/NfeStatusServico4",
25
+ "homologacao": "https://homologacao.sefaz.mt.gov.br/nfcews/services/NfeStatusServico4"
26
+ },
27
+
28
+ },
29
+ }
30
+ };
31
+
32
+ export { urlServicos }
@@ -3,13 +3,16 @@ import { XMLParser, XMLBuilder, XMLValidator } from "fast-xml-parser";
3
3
 
4
4
  //Classe da nota fiscal
5
5
  class Make {
6
- #NFe = {
7
- "@xmlns": "http://www.portalfiscal.inf.br/nfe",
8
- infNFe: {
6
+ #NFe: {
7
+ [key: string]: any;
8
+ infNFe: { [key: string]: any }
9
+ } = {
9
10
  "@xmlns": "http://www.portalfiscal.inf.br/nfe",
10
- }
11
- };
12
- #ICMSTot = {
11
+ infNFe: {
12
+ "@xmlns": "http://www.portalfiscal.inf.br/nfe",
13
+ }
14
+ };
15
+ #ICMSTot: Record<string, number> = {
13
16
  vBC: 0,
14
17
  vICMS: 0,
15
18
  vICMSDeson: 0,
@@ -44,40 +47,40 @@ class Make {
44
47
  }
45
48
 
46
49
  //Optativa
47
- tagInfNFe(obj) {
50
+ tagInfNFe(obj: any) {
48
51
  Object.keys(obj).forEach(key => {
49
52
  this.#NFe.infNFe[`@${key}`] = obj[key];
50
53
  });
51
54
  }
52
55
 
53
- tagIde(obj) {
56
+ tagIde(obj: any) {
54
57
  this.#NFe.infNFe.ide = new Object();
55
58
  Object.keys(obj).forEach(key => {
56
59
  this.#NFe.infNFe.ide[key] = obj[key];
57
60
  });
58
61
  }
59
62
 
60
- tagRefNFe(obj) {
63
+ tagRefNFe(obj: any) {
61
64
  throw "Não implementado!";
62
65
  }
63
66
 
64
- tagRefNF(obj) {
67
+ tagRefNF(obj: any) {
65
68
  throw "Não implementado!";
66
69
  }
67
70
 
68
- tagRefNFP(obj) {
71
+ tagRefNFP(obj: any) {
69
72
  throw "Não implementado!";
70
73
  }
71
74
 
72
- tagRefCTe(obj) {
75
+ tagRefCTe(obj: any) {
73
76
  throw "Não implementado!";
74
77
  }
75
78
 
76
- tagRefECF(obj) {
79
+ tagRefECF(obj: any) {
77
80
  throw "Não implementado!";
78
81
  }
79
82
 
80
- tagEmit(obj) {
83
+ tagEmit(obj: any) {
81
84
  this.#NFe.infNFe.emit = new Object();
82
85
  Object.keys(obj).forEach(key => {
83
86
  this.#NFe.infNFe.emit[key] = obj[key];
@@ -87,13 +90,13 @@ class Make {
87
90
  });
88
91
  }
89
92
 
90
- tagEnderEmit(obj) {
93
+ tagEnderEmit(obj: any) {
91
94
  Object.keys(obj).forEach(key => {
92
95
  this.#NFe.infNFe.emit.enderEmit[key] = obj[key];
93
96
  });
94
97
  }
95
98
 
96
- tagDest(obj) {
99
+ tagDest(obj: any) {
97
100
  this.#NFe.infNFe.dest = {};
98
101
  if (this.#NFe.infNFe.ide.tpAmb == 2 && obj['xNome'] !== undefined) obj['xNome'] = "NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL";
99
102
  Object.keys(obj).forEach(key => {
@@ -104,7 +107,7 @@ class Make {
104
107
  });
105
108
  }
106
109
 
107
- tagEnderDest(obj) {
110
+ tagEnderDest(obj: any) {
108
111
  if (this.#NFe.infNFe.ide.mod == 65) return 1;
109
112
 
110
113
  this.#NFe.infNFe.dest.enderDest = {};
@@ -113,20 +116,16 @@ class Make {
113
116
  });
114
117
  }
115
118
 
116
- tagRetirada(obj) {
119
+ tagRetirada(obj: any) {
117
120
  throw "não implementado!";
118
121
  }
119
122
 
120
- tagEntrega(obj) {
121
- throw "não implementado!";
122
- }
123
-
124
- tagAutXML(obj) {
123
+ tagAutXML(obj: any) {
125
124
  throw "não implementado!";
126
125
  }
127
126
 
128
127
  //tagprod
129
- tagProd(obj) {
128
+ tagProd(obj: any) {
130
129
  //Abrir tag de imposto
131
130
  for (let cont = 0; cont < obj.length; cont++) {
132
131
  if (obj[cont]['@nItem'] === undefined) {
@@ -150,51 +149,51 @@ class Make {
150
149
  this.#NFe.infNFe.det = obj;
151
150
  }
152
151
 
153
- tagCreditoPresumidoProd(obj) {
152
+ tagCreditoPresumidoProd(obj: any) {
154
153
  throw "não implementado!";
155
154
  }
156
155
 
157
- taginfAdProd(obj) {
156
+ taginfAdProd(obj: any) {
158
157
  throw "não implementado!";
159
158
  }
160
159
 
161
- tagCEST(obj) {
160
+ tagCEST(obj: any) {
162
161
  throw "não implementado!";
163
162
  }
164
163
 
165
- tagRECOPI(obj) {
164
+ tagRECOPI(obj: any) {
166
165
  throw "não implementado!";
167
166
  }
168
167
 
169
- tagAdi(obj) {
168
+ tagAdi(obj: any) {
170
169
  throw "não implementado!";
171
170
  }
172
171
 
173
- tagDetExport(obj) {
172
+ tagDetExport(obj: any) {
174
173
  throw "não implementado!";
175
174
  }
176
175
 
177
- tagDetExportInd(obj) {
176
+ tagDetExportInd(obj: any) {
178
177
  throw "não implementado!";
179
178
  }
180
179
 
181
- tagRastro(obj) {
180
+ tagRastro(obj: any) {
182
181
  throw "não implementado!";
183
182
  }
184
183
 
185
- tagVeicProd(obj) {
184
+ tagVeicProd(obj: any) {
186
185
  throw "não implementado!";
187
186
  }
188
187
 
189
- tagMed(obj) {
188
+ tagMed(obj: any) {
190
189
  throw "não implementado!";
191
190
  }
192
191
 
193
- tagArma(obj) {
192
+ tagArma(obj: any) {
194
193
  throw "não implementado!";
195
194
  }
196
195
 
197
- tagComb(obj) {
196
+ tagComb(obj: any) {
198
197
  throw "não implementado!";
199
198
  }
200
199
 
@@ -210,25 +209,12 @@ class Make {
210
209
  throw "não implementado!";
211
210
  }
212
211
 
213
- tagProdICMS(index, obj) {
212
+ tagProdICMS(index: any, obj: any) {
214
213
  throw "não implementado!";
215
214
  }
216
215
 
217
-
218
-
219
- //
220
- tagProdICMSST(index, obj) {
221
- this.#NFe.infNFe.det[index].ICMSPart = {};
222
- Object.keys(obj).forEach(key => {
223
- this.#NFe.infNFe.det[index].ICMSPart[key] = obj[key];
224
- });
225
-
226
- //Calcular ICMSTot
227
- this.#calICMSTot(obj);
228
- }
229
-
230
216
  //
231
- tagProdICMSST(index, obj) {
217
+ tagProdICMSST(index: any, obj: any) {
232
218
  if (this.#NFe.infNFe.det[index].imposto.ICMS === undefined) this.#NFe.infNFe.det[index].imposto.ICMS = {};
233
219
 
234
220
  this.#NFe.infNFe.det[index].imposto.ICMS.ICMSST = {};
@@ -241,7 +227,7 @@ class Make {
241
227
  }
242
228
 
243
229
  //
244
- tagProdICMSSN(index, obj) {
230
+ tagProdICMSSN(index: any, obj: any) {
245
231
  if (this.#NFe.infNFe.det[index].imposto.ICMS === undefined) this.#NFe.infNFe.det[index].imposto.ICMS = {};
246
232
 
247
233
  let keyXML = "";
@@ -282,19 +268,19 @@ class Make {
282
268
  }
283
269
 
284
270
 
285
- tagProdICMSUFDest(index, obj) {
271
+ tagProdICMSUFDest(index: any, obj: any) {
286
272
  throw "Não implementado!";
287
273
  }
288
274
 
289
- tagProdIPI(index, obj) {
275
+ tagProdIPI(index: any, obj: any) {
290
276
  throw "Não implementado!";
291
277
  }
292
278
 
293
- tagProdII(index, obj) {
279
+ tagProdII(index: any, obj: any) {
294
280
  throw "Não implementado!";
295
281
  }
296
282
 
297
- tagProdPIS(index, obj) {
283
+ tagProdPIS(index: any, obj: any) {
298
284
  if (this.#NFe.infNFe.det[index].imposto.PIS === undefined) this.#NFe.infNFe.det[index].imposto.PIS = {};
299
285
 
300
286
  let keyXML = "";
@@ -354,7 +340,7 @@ class Make {
354
340
  this.#calICMSTot(obj);
355
341
  }
356
342
 
357
- tagProdPISST(index, obj) {
343
+ tagProdPISST(index: any, obj: any) {
358
344
  if (this.#NFe.infNFe.det[index].imposto.PIS === undefined) this.#NFe.infNFe.det[index].imposto.PIS = {};
359
345
 
360
346
  this.#NFe.infNFe.det[index].imposto.PIS.PISST = {};
@@ -367,7 +353,7 @@ class Make {
367
353
  this.#calICMSTot(obj);
368
354
  }
369
355
 
370
- tagProdCOFINS(index, obj) {
356
+ tagProdCOFINS(index: any, obj: any) {
371
357
  if (this.#NFe.infNFe.det[index].imposto.COFINS === undefined) this.#NFe.infNFe.det[index].imposto.COFINS = {};
372
358
 
373
359
  let keyXML = null;
@@ -430,7 +416,7 @@ class Make {
430
416
  this.#calICMSTot(obj);
431
417
  }
432
418
 
433
- tagProdCOFINSST(index, obj) {
419
+ tagProdCOFINSST(index: any, obj: any) {
434
420
  if (this.#NFe.infNFe.det[index].imposto.COFINS === undefined) this.#NFe.infNFe.det[index].imposto.COFINS = {};
435
421
 
436
422
  this.#NFe.infNFe.det[index].imposto.COFINS.COFINSST = {};
@@ -442,7 +428,7 @@ class Make {
442
428
  this.#calICMSTot(obj);
443
429
  }
444
430
 
445
- tagProdISSQN(index, obj) {
431
+ tagProdISSQN(index: any, obj: any) {
446
432
  this.#NFe.infNFe.det[index].imposto.ISSQN = {};
447
433
  Object.keys(obj).forEach(key => {
448
434
  this.#NFe.infNFe.det[index].imposto.ISSQN[key] = obj[key];
@@ -452,7 +438,7 @@ class Make {
452
438
  this.#calICMSTot(obj);
453
439
  }
454
440
 
455
- tagProdImpostoDevol(index, obj) {
441
+ tagProdImpostoDevol(index: any, obj: any) {
456
442
  throw "Não implementado!";
457
443
  }
458
444
 
@@ -472,102 +458,102 @@ class Make {
472
458
  }
473
459
  }
474
460
 
475
- tagISSQNTot(obj) {
461
+ tagISSQNTot(obj: any) {
476
462
  throw "Não implementado!";
477
463
  }
478
464
 
479
- tagRetTrib(obj) {
465
+ tagRetTrib(obj: any) {
480
466
  throw "Não implementado!";
481
467
  }
482
468
 
483
469
 
484
- tagTransp(obj) {
470
+ tagTransp(obj: any) {
485
471
  this.#NFe.infNFe.transp = {};
486
472
  Object.keys(obj).forEach(key => {
487
473
  this.#NFe.infNFe.transp[key] = obj[key];
488
474
  });
489
475
  }
490
476
 
491
- tagTransporta(obj) {
477
+ tagTransporta(obj: any) {
492
478
  throw "Não implementado!";
493
479
  }
494
480
 
495
- tagRetTransp(obj) {
481
+ tagRetTransp(obj: any) {
496
482
  throw "Não implementado!";
497
483
  }
498
484
 
499
- tagVeicTransp(obj) {
485
+ tagVeicTransp(obj: any) {
500
486
  throw "Não implementado!";
501
487
  }
502
488
 
503
- tagReboque(obj) {
489
+ tagReboque(obj: any) {
504
490
  throw "Não implementado!";
505
491
  }
506
492
 
507
- tagVagao(obj) {
493
+ tagVagao(obj: any) {
508
494
  throw "Não implementado!";
509
495
  }
510
496
 
511
- tagBalsa(obj) {
497
+ tagBalsa(obj: any) {
512
498
  throw "Não implementado!";
513
499
  }
514
500
 
515
- tagVol(obj) {
501
+ tagVol(obj: any) {
516
502
  throw "Não implementado!";
517
503
  }
518
504
 
519
- tagLacres(obj) {
505
+ tagLacres(obj: any) {
520
506
  throw "Não implementado!";
521
507
  }
522
508
 
523
- tagFat(obj) {
509
+ tagFat(obj: any) {
524
510
  throw "Não implementado!";
525
511
  }
526
512
 
527
- tagDup(obj) {
513
+ tagDup(obj: any) {
528
514
  throw "Não implementado!";
529
515
  }
530
516
 
531
517
  //tagpag()
532
- tagTroco(obj) {
518
+ tagTroco(obj: any) {
533
519
  if (this.#NFe.infNFe.pag === undefined) this.#NFe.infNFe.pag = {};
534
520
  this.#NFe.infNFe.pag.vTroco = obj;
535
521
  }
536
522
 
537
- tagDetPag(obj) {
523
+ tagDetPag(obj: any) {
538
524
  if (this.#NFe.infNFe.pag === undefined) this.#NFe.infNFe.pag = {};
539
525
  this.#NFe.infNFe.pag.detPag = obj;
540
526
  }
541
527
 
542
- tagIntermed(obj) {
528
+ tagIntermed(obj: any) {
543
529
  throw "Não implementado!";
544
530
  }
545
531
 
546
- tagInfAdic(obj) {
532
+ tagInfAdic(obj: any) {
547
533
  throw "Não implementado!";
548
534
  }
549
535
 
550
- tagObsCont(obj) {
536
+ tagObsCont(obj: any) {
551
537
  throw "Não implementado!";
552
538
  }
553
539
 
554
- tagObsFisco(obj) {
540
+ tagObsFisco(obj: any) {
555
541
  throw "Não implementado!";
556
542
  }
557
543
 
558
- tagProcRef(obj) {
544
+ tagProcRef(obj: any) {
559
545
  throw "Não implementado!";
560
546
  }
561
547
 
562
- tagExporta(obj) {
548
+ tagExporta(obj: any) {
563
549
  throw "Não implementado!";
564
550
  }
565
551
 
566
- tagCompra(obj) {
552
+ tagCompra(obj: any) {
567
553
  throw "Não implementado!";
568
554
  }
569
555
 
570
- tagCana(obj) {
556
+ tagCana(obj: any) {
571
557
  throw "Não implementado!";
572
558
  }
573
559
 
@@ -583,7 +569,7 @@ class Make {
583
569
 
584
570
  }
585
571
 
586
- tagInfRespTec(obj) {
572
+ tagInfRespTec(obj: any) {
587
573
  if (this.#NFe.infNFe.infRespTec === undefined) this.#NFe.infNFe.infRespTec = {};
588
574
  Object.keys(obj).forEach(key => {
589
575
  this.#NFe.infNFe.infRespTec[key] = obj[key];
@@ -593,12 +579,12 @@ class Make {
593
579
 
594
580
 
595
581
  //Endereço para retirada
596
- tagRetiEnder(obj) {
582
+ tagRetiEnder(obj: any) {
597
583
  throw "Ainda não configurado!";
598
584
  }
599
585
 
600
586
  //Endereço para entrega
601
- tagEntrega(obj) {
587
+ tagEntrega(obj: any) {
602
588
  throw "Ainda não configurado!";
603
589
  }
604
590
 
@@ -619,7 +605,7 @@ class Make {
619
605
 
620
606
  }
621
607
 
622
- #calcularDigitoVerificador(key) {
608
+ #calcularDigitoVerificador(key: any) {
623
609
  if (key.length !== 43) {
624
610
  return '';
625
611
  }
@@ -657,14 +643,12 @@ class Make {
657
643
 
658
644
  let tempBuild = new XMLBuilder({
659
645
  ignoreAttributes: false,
660
- attributeNamePrefix: "@",
661
- parseTagValue: false, // Evita conversão automática de valores
662
- parseNodeValue: false, // Mantém valores como strings
646
+ attributeNamePrefix: "@"
663
647
  });
664
648
  return tempBuild.build({ NFe: this.#NFe });
665
649
  }
666
650
 
667
- #getInfoQRCodeByUF(uf, amb) {
651
+ #getInfoQRCodeByUF(uf: any, amb: any) {
668
652
  if (this.#NFe.infNFe.ide.tpAmb) {
669
653
  switch (this.#NFe.infNFe.ide.cUF) {
670
654
  case 'AC':
@@ -783,7 +767,7 @@ class Make {
783
767
  }
784
768
  }
785
769
 
786
- #calICMSTot(obj) {
770
+ #calICMSTot(obj: any) {
787
771
  Object.keys(obj).map(key => {
788
772
  if (this.#ICMSTot[key] !== undefined) {
789
773
  this.#ICMSTot[key] += 1 * (obj[key]);
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteNFe_v4.00.xsd"/>
4
+ <xs:element name="consReciNFe" type="TConsReciNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do Pedido de Consulta do Recido do Lote de Notas Fiscais Eletrônicas</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteConsSitNFe_v4.00.xsd"/>
4
+ <xs:element name="consSitNFe" type="TConsSitNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema de validação XML dp Pedido de Consulta da Situação Atual da Nota Fiscal Eletrônica</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteConsStatServ_v4.00.xsd"/>
4
+ <xs:element name="consStatServ" type="TConsStatServ">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do Pedido de Consulta do Status do Serviço</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteNFe_v4.00.xsd"/>
4
+ <xs:element name="enviNFe" type="TEnviNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do Pedido de Concessão de Autorização da Nota Fiscal Eletrônica</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xs:include schemaLocation="leiauteInutNFe_v4.00.xsd"/>
4
+ <xs:element name="inutNFe" type="TInutNFe">
5
+ <xs:annotation>
6
+ <xs:documentation>Schema XML de validação do Pedido de Inutilização de Numeração da Nota Fiscal Eletrônica</xs:documentation>
7
+ </xs:annotation>
8
+ </xs:element>
9
+ </xs:schema>