Skip to content

Commit 0c7cae7

Browse files
committed
CTe Pacote 4.00 (ZIP) (ref. NT 2025.001 v.1.05)
(Publicado em 06/06/2025) WIP
1 parent 0810d8a commit 0c7cae7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2408
-699
lines changed

nfelib/cte/bindings/v4_0/__init__.py

Lines changed: 64 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/
@@ -26,7 +26,11 @@
2626
AquavDirec,
2727
AquavTpNav,
2828
)
29-
from nfelib.cte.bindings.v4_0.cte_modal_dutoviario_v4_00 import Duto
29+
from nfelib.cte.bindings.v4_0.cte_modal_dutoviario_v4_00 import (
30+
Duto,
31+
DutoClassDuto,
32+
DutoTpContratacao,
33+
)
3034
from nfelib.cte.bindings.v4_0.cte_modal_ferroviario_v4_00 import (
3135
Ferrov,
3236
FerrovTpTraf,
@@ -114,6 +118,34 @@
114118
TunidCarga,
115119
)
116120
from nfelib.cte.bindings.v4_0.cte_v4_00 import Cte
121+
from nfelib.cte.bindings.v4_0.dfe_tipos_basicos_v1_00 import (
122+
Tcibs,
123+
TcompraGov,
124+
TcompraGovReduzido,
125+
TcredPres,
126+
TcredPresIbszfm,
127+
TdevTrib,
128+
TdifCbs,
129+
TdifIbs,
130+
TenteGov,
131+
TibscbsmonoTot,
132+
Tibscbstot,
133+
Tis,
134+
Tistot,
135+
Tmonofasia,
136+
ToperCompraGov,
137+
Tred,
138+
TtpCredPresIbszfm,
139+
TtransfCred,
140+
TtribBpe,
141+
TtribCompraGov,
142+
TtribCte,
143+
TtribNf3E,
144+
TtribNfce,
145+
TtribNfcom,
146+
TtribNfe,
147+
TtribRegular,
148+
)
117149
from nfelib.cte.bindings.v4_0.ev_canc_cecte_v4_00 import (
118150
EvCancCecte,
119151
EvCancCecteDescEvento,
@@ -170,17 +202,11 @@
170202
)
171203
from nfelib.cte.bindings.v4_0.evento_cte_v4_00 import EventoCte
172204
from nfelib.cte.bindings.v4_0.gtve_v4_00 import Gtve
173-
from nfelib.cte.bindings.v4_0.inut_cte_tipos_basico_v4_00 import (
174-
TinutCte,
175-
TprocInutCte,
176-
TretInutCte,
177-
)
178-
from nfelib.cte.bindings.v4_0.inut_cte_v4_00 import InutCte
179205
from nfelib.cte.bindings.v4_0.proc_cte_os_v4_00 import CteOsproc
206+
from nfelib.cte.bindings.v4_0.proc_cte_simp_v4_00 import CteSimpProc
180207
from nfelib.cte.bindings.v4_0.proc_cte_v4_00 import CteProc
181208
from nfelib.cte.bindings.v4_0.proc_evento_cte_v4_00 import ProcEventoCte
182209
from nfelib.cte.bindings.v4_0.proc_gtve_v4_00 import GtveProc
183-
from nfelib.cte.bindings.v4_0.proc_inut_cte_v4_00 import ProcInutCte
184210
from nfelib.cte.bindings.v4_0.ret_cons_sit_cte_v4_00 import RetConsSitCte
185211
from nfelib.cte.bindings.v4_0.ret_cons_stat_serv_cte_v4_00 import (
186212
RetConsStatServCte,
@@ -190,13 +216,11 @@
190216
from nfelib.cte.bindings.v4_0.ret_cte_v4_00 import RetCte
191217
from nfelib.cte.bindings.v4_0.ret_evento_cte_v4_00 import RetEventoCte
192218
from nfelib.cte.bindings.v4_0.ret_gtve_v4_00 import RetGtve
193-
from nfelib.cte.bindings.v4_0.ret_inut_cte_v4_00 import RetInutCte
194219
from nfelib.cte.bindings.v4_0.tipos_geral_cte_v4_00 import (
195220
Tamb,
196221
TcodUfIbge,
197222
TcorgaoIbge,
198223
TmodCt,
199-
TmodCtCargaOs,
200224
TmodCtos,
201225
TmodGtve,
202226
TmodNf,
@@ -235,6 +259,8 @@
235259
"AquavDirec",
236260
"AquavTpNav",
237261
"Duto",
262+
"DutoClassDuto",
263+
"DutoTpContratacao",
238264
"TenderFer",
239265
"Ferrov",
240266
"FerrovTpTraf",
@@ -314,6 +340,32 @@
314340
"TomaIndIetoma",
315341
"TomaToma",
316342
"Cte",
343+
"Tcibs",
344+
"TcompraGov",
345+
"TcompraGovReduzido",
346+
"TcredPres",
347+
"TcredPresIbszfm",
348+
"TdevTrib",
349+
"TdifCbs",
350+
"TdifIbs",
351+
"TenteGov",
352+
"TibscbsmonoTot",
353+
"Tibscbstot",
354+
"Tis",
355+
"Tistot",
356+
"Tmonofasia",
357+
"ToperCompraGov",
358+
"Tred",
359+
"TtpCredPresIbszfm",
360+
"TtransfCred",
361+
"TtribBpe",
362+
"TtribCte",
363+
"TtribCompraGov",
364+
"TtribNf3E",
365+
"TtribNfce",
366+
"TtribNfcom",
367+
"TtribNfe",
368+
"TtribRegular",
317369
"EvCancCecte",
318370
"EvCancCecteDescEvento",
319371
"EvCancCte",
@@ -346,29 +398,23 @@
346398
"TretEvento",
347399
"EventoCte",
348400
"Gtve",
349-
"TinutCte",
350-
"TprocInutCte",
351-
"TretInutCte",
352-
"InutCte",
353401
"CteOsproc",
402+
"CteSimpProc",
354403
"CteProc",
355404
"ProcEventoCte",
356405
"GtveProc",
357-
"ProcInutCte",
358406
"RetConsSitCte",
359407
"RetConsStatServCte",
360408
"RetCteOs",
361409
"RetCteSimp",
362410
"RetCte",
363411
"RetEventoCte",
364412
"RetGtve",
365-
"RetInutCte",
366413
"Tamb",
367414
"TcorgaoIbge",
368415
"TcodUfIbge",
369416
"TmodCt",
370417
"TmodCtos",
371-
"TmodCtCargaOs",
372418
"TmodGtve",
373419
"TmodNf",
374420
"TrsakeyValueType",

nfelib/cte/bindings/v4_0/cons_sit_cte_tipos_basico_v4_00.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/
@@ -74,7 +74,7 @@ class Meta:
7474
"required": True,
7575
"max_length": 44,
7676
"white_space": "preserve",
77-
"pattern": r"[0-9]{44}",
77+
"pattern": r"[0-9]{6}[A-Z0-9]{12}[0-9]{26}",
7878
},
7979
)
8080
versao: Optional[str] = field(
@@ -133,7 +133,7 @@ class Meta:
133133
"namespace": "http://www.portalfiscal.inf.br/cte",
134134
"required": True,
135135
"white_space": "preserve",
136-
"pattern": r"[0-9]{3}",
136+
"pattern": r"[0-9]{3,4}",
137137
},
138138
)
139139
xMotivo: Optional[str] = field(

nfelib/cte/bindings/v4_0/cons_sit_cte_v4_00.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/

nfelib/cte/bindings/v4_0/cons_stat_serv_cte_v4_00.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/

nfelib/cte/bindings/v4_0/cons_stat_serv_tipos_basico_v4_00.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/
@@ -118,7 +118,7 @@ class Meta:
118118
"namespace": "http://www.portalfiscal.inf.br/cte",
119119
"required": True,
120120
"white_space": "preserve",
121-
"pattern": r"[0-9]{3}",
121+
"pattern": r"[0-9]{3,4}",
122122
},
123123
)
124124
xMotivo: Optional[str] = field(

nfelib/cte/bindings/v4_0/cte_modal_aereo_v4_00.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/

nfelib/cte/bindings/v4_0/cte_modal_aquaviario_v4_00.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/
@@ -268,7 +268,7 @@ class InfNfe(CommonMixin):
268268
"required": True,
269269
"max_length": 44,
270270
"white_space": "preserve",
271-
"pattern": r"[0-9]{44}",
271+
"pattern": r"[0-9]{6}[A-Z0-9]{12}[0-9]{26}",
272272
},
273273
)
274274
unidRat: Optional[str] = field(

nfelib/cte/bindings/v4_0/cte_modal_dutoviario_v4_00.py

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/
55
"""
66

77
from dataclasses import dataclass, field
8+
from enum import Enum
89
from typing import Optional
910

1011
from nfelib import CommonMixin
1112

1213
__NAMESPACE__ = "http://www.portalfiscal.inf.br/cte"
1314

1415

16+
class DutoClassDuto(Enum):
17+
VALUE_1 = "1"
18+
VALUE_2 = "2"
19+
VALUE_3 = "3"
20+
21+
22+
class DutoTpContratacao(Enum):
23+
VALUE_0 = "0"
24+
VALUE_1 = "1"
25+
VALUE_2 = "2"
26+
27+
1528
@dataclass
1629
class Duto(CommonMixin):
1730
"""
@@ -20,6 +33,14 @@ class Duto(CommonMixin):
2033
:ivar vTar: Valor da tarifa
2134
:ivar dIni: Data de Início da prestação do serviço
2235
:ivar dFim: Data de Fim da prestação do serviço
36+
:ivar classDuto: Classificação do Dutoviário Informar: 1 - Gasoduto
37+
2 - Mineroduto 3 - Oleoduto
38+
:ivar tpContratacao: Tipo de contratação do serviço de transporte
39+
(apenas para gasoduto) Informar: 0 - Ponta a ponto 1 -
40+
Capacidade de Entrada 2 - Capacidade de Saida
41+
:ivar codPontoEntrada: Código do Ponto de Entrada
42+
:ivar codPontoSaida: Código do Ponto de Saída
43+
:ivar nContrato: Número do Contrato de Capacidade
2344
"""
2445

2546
class Meta:
@@ -52,3 +73,45 @@ class Meta:
5273
"pattern": r"(((20(([02468][048])|([13579][26]))-02-29))|(20[0-9][0-9])-((((0[1-9])|(1[0-2]))-((0[1-9])|(1\d)|(2[0-8])))|((((0[13578])|(1[02]))-31)|(((0[1,3-9])|(1[0-2]))-(29|30)))))",
5374
},
5475
)
76+
classDuto: Optional[DutoClassDuto] = field(
77+
default=None,
78+
metadata={
79+
"type": "Element",
80+
},
81+
)
82+
tpContratacao: Optional[DutoTpContratacao] = field(
83+
default=None,
84+
metadata={
85+
"type": "Element",
86+
},
87+
)
88+
codPontoEntrada: Optional[str] = field(
89+
default=None,
90+
metadata={
91+
"type": "Element",
92+
"min_length": 2,
93+
"max_length": 20,
94+
"white_space": "preserve",
95+
"pattern": r"[!-ÿ]{1}[ -ÿ]{0,}[!-ÿ]{1}|[!-ÿ]{1}",
96+
},
97+
)
98+
codPontoSaida: Optional[str] = field(
99+
default=None,
100+
metadata={
101+
"type": "Element",
102+
"min_length": 2,
103+
"max_length": 20,
104+
"white_space": "preserve",
105+
"pattern": r"[!-ÿ]{1}[ -ÿ]{0,}[!-ÿ]{1}|[!-ÿ]{1}",
106+
},
107+
)
108+
nContrato: Optional[str] = field(
109+
default=None,
110+
metadata={
111+
"type": "Element",
112+
"min_length": 2,
113+
"max_length": 20,
114+
"white_space": "preserve",
115+
"pattern": r"[!-ÿ]{1}[ -ÿ]{0,}[!-ÿ]{1}|[!-ÿ]{1}",
116+
},
117+
)

nfelib/cte/bindings/v4_0/cte_modal_ferroviario_v4_00.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/
@@ -224,7 +224,7 @@ class TrafMut(CommonMixin):
224224
"type": "Element",
225225
"max_length": 44,
226226
"white_space": "preserve",
227-
"pattern": r"[0-9]{44}",
227+
"pattern": r"[0-9]{6}[A-Z0-9]{12}[0-9]{26}",
228228
},
229229
)
230230
ferroEnv: List["Ferrov.TrafMut.FerroEnv"] = field(
@@ -254,7 +254,7 @@ class FerroEnv(CommonMixin):
254254
"type": "Element",
255255
"required": True,
256256
"white_space": "preserve",
257-
"pattern": r"[0-9]{14}",
257+
"pattern": r"[A-Z0-9]{12}[0-9]{2}",
258258
},
259259
)
260260
cInt: Optional[str] = field(

nfelib/cte/bindings/v4_0/cte_modal_rodoviario_os_v4_00.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""This file was generated by xsdata, v24.11, on 2025-07-14 03:04:13
1+
"""This file was generated by xsdata, v24.11, on 2025-07-14 05:12:19
22
33
Generator: DataclassGenerator
44
See: https://xsdata.readthedocs.io/
@@ -151,7 +151,7 @@ class Prop(CommonMixin):
151151
metadata={
152152
"type": "Element",
153153
"white_space": "preserve",
154-
"pattern": r"[0-9]{0}|[0-9]{14}",
154+
"pattern": r"[0-9]{0}|[A-Z0-9]{12}[0-9]{2}",
155155
},
156156
)
157157
TAF: Optional[str] = field(

0 commit comments

Comments
 (0)