Skip to content

Commit 098f3c2

Browse files
committed
Atualiza schemas da NFe/NFCe
1 parent 6ad74f3 commit 098f3c2

6 files changed

Lines changed: 573 additions & 581 deletions

File tree

Lines changed: 79 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,84 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 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="tiposDistDFe_v1.01.xsd"/>
4-
<xs:element name="distDFeInt">
5-
<xs:annotation>
6-
<xs:documentation>Schema de pedido de distribuição de DF-e de interesse</xs:documentation>
7-
</xs:annotation>
8-
<xs:complexType>
9-
<xs:sequence>
10-
<xs:element name="tpAmb" type="TAmb">
11-
<xs:annotation>
12-
<xs:documentation>
3+
<xs:include schemaLocation="tiposDistDFe_v1.01.xsd" />
4+
<xs:element name="distDFeInt">
5+
<xs:annotation>
6+
<xs:documentation>Schema de pedido de distribuição de DF-e de interesse</xs:documentation>
7+
</xs:annotation>
8+
<xs:complexType>
9+
<xs:sequence>
10+
<xs:element name="tpAmb" type="TAmb">
11+
<xs:annotation>
12+
<xs:documentation>
1313
Identificação do Ambiente:
1414
1 - Produção
1515
2 - Homologação
16-
</xs:documentation>
17-
</xs:annotation>
18-
</xs:element>
19-
<xs:element name="cUFAutor" type="TCodUfIBGE" minOccurs="0">
20-
<xs:annotation>
21-
<xs:documentation>Código da UF do Autor</xs:documentation>
22-
</xs:annotation>
23-
</xs:element>
24-
<xs:choice>
25-
<xs:element name="CNPJ" type="TCnpj">
26-
<xs:annotation>
27-
<xs:documentation>CNPJ do interessado no DF-e</xs:documentation>
28-
</xs:annotation>
29-
</xs:element>
30-
<xs:element name="CPF" type="TCpf">
31-
<xs:annotation>
32-
<xs:documentation>CPF do interessado no DF-e</xs:documentation>
33-
</xs:annotation>
34-
</xs:element>
35-
</xs:choice>
36-
<xs:choice>
37-
<xs:element name="distNSU">
38-
<xs:annotation>
39-
<xs:documentation>Grupo para distribuir DF-e de interesse</xs:documentation>
40-
</xs:annotation>
41-
<xs:complexType>
42-
<xs:sequence>
43-
<xs:element name="ultNSU" type="TNSU">
44-
<xs:annotation>
45-
<xs:documentation>Último NSU recebido pelo ator. Caso seja informado com zero, ou com um NSU muito antigo, a consulta retornará unicamente as informações resumidas e documentos fiscais eletrônicos que tenham sido recepcionados pelo Ambiente Nacional nos últimos 3 meses.</xs:documentation>
46-
</xs:annotation>
47-
</xs:element>
48-
</xs:sequence>
49-
</xs:complexType>
50-
</xs:element>
51-
<xs:element name="consNSU">
52-
<xs:annotation>
53-
<xs:documentation>Grupo para consultar um DF-e a partir de um NSU específico</xs:documentation>
54-
</xs:annotation>
55-
<xs:complexType>
56-
<xs:sequence>
57-
<xs:element name="NSU" type="TNSU">
58-
<xs:annotation>
59-
<xs:documentation>Número Sequencial Único. Geralmente esta consulta será utilizada quando identificado pelo interessado um NSU faltante. O Web Service retornará o documento ou informará que o NSU não existe no Ambiente Nacional. Assim, esta consulta fechará a lacuna do NSU identificado como faltante.</xs:documentation>
60-
</xs:annotation>
61-
</xs:element>
62-
</xs:sequence>
63-
</xs:complexType>
64-
</xs:element>
65-
<xs:element name="consChNFe">
66-
<xs:annotation>
67-
<xs:documentation>Grupo para consultar uma NF-e a partir da chave de acesso</xs:documentation>
68-
</xs:annotation>
69-
<xs:complexType>
70-
<xs:sequence>
71-
<xs:element name="chNFe" type="TChNFe">
72-
<xs:annotation>
73-
<xs:documentation>Chave de acesso da NF-e a ser consultada</xs:documentation>
74-
</xs:annotation>
75-
</xs:element>
76-
</xs:sequence>
77-
</xs:complexType>
78-
</xs:element>
79-
</xs:choice>
80-
</xs:sequence>
81-
<xs:attribute name="versao" type="TVerDistDFe" use="required"/>
82-
</xs:complexType>
83-
</xs:element>
84-
</xs:schema>
85-
16+
</xs:documentation>
17+
</xs:annotation>
18+
</xs:element>
19+
<xs:element name="cUFAutor" type="TCodUfIBGE" minOccurs="0">
20+
<xs:annotation>
21+
<xs:documentation>Código da UF do Autor</xs:documentation>
22+
</xs:annotation>
23+
</xs:element>
24+
<xs:choice>
25+
<xs:element name="CNPJ" type="TCnpj">
26+
<xs:annotation>
27+
<xs:documentation>CNPJ do interessado no DF-e</xs:documentation>
28+
</xs:annotation>
29+
</xs:element>
30+
<xs:element name="CPF" type="TCpf">
31+
<xs:annotation>
32+
<xs:documentation>CPF do interessado no DF-e</xs:documentation>
33+
</xs:annotation>
34+
</xs:element>
35+
</xs:choice>
36+
<xs:choice>
37+
<xs:element name="distNSU">
38+
<xs:annotation>
39+
<xs:documentation>Grupo para distribuir DF-e de interesse</xs:documentation>
40+
</xs:annotation>
41+
<xs:complexType>
42+
<xs:sequence>
43+
<xs:element name="ultNSU" type="TNSU">
44+
<xs:annotation>
45+
<xs:documentation>Último NSU recebido pelo ator. Caso seja informado com zero, ou com um NSU muito antigo, a consulta retornará unicamente as informações resumidas e documentos fiscais eletrônicos que tenham sido recepcionados pelo Ambiente Nacional nos últimos 3 meses.</xs:documentation>
46+
</xs:annotation>
47+
</xs:element>
48+
</xs:sequence>
49+
</xs:complexType>
50+
</xs:element>
51+
<xs:element name="consNSU">
52+
<xs:annotation>
53+
<xs:documentation>Grupo para consultar um DF-e a partir de um NSU específico</xs:documentation>
54+
</xs:annotation>
55+
<xs:complexType>
56+
<xs:sequence>
57+
<xs:element name="NSU" type="TNSU">
58+
<xs:annotation>
59+
<xs:documentation>Número Sequencial Único. Geralmente esta consulta será utilizada quando identificado pelo interessado um NSU faltante. O Web Service retornará o documento ou informará que o NSU não existe no Ambiente Nacional. Assim, esta consulta fechará a lacuna do NSU identificado como faltante.</xs:documentation>
60+
</xs:annotation>
61+
</xs:element>
62+
</xs:sequence>
63+
</xs:complexType>
64+
</xs:element>
65+
<xs:element name="consChNFe">
66+
<xs:annotation>
67+
<xs:documentation>Grupo para consultar uma NF-e a partir da chave de acesso</xs:documentation>
68+
</xs:annotation>
69+
<xs:complexType>
70+
<xs:sequence>
71+
<xs:element name="chNFe" type="TChNFe">
72+
<xs:annotation>
73+
<xs:documentation>Chave de acesso da NF-e a ser consultada</xs:documentation>
74+
</xs:annotation>
75+
</xs:element>
76+
</xs:sequence>
77+
</xs:complexType>
78+
</xs:element>
79+
</xs:choice>
80+
</xs:sequence>
81+
<xs:attribute name="versao" type="TVerDistDFe" use="required" />
82+
</xs:complexType>
83+
</xs:element>
84+
</xs:schema>

pynfe/data/XSDs/NF-e/leiauteNFe_v4.00.xsd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@ N-NormalVIN</xs:documentation>
16981698
</xs:annotation>
16991699
<xs:simpleType>
17001700
<xs:restriction base="TString">
1701-
<xs:pattern value="[0-9]{13}|ISENTO"/>
1701+
<xs:pattern value="[0-9]{11}|[0-9]{13}|ISENTO"/>
17021702
</xs:restriction>
17031703
</xs:simpleType>
17041704
</xs:element>
@@ -5822,7 +5822,7 @@ tipo de ato concessório:
58225822
<xs:simpleType>
58235823
<xs:restriction base="xs:string">
58245824
<xs:minLength value="2"/>
5825-
<xs:maxLength value="2000"/>
5825+
<xs:maxLength value="5000"/>
58265826
</xs:restriction>
58275827
</xs:simpleType>
58285828
</xs:element>
@@ -5866,7 +5866,7 @@ tipo de ato concessório:
58665866
<xs:whiteSpace value="preserve"/>
58675867
<xs:minLength value="100"/>
58685868
<xs:maxLength value="600"/>
5869-
<xs:pattern value="(((HTTPS?|https?)://.*\?chNFe=[0-9]{44}&amp;nVersao=100&amp;tpAmb=[1-2](&amp;cDest=([A-Za-z0-9.:+-/)(]{0}|[A-Za-z0-9.:+-/)(]{5,20})?)?&amp;dhEmi=[A-Fa-f0-9]{50}&amp;vNF=(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)&amp;vICMS=(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)&amp;digVal=[A-Fa-f0-9]{56}&amp;cIdToken=[0-9]{6}&amp;cHashQRCode=[A-Fa-f0-9]{40})|((HTTPS?|https?)://.*\?p=([0-9]{34}(1|4)[0-9]{9})\|[2]\|[1-2]\|(0|[1-9]{1}([0-9]{1,5})?)\|[A-Fa-f0-9]{40})|((HTTPS?|https?)://.*\?p=([0-9]{34}9[0-9]{9})\|[2]\|[1-2]\|([0]{1}[1-9]{1}|[1-2]{1}[0-9]{1}|[3]{1}[0-1]{1})\|(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)\|[A-Fa-f0-9]{56}\|(0|[1-9]{1}([0-9]{1,5})?)\|[A-Fa-f0-9]{40}))"/>
5869+
<xs:pattern value="(((HTTPS?|https?)://.*\?chNFe=[0-9]{44}&amp;nVersao=100&amp;tpAmb=[1-2](&amp;cDest=([A-Za-z0-9.:+-/)(]{0}|[A-Za-z0-9.:+-/)(]{5,20})?)?&amp;dhEmi=[A-Fa-f0-9]{50}&amp;vNF=(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)&amp;vICMS=(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)&amp;digVal=[A-Fa-f0-9]{56}&amp;cIdToken=[0-9]{6}&amp;cHashQRCode=[A-Fa-f0-9]{40})|((HTTPS?|https?)://.*\?p=([0-9]{34}(1|3|4)[0-9]{9})\|[2]\|[1-2]\|(0|[1-9]{1}([0-9]{1,5})?)\|[A-Fa-f0-9]{40})|((HTTPS?|https?)://.*\?p=([0-9]{34}9[0-9]{9})\|[2]\|[1-2]\|([0]{1}[1-9]{1}|[1-2]{1}[0-9]{1}|[3]{1}[0-1]{1})\|(0|0\.[0-9]{2}|[1-9]{1}[0-9]{0,12}(\.[0-9]{2})?)\|[A-Fa-f0-9]{56}\|(0|[1-9]{1}([0-9]{1,5})?)\|[A-Fa-f0-9]{40}))"/>
58705870
</xs:restriction>
58715871
</xs:simpleType>
58725872
</xs:element>
Lines changed: 92 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,94 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 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:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema_v1.01.xsd"/>
4-
<xs:include schemaLocation="tiposDistDFe_v1.01.xsd"/>
5-
<xs:element name="resEvento">
6-
<xs:annotation>
7-
<xs:documentation>Schema da estrutura XML gerada pelo Ambiente Nacional com o conjunto de informações resumidas de um evento de NF-e</xs:documentation>
8-
</xs:annotation>
9-
<xs:complexType>
10-
<xs:sequence>
11-
<xs:element name="cOrgao" type="TCOrgaoIBGE">
12-
<xs:annotation>
13-
<xs:documentation>Código do órgão de recepção do Evento. Utilizar a Tabela do IBGE extendida, utilizar 91 para identificar o Ambiente Nacional</xs:documentation>
14-
</xs:annotation>
15-
</xs:element>
16-
<xs:choice>
17-
<xs:element name="CNPJ" type="TCnpj">
18-
<xs:annotation>
19-
<xs:documentation>CNPJ do Emitente</xs:documentation>
20-
</xs:annotation>
21-
</xs:element>
22-
<xs:element name="CPF" type="TCpf">
23-
<xs:annotation>
24-
<xs:documentation>CPF do Emitente</xs:documentation>
25-
</xs:annotation>
26-
</xs:element>
27-
</xs:choice>
28-
<xs:element name="chNFe" type="TChNFe">
29-
<xs:annotation>
30-
<xs:documentation>Chave de acesso da NF-e</xs:documentation>
31-
</xs:annotation>
32-
</xs:element>
33-
<xs:element name="dhEvento" type="TDateTimeUTC">
34-
<xs:annotation>
35-
<xs:documentation>Data e Hora do Evento, formato UTC (AAAA-MM-DDThh:mm:ssTZD, onde TZD = +hh:mm ou -hh:mm)</xs:documentation>
36-
</xs:annotation>
37-
</xs:element>
38-
<xs:element name="tpEvento">
39-
<xs:annotation>
40-
<xs:documentation>Tipo do Evento</xs:documentation>
41-
</xs:annotation>
42-
<xs:simpleType>
43-
<xs:restriction base="xs:string">
44-
<xs:whiteSpace value="preserve"/>
45-
<xs:pattern value="[0-9]{6}"/>
46-
</xs:restriction>
47-
</xs:simpleType>
48-
</xs:element>
49-
<xs:element name="nSeqEvento">
50-
<xs:annotation>
51-
<xs:documentation>Seqüencial do evento para o mesmo tipo de evento. Para maioria dos eventos será 1, nos casos em que possa existir mais de um evento, como é o caso da carta de correção, o autor do evento deve numerar de forma seqüencial</xs:documentation>
52-
</xs:annotation>
53-
<xs:simpleType>
54-
<xs:restriction base="xs:string">
55-
<xs:whiteSpace value="preserve"/>
56-
<xs:pattern value="[1-9][0-9]{0,1}"/>
57-
</xs:restriction>
58-
</xs:simpleType>
59-
</xs:element>
60-
<xs:element name="xEvento">
61-
<xs:annotation>
62-
<xs:documentation>Descrição do Evento</xs:documentation>
63-
</xs:annotation>
64-
<xs:simpleType>
65-
<xs:restriction base="TString">
66-
<xs:minLength value="5"/>
67-
<xs:maxLength value="60"/>
68-
</xs:restriction>
69-
</xs:simpleType>
70-
</xs:element>
71-
<xs:element name="dhRecbto" type="TDateTimeUTC">
72-
<xs:annotation>
73-
<xs:documentation>Data e hora de autorização do evento no formato AAAA-MM-DDTHH:MM:SSTZD</xs:documentation>
74-
</xs:annotation>
75-
</xs:element>
76-
<xs:element name="nProt" type="TProt">
77-
<xs:annotation>
78-
<xs:documentation>Número do Protocolo do evento. 1 posição (1 – Secretaria de Fazenda Estadual 2 – Receita Federal); 2 - códiga da UF - 2 posições ano; 10 seqüencial no ano</xs:documentation>
79-
</xs:annotation>
80-
</xs:element>
81-
</xs:sequence>
82-
<xs:attribute name="versao" type="TVerResEvento" use="required"/>
83-
</xs:complexType>
84-
</xs:element>
85-
<xs:simpleType name="TVerResEvento">
86-
<xs:annotation>
87-
<xs:documentation>Tipo Versão do leiate resNFe</xs:documentation>
88-
</xs:annotation>
89-
<xs:restriction base="xs:string">
90-
<xs:whiteSpace value="preserve"/>
91-
<xs:enumeration value="1.01"/>
92-
</xs:restriction>
93-
</xs:simpleType>
94-
</xs:schema>
95-
3+
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema_v1.01.xsd" />
4+
<xs:include schemaLocation="tiposDistDFe_v1.01.xsd" />
5+
<xs:element name="resEvento">
6+
<xs:annotation>
7+
<xs:documentation>Schema da estrutura XML gerada pelo Ambiente Nacional com o conjunto de informações resumidas de um evento de NF-e</xs:documentation>
8+
</xs:annotation>
9+
<xs:complexType>
10+
<xs:sequence>
11+
<xs:element name="cOrgao" type="TCOrgaoIBGE">
12+
<xs:annotation>
13+
<xs:documentation>Código do órgão de recepção do Evento. Utilizar a Tabela do IBGE extendida, utilizar 91 para identificar o Ambiente Nacional</xs:documentation>
14+
</xs:annotation>
15+
</xs:element>
16+
<xs:choice>
17+
<xs:element name="CNPJ" type="TCnpj">
18+
<xs:annotation>
19+
<xs:documentation>CNPJ do Emitente</xs:documentation>
20+
</xs:annotation>
21+
</xs:element>
22+
<xs:element name="CPF" type="TCpf">
23+
<xs:annotation>
24+
<xs:documentation>CPF do Emitente</xs:documentation>
25+
</xs:annotation>
26+
</xs:element>
27+
</xs:choice>
28+
<xs:element name="chNFe" type="TChNFe">
29+
<xs:annotation>
30+
<xs:documentation>Chave de acesso da NF-e</xs:documentation>
31+
</xs:annotation>
32+
</xs:element>
33+
<xs:element name="dhEvento" type="TDateTimeUTC">
34+
<xs:annotation>
35+
<xs:documentation>Data e Hora do Evento, formato UTC (AAAA-MM-DDThh:mm:ssTZD, onde TZD = +hh:mm ou -hh:mm)</xs:documentation>
36+
</xs:annotation>
37+
</xs:element>
38+
<xs:element name="tpEvento">
39+
<xs:annotation>
40+
<xs:documentation>Tipo do Evento</xs:documentation>
41+
</xs:annotation>
42+
<xs:simpleType>
43+
<xs:restriction base="xs:string">
44+
<xs:whiteSpace value="preserve" />
45+
<xs:pattern value="[0-9]{6}" />
46+
</xs:restriction>
47+
</xs:simpleType>
48+
</xs:element>
49+
<xs:element name="nSeqEvento">
50+
<xs:annotation>
51+
<xs:documentation>Seqüencial do evento para o mesmo tipo de evento. Para maioria dos eventos será 1, nos casos em que possa existir mais de um evento, como é o caso da carta de correção, o autor do evento deve numerar de forma seqüencial</xs:documentation>
52+
</xs:annotation>
53+
<xs:simpleType>
54+
<xs:restriction base="xs:string">
55+
<xs:whiteSpace value="preserve" />
56+
<xs:pattern value="[1-9][0-9]{0,1}" />
57+
</xs:restriction>
58+
</xs:simpleType>
59+
</xs:element>
60+
<xs:element name="xEvento">
61+
<xs:annotation>
62+
<xs:documentation>Descrição do Evento</xs:documentation>
63+
</xs:annotation>
64+
<xs:simpleType>
65+
<xs:restriction base="TString">
66+
<xs:minLength value="5" />
67+
<xs:maxLength value="60" />
68+
</xs:restriction>
69+
</xs:simpleType>
70+
</xs:element>
71+
<xs:element name="dhRecbto" type="TDateTimeUTC">
72+
<xs:annotation>
73+
<xs:documentation>Data e hora de autorização do evento no formato AAAA-MM-DDTHH:MM:SSTZD</xs:documentation>
74+
</xs:annotation>
75+
</xs:element>
76+
<xs:element name="nProt" type="TProt">
77+
<xs:annotation>
78+
<xs:documentation>Número do Protocolo do evento. 1 posição (1 – Secretaria de Fazenda Estadual 2 – Receita Federal); 2 - códiga da UF - 2 posições ano; 10 seqüencial no ano</xs:documentation>
79+
</xs:annotation>
80+
</xs:element>
81+
</xs:sequence>
82+
<xs:attribute name="versao" type="TVerResEvento" use="required" />
83+
</xs:complexType>
84+
</xs:element>
85+
<xs:simpleType name="TVerResEvento">
86+
<xs:annotation>
87+
<xs:documentation>Tipo Versão do leiate resNFe</xs:documentation>
88+
</xs:annotation>
89+
<xs:restriction base="xs:string">
90+
<xs:whiteSpace value="preserve" />
91+
<xs:enumeration value="1.01" />
92+
</xs:restriction>
93+
</xs:simpleType>
94+
</xs:schema>

0 commit comments

Comments
 (0)