From 12ea0bbb652142a8564fc5c8650d332020ae4962 Mon Sep 17 00:00:00 2001 From: Jochen Mattes Date: Mon, 15 Sep 2025 09:50:45 +0200 Subject: [PATCH 1/2] adds material certification --- werk24/models/v2/enums.py | 23 +++++++++++++++++++++++ werk24/models/v2/models.py | 19 +++++++++++++++++++ werk24/models/v2/responses.py | 13 +++++++++---- 3 files changed, 51 insertions(+), 4 deletions(-) diff --git a/werk24/models/v2/enums.py b/werk24/models/v2/enums.py index 62bbc8b6..f3bdee27 100644 --- a/werk24/models/v2/enums.py +++ b/werk24/models/v2/enums.py @@ -1408,3 +1408,26 @@ class PrimaryProcessType(str, Enum): CUTTING = "CUTTING" TURNING = "TURNING" MILLING = "MILLING" + + +class CertificationType(str, Enum): + AS9100 = "AS9100" + CMRT = "CMRT" + COC = "COC" + EAR = "EAR" + EN_9100 = "EN_9100" + FINISHING_CERT = "FINISHING_CERT" + HARDWARE_CERT = "HARDWARE_CERT" + IATF_16949 = "IATF_16949" + ISO_13485 = "ISO_13485" + ISO_14001 = "ISO_14001" + ISO_9001 = "ISO_9001" + ITAR = "ITAR" + JCP = "JCP" + MATERIAL_CERT_DFARS = "MATERIAL_CERT_DFARS" + MATERIAL_CERT_STANDARD = "MATERIAL_CERT_STANDARD" + MATERIAL_TRACEABILITY = "MATERIAL_TRACEABILITY" + NADCAP = "NADCAP" + NIST_800_171 = "NIST_800_171" + REACH = "REACH" + ROHS = "ROHS" diff --git a/werk24/models/v2/models.py b/werk24/models/v2/models.py index 963aa2ee..a474fd9e 100644 --- a/werk24/models/v2/models.py +++ b/werk24/models/v2/models.py @@ -10,6 +10,7 @@ ) from .enums import ( + CertificationType, CoordinateSpace, CurvatureType, DepthType, @@ -1271,3 +1272,21 @@ class BoundingDimensions(BaseModel): None, description="The enclosing cylinder of the component.", ) + + +class Certification(BaseModel): + """ + Represents a certification or compliance mark on a part or drawing. + """ + + certification_type: CertificationType = Field( + ..., + description="The type of certification, such as CE, UL, or ISO.", + examples=[CertificationType.CE], + ) + + raw_ocr: Optional[str] = Field( + None, + description="Raw OCR text extracted from the drawing that contains the certification information.", + examples=["Requires Certificate of Compliance"], + ) diff --git a/werk24/models/v2/responses.py b/werk24/models/v2/responses.py index bff524d0..363af4c1 100644 --- a/werk24/models/v2/responses.py +++ b/werk24/models/v2/responses.py @@ -9,6 +9,7 @@ BillOfMaterial, Bore, BoundingDimensions, + Certification, Chamfer, Dimension, Entry, @@ -153,6 +154,10 @@ class ResponseMetaDataComponentDrawing(Response): None, description="Bill of materials for the component, listing parts and quantities.", ) + certifications: List[Certification] = Field( + default_factory=list, + description="List of certifications associated with the component.", + ) designation: list[Entry] = Field( default_factory=list, description="Designation of the component.", @@ -177,6 +182,10 @@ class ResponseMetaDataComponentDrawing(Response): default_factory=list, description="Material options available for the component.", ) + notes: list[Note] = Field( + default_factory=list, + description="List of all notes in the drawing.", + ) projection_method: Optional[ProjectionMethod] = Field( None, description="Projection method used in the drawing (e.g., first angle or third angle).", @@ -189,10 +198,6 @@ class ResponseMetaDataComponentDrawing(Response): None, description="Weight of the component.", ) - notes: list[Note] = Field( - default_factory=list, - description="List of all notes in the drawing.", - ) class ResponseRedaction(Response): From 2d737ee2a204ef9805da32b51c5aab6ad96c6b90 Mon Sep 17 00:00:00 2001 From: Jochen Mattes Date: Mon, 15 Sep 2025 09:54:42 +0200 Subject: [PATCH 2/2] fixes default value --- werk24/models/v2/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/werk24/models/v2/models.py b/werk24/models/v2/models.py index a474fd9e..1b655abe 100644 --- a/werk24/models/v2/models.py +++ b/werk24/models/v2/models.py @@ -1282,7 +1282,7 @@ class Certification(BaseModel): certification_type: CertificationType = Field( ..., description="The type of certification, such as CE, UL, or ISO.", - examples=[CertificationType.CE], + examples=[CertificationType.EAR], ) raw_ocr: Optional[str] = Field(