regula-documentreader-webclient 8.4.556.dev0__py3-none-any.whl → 8.4.558rc0__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.

@@ -3,14 +3,14 @@ from typing import Union
3
3
  from regula.documentreader.webclient import ProcessResponse
4
4
  from regula.documentreader.webclient.gen import ApiClient
5
5
  from regula.documentreader.webclient.ext.models.recognition_response import RecognitionResponse
6
- from regula.documentreader.webclient.gen.api import HealthcheckApi, ProcessApi
6
+ from regula.documentreader.webclient.gen.api import HealthcheckApi, ProcessApi, ResourcesApi, TransactionApi
7
7
  from regula.documentreader.webclient.gen.configuration import Configuration
8
8
  from regula.documentreader.webclient.gen.models import ProcessRequest
9
9
 
10
10
  Base64String = str
11
11
 
12
12
 
13
- class DocumentReaderApi(HealthcheckApi, ProcessApi):
13
+ class DocumentReaderApi(HealthcheckApi, ProcessApi, ResourcesApi, TransactionApi):
14
14
 
15
15
  def __init__(self, host=None, debug=False, verify_ssl=True, api_client=None):
16
16
  if api_client:
@@ -12,6 +12,7 @@ __version__ = "1.0.0"
12
12
  __all__ = [
13
13
  "HealthcheckApi",
14
14
  "ProcessApi",
15
+ "ResourcesApi",
15
16
  "TransactionApi",
16
17
  "ApiResponse",
17
18
  "ApiClient",
@@ -52,6 +53,8 @@ __all__ = [
52
53
  "Critical",
53
54
  "CrossSourceValueComparison",
54
55
  "DataModule",
56
+ "DatabaseDocument",
57
+ "DatabaseDocumentList",
55
58
  "DetailsOptical",
56
59
  "DetailsRFID",
57
60
  "DeviceInfo",
@@ -256,6 +259,7 @@ if __import__("typing").TYPE_CHECKING:
256
259
  # import apis into sdk package
257
260
  from regula.documentreader.webclient.gen.api.healthcheck_api import HealthcheckApi as HealthcheckApi
258
261
  from regula.documentreader.webclient.gen.api.process_api import ProcessApi as ProcessApi
262
+ from regula.documentreader.webclient.gen.api.resources_api import ResourcesApi as ResourcesApi
259
263
  from regula.documentreader.webclient.gen.api.transaction_api import TransactionApi as TransactionApi
260
264
 
261
265
  # import ApiClient
@@ -300,6 +304,8 @@ if __import__("typing").TYPE_CHECKING:
300
304
  from regula.documentreader.webclient.gen.models.critical import Critical as Critical
301
305
  from regula.documentreader.webclient.gen.models.cross_source_value_comparison import CrossSourceValueComparison as CrossSourceValueComparison
302
306
  from regula.documentreader.webclient.gen.models.data_module import DataModule as DataModule
307
+ from regula.documentreader.webclient.gen.models.database_document import DatabaseDocument as DatabaseDocument
308
+ from regula.documentreader.webclient.gen.models.database_document_list import DatabaseDocumentList as DatabaseDocumentList
303
309
  from regula.documentreader.webclient.gen.models.details_optical import DetailsOptical as DetailsOptical
304
310
  from regula.documentreader.webclient.gen.models.details_rfid import DetailsRFID as DetailsRFID
305
311
  from regula.documentreader.webclient.gen.models.device_info import DeviceInfo as DeviceInfo
@@ -510,6 +516,7 @@ else:
510
516
  """# import apis into sdk package
511
517
  from regula.documentreader.webclient.gen.api.healthcheck_api import HealthcheckApi as HealthcheckApi
512
518
  from regula.documentreader.webclient.gen.api.process_api import ProcessApi as ProcessApi
519
+ from regula.documentreader.webclient.gen.api.resources_api import ResourcesApi as ResourcesApi
513
520
  from regula.documentreader.webclient.gen.api.transaction_api import TransactionApi as TransactionApi
514
521
 
515
522
  # import ApiClient
@@ -554,6 +561,8 @@ from regula.documentreader.webclient.gen.models.container_list_list_inner import
554
561
  from regula.documentreader.webclient.gen.models.critical import Critical as Critical
555
562
  from regula.documentreader.webclient.gen.models.cross_source_value_comparison import CrossSourceValueComparison as CrossSourceValueComparison
556
563
  from regula.documentreader.webclient.gen.models.data_module import DataModule as DataModule
564
+ from regula.documentreader.webclient.gen.models.database_document import DatabaseDocument as DatabaseDocument
565
+ from regula.documentreader.webclient.gen.models.database_document_list import DatabaseDocumentList as DatabaseDocumentList
557
566
  from regula.documentreader.webclient.gen.models.details_optical import DetailsOptical as DetailsOptical
558
567
  from regula.documentreader.webclient.gen.models.details_rfid import DetailsRFID as DetailsRFID
559
568
  from regula.documentreader.webclient.gen.models.device_info import DeviceInfo as DeviceInfo
@@ -4,6 +4,7 @@ if __import__("typing").TYPE_CHECKING:
4
4
  # import apis into api package
5
5
  from regula.documentreader.webclient.gen.api.healthcheck_api import HealthcheckApi
6
6
  from regula.documentreader.webclient.gen.api.process_api import ProcessApi
7
+ from regula.documentreader.webclient.gen.api.resources_api import ResourcesApi
7
8
  from regula.documentreader.webclient.gen.api.transaction_api import TransactionApi
8
9
 
9
10
  else:
@@ -15,6 +16,7 @@ else:
15
16
  """# import apis into api package
16
17
  from regula.documentreader.webclient.gen.api.healthcheck_api import HealthcheckApi
17
18
  from regula.documentreader.webclient.gen.api.process_api import ProcessApi
19
+ from regula.documentreader.webclient.gen.api.resources_api import ResourcesApi
18
20
  from regula.documentreader.webclient.gen.api.transaction_api import TransactionApi
19
21
 
20
22
  """,
@@ -0,0 +1,270 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Generated by: https://openapi-generator.tech
5
+ """
6
+ import warnings
7
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
8
+ from typing import Any, Dict, List, Optional, Tuple, Union
9
+ from typing_extensions import Annotated
10
+
11
+ from regula.documentreader.webclient.gen.models.database_document_list import DatabaseDocumentList
12
+
13
+ from regula.documentreader.webclient.gen.api_client import ApiClient, RequestSerialized
14
+ from regula.documentreader.webclient.gen.api_response import ApiResponse
15
+ from regula.documentreader.webclient.gen.rest import RESTResponseType
16
+
17
+
18
+ class ResourcesApi:
19
+ """NOTE: This class is auto generated by OpenAPI Generator
20
+ Ref: https://openapi-generator.tech
21
+
22
+ Do not edit the class manually.
23
+ """
24
+
25
+ def __init__(self, api_client=None) -> None:
26
+ if api_client is None:
27
+ api_client = ApiClient.get_default()
28
+ self.api_client = api_client
29
+
30
+
31
+ @validate_call
32
+ def doclist(
33
+ self,
34
+ _request_timeout: Union[
35
+ None,
36
+ Annotated[StrictFloat, Field(gt=0)],
37
+ Tuple[
38
+ Annotated[StrictFloat, Field(gt=0)],
39
+ Annotated[StrictFloat, Field(gt=0)]
40
+ ]
41
+ ] = None,
42
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
43
+ _content_type: Optional[StrictStr] = None,
44
+ _headers: Optional[Dict[StrictStr, Any]] = None,
45
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
46
+ ) -> DatabaseDocumentList:
47
+ """Returns the list of documents stored in the database that the Web Service API is running with.
48
+
49
+
50
+ :param _request_timeout: timeout setting for this request. If one
51
+ number provided, it will be total request
52
+ timeout. It can also be a pair (tuple) of
53
+ (connection, read) timeouts.
54
+ :type _request_timeout: int, tuple(int, int), optional
55
+ :param _request_auth: set to override the auth_settings for an a single
56
+ request; this effectively ignores the
57
+ authentication in the spec for a single request.
58
+ :type _request_auth: dict, optional
59
+ :param _content_type: force content-type for the request.
60
+ :type _content_type: str, Optional
61
+ :param _headers: set to override the headers for a single
62
+ request; this effectively ignores the headers
63
+ in the spec for a single request.
64
+ :type _headers: dict, optional
65
+ :param _host_index: set to override the host_index for a single
66
+ request; this effectively ignores the host_index
67
+ in the spec for a single request.
68
+ :type _host_index: int, optional
69
+ :return: Returns the result object.
70
+ """ # noqa: E501
71
+
72
+ _param = self._doclist_serialize(
73
+ _request_auth=_request_auth,
74
+ _content_type=_content_type,
75
+ _headers=_headers,
76
+ _host_index=_host_index
77
+ )
78
+
79
+ _response_types_map: Dict[str, Optional[str]] = {
80
+ '200': "DatabaseDocumentList",
81
+ }
82
+ response_data = self.api_client.call_api(
83
+ *_param,
84
+ _request_timeout=_request_timeout
85
+ )
86
+ response_data.read()
87
+ return self.api_client.response_deserialize(
88
+ response_data=response_data,
89
+ response_types_map=_response_types_map,
90
+ ).data
91
+
92
+
93
+ @validate_call
94
+ def doclist_with_http_info(
95
+ self,
96
+ _request_timeout: Union[
97
+ None,
98
+ Annotated[StrictFloat, Field(gt=0)],
99
+ Tuple[
100
+ Annotated[StrictFloat, Field(gt=0)],
101
+ Annotated[StrictFloat, Field(gt=0)]
102
+ ]
103
+ ] = None,
104
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
105
+ _content_type: Optional[StrictStr] = None,
106
+ _headers: Optional[Dict[StrictStr, Any]] = None,
107
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
108
+ ) -> ApiResponse[DatabaseDocumentList]:
109
+ """Returns the list of documents stored in the database that the Web Service API is running with.
110
+
111
+
112
+ :param _request_timeout: timeout setting for this request. If one
113
+ number provided, it will be total request
114
+ timeout. It can also be a pair (tuple) of
115
+ (connection, read) timeouts.
116
+ :type _request_timeout: int, tuple(int, int), optional
117
+ :param _request_auth: set to override the auth_settings for an a single
118
+ request; this effectively ignores the
119
+ authentication in the spec for a single request.
120
+ :type _request_auth: dict, optional
121
+ :param _content_type: force content-type for the request.
122
+ :type _content_type: str, Optional
123
+ :param _headers: set to override the headers for a single
124
+ request; this effectively ignores the headers
125
+ in the spec for a single request.
126
+ :type _headers: dict, optional
127
+ :param _host_index: set to override the host_index for a single
128
+ request; this effectively ignores the host_index
129
+ in the spec for a single request.
130
+ :type _host_index: int, optional
131
+ :return: Returns the result object.
132
+ """ # noqa: E501
133
+
134
+ _param = self._doclist_serialize(
135
+ _request_auth=_request_auth,
136
+ _content_type=_content_type,
137
+ _headers=_headers,
138
+ _host_index=_host_index
139
+ )
140
+
141
+ _response_types_map: Dict[str, Optional[str]] = {
142
+ '200': "DatabaseDocumentList",
143
+ }
144
+ response_data = self.api_client.call_api(
145
+ *_param,
146
+ _request_timeout=_request_timeout
147
+ )
148
+ response_data.read()
149
+ return self.api_client.response_deserialize(
150
+ response_data=response_data,
151
+ response_types_map=_response_types_map,
152
+ )
153
+
154
+
155
+ @validate_call
156
+ def doclist_without_preload_content(
157
+ self,
158
+ _request_timeout: Union[
159
+ None,
160
+ Annotated[StrictFloat, Field(gt=0)],
161
+ Tuple[
162
+ Annotated[StrictFloat, Field(gt=0)],
163
+ Annotated[StrictFloat, Field(gt=0)]
164
+ ]
165
+ ] = None,
166
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
167
+ _content_type: Optional[StrictStr] = None,
168
+ _headers: Optional[Dict[StrictStr, Any]] = None,
169
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
170
+ ) -> RESTResponseType:
171
+ """Returns the list of documents stored in the database that the Web Service API is running with.
172
+
173
+
174
+ :param _request_timeout: timeout setting for this request. If one
175
+ number provided, it will be total request
176
+ timeout. It can also be a pair (tuple) of
177
+ (connection, read) timeouts.
178
+ :type _request_timeout: int, tuple(int, int), optional
179
+ :param _request_auth: set to override the auth_settings for an a single
180
+ request; this effectively ignores the
181
+ authentication in the spec for a single request.
182
+ :type _request_auth: dict, optional
183
+ :param _content_type: force content-type for the request.
184
+ :type _content_type: str, Optional
185
+ :param _headers: set to override the headers for a single
186
+ request; this effectively ignores the headers
187
+ in the spec for a single request.
188
+ :type _headers: dict, optional
189
+ :param _host_index: set to override the host_index for a single
190
+ request; this effectively ignores the host_index
191
+ in the spec for a single request.
192
+ :type _host_index: int, optional
193
+ :return: Returns the result object.
194
+ """ # noqa: E501
195
+
196
+ _param = self._doclist_serialize(
197
+ _request_auth=_request_auth,
198
+ _content_type=_content_type,
199
+ _headers=_headers,
200
+ _host_index=_host_index
201
+ )
202
+
203
+ _response_types_map: Dict[str, Optional[str]] = {
204
+ '200': "DatabaseDocumentList",
205
+ }
206
+ response_data = self.api_client.call_api(
207
+ *_param,
208
+ _request_timeout=_request_timeout
209
+ )
210
+ return response_data.response
211
+
212
+
213
+ def _doclist_serialize(
214
+ self,
215
+ _request_auth,
216
+ _content_type,
217
+ _headers,
218
+ _host_index,
219
+ ) -> RequestSerialized:
220
+
221
+ _host = None
222
+
223
+ _collection_formats: Dict[str, str] = {
224
+ }
225
+
226
+ _path_params: Dict[str, str] = {}
227
+ _query_params: List[Tuple[str, str]] = []
228
+ _header_params: Dict[str, Optional[str]] = _headers or {}
229
+ _form_params: List[Tuple[str, str]] = []
230
+ _files: Dict[
231
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
232
+ ] = {}
233
+ _body_params: Optional[bytes] = None
234
+
235
+ # process the path parameters
236
+ # process the query parameters
237
+ # process the header parameters
238
+ # process the form parameters
239
+ # process the body parameter
240
+
241
+
242
+ # set the HTTP header `Accept`
243
+ if 'Accept' not in _header_params:
244
+ _header_params['Accept'] = self.api_client.select_header_accept(
245
+ [
246
+ 'application/json'
247
+ ]
248
+ )
249
+
250
+
251
+ # authentication setting
252
+ _auth_settings: List[str] = [
253
+ ]
254
+
255
+ return self.api_client.param_serialize(
256
+ method='GET',
257
+ resource_path='/api/doclist',
258
+ path_params=_path_params,
259
+ query_params=_query_params,
260
+ header_params=_header_params,
261
+ body=_body_params,
262
+ post_params=_form_params,
263
+ files=_files,
264
+ auth_settings=_auth_settings,
265
+ collection_formats=_collection_formats,
266
+ _host=_host,
267
+ _request_auth=_request_auth
268
+ )
269
+
270
+
@@ -1107,6 +1107,7 @@ class TransactionApi:
1107
1107
  self,
1108
1108
  transaction_id: Annotated[UUID, Field(description="Transaction id")],
1109
1109
  transaction_process_request: TransactionProcessRequest,
1110
+ use_cache: Annotated[Optional[StrictBool], Field(description="Get processed values from storage in case transaction has already processed.")] = None,
1110
1111
  _request_timeout: Union[
1111
1112
  None,
1112
1113
  Annotated[StrictFloat, Field(gt=0)],
@@ -1127,6 +1128,8 @@ class TransactionApi:
1127
1128
  :type transaction_id: str
1128
1129
  :param transaction_process_request: (required)
1129
1130
  :type transaction_process_request: TransactionProcessRequest
1131
+ :param use_cache: Get processed values from storage in case transaction has already processed.
1132
+ :type use_cache: bool
1130
1133
  :param _request_timeout: timeout setting for this request. If one
1131
1134
  number provided, it will be total request
1132
1135
  timeout. It can also be a pair (tuple) of
@@ -1152,6 +1155,7 @@ class TransactionApi:
1152
1155
  _param = self._api_v2_transaction_transaction_id_process_post_serialize(
1153
1156
  transaction_id=transaction_id,
1154
1157
  transaction_process_request=transaction_process_request,
1158
+ use_cache=use_cache,
1155
1159
  _request_auth=_request_auth,
1156
1160
  _content_type=_content_type,
1157
1161
  _headers=_headers,
@@ -1179,6 +1183,7 @@ class TransactionApi:
1179
1183
  self,
1180
1184
  transaction_id: Annotated[UUID, Field(description="Transaction id")],
1181
1185
  transaction_process_request: TransactionProcessRequest,
1186
+ use_cache: Annotated[Optional[StrictBool], Field(description="Get processed values from storage in case transaction has already processed.")] = None,
1182
1187
  _request_timeout: Union[
1183
1188
  None,
1184
1189
  Annotated[StrictFloat, Field(gt=0)],
@@ -1199,6 +1204,8 @@ class TransactionApi:
1199
1204
  :type transaction_id: str
1200
1205
  :param transaction_process_request: (required)
1201
1206
  :type transaction_process_request: TransactionProcessRequest
1207
+ :param use_cache: Get processed values from storage in case transaction has already processed.
1208
+ :type use_cache: bool
1202
1209
  :param _request_timeout: timeout setting for this request. If one
1203
1210
  number provided, it will be total request
1204
1211
  timeout. It can also be a pair (tuple) of
@@ -1224,6 +1231,7 @@ class TransactionApi:
1224
1231
  _param = self._api_v2_transaction_transaction_id_process_post_serialize(
1225
1232
  transaction_id=transaction_id,
1226
1233
  transaction_process_request=transaction_process_request,
1234
+ use_cache=use_cache,
1227
1235
  _request_auth=_request_auth,
1228
1236
  _content_type=_content_type,
1229
1237
  _headers=_headers,
@@ -1251,6 +1259,7 @@ class TransactionApi:
1251
1259
  self,
1252
1260
  transaction_id: Annotated[UUID, Field(description="Transaction id")],
1253
1261
  transaction_process_request: TransactionProcessRequest,
1262
+ use_cache: Annotated[Optional[StrictBool], Field(description="Get processed values from storage in case transaction has already processed.")] = None,
1254
1263
  _request_timeout: Union[
1255
1264
  None,
1256
1265
  Annotated[StrictFloat, Field(gt=0)],
@@ -1271,6 +1280,8 @@ class TransactionApi:
1271
1280
  :type transaction_id: str
1272
1281
  :param transaction_process_request: (required)
1273
1282
  :type transaction_process_request: TransactionProcessRequest
1283
+ :param use_cache: Get processed values from storage in case transaction has already processed.
1284
+ :type use_cache: bool
1274
1285
  :param _request_timeout: timeout setting for this request. If one
1275
1286
  number provided, it will be total request
1276
1287
  timeout. It can also be a pair (tuple) of
@@ -1296,6 +1307,7 @@ class TransactionApi:
1296
1307
  _param = self._api_v2_transaction_transaction_id_process_post_serialize(
1297
1308
  transaction_id=transaction_id,
1298
1309
  transaction_process_request=transaction_process_request,
1310
+ use_cache=use_cache,
1299
1311
  _request_auth=_request_auth,
1300
1312
  _content_type=_content_type,
1301
1313
  _headers=_headers,
@@ -1318,6 +1330,7 @@ class TransactionApi:
1318
1330
  self,
1319
1331
  transaction_id,
1320
1332
  transaction_process_request,
1333
+ use_cache,
1321
1334
  _request_auth,
1322
1335
  _content_type,
1323
1336
  _headers,
@@ -1342,6 +1355,10 @@ class TransactionApi:
1342
1355
  if transaction_id is not None:
1343
1356
  _path_params['transactionId'] = transaction_id
1344
1357
  # process the query parameters
1358
+ if use_cache is not None:
1359
+
1360
+ _query_params.append(('useCache', use_cache))
1361
+
1345
1362
  # process the header parameters
1346
1363
  # process the form parameters
1347
1364
  # process the body parameter
@@ -37,6 +37,8 @@ if __import__("typing").TYPE_CHECKING:
37
37
  from regula.documentreader.webclient.gen.models.critical import Critical
38
38
  from regula.documentreader.webclient.gen.models.cross_source_value_comparison import CrossSourceValueComparison
39
39
  from regula.documentreader.webclient.gen.models.data_module import DataModule
40
+ from regula.documentreader.webclient.gen.models.database_document import DatabaseDocument
41
+ from regula.documentreader.webclient.gen.models.database_document_list import DatabaseDocumentList
40
42
  from regula.documentreader.webclient.gen.models.details_optical import DetailsOptical
41
43
  from regula.documentreader.webclient.gen.models.details_rfid import DetailsRFID
42
44
  from regula.documentreader.webclient.gen.models.device_info import DeviceInfo
@@ -273,6 +275,8 @@ from regula.documentreader.webclient.gen.models.container_list_list_inner import
273
275
  from regula.documentreader.webclient.gen.models.critical import Critical
274
276
  from regula.documentreader.webclient.gen.models.cross_source_value_comparison import CrossSourceValueComparison
275
277
  from regula.documentreader.webclient.gen.models.data_module import DataModule
278
+ from regula.documentreader.webclient.gen.models.database_document import DatabaseDocument
279
+ from regula.documentreader.webclient.gen.models.database_document_list import DatabaseDocumentList
276
280
  from regula.documentreader.webclient.gen.models.details_optical import DetailsOptical
277
281
  from regula.documentreader.webclient.gen.models.details_rfid import DetailsRFID
278
282
  from regula.documentreader.webclient.gen.models.device_info import DeviceInfo
@@ -0,0 +1,111 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Generated by: https://openapi-generator.tech
5
+ """
6
+
7
+ from __future__ import annotations
8
+ import pprint
9
+ import re # noqa: F401
10
+ import json
11
+
12
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
13
+ from typing import Any, ClassVar, Dict, List, Optional
14
+ from regula.documentreader.webclient.gen.models.document_type import DocumentType
15
+ from typing import Optional, Set
16
+ from typing_extensions import Self
17
+ from pydantic import SkipValidation, Field
18
+
19
+ class DatabaseDocument(BaseModel):
20
+ """
21
+ DatabaseDocument
22
+ """ # noqa: E501
23
+ barcode_fields: SkipValidation[bool] = Field(alias="barcode_fields", description="Whether the document has a barcode.")
24
+ country: SkipValidation[str] = Field(alias="country", description="Country name.")
25
+ createad: SkipValidation[str] = Field(alias="createad", description="Date when the document description was created in the database.")
26
+ doc_type: SkipValidation[DocumentType] = Field(alias="doc_type")
27
+ document: SkipValidation[str] = Field(alias="document", description="Document name.")
28
+ graphic_fields: SkipValidation[bool] = Field(alias="graphic_fields", description="The presence of graphic fields in the document.")
29
+ id: SkipValidation[int] = Field(alias="id", description="Document code.")
30
+ mrz: SkipValidation[bool] = Field(alias="mrz", description="The document has an MRZ.")
31
+ region: SkipValidation[Optional[str]] = Field(alias="region", default=None, description="Country region.")
32
+ rfid_chip: SkipValidation[bool] = Field(alias="rfid_chip", description="The document has an RFID chip.")
33
+ text_fields: SkipValidation[bool] = Field(alias="text_fields", description="The presence of text fields in the document.")
34
+ updated: SkipValidation[str] = Field(alias="updated", description="Date when the document description was updated in the database.")
35
+ year: SkipValidation[Optional[str]] = Field(alias="year", default=None, description="The year when the document was issued.")
36
+ sovereignty: SkipValidation[Optional[str]] = Field(alias="sovereignty", default=None, description="Guardian country.")
37
+ deprecated: SkipValidation[Optional[bool]] = Field(alias="deprecated", default=None, description="Whether the document is no longer in circulation.")
38
+ __properties: ClassVar[List[str]] = ["barcode_fields", "country", "createad", "doc_type", "document", "graphic_fields", "id", "mrz", "region", "rfid_chip", "text_fields", "updated", "year", "sovereignty", "deprecated"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ arbitrary_types_allowed=True,
45
+ use_enum_values=True
46
+ )
47
+
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of DatabaseDocument from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ ])
75
+
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of DatabaseDocument from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "barcode_fields": obj.get("barcode_fields"),
94
+ "country": obj.get("country"),
95
+ "createad": obj.get("createad"),
96
+ "doc_type": obj.get("doc_type"),
97
+ "document": obj.get("document"),
98
+ "graphic_fields": obj.get("graphic_fields"),
99
+ "id": obj.get("id"),
100
+ "mrz": obj.get("mrz"),
101
+ "region": obj.get("region"),
102
+ "rfid_chip": obj.get("rfid_chip"),
103
+ "text_fields": obj.get("text_fields"),
104
+ "updated": obj.get("updated"),
105
+ "year": obj.get("year"),
106
+ "sovereignty": obj.get("sovereignty"),
107
+ "deprecated": obj.get("deprecated")
108
+ })
109
+ return _obj
110
+
111
+
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Generated by: https://openapi-generator.tech
5
+ """
6
+
7
+ from __future__ import annotations
8
+ import pprint
9
+ import re # noqa: F401
10
+ import json
11
+
12
+ from pydantic import BaseModel, ConfigDict, Field
13
+ from typing import Any, ClassVar, Dict, List
14
+ from regula.documentreader.webclient.gen.models.database_document import DatabaseDocument
15
+ from typing import Optional, Set
16
+ from typing_extensions import Self
17
+ from pydantic import SkipValidation, Field
18
+
19
+ class DatabaseDocumentList(BaseModel):
20
+ """
21
+ DatabaseDocumentList
22
+ """ # noqa: E501
23
+ items: SkipValidation[List[DatabaseDocument]] = Field(alias="items", description="The list of documents stored in the database.")
24
+ __properties: ClassVar[List[str]] = ["items"]
25
+
26
+ model_config = ConfigDict(
27
+ populate_by_name=True,
28
+ validate_assignment=True,
29
+ protected_namespaces=(),
30
+ arbitrary_types_allowed=True,
31
+ use_enum_values=True
32
+ )
33
+
34
+
35
+ def to_str(self) -> str:
36
+ """Returns the string representation of the model using alias"""
37
+ return pprint.pformat(self.model_dump(by_alias=True))
38
+
39
+ def to_json(self) -> str:
40
+ """Returns the JSON representation of the model using alias"""
41
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
42
+ return json.dumps(self.to_dict())
43
+
44
+ @classmethod
45
+ def from_json(cls, json_str: str) -> Optional[Self]:
46
+ """Create an instance of DatabaseDocumentList from a JSON string"""
47
+ return cls.from_dict(json.loads(json_str))
48
+
49
+ def to_dict(self) -> Dict[str, Any]:
50
+ """Return the dictionary representation of the model using alias.
51
+
52
+ This has the following differences from calling pydantic's
53
+ `self.model_dump(by_alias=True)`:
54
+
55
+ * `None` is only added to the output dict for nullable fields that
56
+ were set at model initialization. Other fields with value `None`
57
+ are ignored.
58
+ """
59
+ excluded_fields: Set[str] = set([
60
+ ])
61
+
62
+ _dict = self.model_dump(
63
+ by_alias=True,
64
+ exclude=excluded_fields,
65
+ exclude_none=True,
66
+ )
67
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
68
+ _items = []
69
+ if self.items:
70
+ for _item_items in self.items:
71
+ if _item_items:
72
+ _items.append(_item_items.to_dict())
73
+ _dict['items'] = _items
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of DatabaseDocumentList from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "items": [DatabaseDocument.from_dict(_item) for _item in obj.get("items", []) if DatabaseDocument.from_dict(_item) is not None]
87
+ })
88
+ return _obj
89
+
90
+
@@ -101,7 +101,8 @@ class ProcessParams(BaseModel):
101
101
  pdf_pages_limit: SkipValidation[Optional[int]] = Field(alias="pdfPagesLimit", default=None, description="Limits the number of pages to be processed from a PDF file.")
102
102
  disable_auth_resolution_filter: SkipValidation[Optional[bool]] = Field(alias="disableAuthResolutionFilter", default=None, description="This parameter if enabled will ignore the minimum barcode resolution needed to start processing.")
103
103
  strict_security_checks: SkipValidation[Optional[bool]] = Field(alias="strictSecurityChecks", default=None, description="When enabled, this parameter marks security checks that don’t meet minimum requirements as 'Failed' (instead of 'WasNotDone'), which causes the overall security status to be 'Failed'.")
104
- __properties: ClassVar[List[str]] = ["generateDTCVC", "lcidFilter", "checkLiveness", "lcidIgnoreFilter", "oneShotIdentification", "useFaceApi", "faceApi", "doDetectCan", "imageOutputMaxHeight", "imageOutputMaxWidth", "scenario", "resultTypeOutput", "doublePageSpread", "generateDoublePageSpreadImage", "fieldTypesFilter", "dateFormat", "measureSystem", "imageDpiOutMax", "alreadyCropped", "customParams", "config", "log", "logLevel", "forceDocID", "matchTextFieldMask", "fastDocDetect", "updateOCRValidityByGlare", "checkRequiredTextFields", "returnCroppedBarcode", "imageQa", "strictImageQuality", "respectImageQuality", "forceDocFormat", "noGraphics", "depersonalizeLog", "multiDocOnImage", "shiftExpiryDate", "minimalHolderAge", "returnUncroppedImage", "mrzFormatsFilter", "forceReadMrzBeforeLocate", "parseBarcodes", "convertCase", "splitNames", "disablePerforationOCR", "documentGroupFilter", "processAuth", "deviceId", "deviceType", "deviceTypeHex", "ignoreDeviceIdFromImage", "documentIdList", "rfid", "checkAuth", "authParams", "mrzDetectMode", "generateNumericCodes", "strictBarcodeDigitalSignatureCheck", "selectLongestNames", "doBarcodes", "strictDLCategoryExpiry", "generateAlpha2Codes", "pdfPagesLimit", "disableAuthResolutionFilter", "strictSecurityChecks"]
104
+ return_transliterated_fields: SkipValidation[Optional[bool]] = Field(alias="returnTransliteratedFields", default=None, description="Allows transliteration to be turned on or off; by default, it is enabled.")
105
+ __properties: ClassVar[List[str]] = ["generateDTCVC", "lcidFilter", "checkLiveness", "lcidIgnoreFilter", "oneShotIdentification", "useFaceApi", "faceApi", "doDetectCan", "imageOutputMaxHeight", "imageOutputMaxWidth", "scenario", "resultTypeOutput", "doublePageSpread", "generateDoublePageSpreadImage", "fieldTypesFilter", "dateFormat", "measureSystem", "imageDpiOutMax", "alreadyCropped", "customParams", "config", "log", "logLevel", "forceDocID", "matchTextFieldMask", "fastDocDetect", "updateOCRValidityByGlare", "checkRequiredTextFields", "returnCroppedBarcode", "imageQa", "strictImageQuality", "respectImageQuality", "forceDocFormat", "noGraphics", "depersonalizeLog", "multiDocOnImage", "shiftExpiryDate", "minimalHolderAge", "returnUncroppedImage", "mrzFormatsFilter", "forceReadMrzBeforeLocate", "parseBarcodes", "convertCase", "splitNames", "disablePerforationOCR", "documentGroupFilter", "processAuth", "deviceId", "deviceType", "deviceTypeHex", "ignoreDeviceIdFromImage", "documentIdList", "rfid", "checkAuth", "authParams", "mrzDetectMode", "generateNumericCodes", "strictBarcodeDigitalSignatureCheck", "selectLongestNames", "doBarcodes", "strictDLCategoryExpiry", "generateAlpha2Codes", "pdfPagesLimit", "disableAuthResolutionFilter", "strictSecurityChecks", "returnTransliteratedFields"]
105
106
 
106
107
  model_config = ConfigDict(
107
108
  populate_by_name=True,
@@ -239,7 +240,8 @@ class ProcessParams(BaseModel):
239
240
  "generateAlpha2Codes": obj.get("generateAlpha2Codes"),
240
241
  "pdfPagesLimit": obj.get("pdfPagesLimit"),
241
242
  "disableAuthResolutionFilter": obj.get("disableAuthResolutionFilter"),
242
- "strictSecurityChecks": obj.get("strictSecurityChecks")
243
+ "strictSecurityChecks": obj.get("strictSecurityChecks"),
244
+ "returnTransliteratedFields": obj.get("returnTransliteratedFields")
243
245
  })
244
246
  return _obj
245
247
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: regula_documentreader_webclient
3
- Version: 8.4.556.dev0
3
+ Version: 8.4.558rc0
4
4
  Summary: Regula's Document Reader python client
5
5
  Home-page: https://regulaforensics.com
6
6
  Author: Regula Forensics, Inc.
@@ -3,7 +3,7 @@ regula/documentreader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
3
3
  regula/documentreader/webclient/__init__.py,sha256=9hNPg8FLQRyDZAueC34R9NnYD6krtWSlnUczVs-jYyU,100
4
4
  regula/documentreader/webclient/ext/__init__.py,sha256=9ahgPOBtNOMhuCo7I0FqNOlrlUfoHq1rQucZcEF6bnQ,1119
5
5
  regula/documentreader/webclient/ext/api/__init__.py,sha256=Xzygo6zcLQaUJmchHGc2awK1kGwgIcqdBBqexU8iZfI,90
6
- regula/documentreader/webclient/ext/api/document_reader_api.py,sha256=oXapG6vVGn8EtuyGmDkERulgdCfphVG0JmH2Nd9Ays0,2292
6
+ regula/documentreader/webclient/ext/api/document_reader_api.py,sha256=WTEGSAsvwkzXnIzjGBrLYYBwJzuN9yCehJwrMLrRBd4,2352
7
7
  regula/documentreader/webclient/ext/models/__init__.py,sha256=c8SIj9HZVotag-5rsFbSeQdTAD_kkCe4POpf6WHgSs0,1103
8
8
  regula/documentreader/webclient/ext/models/images.py,sha256=x4BU2eQoE7AlDskSFlXHzMDJtEUldiN84VHyxWoN980,1409
9
9
  regula/documentreader/webclient/ext/models/recognition_request.py,sha256=GWOhOqSm8weoo4ngHK1G1sKbmCpxmy1O33RhooCTpMQ,3385
@@ -17,18 +17,19 @@ regula/documentreader/webclient/ext/models/authenticity/ident.py,sha256=DSmXEJ-v
17
17
  regula/documentreader/webclient/ext/models/authenticity/image_ident.py,sha256=QmKTghP4Lo7bHBEubwzsVt1ob97NNaNIu_5QN_LUF9M,370
18
18
  regula/documentreader/webclient/ext/models/authenticity/ocr_security_text.py,sha256=BV0h2_UDrwUlWczoJQW8qTSkdZ0icm0n0pPDRY9Qwq4,407
19
19
  regula/documentreader/webclient/ext/models/authenticity/security_feature.py,sha256=t8egDyT1wlGvsyvZboAFOvcaYsALGpj41E50FUbvx68,622
20
- regula/documentreader/webclient/gen/__init__.py,sha256=GCZqiHii-kQ6CTxfkpCwcKqW7S9v2jJutKst8bxS8a4,60707
20
+ regula/documentreader/webclient/gen/__init__.py,sha256=gR3bW_kkK7ZSqQUbUYhdc0S9Y2wX9QFnR0pjkJ22Amw,61447
21
21
  regula/documentreader/webclient/gen/api_client.py,sha256=BZ1SIy0PwA4khadeMet9fNj8pt1j_OaaebUSHChq31k,27673
22
22
  regula/documentreader/webclient/gen/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
23
23
  regula/documentreader/webclient/gen/configuration.py,sha256=0hMqlAxYaL30050LBPnHrh6Sg1EIfSfQLr0eGNRNz1w,18084
24
24
  regula/documentreader/webclient/gen/exceptions.py,sha256=fYFXlhg-wAlI9z7BBe-1Eifxm9tiBONwsXkH_VMq4RE,6228
25
25
  regula/documentreader/webclient/gen/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  regula/documentreader/webclient/gen/rest.py,sha256=y7sJJqeEmZH-cdSovKzh4w3GhJZ7-fQH6C9tNr7NLao,9246
27
- regula/documentreader/webclient/gen/api/__init__.py,sha256=v4_OMiqFnSqq6QQtO51dXylWfQroQu9OxkAwog10xmM,839
27
+ regula/documentreader/webclient/gen/api/__init__.py,sha256=tV8dT21wd7mWggGTykkC8-V4TIMw8VrGcy8GmHXpQmU,1001
28
28
  regula/documentreader/webclient/gen/api/healthcheck_api.py,sha256=g3Q3XsdgYfEmmdgnnspRX5DluONia4bDANKUZLRMMlQ,29942
29
29
  regula/documentreader/webclient/gen/api/process_api.py,sha256=RnJXVZy-M1bNfiXK0tHEQEuhOgxkXk9jMG-hpZfTjZ8,12123
30
- regula/documentreader/webclient/gen/api/transaction_api.py,sha256=lVfSEe4-iWrP_2gdQ3Pg5XJu9MNtKK7fyKJC-M0y8Rk,65548
31
- regula/documentreader/webclient/gen/models/__init__.py,sha256=CA-hi89GT7USlPrYyOtazj0BGeMQtWFPU1pDID5dLWk,43117
30
+ regula/documentreader/webclient/gen/api/resources_api.py,sha256=grQfqv8hZNJnR1hC72jG614D_Y9MDn3sMyZYWllk15U,10264
31
+ regula/documentreader/webclient/gen/api/transaction_api.py,sha256=53uZvktOfFNr_b9iWYR0AqD4YGTzvVtfUa25ir5ooqE,66657
32
+ regula/documentreader/webclient/gen/models/__init__.py,sha256=PDtw9Ds3a-mP2OnXUz8mIwyPHRJJZyQVt-8a5GFShU0,43503
32
33
  regula/documentreader/webclient/gen/models/area_array.py,sha256=cWpxUR1lpgj1UalajIiU8s3OjhWEZqYli9bV02ixT2M,3684
33
34
  regula/documentreader/webclient/gen/models/area_container.py,sha256=E6e1gPW516A0KCAmHm05ad_I0yD3FauruZgNxU-EIdA,3665
34
35
  regula/documentreader/webclient/gen/models/auth_params.py,sha256=XY1Exfwh68u6FKGhZdjnzHPmB2pFlKxiywcV7f5dj2E,6743
@@ -59,6 +60,8 @@ regula/documentreader/webclient/gen/models/container_list_list_inner.py,sha256=Q
59
60
  regula/documentreader/webclient/gen/models/critical.py,sha256=u_jXlQuCjH5mDzT79bswOCm3-mv3uGfd345QHRLIopk,564
60
61
  regula/documentreader/webclient/gen/models/cross_source_value_comparison.py,sha256=vErGJnUVL1wFNng3-9vZT6j9JRt4O_n40awdZf8hIPc,2849
61
62
  regula/documentreader/webclient/gen/models/data_module.py,sha256=gprIbhcuGDWFrfYyncW0XmkpUzm7k9bPsyebQQbJ8gs,3017
63
+ regula/documentreader/webclient/gen/models/database_document.py,sha256=-Feuit0SvCg47y3FpPQUkNbinpUFRsg4lgO2g_egRuY,4970
64
+ regula/documentreader/webclient/gen/models/database_document_list.py,sha256=6cW6klu0XBCoQgjUb3o92XIWMnRNWKHsjn-aR_A1p1U,2983
62
65
  regula/documentreader/webclient/gen/models/details_optical.py,sha256=4BqIREpkP_KLFjr7g5poV_juFOiv3sn9HSb016-mioE,3531
63
66
  regula/documentreader/webclient/gen/models/details_rfid.py,sha256=0E9egs-_npBsr5C9obstMx9ebRypofQg6f15_IkQwgU,3095
64
67
  regula/documentreader/webclient/gen/models/device_info.py,sha256=ug5JWmmRuwRuRZygdK6kzskEOWHNgCjfLR-O0ewzVX8,4594
@@ -165,7 +168,7 @@ regula/documentreader/webclient/gen/models/photo_ident_result.py,sha256=_BD7dYR8
165
168
  regula/documentreader/webclient/gen/models/point.py,sha256=TBIznHwx7KPGeWBoA9uGcQks_zYsm17w2AuQyagz9QU,2402
166
169
  regula/documentreader/webclient/gen/models/point_array.py,sha256=m7QaOSsfbOzL6Skd8dWdvJjMJrwGVJxqnqxVg0XaM8A,2893
167
170
  regula/documentreader/webclient/gen/models/points_container.py,sha256=4zYuorTsQpbPDHwcVlJVtfNj9sc6g9h5b1idHnRQEVU,3086
168
- regula/documentreader/webclient/gen/models/process_params.py,sha256=A6M_avvqWz9eTPl73gORfQsEZ4aWDk2VZ2buTsaUuEA,26118
171
+ regula/documentreader/webclient/gen/models/process_params.py,sha256=_IIfhL56wNf1qZxGtEMNo3CZKjMsI8zdMA1HKoz53HM,26441
169
172
  regula/documentreader/webclient/gen/models/process_params_rfid.py,sha256=Uafaa-fWJi3_L49C_KsOnaOyB1c76qsFqzeUsfDrOug,2782
170
173
  regula/documentreader/webclient/gen/models/process_request.py,sha256=mfrFQREqd9MPBFnDbhr464tasA_6qncUbzc-bDX1wDA,6132
171
174
  regula/documentreader/webclient/gen/models/process_request_image.py,sha256=66CDZtzqPDrQQsl6GVzhbLvwaR2WUm_yvT2H_QzrqzQ,3148
@@ -260,7 +263,7 @@ regula/documentreader/webclient/gen/models/verification_result.py,sha256=E6bCVR5
260
263
  regula/documentreader/webclient/gen/models/verified_field_map.py,sha256=QjCCjZ82WhT5uzdFthwfiX4Kgi5RL_m7E0NprLhHAJs,4863
261
264
  regula/documentreader/webclient/gen/models/visibility.py,sha256=GACgQd_8lx_cwMwI5lCi7cTxEWxw2atbJo6uI4mTKpQ,602
262
265
  regula/documentreader/webclient/gen/models/visual_extended_field_item.py,sha256=ym9y5RWEoE_92NrJfcrKA6OCtE_E8IOuiRHF2Ar3EQc,5245
263
- regula_documentreader_webclient-8.4.556.dev0.dist-info/METADATA,sha256=biEtGzG7KuW5CyIOYPA8v3MvVd9aq_FIJSC1crD58zI,4036
264
- regula_documentreader_webclient-8.4.556.dev0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
265
- regula_documentreader_webclient-8.4.556.dev0.dist-info/top_level.txt,sha256=SFSSVn4j8QDivd3307s97NtpIJ8zOjiWZloAxZIClJY,7
266
- regula_documentreader_webclient-8.4.556.dev0.dist-info/RECORD,,
266
+ regula_documentreader_webclient-8.4.558rc0.dist-info/METADATA,sha256=0BMTmfezNPURxJJ6CI4s60zpfjMmSi6HFVQJeRtMMng,4034
267
+ regula_documentreader_webclient-8.4.558rc0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
268
+ regula_documentreader_webclient-8.4.558rc0.dist-info/top_level.txt,sha256=SFSSVn4j8QDivd3307s97NtpIJ8zOjiWZloAxZIClJY,7
269
+ regula_documentreader_webclient-8.4.558rc0.dist-info/RECORD,,