diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d008295..7aa8e86 100755 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -168,6 +168,7 @@ regula/documentreader/webclient/gen/models/process_request_image.py regula/documentreader/webclient/gen/models/process_response.py regula/documentreader/webclient/gen/models/process_system_info.py regula/documentreader/webclient/gen/models/processing_status.py +regula/documentreader/webclient/gen/models/properties_params.py regula/documentreader/webclient/gen/models/raw_image_container_item.py regula/documentreader/webclient/gen/models/raw_image_container_list.py regula/documentreader/webclient/gen/models/rectangle_coordinates.py diff --git a/regula/documentreader/webclient/gen/__init__.py b/regula/documentreader/webclient/gen/__init__.py index 173c60a..1207645 100644 --- a/regula/documentreader/webclient/gen/__init__.py +++ b/regula/documentreader/webclient/gen/__init__.py @@ -180,6 +180,7 @@ "ProcessResponse", "ProcessSystemInfo", "ProcessingStatus", + "PropertiesParams", "RFIDDocVisualExtendedField", "RFIDDocVisualExtendedFieldItem", "RFIDDocVisualExtendedInfo", @@ -451,6 +452,7 @@ from regula.documentreader.webclient.gen.models.process_response import ProcessResponse as ProcessResponse from regula.documentreader.webclient.gen.models.process_system_info import ProcessSystemInfo as ProcessSystemInfo from regula.documentreader.webclient.gen.models.processing_status import ProcessingStatus as ProcessingStatus + from regula.documentreader.webclient.gen.models.properties_params import PropertiesParams as PropertiesParams from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_field import RFIDDocVisualExtendedField as RFIDDocVisualExtendedField from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_field_item import RFIDDocVisualExtendedFieldItem as RFIDDocVisualExtendedFieldItem from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_info import RFIDDocVisualExtendedInfo as RFIDDocVisualExtendedInfo @@ -728,6 +730,7 @@ from regula.documentreader.webclient.gen.models.process_response import ProcessResponse as ProcessResponse from regula.documentreader.webclient.gen.models.process_system_info import ProcessSystemInfo as ProcessSystemInfo from regula.documentreader.webclient.gen.models.processing_status import ProcessingStatus as ProcessingStatus +from regula.documentreader.webclient.gen.models.properties_params import PropertiesParams as PropertiesParams from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_field import RFIDDocVisualExtendedField as RFIDDocVisualExtendedField from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_field_item import RFIDDocVisualExtendedFieldItem as RFIDDocVisualExtendedFieldItem from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_info import RFIDDocVisualExtendedInfo as RFIDDocVisualExtendedInfo diff --git a/regula/documentreader/webclient/gen/models/__init__.py b/regula/documentreader/webclient/gen/models/__init__.py index df0970f..5eb8b79 100644 --- a/regula/documentreader/webclient/gen/models/__init__.py +++ b/regula/documentreader/webclient/gen/models/__init__.py @@ -164,6 +164,7 @@ from regula.documentreader.webclient.gen.models.process_response import ProcessResponse from regula.documentreader.webclient.gen.models.process_system_info import ProcessSystemInfo from regula.documentreader.webclient.gen.models.processing_status import ProcessingStatus + from regula.documentreader.webclient.gen.models.properties_params import PropertiesParams from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_field import RFIDDocVisualExtendedField from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_field_item import RFIDDocVisualExtendedFieldItem from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_info import RFIDDocVisualExtendedInfo @@ -422,6 +423,7 @@ from regula.documentreader.webclient.gen.models.process_response import ProcessResponse from regula.documentreader.webclient.gen.models.process_system_info import ProcessSystemInfo from regula.documentreader.webclient.gen.models.processing_status import ProcessingStatus +from regula.documentreader.webclient.gen.models.properties_params import PropertiesParams from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_field import RFIDDocVisualExtendedField from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_field_item import RFIDDocVisualExtendedFieldItem from regula.documentreader.webclient.gen.models.rfid_doc_visual_extended_info import RFIDDocVisualExtendedInfo diff --git a/regula/documentreader/webclient/gen/models/auth_params.py b/regula/documentreader/webclient/gen/models/auth_params.py index ba77429..e7daf5a 100644 --- a/regula/documentreader/webclient/gen/models/auth_params.py +++ b/regula/documentreader/webclient/gen/models/auth_params.py @@ -12,6 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional from regula.documentreader.webclient.gen.models.liveness_params import LivenessParams +from regula.documentreader.webclient.gen.models.properties_params import PropertiesParams from typing import Optional, Set from typing_extensions import Self from pydantic import SkipValidation, Field @@ -36,7 +37,9 @@ class AuthParams(BaseModel): check_photo_comparison: SkipValidation[Optional[bool]] = Field(alias="checkPhotoComparison", default=None, description="This parameter is used to enable Portrait comparison check") check_letter_screen: SkipValidation[Optional[bool]] = Field(alias="checkLetterScreen", default=None, description="This parameter is used to enable LetterScreen check") check_security_text: SkipValidation[Optional[bool]] = Field(alias="checkSecurityText", default=None, description="This parameter is used to enable Security text check") - __properties: ClassVar[List[str]] = ["checkLiveness", "livenessParams", "checkUVLuminiscence", "checkIRB900", "checkImagePatterns", "checkFibers", "checkExtMRZ", "checkExtOCR", "checkAxial", "checkBarcodeFormat", "checkIRVisibility", "checkIPI", "checkPhotoEmbedding", "checkPhotoComparison", "checkLetterScreen", "checkSecurityText"] + check_properties: SkipValidation[Optional[bool]] = Field(alias="checkProperties", default=None, description="Set to true to enable detection of the document properties, such as holder's signature and other attributes.") + properties_params: SkipValidation[Optional[PropertiesParams]] = Field(alias="propertiesParams", default=None) + __properties: ClassVar[List[str]] = ["checkLiveness", "livenessParams", "checkUVLuminiscence", "checkIRB900", "checkImagePatterns", "checkFibers", "checkExtMRZ", "checkExtOCR", "checkAxial", "checkBarcodeFormat", "checkIRVisibility", "checkIPI", "checkPhotoEmbedding", "checkPhotoComparison", "checkLetterScreen", "checkSecurityText", "checkProperties", "propertiesParams"] model_config = ConfigDict( populate_by_name=True, @@ -82,6 +85,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of liveness_params if self.liveness_params and isinstance(self.liveness_params, LivenessParams): _dict['livenessParams'] = self.liveness_params.to_dict() + # override the default output from pydantic by calling `to_dict()` of properties_params + if self.properties_params and isinstance(self.properties_params, PropertiesParams): + _dict['propertiesParams'] = self.properties_params.to_dict() return _dict @classmethod @@ -109,7 +115,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "checkPhotoEmbedding": obj.get("checkPhotoEmbedding"), "checkPhotoComparison": obj.get("checkPhotoComparison"), "checkLetterScreen": obj.get("checkLetterScreen"), - "checkSecurityText": obj.get("checkSecurityText") + "checkSecurityText": obj.get("checkSecurityText"), + "checkProperties": obj.get("checkProperties"), + "propertiesParams": PropertiesParams.from_dict(obj["propertiesParams"]) if obj.get("propertiesParams") is not None else None }) return _obj diff --git a/regula/documentreader/webclient/gen/models/authenticity_result_type.py b/regula/documentreader/webclient/gen/models/authenticity_result_type.py index 91e3c6a..3a0b9d3 100644 --- a/regula/documentreader/webclient/gen/models/authenticity_result_type.py +++ b/regula/documentreader/webclient/gen/models/authenticity_result_type.py @@ -40,6 +40,7 @@ class AuthenticityResultType(int, Enum): EXTENDED_OCR_CHECK = 4194304 EXTENDED_MRZ_CHECK = 8388608 ENCRYPTED_IPI = 16777216 + PROPERTY = 33554432 @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/regula/documentreader/webclient/gen/models/check_diagnose.py b/regula/documentreader/webclient/gen/models/check_diagnose.py index 148cdf4..856450b 100644 --- a/regula/documentreader/webclient/gen/models/check_diagnose.py +++ b/regula/documentreader/webclient/gen/models/check_diagnose.py @@ -147,6 +147,9 @@ class CheckDiagnose(int, Enum): CHD_ICAO_IDB_SIGNATURE_MUST_NOT_BE_PRESENT = 247 CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT = 248 CHD_INCORRECT_OBJECT_COLOR = 250 + PROPERTY_NO_SIGNATURE = 260 + PROPERTY_TEXT_AS_SIGNATURE = 261 + PROPERTY_FINGERPRINT_AS_SIGNATURE = 262 @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/regula/documentreader/webclient/gen/models/properties_params.py b/regula/documentreader/webclient/gen/models/properties_params.py new file mode 100644 index 0000000..a258cdf --- /dev/null +++ b/regula/documentreader/webclient/gen/models/properties_params.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Generated by: https://openapi-generator.tech +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic import SkipValidation, Field + +class PropertiesParams(BaseModel): + """ + PropertiesParams + """ # noqa: E501 + check_holders_signature: SkipValidation[Optional[bool]] = Field(alias="checkHoldersSignature", default=None, description="Set to true to enable detection of the document holder’s signature.") + __properties: ClassVar[List[str]] = ["checkHoldersSignature"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + use_enum_values=True + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PropertiesParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PropertiesParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checkHoldersSignature": obj.get("checkHoldersSignature") + }) + return _obj + + diff --git a/regula/documentreader/webclient/gen/models/security_feature_type.py b/regula/documentreader/webclient/gen/models/security_feature_type.py index c05a27d..b4bc8c0 100644 --- a/regula/documentreader/webclient/gen/models/security_feature_type.py +++ b/regula/documentreader/webclient/gen/models/security_feature_type.py @@ -79,6 +79,7 @@ class SecurityFeatureType(int, Enum): PORTRAIT_COMPARISON_BARCODE_VS_GHOST = 59 PORTRAIT_COMPARISON_GHOST_VS_LIVE = 60 PORTRAIT_COMPARISON_EXT_VS_GHOST = 61 + SIGNATURE_PRESENCE = 62 @classmethod def from_json(cls, json_str: str) -> Self: