regula-documentreader-webclient 8.1.302.dev0__py3-none-any.whl → 8.1.339.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of regula-documentreader-webclient might be problematic. Click here for more details.
- regula/documentreader/webclient/ext/models/authenticity/authenticity_check_list.py +45 -15
- regula/documentreader/webclient/ext/models/authenticity/fiber.py +4 -4
- regula/documentreader/webclient/ext/models/authenticity/ident.py +5 -5
- regula/documentreader/webclient/ext/models/authenticity/image_ident.py +4 -4
- regula/documentreader/webclient/ext/models/authenticity/ocr_security_text.py +4 -4
- regula/documentreader/webclient/ext/models/authenticity/security_feature.py +5 -5
- regula/documentreader/webclient/ext/models/images.py +2 -2
- regula/documentreader/webclient/ext/models/recognition_response.py +3 -3
- regula/documentreader/webclient/ext/models/text.py +6 -6
- regula/documentreader/webclient/gen/__init__.py +1 -0
- regula/documentreader/webclient/gen/configuration.py +1 -1
- regula/documentreader/webclient/gen/models/__init__.py +1 -0
- regula/documentreader/webclient/gen/models/authenticity_check_result_item.py +3 -15
- regula/documentreader/webclient/gen/models/authenticity_result_type.py +0 -5
- regula/documentreader/webclient/gen/models/barcode_type.py +0 -1
- regula/documentreader/webclient/gen/models/document_image.py +1 -1
- regula/documentreader/webclient/gen/models/face_detection_item.py +2 -2
- regula/documentreader/webclient/gen/models/face_detection_result.py +2 -2
- regula/documentreader/webclient/gen/models/fiber_item.py +4 -2
- regula/documentreader/webclient/gen/models/fiber_result.py +4 -2
- regula/documentreader/webclient/gen/models/ident_item.py +7 -3
- regula/documentreader/webclient/gen/models/ident_result.py +7 -3
- regula/documentreader/webclient/gen/models/image_data.py +1 -1
- regula/documentreader/webclient/gen/models/light.py +6 -0
- regula/documentreader/webclient/gen/models/liveness_params.py +4 -2
- regula/documentreader/webclient/gen/models/ocr_security_text_item.py +3 -1
- regula/documentreader/webclient/gen/models/ocr_security_text_result.py +3 -1
- regula/documentreader/webclient/gen/models/parsing_error_codes.py +153 -0
- regula/documentreader/webclient/gen/models/photo_ident_item.py +3 -5
- regula/documentreader/webclient/gen/models/photo_ident_result.py +3 -5
- regula/documentreader/webclient/gen/models/process_params.py +4 -2
- regula/documentreader/webclient/gen/models/scenario.py +1 -0
- regula/documentreader/webclient/gen/models/security_feature_item.py +3 -1
- regula/documentreader/webclient/gen/models/security_feature_result.py +3 -1
- regula/documentreader/webclient/gen/models/security_feature_type.py +2 -0
- regula/documentreader/webclient/gen/models/symbol_recognition_result.py +1 -1
- regula/documentreader/webclient/gen/models/transaction_process_request.py +7 -1
- {regula_documentreader_webclient-8.1.302.dev0.dist-info → regula_documentreader_webclient-8.1.339.dev0.dist-info}/METADATA +2 -2
- {regula_documentreader_webclient-8.1.302.dev0.dist-info → regula_documentreader_webclient-8.1.339.dev0.dist-info}/RECORD +41 -40
- {regula_documentreader_webclient-8.1.302.dev0.dist-info → regula_documentreader_webclient-8.1.339.dev0.dist-info}/WHEEL +0 -0
- {regula_documentreader_webclient-8.1.302.dev0.dist-info → regula_documentreader_webclient-8.1.339.dev0.dist-info}/top_level.txt +0 -0
|
@@ -14,77 +14,107 @@ class AuthenticityCheckList(GenAuthenticityCheckList):
|
|
|
14
14
|
@property
|
|
15
15
|
def uv_luminescence_checks(self) -> Optional[SecurityFeatureChecks]:
|
|
16
16
|
result = self.__result_by_type(AuthenticityResultType.UV_LUMINESCENCE)
|
|
17
|
-
|
|
17
|
+
if result:
|
|
18
|
+
return SecurityFeatureChecks.from_json(result.to_json())
|
|
19
|
+
return None
|
|
18
20
|
|
|
19
21
|
@property
|
|
20
22
|
def ir_b900_checks(self) -> Optional[SecurityFeatureChecks]:
|
|
21
23
|
result = self.__result_by_type(AuthenticityResultType.IR_B900)
|
|
22
|
-
|
|
24
|
+
if result:
|
|
25
|
+
return SecurityFeatureChecks.from_json(result.to_json())
|
|
26
|
+
return None
|
|
23
27
|
|
|
24
28
|
@property
|
|
25
29
|
def image_pattern_checks(self) -> Optional[IdentChecks]:
|
|
26
30
|
result = self.__result_by_type(AuthenticityResultType.IMAGE_PATTERN)
|
|
27
|
-
|
|
31
|
+
if result:
|
|
32
|
+
return IdentChecks.from_json(result.to_json())
|
|
33
|
+
return None
|
|
28
34
|
|
|
29
35
|
@property
|
|
30
36
|
def axial_protection_checks(self) -> Optional[SecurityFeatureChecks]:
|
|
31
37
|
result = self.__result_by_type(AuthenticityResultType.AXIAL_PROTECTION)
|
|
32
|
-
|
|
38
|
+
if result:
|
|
39
|
+
return SecurityFeatureChecks.from_json(result.to_json())
|
|
40
|
+
return None
|
|
33
41
|
|
|
34
42
|
@property
|
|
35
43
|
def uv_fiber_checks(self) -> Optional[FiberChecks]:
|
|
36
44
|
result = self.__result_by_type(AuthenticityResultType.UV_FIBERS)
|
|
37
|
-
|
|
45
|
+
if result:
|
|
46
|
+
return FiberChecks.from_json(result.to_json())
|
|
47
|
+
return None
|
|
38
48
|
|
|
39
49
|
@property
|
|
40
50
|
def ir_visibility_checks(self) -> Optional[IdentChecks]:
|
|
41
51
|
result = self.__result_by_type(AuthenticityResultType.IR_VISIBILITY)
|
|
42
|
-
|
|
52
|
+
if result:
|
|
53
|
+
return IdentChecks.from_json(result.to_json())
|
|
54
|
+
return None
|
|
43
55
|
|
|
44
56
|
@property
|
|
45
57
|
def ocr_security_text_checks(self) -> Optional[OCRSecurityTextChecks]:
|
|
46
58
|
result = self.__result_by_type(AuthenticityResultType.OCR_SECURITY_TEXT)
|
|
47
|
-
|
|
59
|
+
if result:
|
|
60
|
+
return OCRSecurityTextChecks.from_json(result.to_json())
|
|
61
|
+
return None
|
|
48
62
|
|
|
49
63
|
@property
|
|
50
64
|
def ipi_checks(self) -> Optional[ImageIdentChecks]:
|
|
51
65
|
result = self.__result_by_type(AuthenticityResultType.IPI)
|
|
52
|
-
|
|
66
|
+
if result:
|
|
67
|
+
return ImageIdentChecks.from_json(result.to_json())
|
|
68
|
+
return None
|
|
53
69
|
|
|
54
70
|
@property
|
|
55
71
|
def embed_image_checks(self) -> Optional[SecurityFeatureChecks]:
|
|
56
72
|
result = self.__result_by_type(AuthenticityResultType.PHOTO_EMBED_TYPE)
|
|
57
|
-
|
|
73
|
+
if result:
|
|
74
|
+
return SecurityFeatureChecks.from_json(result.to_json())
|
|
75
|
+
return None
|
|
58
76
|
|
|
59
77
|
@property
|
|
60
78
|
def holograms_checks(self) -> Optional[SecurityFeatureChecks]:
|
|
61
79
|
result = self.__result_by_type(AuthenticityResultType.HOLOGRAMS)
|
|
62
|
-
|
|
80
|
+
if result:
|
|
81
|
+
return SecurityFeatureChecks.from_json(result.to_json())
|
|
82
|
+
return None
|
|
63
83
|
|
|
64
84
|
@property
|
|
65
85
|
def photo_area_checks(self) -> Optional[SecurityFeatureChecks]:
|
|
66
86
|
result = self.__result_by_type(AuthenticityResultType.PHOTO_AREA)
|
|
67
|
-
|
|
87
|
+
if result:
|
|
88
|
+
return SecurityFeatureChecks.from_json(result.to_json())
|
|
89
|
+
return None
|
|
68
90
|
|
|
69
91
|
@property
|
|
70
92
|
def portrait_comparison_checks(self) -> Optional[IdentChecks]:
|
|
71
93
|
result = self.__result_by_type(AuthenticityResultType.PORTRAIT_COMPARISON)
|
|
72
|
-
|
|
94
|
+
if result:
|
|
95
|
+
return IdentChecks.from_json(result.to_json())
|
|
96
|
+
return None
|
|
73
97
|
|
|
74
98
|
@property
|
|
75
99
|
def barcode_format_checks(self) -> Optional[SecurityFeatureChecks]:
|
|
76
100
|
result = self.__result_by_type(AuthenticityResultType.BARCODE_FORMAT_CHECK)
|
|
77
|
-
|
|
101
|
+
if result:
|
|
102
|
+
return SecurityFeatureChecks.from_json(result.to_json())
|
|
103
|
+
return None
|
|
78
104
|
|
|
79
105
|
@property
|
|
80
106
|
def kinegram_checks(self) -> Optional[IdentChecks]:
|
|
81
107
|
result = self.__result_by_type(AuthenticityResultType.KINEGRAM)
|
|
82
|
-
|
|
108
|
+
if result:
|
|
109
|
+
return IdentChecks.from_json(result.to_json())
|
|
110
|
+
return None
|
|
83
111
|
|
|
84
112
|
@property
|
|
85
113
|
def letter_screen_checks(self) -> Optional[IdentChecks]:
|
|
86
114
|
result = self.__result_by_type(AuthenticityResultType.LETTER_SCREEN)
|
|
87
|
-
|
|
115
|
+
if result:
|
|
116
|
+
return IdentChecks.from_json(result.to_json())
|
|
117
|
+
return None
|
|
88
118
|
|
|
89
119
|
def __result_by_type(self, authenticity_type: int) -> Optional[AuthenticityCheckResult]:
|
|
90
120
|
for result in self.list:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import List
|
|
1
|
+
from typing import List, cast
|
|
2
2
|
|
|
3
3
|
from regula.documentreader.webclient.gen.models import FiberResult, AuthenticityCheckResult
|
|
4
4
|
|
|
@@ -6,6 +6,6 @@ from regula.documentreader.webclient.gen.models import FiberResult, Authenticity
|
|
|
6
6
|
class FiberChecks(AuthenticityCheckResult):
|
|
7
7
|
|
|
8
8
|
@property
|
|
9
|
-
def
|
|
10
|
-
|
|
11
|
-
return
|
|
9
|
+
def checks_list(self) -> List[FiberResult]:
|
|
10
|
+
fiber_list: List[FiberResult] = cast(List[FiberResult], self.list)
|
|
11
|
+
return fiber_list
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import List
|
|
1
|
+
from typing import List, cast
|
|
2
2
|
|
|
3
3
|
from regula.documentreader.webclient.gen.models import AuthenticityCheckResult, IdentResult
|
|
4
4
|
|
|
@@ -6,10 +6,10 @@ from regula.documentreader.webclient.gen.models import AuthenticityCheckResult,
|
|
|
6
6
|
class IdentChecks(AuthenticityCheckResult):
|
|
7
7
|
|
|
8
8
|
@property
|
|
9
|
-
def
|
|
10
|
-
|
|
11
|
-
return
|
|
9
|
+
def checks_list(self) -> List[IdentResult]:
|
|
10
|
+
ident_list: List[IdentResult] = cast(List[IdentResult], self.list)
|
|
11
|
+
return ident_list
|
|
12
12
|
|
|
13
13
|
# element_type is SecurityFeatureType
|
|
14
14
|
def checks_by_element(self, element_type: int) -> List[IdentResult]:
|
|
15
|
-
return [check for check in self.
|
|
15
|
+
return [check for check in self.checks_list if check.element_type == element_type]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import List
|
|
1
|
+
from typing import List, cast
|
|
2
2
|
|
|
3
3
|
from regula.documentreader.webclient.gen.models import AuthenticityCheckResult, PhotoIdentResult
|
|
4
4
|
|
|
@@ -6,6 +6,6 @@ from regula.documentreader.webclient.gen.models import AuthenticityCheckResult,
|
|
|
6
6
|
class ImageIdentChecks(AuthenticityCheckResult):
|
|
7
7
|
|
|
8
8
|
@property
|
|
9
|
-
def
|
|
10
|
-
|
|
11
|
-
return
|
|
9
|
+
def checks_list(self) -> List[PhotoIdentResult]:
|
|
10
|
+
image_ident_list: List[PhotoIdentResult] = cast(List[PhotoIdentResult], self.list)
|
|
11
|
+
return image_ident_list
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import List
|
|
1
|
+
from typing import List, cast
|
|
2
2
|
|
|
3
3
|
from regula.documentreader.webclient.gen.models import AuthenticityCheckResult, OCRSecurityTextResult
|
|
4
4
|
|
|
@@ -6,6 +6,6 @@ from regula.documentreader.webclient.gen.models import AuthenticityCheckResult,
|
|
|
6
6
|
class OCRSecurityTextChecks(AuthenticityCheckResult):
|
|
7
7
|
|
|
8
8
|
@property
|
|
9
|
-
def
|
|
10
|
-
|
|
11
|
-
return
|
|
9
|
+
def checks_list(self) -> List[OCRSecurityTextResult]:
|
|
10
|
+
ocr_security_text_list: List[OCRSecurityTextResult] = cast(List[OCRSecurityTextResult], self.list)
|
|
11
|
+
return ocr_security_text_list
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import List,
|
|
1
|
+
from typing import List, cast
|
|
2
2
|
|
|
3
3
|
from regula.documentreader.webclient.gen.models import AuthenticityCheckResult, SecurityFeatureResult
|
|
4
4
|
|
|
@@ -6,10 +6,10 @@ from regula.documentreader.webclient.gen.models import AuthenticityCheckResult,
|
|
|
6
6
|
class SecurityFeatureChecks(AuthenticityCheckResult):
|
|
7
7
|
|
|
8
8
|
@property
|
|
9
|
-
def
|
|
10
|
-
|
|
11
|
-
return
|
|
9
|
+
def checks_list(self) -> List[SecurityFeatureResult]:
|
|
10
|
+
security_feature_list: List[SecurityFeatureResult] = cast(List[SecurityFeatureResult], self.list)
|
|
11
|
+
return security_feature_list
|
|
12
12
|
|
|
13
13
|
# element_type is SecurityFeatureType
|
|
14
14
|
def checks_by_element(self, element_type: int) -> List[SecurityFeatureResult]:
|
|
15
|
-
return [check for check in self.
|
|
15
|
+
return [check for check in self.checks_list if check.element_type == element_type]
|
|
@@ -33,8 +33,8 @@ class Images(GenImages):
|
|
|
33
33
|
def get_field(self, field_type: int) -> Optional[ImagesField]:
|
|
34
34
|
for field in self.field_list:
|
|
35
35
|
if field.field_type == field_type:
|
|
36
|
-
return ImagesField.
|
|
36
|
+
return ImagesField.from_json(field.to_json())
|
|
37
37
|
return None
|
|
38
38
|
|
|
39
39
|
def get_fields(self, field_type: int) -> List[ImagesField]:
|
|
40
|
-
return [ImagesField.
|
|
40
|
+
return [ImagesField.from_json(field.to_json()) for field in self.field_list if field.field_type == field_type]
|
|
@@ -20,7 +20,7 @@ class RecognitionResponse:
|
|
|
20
20
|
def text(self) -> Optional[Text]:
|
|
21
21
|
result = self.result_by_type(Result.TEXT)
|
|
22
22
|
if result:
|
|
23
|
-
return Text.
|
|
23
|
+
return Text.from_json(result.text.to_json())
|
|
24
24
|
return None
|
|
25
25
|
|
|
26
26
|
@property
|
|
@@ -34,13 +34,13 @@ class RecognitionResponse:
|
|
|
34
34
|
def images(self) -> Optional[Images]:
|
|
35
35
|
result = self.result_by_type(Result.IMAGES)
|
|
36
36
|
if result:
|
|
37
|
-
return Images.
|
|
37
|
+
return Images.from_json(result.images.to_json())
|
|
38
38
|
return None
|
|
39
39
|
|
|
40
40
|
def authenticity(self, page_idx=0) -> Optional[AuthenticityCheckList]:
|
|
41
41
|
result = self.pageable_result_by_type(Result.AUTHENTICITY, page_idx)
|
|
42
42
|
if result:
|
|
43
|
-
return AuthenticityCheckList.
|
|
43
|
+
return AuthenticityCheckList.from_json(result.authenticity_check_list.to_json())
|
|
44
44
|
return None
|
|
45
45
|
|
|
46
46
|
def image_quality_checks(self, page_idx=0) -> Optional[ImageQualityCheckList]:
|
|
@@ -11,12 +11,12 @@ class Text(GenText):
|
|
|
11
11
|
for field in self.field_list:
|
|
12
12
|
if field.field_type == field_type:
|
|
13
13
|
if lcid is not None and field.lcid == lcid:
|
|
14
|
-
return TextField.
|
|
14
|
+
return TextField.from_json(field.to_json())
|
|
15
15
|
elif lcid is None and field.lcid == LCID.LATIN:
|
|
16
|
-
return TextField.
|
|
16
|
+
return TextField.from_json(field.to_json())
|
|
17
17
|
elif lcid is None and result is None:
|
|
18
18
|
result = field
|
|
19
|
-
return TextField.
|
|
19
|
+
return TextField.from_json(result.to_json())
|
|
20
20
|
|
|
21
21
|
def get_field_value(self, field_type: int, lcid: int = None) -> Optional[str]:
|
|
22
22
|
field = self.get_field(field_type, lcid)
|
|
@@ -27,12 +27,12 @@ class Text(GenText):
|
|
|
27
27
|
for field in self.field_list:
|
|
28
28
|
if field.field_name == field_name:
|
|
29
29
|
if lcid is not None and field.lcid == lcid:
|
|
30
|
-
return TextField.
|
|
30
|
+
return TextField.from_json(field.to_json())
|
|
31
31
|
elif lcid is None and field.lcid == LCID.LATIN:
|
|
32
|
-
return TextField.
|
|
32
|
+
return TextField.from_json(field.to_json())
|
|
33
33
|
elif lcid is None and result is None:
|
|
34
34
|
result = field
|
|
35
|
-
return TextField.
|
|
35
|
+
return TextField.from_json(result.to_json())
|
|
36
36
|
|
|
37
37
|
def get_field_value_by_name(self, field_name: str, lcid: int = None) -> Optional[str]:
|
|
38
38
|
field = self.get_field_by_name(field_name, lcid)
|
|
@@ -150,6 +150,7 @@ from regula.documentreader.webclient.gen.models.out_data import OutData
|
|
|
150
150
|
from regula.documentreader.webclient.gen.models.out_data_transaction_images_field_value import OutDataTransactionImagesFieldValue
|
|
151
151
|
from regula.documentreader.webclient.gen.models.p_array_field import PArrayField
|
|
152
152
|
from regula.documentreader.webclient.gen.models.parsed_data import ParsedData
|
|
153
|
+
from regula.documentreader.webclient.gen.models.parsing_error_codes import ParsingErrorCodes
|
|
153
154
|
from regula.documentreader.webclient.gen.models.parsing_notification_codes import ParsingNotificationCodes
|
|
154
155
|
from regula.documentreader.webclient.gen.models.per_document_config import PerDocumentConfig
|
|
155
156
|
from regula.documentreader.webclient.gen.models.photo_ident_item import PhotoIdentItem
|
|
@@ -492,7 +492,7 @@ class Configuration:
|
|
|
492
492
|
return "Python SDK Debug Report:\n"\
|
|
493
493
|
"OS: {env}\n"\
|
|
494
494
|
"Python Version: {pyversion}\n"\
|
|
495
|
-
"Version of the API:
|
|
495
|
+
"Version of the API: 8.1.0\n"\
|
|
496
496
|
"SDK Package Version: 1.0.0".\
|
|
497
497
|
format(env=sys.platform, pyversion=sys.version)
|
|
498
498
|
|
|
@@ -131,6 +131,7 @@ from regula.documentreader.webclient.gen.models.out_data import OutData
|
|
|
131
131
|
from regula.documentreader.webclient.gen.models.out_data_transaction_images_field_value import OutDataTransactionImagesFieldValue
|
|
132
132
|
from regula.documentreader.webclient.gen.models.p_array_field import PArrayField
|
|
133
133
|
from regula.documentreader.webclient.gen.models.parsed_data import ParsedData
|
|
134
|
+
from regula.documentreader.webclient.gen.models.parsing_error_codes import ParsingErrorCodes
|
|
134
135
|
from regula.documentreader.webclient.gen.models.parsing_notification_codes import ParsingNotificationCodes
|
|
135
136
|
from regula.documentreader.webclient.gen.models.per_document_config import PerDocumentConfig
|
|
136
137
|
from regula.documentreader.webclient.gen.models.photo_ident_item import PhotoIdentItem
|
|
@@ -26,14 +26,10 @@ if TYPE_CHECKING:
|
|
|
26
26
|
from regula.documentreader.webclient.gen.models.photo_ident_result import PhotoIdentResult
|
|
27
27
|
from regula.documentreader.webclient.gen.models.ident_result import IdentResult
|
|
28
28
|
from regula.documentreader.webclient.gen.models.fiber_result import FiberResult
|
|
29
|
-
from regula.documentreader.webclient.gen.models.fiber_result import FiberResult
|
|
30
29
|
from regula.documentreader.webclient.gen.models.ocr_security_text_result import OCRSecurityTextResult
|
|
31
30
|
from regula.documentreader.webclient.gen.models.security_feature_result import SecurityFeatureResult
|
|
32
31
|
from regula.documentreader.webclient.gen.models.ident_result import IdentResult
|
|
33
32
|
from regula.documentreader.webclient.gen.models.ident_result import IdentResult
|
|
34
|
-
from regula.documentreader.webclient.gen.models.security_feature_result import SecurityFeatureResult
|
|
35
|
-
from regula.documentreader.webclient.gen.models.photo_ident_result import PhotoIdentResult
|
|
36
|
-
from regula.documentreader.webclient.gen.models.ident_result import IdentResult
|
|
37
33
|
from regula.documentreader.webclient.gen.models.ident_result import IdentResult
|
|
38
34
|
from regula.documentreader.webclient.gen.models.ident_result import IdentResult
|
|
39
35
|
from regula.documentreader.webclient.gen.models.ident_result import IdentResult
|
|
@@ -69,7 +65,7 @@ class AuthenticityCheckResultItem(BaseModel):
|
|
|
69
65
|
|
|
70
66
|
# discriminator mappings
|
|
71
67
|
__discriminator_value_class_map: ClassVar[Dict[str, str]] = {
|
|
72
|
-
'1': 'SecurityFeatureResult','1024': 'IdentResult','1048576': 'IdentResult','128': 'PhotoIdentResult','131072': 'IdentResult','16': 'FiberResult','
|
|
68
|
+
'1': 'SecurityFeatureResult','1024': 'IdentResult','1048576': 'IdentResult','128': 'PhotoIdentResult','131072': 'IdentResult','16': 'FiberResult','16777216': 'OCRSecurityTextResult','2': 'SecurityFeatureResult','2097152': 'IdentResult','262144': 'IdentResult','32': 'IdentResult','32768': 'IdentResult','4': 'IdentResult','4096': 'SecurityFeatureResult','4194304': 'SecurityFeatureResult','512': 'SecurityFeatureResult','524288': 'IdentResult','64': 'OCRSecurityTextResult','65536': 'SecurityFeatureResult','8': 'SecurityFeatureResult','8192': 'SecurityFeatureResult','8388608': 'SecurityFeatureResult'
|
|
73
69
|
}
|
|
74
70
|
|
|
75
71
|
@classmethod
|
|
@@ -91,7 +87,7 @@ class AuthenticityCheckResultItem(BaseModel):
|
|
|
91
87
|
return json.dumps(self.to_dict())
|
|
92
88
|
|
|
93
89
|
@classmethod
|
|
94
|
-
def from_json(cls, json_str: str) -> Optional[Union[SecurityFeatureResult, IdentResult, IdentResult, PhotoIdentResult, IdentResult, FiberResult,
|
|
90
|
+
def from_json(cls, json_str: str) -> Optional[Union[SecurityFeatureResult, IdentResult, IdentResult, PhotoIdentResult, IdentResult, FiberResult, OCRSecurityTextResult, SecurityFeatureResult, IdentResult, IdentResult, IdentResult, IdentResult, IdentResult, SecurityFeatureResult, SecurityFeatureResult, SecurityFeatureResult, IdentResult, OCRSecurityTextResult, SecurityFeatureResult, SecurityFeatureResult, SecurityFeatureResult, SecurityFeatureResult]]:
|
|
95
91
|
"""Create an instance of AuthenticityCheckResultItem from a JSON string"""
|
|
96
92
|
return cls.from_dict(json.loads(json_str))
|
|
97
93
|
|
|
@@ -116,7 +112,7 @@ class AuthenticityCheckResultItem(BaseModel):
|
|
|
116
112
|
return _dict
|
|
117
113
|
|
|
118
114
|
@classmethod
|
|
119
|
-
def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[SecurityFeatureResult, IdentResult, IdentResult, PhotoIdentResult, IdentResult, FiberResult,
|
|
115
|
+
def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[SecurityFeatureResult, IdentResult, IdentResult, PhotoIdentResult, IdentResult, FiberResult, OCRSecurityTextResult, SecurityFeatureResult, IdentResult, IdentResult, IdentResult, IdentResult, IdentResult, SecurityFeatureResult, SecurityFeatureResult, SecurityFeatureResult, IdentResult, OCRSecurityTextResult, SecurityFeatureResult, SecurityFeatureResult, SecurityFeatureResult, SecurityFeatureResult]]:
|
|
120
116
|
"""Create an instance of AuthenticityCheckResultItem from a dict"""
|
|
121
117
|
# look up the object type based on discriminator mapping
|
|
122
118
|
object_type = cls.get_discriminator_value(obj)
|
|
@@ -132,8 +128,6 @@ class AuthenticityCheckResultItem(BaseModel):
|
|
|
132
128
|
return import_module("regula.documentreader.webclient.gen.models.ident_result").IdentResult.from_dict(obj)
|
|
133
129
|
if object_type == 'FiberResult':
|
|
134
130
|
return import_module("regula.documentreader.webclient.gen.models.fiber_result").FiberResult.from_dict(obj)
|
|
135
|
-
if object_type == 'FiberResult':
|
|
136
|
-
return import_module("regula.documentreader.webclient.gen.models.fiber_result").FiberResult.from_dict(obj)
|
|
137
131
|
if object_type == 'OCRSecurityTextResult':
|
|
138
132
|
return import_module("regula.documentreader.webclient.gen.models.ocr_security_text_result").OCRSecurityTextResult.from_dict(obj)
|
|
139
133
|
if object_type == 'SecurityFeatureResult':
|
|
@@ -142,12 +136,6 @@ class AuthenticityCheckResultItem(BaseModel):
|
|
|
142
136
|
return import_module("regula.documentreader.webclient.gen.models.ident_result").IdentResult.from_dict(obj)
|
|
143
137
|
if object_type == 'IdentResult':
|
|
144
138
|
return import_module("regula.documentreader.webclient.gen.models.ident_result").IdentResult.from_dict(obj)
|
|
145
|
-
if object_type == 'SecurityFeatureResult':
|
|
146
|
-
return import_module("regula.documentreader.webclient.gen.models.security_feature_result").SecurityFeatureResult.from_dict(obj)
|
|
147
|
-
if object_type == 'PhotoIdentResult':
|
|
148
|
-
return import_module("regula.documentreader.webclient.gen.models.photo_ident_result").PhotoIdentResult.from_dict(obj)
|
|
149
|
-
if object_type == 'IdentResult':
|
|
150
|
-
return import_module("regula.documentreader.webclient.gen.models.ident_result").IdentResult.from_dict(obj)
|
|
151
139
|
if object_type == 'IdentResult':
|
|
152
140
|
return import_module("regula.documentreader.webclient.gen.models.ident_result").IdentResult.from_dict(obj)
|
|
153
141
|
if object_type == 'IdentResult':
|
|
@@ -18,7 +18,6 @@ class AuthenticityResultType(int, Enum):
|
|
|
18
18
|
"""
|
|
19
19
|
allowed enum values
|
|
20
20
|
"""
|
|
21
|
-
NONE = 0
|
|
22
21
|
UV_LUMINESCENCE = 1
|
|
23
22
|
IR_B900 = 2
|
|
24
23
|
IMAGE_PATTERN = 4
|
|
@@ -27,13 +26,10 @@ class AuthenticityResultType(int, Enum):
|
|
|
27
26
|
IR_VISIBILITY = 32
|
|
28
27
|
OCR_SECURITY_TEXT = 64
|
|
29
28
|
IPI = 128
|
|
30
|
-
IR_PHOTO = 256
|
|
31
29
|
PHOTO_EMBED_TYPE = 512
|
|
32
30
|
OVI = 1024
|
|
33
|
-
IR_LUMINESCENCE = 2048
|
|
34
31
|
HOLOGRAMS = 4096
|
|
35
32
|
PHOTO_AREA = 8192
|
|
36
|
-
UV_BACKGROUND = 16384
|
|
37
33
|
PORTRAIT_COMPARISON = 32768
|
|
38
34
|
BARCODE_FORMAT_CHECK = 65536
|
|
39
35
|
KINEGRAM = 131072
|
|
@@ -44,7 +40,6 @@ class AuthenticityResultType(int, Enum):
|
|
|
44
40
|
EXTENDED_OCR_CHECK = 4194304
|
|
45
41
|
EXTENDED_MRZ_CHECK = 8388608
|
|
46
42
|
ENCRYPTED_IPI = 16777216
|
|
47
|
-
STATUS_ONLY = 2147483648
|
|
48
43
|
|
|
49
44
|
@classmethod
|
|
50
45
|
def from_json(cls, json_str: str) -> Self:
|
|
@@ -18,7 +18,7 @@ class DocumentImage(BaseModel):
|
|
|
18
18
|
"""
|
|
19
19
|
DocumentImage
|
|
20
20
|
""" # noqa: E501
|
|
21
|
-
image: StrictStr = Field(description="Base64 encoded image")
|
|
21
|
+
image: Optional[StrictStr] = Field(default=None, description="Base64 encoded image")
|
|
22
22
|
format: Optional[StrictStr] = Field(default=None, description="Image format")
|
|
23
23
|
__properties: ClassVar[List[str]] = ["image", "format"]
|
|
24
24
|
|
|
@@ -10,7 +10,7 @@ import re # noqa: F401
|
|
|
10
10
|
import json
|
|
11
11
|
|
|
12
12
|
from pydantic import BaseModel, ConfigDict, Field
|
|
13
|
-
from typing import Any, ClassVar, Dict, List
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
14
|
from regula.documentreader.webclient.gen.models.face_detection import FaceDetection
|
|
15
15
|
from typing import Optional, Set
|
|
16
16
|
from typing_extensions import Self
|
|
@@ -19,7 +19,7 @@ class FaceDetectionItem(BaseModel):
|
|
|
19
19
|
"""
|
|
20
20
|
FaceDetectionItem
|
|
21
21
|
""" # noqa: E501
|
|
22
|
-
face_detection: FaceDetection = Field(alias="FaceDetection")
|
|
22
|
+
face_detection: Optional[FaceDetection] = Field(default=None, alias="FaceDetection")
|
|
23
23
|
__properties: ClassVar[List[str]] = ["FaceDetection"]
|
|
24
24
|
|
|
25
25
|
model_config = ConfigDict(
|
|
@@ -10,7 +10,7 @@ import re # noqa: F401
|
|
|
10
10
|
import json
|
|
11
11
|
|
|
12
12
|
from pydantic import ConfigDict, Field
|
|
13
|
-
from typing import Any, ClassVar, Dict, List
|
|
13
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
14
|
from regula.documentreader.webclient.gen.models.face_detection import FaceDetection
|
|
15
15
|
from regula.documentreader.webclient.gen.models.result import Result
|
|
16
16
|
from regula.documentreader.webclient.gen.models.result_item import ResultItem
|
|
@@ -21,7 +21,7 @@ class FaceDetectionResult(ResultItem):
|
|
|
21
21
|
"""
|
|
22
22
|
FaceDetectionResult
|
|
23
23
|
""" # noqa: E501
|
|
24
|
-
face_detection: FaceDetection = Field(alias="FaceDetection")
|
|
24
|
+
face_detection: Optional[FaceDetection] = Field(default=None, alias="FaceDetection")
|
|
25
25
|
__properties: ClassVar[List[str]] = ["buf_length", "light", "list_idx", "page_idx", "result_type", "FaceDetection"]
|
|
26
26
|
|
|
27
27
|
model_config = ConfigDict(
|
|
@@ -29,7 +29,8 @@ class FiberItem(BaseModel):
|
|
|
29
29
|
length: List[StrictInt] = Field(description="Fibers length value for located areas (in pixels)", alias="Length")
|
|
30
30
|
area: List[StrictInt] = Field(description="Fibers value for areas (in pixels)", alias="Area")
|
|
31
31
|
color_values: List[StrictInt] = Field(description="Fibers color value", alias="ColorValues")
|
|
32
|
-
|
|
32
|
+
error_code: Optional[StrictInt] = Field(default=None, alias="ErrorCode")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["RectCount", "ExpectedCount", "LightValue", "LightDisp", "RectArray", "Width", "Length", "Area", "ColorValues", "ErrorCode"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
36
|
populate_by_name=True,
|
|
@@ -97,7 +98,8 @@ class FiberItem(BaseModel):
|
|
|
97
98
|
"Width": obj.get("Width"),
|
|
98
99
|
"Length": obj.get("Length"),
|
|
99
100
|
"Area": obj.get("Area"),
|
|
100
|
-
"ColorValues": obj.get("ColorValues")
|
|
101
|
+
"ColorValues": obj.get("ColorValues"),
|
|
102
|
+
"ErrorCode": obj.get("ErrorCode")
|
|
101
103
|
})
|
|
102
104
|
return _obj
|
|
103
105
|
|
|
@@ -33,7 +33,8 @@ class FiberResult(AuthenticityCheckResultItem):
|
|
|
33
33
|
length: List[StrictInt] = Field(description="Fibers length value for located areas (in pixels)", alias="Length")
|
|
34
34
|
area: List[StrictInt] = Field(description="Fibers value for areas (in pixels)", alias="Area")
|
|
35
35
|
color_values: List[StrictInt] = Field(description="Fibers color value", alias="ColorValues")
|
|
36
|
-
|
|
36
|
+
error_code: Optional[StrictInt] = Field(default=None, alias="ErrorCode")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["Type", "ElementResult", "ElementDiagnose", "PercentValue", "RectCount", "ExpectedCount", "LightValue", "LightDisp", "RectArray", "Width", "Length", "Area", "ColorValues", "ErrorCode"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
40
|
populate_by_name=True,
|
|
@@ -105,7 +106,8 @@ class FiberResult(AuthenticityCheckResultItem):
|
|
|
105
106
|
"Width": obj.get("Width"),
|
|
106
107
|
"Length": obj.get("Length"),
|
|
107
108
|
"Area": obj.get("Area"),
|
|
108
|
-
"ColorValues": obj.get("ColorValues")
|
|
109
|
+
"ColorValues": obj.get("ColorValues"),
|
|
110
|
+
"ErrorCode": obj.get("ErrorCode")
|
|
109
111
|
})
|
|
110
112
|
return _obj
|
|
111
113
|
|
|
@@ -9,7 +9,7 @@ import pprint
|
|
|
9
9
|
import re # noqa: F401
|
|
10
10
|
import json
|
|
11
11
|
|
|
12
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
12
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
13
13
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
14
|
from regula.documentreader.webclient.gen.models.area_container import AreaContainer
|
|
15
15
|
from regula.documentreader.webclient.gen.models.image_data import ImageData
|
|
@@ -29,7 +29,9 @@ class IdentItem(BaseModel):
|
|
|
29
29
|
image: ImageData = Field(alias="Image")
|
|
30
30
|
etalon_image: ImageData = Field(alias="EtalonImage")
|
|
31
31
|
area_list: Optional[AreaContainer] = Field(default=None, alias="AreaList")
|
|
32
|
-
|
|
32
|
+
element_id: Optional[StrictInt] = Field(default=None, alias="ElementID")
|
|
33
|
+
result: Optional[StrictInt] = Field(default=None, alias="Result")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["ElementType", "LightIndex", "Area", "Image", "EtalonImage", "AreaList", "ElementID", "Result"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -99,7 +101,9 @@ class IdentItem(BaseModel):
|
|
|
99
101
|
"Area": RectangleCoordinates.from_dict(obj["Area"]) if obj.get("Area") is not None else None,
|
|
100
102
|
"Image": ImageData.from_dict(obj["Image"]) if obj.get("Image") is not None else None,
|
|
101
103
|
"EtalonImage": ImageData.from_dict(obj["EtalonImage"]) if obj.get("EtalonImage") is not None else None,
|
|
102
|
-
"AreaList": AreaContainer.from_dict(obj["AreaList"]) if obj.get("AreaList") is not None else None
|
|
104
|
+
"AreaList": AreaContainer.from_dict(obj["AreaList"]) if obj.get("AreaList") is not None else None,
|
|
105
|
+
"ElementID": obj.get("ElementID"),
|
|
106
|
+
"Result": obj.get("Result")
|
|
103
107
|
})
|
|
104
108
|
return _obj
|
|
105
109
|
|
|
@@ -9,7 +9,7 @@ import pprint
|
|
|
9
9
|
import re # noqa: F401
|
|
10
10
|
import json
|
|
11
11
|
|
|
12
|
-
from pydantic import ConfigDict, Field
|
|
12
|
+
from pydantic import ConfigDict, Field, StrictInt
|
|
13
13
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
14
14
|
from regula.documentreader.webclient.gen.models.area_container import AreaContainer
|
|
15
15
|
from regula.documentreader.webclient.gen.models.authenticity_check_result_item import AuthenticityCheckResultItem
|
|
@@ -33,7 +33,9 @@ class IdentResult(AuthenticityCheckResultItem):
|
|
|
33
33
|
image: ImageData = Field(alias="Image")
|
|
34
34
|
etalon_image: ImageData = Field(alias="EtalonImage")
|
|
35
35
|
area_list: Optional[AreaContainer] = Field(default=None, alias="AreaList")
|
|
36
|
-
|
|
36
|
+
element_id: Optional[StrictInt] = Field(default=None, alias="ElementID")
|
|
37
|
+
result: Optional[StrictInt] = Field(default=None, alias="Result")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["Type", "ElementResult", "ElementDiagnose", "PercentValue", "ElementType", "LightIndex", "Area", "Image", "EtalonImage", "AreaList", "ElementID", "Result"]
|
|
37
39
|
|
|
38
40
|
model_config = ConfigDict(
|
|
39
41
|
populate_by_name=True,
|
|
@@ -107,7 +109,9 @@ class IdentResult(AuthenticityCheckResultItem):
|
|
|
107
109
|
"Area": RectangleCoordinates.from_dict(obj["Area"]) if obj.get("Area") is not None else None,
|
|
108
110
|
"Image": ImageData.from_dict(obj["Image"]) if obj.get("Image") is not None else None,
|
|
109
111
|
"EtalonImage": ImageData.from_dict(obj["EtalonImage"]) if obj.get("EtalonImage") is not None else None,
|
|
110
|
-
"AreaList": AreaContainer.from_dict(obj["AreaList"]) if obj.get("AreaList") is not None else None
|
|
112
|
+
"AreaList": AreaContainer.from_dict(obj["AreaList"]) if obj.get("AreaList") is not None else None,
|
|
113
|
+
"ElementID": obj.get("ElementID"),
|
|
114
|
+
"Result": obj.get("Result")
|
|
111
115
|
})
|
|
112
116
|
return _obj
|
|
113
117
|
|
|
@@ -18,7 +18,7 @@ class ImageData(BaseModel):
|
|
|
18
18
|
"""
|
|
19
19
|
ImageData
|
|
20
20
|
""" # noqa: E501
|
|
21
|
-
image: StrictStr = Field(description="Base64 encoded image")
|
|
21
|
+
image: Optional[StrictStr] = Field(default=None, description="Base64 encoded image")
|
|
22
22
|
format: Optional[StrictStr] = Field(default=None, description="Image format")
|
|
23
23
|
__properties: ClassVar[List[str]] = ["image", "format"]
|
|
24
24
|
|
|
@@ -60,6 +60,12 @@ class Light(int, Enum):
|
|
|
60
60
|
UVB = 1048576
|
|
61
61
|
WHITE_OBL = 2097152
|
|
62
62
|
WHITE_SPECIAL = 4194304
|
|
63
|
+
WHITE_UV = 134
|
|
64
|
+
WHITE_FULL_HOLO = 67108870
|
|
65
|
+
HR_LIGHT = 1073741824
|
|
66
|
+
HR_WHITE = 1073741830
|
|
67
|
+
HR_UV = 1073741952
|
|
68
|
+
HR_IR = 1073741848
|
|
63
69
|
|
|
64
70
|
@classmethod
|
|
65
71
|
def from_json(cls, json_str: str) -> Self:
|
|
@@ -24,7 +24,8 @@ class LivenessParams(BaseModel):
|
|
|
24
24
|
check_ed: Optional[StrictBool] = Field(default=None, description="This parameter is used to enable Electronic device detection", alias="checkED")
|
|
25
25
|
check_black_and_white_copy: Optional[StrictBool] = Field(default=None, description="This parameter is used to enable Black and white copy check", alias="checkBlackAndWhiteCopy")
|
|
26
26
|
check_dynaprint: Optional[StrictBool] = Field(default=None, description="This parameter is used to enable Dynaprint check", alias="checkDynaprint")
|
|
27
|
-
|
|
27
|
+
check_geometry: Optional[StrictBool] = Field(default=None, description="This parameter is used to enable Geometry check", alias="checkGeometry")
|
|
28
|
+
__properties: ClassVar[List[str]] = ["checkOVI", "checkMLI", "checkHolo", "checkED", "checkBlackAndWhiteCopy", "checkDynaprint", "checkGeometry"]
|
|
28
29
|
|
|
29
30
|
model_config = ConfigDict(
|
|
30
31
|
populate_by_name=True,
|
|
@@ -82,7 +83,8 @@ class LivenessParams(BaseModel):
|
|
|
82
83
|
"checkHolo": obj.get("checkHolo"),
|
|
83
84
|
"checkED": obj.get("checkED"),
|
|
84
85
|
"checkBlackAndWhiteCopy": obj.get("checkBlackAndWhiteCopy"),
|
|
85
|
-
"checkDynaprint": obj.get("checkDynaprint")
|
|
86
|
+
"checkDynaprint": obj.get("checkDynaprint"),
|
|
87
|
+
"checkGeometry": obj.get("checkGeometry")
|
|
86
88
|
})
|
|
87
89
|
return _obj
|
|
88
90
|
|