Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions regula/documentreader/webclient/gen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"ProcessResponse",
"ProcessSystemInfo",
"ProcessingStatus",
"PropertiesParams",
"RFIDDocVisualExtendedField",
"RFIDDocVisualExtendedFieldItem",
"RFIDDocVisualExtendedInfo",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions regula/documentreader/webclient/gen/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions regula/documentreader/webclient/gen/models/auth_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
82 changes: 82 additions & 0 deletions regula/documentreader/webclient/gen/models/properties_params.py
Original file line number Diff line number Diff line change
@@ -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


Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down