Skip to content

Commit a63e089

Browse files
committed
Commit: ada4e121
1 parent 79884bc commit a63e089

File tree

9 files changed

+510
-2
lines changed

9 files changed

+510
-2
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ regula/__init__.py
22
regula/documentreader/__init__.py
33
regula/documentreader/webclient/gen/__init__.py
44
regula/documentreader/webclient/gen/api/__init__.py
5+
regula/documentreader/webclient/gen/api/default_api.py
56
regula/documentreader/webclient/gen/api/healthcheck_api.py
67
regula/documentreader/webclient/gen/api/process_api.py
78
regula/documentreader/webclient/gen/api/transaction_api.py
@@ -40,6 +41,8 @@ regula/documentreader/webclient/gen/models/container_list_list_inner.py
4041
regula/documentreader/webclient/gen/models/critical.py
4142
regula/documentreader/webclient/gen/models/cross_source_value_comparison.py
4243
regula/documentreader/webclient/gen/models/data_module.py
44+
regula/documentreader/webclient/gen/models/database_document.py
45+
regula/documentreader/webclient/gen/models/database_document_list.py
4346
regula/documentreader/webclient/gen/models/details_optical.py
4447
regula/documentreader/webclient/gen/models/details_rfid.py
4548
regula/documentreader/webclient/gen/models/device_info.py

regula/documentreader/webclient/gen/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# Define package exports
1212
__all__ = [
13+
"DefaultApi",
1314
"HealthcheckApi",
1415
"ProcessApi",
1516
"TransactionApi",
@@ -52,6 +53,8 @@
5253
"Critical",
5354
"CrossSourceValueComparison",
5455
"DataModule",
56+
"DatabaseDocument",
57+
"DatabaseDocumentList",
5558
"DetailsOptical",
5659
"DetailsRFID",
5760
"DeviceInfo",
@@ -254,6 +257,7 @@
254257

255258
if __import__("typing").TYPE_CHECKING:
256259
# import apis into sdk package
260+
from regula.documentreader.webclient.gen.api.default_api import DefaultApi as DefaultApi
257261
from regula.documentreader.webclient.gen.api.healthcheck_api import HealthcheckApi as HealthcheckApi
258262
from regula.documentreader.webclient.gen.api.process_api import ProcessApi as ProcessApi
259263
from regula.documentreader.webclient.gen.api.transaction_api import TransactionApi as TransactionApi
@@ -300,6 +304,8 @@
300304
from regula.documentreader.webclient.gen.models.critical import Critical as Critical
301305
from regula.documentreader.webclient.gen.models.cross_source_value_comparison import CrossSourceValueComparison as CrossSourceValueComparison
302306
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
303309
from regula.documentreader.webclient.gen.models.details_optical import DetailsOptical as DetailsOptical
304310
from regula.documentreader.webclient.gen.models.details_rfid import DetailsRFID as DetailsRFID
305311
from regula.documentreader.webclient.gen.models.device_info import DeviceInfo as DeviceInfo
@@ -508,6 +514,7 @@
508514
("__version__", __version__),
509515
("__all__", __all__),
510516
"""# import apis into sdk package
517+
from regula.documentreader.webclient.gen.api.default_api import DefaultApi as DefaultApi
511518
from regula.documentreader.webclient.gen.api.healthcheck_api import HealthcheckApi as HealthcheckApi
512519
from regula.documentreader.webclient.gen.api.process_api import ProcessApi as ProcessApi
513520
from regula.documentreader.webclient.gen.api.transaction_api import TransactionApi as TransactionApi
@@ -554,6 +561,8 @@
554561
from regula.documentreader.webclient.gen.models.critical import Critical as Critical
555562
from regula.documentreader.webclient.gen.models.cross_source_value_comparison import CrossSourceValueComparison as CrossSourceValueComparison
556563
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
557566
from regula.documentreader.webclient.gen.models.details_optical import DetailsOptical as DetailsOptical
558567
from regula.documentreader.webclient.gen.models.details_rfid import DetailsRFID as DetailsRFID
559568
from regula.documentreader.webclient.gen.models.device_info import DeviceInfo as DeviceInfo

regula/documentreader/webclient/gen/api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
if __import__("typing").TYPE_CHECKING:
44
# import apis into api package
5+
from regula.documentreader.webclient.gen.api.default_api import DefaultApi
56
from regula.documentreader.webclient.gen.api.healthcheck_api import HealthcheckApi
67
from regula.documentreader.webclient.gen.api.process_api import ProcessApi
78
from regula.documentreader.webclient.gen.api.transaction_api import TransactionApi
@@ -13,6 +14,7 @@
1314
LazyModule(
1415
*as_package(__file__),
1516
"""# import apis into api package
17+
from regula.documentreader.webclient.gen.api.default_api import DefaultApi
1618
from regula.documentreader.webclient.gen.api.healthcheck_api import HealthcheckApi
1719
from regula.documentreader.webclient.gen.api.process_api import ProcessApi
1820
from regula.documentreader.webclient.gen.api.transaction_api import TransactionApi
Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 DefaultApi:
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+

0 commit comments

Comments
 (0)