Skip to content

Commit 480c2e4

Browse files
authored
Merge pull request #478 from W24-Service-GmbH/werk24/certifications
Werk24/certifications
2 parents 7c8a2b3 + 2d737ee commit 480c2e4

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

werk24/models/v2/enums.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,3 +1408,26 @@ class PrimaryProcessType(str, Enum):
14081408
CUTTING = "CUTTING"
14091409
TURNING = "TURNING"
14101410
MILLING = "MILLING"
1411+
1412+
1413+
class CertificationType(str, Enum):
1414+
AS9100 = "AS9100"
1415+
CMRT = "CMRT"
1416+
COC = "COC"
1417+
EAR = "EAR"
1418+
EN_9100 = "EN_9100"
1419+
FINISHING_CERT = "FINISHING_CERT"
1420+
HARDWARE_CERT = "HARDWARE_CERT"
1421+
IATF_16949 = "IATF_16949"
1422+
ISO_13485 = "ISO_13485"
1423+
ISO_14001 = "ISO_14001"
1424+
ISO_9001 = "ISO_9001"
1425+
ITAR = "ITAR"
1426+
JCP = "JCP"
1427+
MATERIAL_CERT_DFARS = "MATERIAL_CERT_DFARS"
1428+
MATERIAL_CERT_STANDARD = "MATERIAL_CERT_STANDARD"
1429+
MATERIAL_TRACEABILITY = "MATERIAL_TRACEABILITY"
1430+
NADCAP = "NADCAP"
1431+
NIST_800_171 = "NIST_800_171"
1432+
REACH = "REACH"
1433+
ROHS = "ROHS"

werk24/models/v2/models.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
)
1111

1212
from .enums import (
13+
CertificationType,
1314
CoordinateSpace,
1415
CurvatureType,
1516
DepthType,
@@ -1271,3 +1272,21 @@ class BoundingDimensions(BaseModel):
12711272
None,
12721273
description="The enclosing cylinder of the component.",
12731274
)
1275+
1276+
1277+
class Certification(BaseModel):
1278+
"""
1279+
Represents a certification or compliance mark on a part or drawing.
1280+
"""
1281+
1282+
certification_type: CertificationType = Field(
1283+
...,
1284+
description="The type of certification, such as CE, UL, or ISO.",
1285+
examples=[CertificationType.EAR],
1286+
)
1287+
1288+
raw_ocr: Optional[str] = Field(
1289+
None,
1290+
description="Raw OCR text extracted from the drawing that contains the certification information.",
1291+
examples=["Requires Certificate of Compliance"],
1292+
)

werk24/models/v2/responses.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
BillOfMaterial,
1010
Bore,
1111
BoundingDimensions,
12+
Certification,
1213
Chamfer,
1314
Dimension,
1415
Entry,
@@ -153,6 +154,10 @@ class ResponseMetaDataComponentDrawing(Response):
153154
None,
154155
description="Bill of materials for the component, listing parts and quantities.",
155156
)
157+
certifications: List[Certification] = Field(
158+
default_factory=list,
159+
description="List of certifications associated with the component.",
160+
)
156161
designation: list[Entry] = Field(
157162
default_factory=list,
158163
description="Designation of the component.",
@@ -177,6 +182,10 @@ class ResponseMetaDataComponentDrawing(Response):
177182
default_factory=list,
178183
description="Material options available for the component.",
179184
)
185+
notes: list[Note] = Field(
186+
default_factory=list,
187+
description="List of all notes in the drawing.",
188+
)
180189
projection_method: Optional[ProjectionMethod] = Field(
181190
None,
182191
description="Projection method used in the drawing (e.g., first angle or third angle).",
@@ -189,10 +198,6 @@ class ResponseMetaDataComponentDrawing(Response):
189198
None,
190199
description="Weight of the component.",
191200
)
192-
notes: list[Note] = Field(
193-
default_factory=list,
194-
description="List of all notes in the drawing.",
195-
)
196201

197202

198203
class ResponseRedaction(Response):

0 commit comments

Comments
 (0)