Skip to content

Commit bc9b8fb

Browse files
committed
Atualizações na documentação para nova versão
1 parent a879b7f commit bc9b8fb

12 files changed

Lines changed: 85 additions & 71 deletions

docs/configuracaoDeAmbiente.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- filepath: /usr/projetos/nfewizard/nfewizard-org.github.io/docs/configuracaoDeAmbiente.md -->
12
# Configuração de Ambiente
23

34
Repositório do projeto [NFeWizard-io](https://github.com/nfewizard-org/nfewizard-io).
@@ -29,6 +30,8 @@ Repositório do projeto [NFeWizard-io](https://github.com/nfewizard-org/nfewizar
2930
|----------|-----------|-----------|
3031
| `ambiente`| Define o ambiente que receberá os XML da NF-e:<br>1 = Produção<br>2 = Homologação | Obrigatório |
3132
| `versaoDF` | Define a versão da NF-e (Testada apenas 4.00):<br>2.00 = Versão 2.00<br>3.00 = Versão 3.00<br>3.10 = Versão 3.10<br>4.00 = Versão 4.00 | Obrigatório |
33+
| `idCSC` | ID do Código de Segurança do Contribuinte | Opcional |
34+
| `tokenCSC` | Token do Código de Segurança do Contribuinte | Opcional |
3235

3336
### EMAIL
3437

@@ -43,7 +46,7 @@ Repositório do projeto [NFeWizard-io](https://github.com/nfewizard-org/nfewizar
4346
| `emailParams` | Dados para envio do e-mail | Obrigatório |
4447
| `emailParams.from` | Remetente padrão | Obrigatório |
4548
| `emailParams.to` | Destinatário padrão | Obrigatório |
46-
| `emailParams.subject`| Assunto padrão
49+
| `emailParams.subject`| Assunto padrão | Opcional |
4750

4851
### LIB
4952

@@ -52,4 +55,8 @@ Repositório do projeto [NFeWizard-io](https://github.com/nfewizard-org/nfewizar
5255
| `connection` | Define configurações das requisições | Opcional |
5356
| `connection.timeout` | Define o tempo limite em milissegundos para as requisições HTTP feitas pela lib | Opcional, padrão: 60000 |
5457
| `log` | Define configurações de log | Opcional |
55-
| `log.exibirLogNoConsole` | Define se os logs devem ser exibidos no console (Em desenvolvimento)| Opcional, padrão: false |
58+
| `log.exibirLogNoConsole` | Define se os logs devem ser exibidos no console | Opcional, padrão: false |
59+
| `log.armazenarLogs` | Define se os logs devem ser armazenados em arquivo | Opcional, padrão: false |
60+
| `log.pathLogs` | Define o diretório onde os logs serão salvos | Opcional |
61+
| `useOpenSSL` | Define se deve usar OpenSSL para operações criptográficas | Opcional, padrão: false |
62+
| `useForSchemaValidation` | Define o método de validação de schema:<br>`validateSchemaJsBased` = Validação baseada em JavaScript<br>`validateSchemaXmlLintBased` = Validação baseada em xmllint | Opcional, padrão: validateSchemaJsBased |

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import NFeWizard from 'nfewizard-io';
3838
const nfewizard = new NFeWizard();
3939

4040
// Inicializar
41-
await nfewizard.NFE_LoadEnvironment({
41+
await nfeWizard.NFE_LoadEnvironment({
4242
config: {
4343
dfe: {
4444
baixarXMLDistribuicao: true,
@@ -94,7 +94,7 @@ const chaveNFe: DFePorChaveNFe = {
9494
},
9595
}
9696

97-
await nfewizard.NFE_DistribuicaoDFePorChave(chaveNFe);
97+
await nfeWizard.NFE_DistribuicaoDFePorChave(chaveNFe);
9898
```
9999

100100
<!-- ## Documentação

docs/nfceAutorizacao.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const autorizacao: NFe = {
169169
],
170170
};
171171

172-
await nfewizard.NFCE_Autorizacao(autorizacao);
172+
await nfeWizard.NFCE_Autorizacao(autorizacao);
173173
```
174174
<br>
175175

docs/nfeAutorizacao.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const autorizacao: NFe = {
175175
],
176176
};
177177

178-
await nfewizard.NFE_Autorizacao(autorizacao);
178+
await nfeWizard.NFE_Autorizacao(autorizacao);
179179
```
180180
<br>
181181

docs/nfeConsultaProtocolo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
```typescript title="NFE_ConsultaStatusServico" linenums="1"
16-
await nfewizard.NFE_ConsultaProtocolo('99999999999999999999999999999999999999999999');
16+
await nfeWizard.NFE_ConsultaProtocolo('99999999999999999999999999999999999999999999');
1717
```
1818
<br>
1919

docs/nfeDistribuicaoDfe.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const distribuicao: ConsultaNFe = {
4343
}
4444
}
4545

46-
await nfewizard.NFE_DistribuicaoDFe(distribuicao);
46+
await nfeWizard.NFE_DistribuicaoDFe(distribuicao);
4747
```
4848
<br>
4949
Também é possível utilizar o método especifico para cada tipo de distribuição:
@@ -65,7 +65,7 @@ const ultimoNSU: DFePorUltimoNSU = {
6565
},
6666
}
6767

68-
await nfewizard.NFE_DistribuicaoDFePorUltNSU(ultimoNSU);
68+
await nfeWizard.NFE_DistribuicaoDFePorUltNSU(ultimoNSU);
6969
```
7070

7171
`Retorno`:
@@ -121,7 +121,7 @@ const nsu: DFePorNSU = {
121121
},
122122
}
123123

124-
await nfewizard.NFE_DistribuicaoDFePorNSU(nsu);
124+
await nfeWizard.NFE_DistribuicaoDFePorNSU(nsu);
125125
```
126126

127127
`Retorno`:
@@ -169,7 +169,7 @@ const chave: DFePorChaveNFe = {
169169
},
170170
}
171171

172-
await nfewizard.NFE_DistribuicaoDFePorChave(chave);
172+
await nfeWizard.NFE_DistribuicaoDFePorChave(chave);
173173
```
174174

175175
`Retorno`:

docs/nfeEnviaEmail.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ const messageExample = `
105105
</html>
106106
`;
107107

108-
nfewizard.NFE_EnviaEmail({
109-
messageExample,
108+
nfeWizard.NFE_EnviaEmail({
109+
message: messageExample,
110110
subject: 'Envio de DANFE e NF-e',
111111
attachments: [
112112
{

docs/nfeGerarDanfe.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const autorizacao: NFe | NFeDanfe = {
183183
],
184184
};
185185

186-
await nfewizard.NFE_GerarDanfe({
186+
await nfeWizard.NFE_GerarDanfe({
187187
chave: '99999999999999999999999999999999999999999999',
188188
data: {
189189
NFe: autorizacao.NFe
@@ -216,11 +216,11 @@ const autorizacao: NFeDanfe = {
216216
NFe: [...],
217217
};
218218

219-
const retorno = await nfewizard.NFE_Autorizacao(autorizacao);
219+
const retorno = await nfeWizard.NFE_Autorizacao(autorizacao);
220220

221221
// Gera DANFE da NFe transmitida
222222
const chave = retorno[0].protNFe.infProt.chNFe;
223-
await nfewizard.NFE_GerarDanfe({
223+
await nfeWizard.NFE_GerarDanfe({
224224
chave,
225225
data: retorno[0],
226226
outputPath: 'src/assets/DANFE.pdf'
@@ -259,7 +259,7 @@ const autorizacao: NFeDanfe = {
259259

260260
if (autorizacao.NFe instanceof Array) {
261261
autorizacao.NFe.forEach(async (NFe: LayoutNFe) => {
262-
await nfewizard.NFE_GerarDanfe({
262+
await nfeWizard.NFE_GerarDanfe({
263263
chave: '99999999999999999999999999999999999999999999',
264264
data: {
265265
NFe,
@@ -274,11 +274,11 @@ if (autorizacao.NFe instanceof Array) {
274274
* Exemplo com NFe já transmitida
275275
*/
276276

277-
const retorno = await nfewizard.NFE_Autorizacao(autorizacao);
277+
const retorno = await nfeWizard.NFE_Autorizacao(autorizacao);
278278

279279
retorno.forEach(async (NFe) => {
280280
const chave = NFe.protNFe.infProt.chNFe;
281-
await nfewizard.NFE_GerarDanfe({
281+
await nfeWizard.NFE_GerarDanfe({
282282
chave: chave,
283283
data: NFe,
284284
outputPath: `src/assets/DANFE-${chave}.pdf`

docs/nfeInicializarAmbiente.md

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,50 +19,57 @@ import NFeWizard from 'nfewizard-io';
1919

2020
const nfewizard = new NFeWizard();
2121

22-
await nfewizard.NFE_LoadEnvironment({
23-
config: {
24-
dfe: {
25-
baixarXMLDistribuicao: true,
26-
pathXMLDistribuicao: "tmp/DistribuicaoDFe",
27-
armazenarXMLAutorizacao: true,
28-
pathXMLAutorizacao: "tmp/Autorizacao",
29-
armazenarXMLRetorno: true,
30-
pathXMLRetorno: "tmp/RequestLogs",
31-
armazenarXMLConsulta: true,
32-
pathXMLConsulta: "tmp/RequestLogs",
33-
armazenarXMLConsultaComTagSoap: false,
34-
armazenarRetornoEmJSON: true,
35-
pathRetornoEmJSON: "tmp/DistribuicaoDFe",
22+
await nfeWizard.NFE_LoadEnvironment({
23+
config: {
24+
dfe: {
25+
baixarXMLDistribuicao: true,
26+
pathXMLDistribuicao: "tmp/DistribuicaoDFe",
27+
armazenarXMLAutorizacao: true,
28+
pathXMLAutorizacao: "tmp/Autorizacao",
29+
armazenarXMLRetorno: true,
30+
pathXMLRetorno: "tmp/RequestLogs",
31+
armazenarXMLConsulta: true,
32+
pathXMLConsulta: "tmp/RequestLogs",
33+
armazenarXMLConsultaComTagSoap: false,
34+
armazenarRetornoEmJSON: false,
35+
pathRetornoEmJSON: "tmp/DistribuicaoDFe",
3636

37-
pathCertificado: "certificado.pfx",
38-
senhaCertificado: "123456",
39-
UF: "SP",
40-
CPFCNPJ: "99999999999999",
41-
},
42-
nfe: {
43-
ambiente: 2,
44-
versaoDF: "4.00",
45-
idCSC: 1,
46-
tokenCSC: '99999999-9999-9999-9999-999999999999'
47-
},
48-
email: {
49-
host: 'smtp.example.com',
50-
port: 587,
51-
secure: false,
52-
auth: {
53-
user: 'seu-email@example.com',
54-
pass: 'sua-senha'
37+
pathCertificado: "certificado.pfx",
38+
senhaCertificado: "1234",
39+
UF: "SP",
40+
CPFCNPJ: "99999999999999",
5541
},
56-
emailParams: {
57-
from: '"Seu Nome" <seu-email@example.com>',
58-
to: 'destinatario@example.com',
59-
}
60-
},
61-
lib: {
62-
connection: {
63-
timeout: 30000,
42+
nfe: {
43+
ambiente: 2,
44+
versaoDF: "4.00",
45+
idCSC: 1,
46+
tokenCSC: '99999999-9999-9999-9999-999999999999'
47+
},
48+
email: {
49+
host: 'mail.provider.com.br', // Substitua pelo host SMTP do seu provedor de e-mail
50+
port: 465, // 587 para TLS ou 465 para SSL
51+
secure: true, // true para 465, false para outros
52+
auth: {
53+
user: 'nfe.example@email.com.br', // Seu e-mail
54+
pass: '123456' // Senha fortíssima do e-mail
55+
},
56+
emailParams: {
57+
from: 'Company <noreply.company@email.com>', // Remetente padrão
58+
to: 'customer.name@email.com.br', // Destinatário padrão
59+
}
6460
},
61+
lib: {
62+
connection: {
63+
timeout: 30000,
64+
},
65+
log: {
66+
exibirLogNoConsole: true,
67+
armazenarLogs: true,
68+
pathLogs: 'tmp/Logs'
69+
},
70+
useOpenSSL: false,
71+
useForSchemaValidation: 'validateSchemaJsBased',
72+
}
6573
}
66-
}
67-
});
74+
});
6875
```

docs/nfeInutilizacao.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const inutilizacao: InutilizacaoData = {
3333
xJust: 'Teste de homologação',
3434
}
3535

36-
await nfewizard.NFE_Inutilizacao(inutilizacao)
36+
await nfeWizard.NFE_Inutilizacao(inutilizacao)
3737
```
3838
<br>
3939

0 commit comments

Comments
 (0)