dockflow-sdk 0.3.0__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.
Files changed (52) hide show
  1. dockflow_sdk/__init__.py +124 -0
  2. dockflow_sdk/api/__init__.py +8 -0
  3. dockflow_sdk/api/documents_api.py +1382 -0
  4. dockflow_sdk/api/tradeflows_api.py +615 -0
  5. dockflow_sdk/api/upstream_api.py +471 -0
  6. dockflow_sdk/api/widget_api.py +303 -0
  7. dockflow_sdk/api_client.py +865 -0
  8. dockflow_sdk/api_response.py +21 -0
  9. dockflow_sdk/configuration.py +658 -0
  10. dockflow_sdk/exceptions.py +218 -0
  11. dockflow_sdk/models/__init__.py +51 -0
  12. dockflow_sdk/models/container_reference.py +90 -0
  13. dockflow_sdk/models/create_tradeflows202_response.py +104 -0
  14. dockflow_sdk/models/create_tradeflows202_response_tradeflows_inner.py +90 -0
  15. dockflow_sdk/models/document_update.py +92 -0
  16. dockflow_sdk/models/document_upload.py +105 -0
  17. dockflow_sdk/models/downstream_tradeflow.py +189 -0
  18. dockflow_sdk/models/downstream_tradeflow_bill_of_lading_reference.py +138 -0
  19. dockflow_sdk/models/downstream_tradeflow_booking_reference.py +138 -0
  20. dockflow_sdk/models/downstream_tradeflow_events_inner.py +97 -0
  21. dockflow_sdk/models/downstream_tradeflow_free_time_overrides_inner.py +101 -0
  22. dockflow_sdk/models/downstream_tradeflow_mock_tracking.py +88 -0
  23. dockflow_sdk/models/downstream_tradeflow_partners_inner.py +94 -0
  24. dockflow_sdk/models/downstream_tradeflow_references.py +92 -0
  25. dockflow_sdk/models/get_document200_response.py +100 -0
  26. dockflow_sdk/models/get_document200_response_data_inner.py +133 -0
  27. dockflow_sdk/models/get_document200_response_data_inner_document_type.py +90 -0
  28. dockflow_sdk/models/get_upstream200_response.py +102 -0
  29. dockflow_sdk/models/get_upstream400_response.py +172 -0
  30. dockflow_sdk/models/inline_object.py +90 -0
  31. dockflow_sdk/models/list_document_types200_response_inner.py +90 -0
  32. dockflow_sdk/models/upload_document202_response.py +120 -0
  33. dockflow_sdk/models/upload_document400_response.py +155 -0
  34. dockflow_sdk/models/upstream_record.py +132 -0
  35. dockflow_sdk/models/upstream_record_additional_references.py +90 -0
  36. dockflow_sdk/models/upstream_record_data_quality.py +96 -0
  37. dockflow_sdk/models/upstream_record_metadata.py +105 -0
  38. dockflow_sdk/models/widget_container.py +120 -0
  39. dockflow_sdk/models/widget_country.py +100 -0
  40. dockflow_sdk/models/widget_leg.py +113 -0
  41. dockflow_sdk/models/widget_location.py +129 -0
  42. dockflow_sdk/models/widget_milestone.py +118 -0
  43. dockflow_sdk/models/widget_point.py +90 -0
  44. dockflow_sdk/models/widget_search_result.py +155 -0
  45. dockflow_sdk/models/widget_track.py +102 -0
  46. dockflow_sdk/models/widget_track_reading.py +92 -0
  47. dockflow_sdk/py.typed +0 -0
  48. dockflow_sdk/rest.py +334 -0
  49. dockflow_sdk-0.3.0.dist-info/METADATA +212 -0
  50. dockflow_sdk-0.3.0.dist-info/RECORD +52 -0
  51. dockflow_sdk-0.3.0.dist-info/WHEEL +5 -0
  52. dockflow_sdk-0.3.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,303 @@
1
+ """
2
+ Dockflow v3 API
3
+
4
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 3.0.0
7
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+
9
+ Do not edit the class manually.
10
+ """ # noqa: E501
11
+
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import Field
19
+ from typing_extensions import Annotated
20
+ from dockflow_sdk.models.widget_search_result import WidgetSearchResult
21
+
22
+ from dockflow_sdk.api_client import ApiClient, RequestSerialized
23
+ from dockflow_sdk.api_response import ApiResponse
24
+ from dockflow_sdk.rest import RESTResponseType
25
+
26
+
27
+ class WidgetApi:
28
+ """NOTE: This class is auto generated by OpenAPI Generator
29
+ Ref: https://openapi-generator.tech
30
+
31
+ Do not edit the class manually.
32
+ """
33
+
34
+ def __init__(self, api_client=None) -> None:
35
+ if api_client is None:
36
+ api_client = ApiClient.get_default()
37
+ self.api_client = api_client
38
+
39
+
40
+ @validate_call
41
+ def search_widget(
42
+ self,
43
+ q: Annotated[str, Field(min_length=4, strict=True, max_length=64, description="Container number, booking or bill of lading reference.")],
44
+ _request_timeout: Union[
45
+ None,
46
+ Annotated[StrictFloat, Field(gt=0)],
47
+ Tuple[
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Annotated[StrictFloat, Field(gt=0)]
50
+ ]
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> WidgetSearchResult:
57
+ """Search a shipment for the embeddable tracking widget
58
+
59
+ Matches a container number, booking or bill of lading within the token's entity and returns the best match.
60
+
61
+ :param q: Container number, booking or bill of lading reference. (required)
62
+ :type q: str
63
+ :param _request_timeout: timeout setting for this request. If one
64
+ number provided, it will be total request
65
+ timeout. It can also be a pair (tuple) of
66
+ (connection, read) timeouts.
67
+ :type _request_timeout: int, tuple(int, int), optional
68
+ :param _request_auth: set to override the auth_settings for an a single
69
+ request; this effectively ignores the
70
+ authentication in the spec for a single request.
71
+ :type _request_auth: dict, optional
72
+ :param _content_type: force content-type for the request.
73
+ :type _content_type: str, Optional
74
+ :param _headers: set to override the headers for a single
75
+ request; this effectively ignores the headers
76
+ in the spec for a single request.
77
+ :type _headers: dict, optional
78
+ :param _host_index: set to override the host_index for a single
79
+ request; this effectively ignores the host_index
80
+ in the spec for a single request.
81
+ :type _host_index: int, optional
82
+ :return: Returns the result object.
83
+ """ # noqa: E501
84
+
85
+ _param = self._search_widget_serialize(
86
+ q=q,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index
91
+ )
92
+
93
+ _response_types_map: Dict[str, Optional[str]] = {
94
+ '200': "WidgetSearchResult",
95
+ '422': "InlineObject",
96
+ }
97
+ response_data = self.api_client.call_api(
98
+ *_param,
99
+ _request_timeout=_request_timeout
100
+ )
101
+ response_data.read()
102
+ return self.api_client.response_deserialize(
103
+ response_data=response_data,
104
+ response_types_map=_response_types_map,
105
+ ).data
106
+
107
+
108
+ @validate_call
109
+ def search_widget_with_http_info(
110
+ self,
111
+ q: Annotated[str, Field(min_length=4, strict=True, max_length=64, description="Container number, booking or bill of lading reference.")],
112
+ _request_timeout: Union[
113
+ None,
114
+ Annotated[StrictFloat, Field(gt=0)],
115
+ Tuple[
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Annotated[StrictFloat, Field(gt=0)]
118
+ ]
119
+ ] = None,
120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
121
+ _content_type: Optional[StrictStr] = None,
122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
124
+ ) -> ApiResponse[WidgetSearchResult]:
125
+ """Search a shipment for the embeddable tracking widget
126
+
127
+ Matches a container number, booking or bill of lading within the token's entity and returns the best match.
128
+
129
+ :param q: Container number, booking or bill of lading reference. (required)
130
+ :type q: str
131
+ :param _request_timeout: timeout setting for this request. If one
132
+ number provided, it will be total request
133
+ timeout. It can also be a pair (tuple) of
134
+ (connection, read) timeouts.
135
+ :type _request_timeout: int, tuple(int, int), optional
136
+ :param _request_auth: set to override the auth_settings for an a single
137
+ request; this effectively ignores the
138
+ authentication in the spec for a single request.
139
+ :type _request_auth: dict, optional
140
+ :param _content_type: force content-type for the request.
141
+ :type _content_type: str, Optional
142
+ :param _headers: set to override the headers for a single
143
+ request; this effectively ignores the headers
144
+ in the spec for a single request.
145
+ :type _headers: dict, optional
146
+ :param _host_index: set to override the host_index for a single
147
+ request; this effectively ignores the host_index
148
+ in the spec for a single request.
149
+ :type _host_index: int, optional
150
+ :return: Returns the result object.
151
+ """ # noqa: E501
152
+
153
+ _param = self._search_widget_serialize(
154
+ q=q,
155
+ _request_auth=_request_auth,
156
+ _content_type=_content_type,
157
+ _headers=_headers,
158
+ _host_index=_host_index
159
+ )
160
+
161
+ _response_types_map: Dict[str, Optional[str]] = {
162
+ '200': "WidgetSearchResult",
163
+ '422': "InlineObject",
164
+ }
165
+ response_data = self.api_client.call_api(
166
+ *_param,
167
+ _request_timeout=_request_timeout
168
+ )
169
+ response_data.read()
170
+ return self.api_client.response_deserialize(
171
+ response_data=response_data,
172
+ response_types_map=_response_types_map,
173
+ )
174
+
175
+
176
+ @validate_call
177
+ def search_widget_without_preload_content(
178
+ self,
179
+ q: Annotated[str, Field(min_length=4, strict=True, max_length=64, description="Container number, booking or bill of lading reference.")],
180
+ _request_timeout: Union[
181
+ None,
182
+ Annotated[StrictFloat, Field(gt=0)],
183
+ Tuple[
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Annotated[StrictFloat, Field(gt=0)]
186
+ ]
187
+ ] = None,
188
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
189
+ _content_type: Optional[StrictStr] = None,
190
+ _headers: Optional[Dict[StrictStr, Any]] = None,
191
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
192
+ ) -> RESTResponseType:
193
+ """Search a shipment for the embeddable tracking widget
194
+
195
+ Matches a container number, booking or bill of lading within the token's entity and returns the best match.
196
+
197
+ :param q: Container number, booking or bill of lading reference. (required)
198
+ :type q: str
199
+ :param _request_timeout: timeout setting for this request. If one
200
+ number provided, it will be total request
201
+ timeout. It can also be a pair (tuple) of
202
+ (connection, read) timeouts.
203
+ :type _request_timeout: int, tuple(int, int), optional
204
+ :param _request_auth: set to override the auth_settings for an a single
205
+ request; this effectively ignores the
206
+ authentication in the spec for a single request.
207
+ :type _request_auth: dict, optional
208
+ :param _content_type: force content-type for the request.
209
+ :type _content_type: str, Optional
210
+ :param _headers: set to override the headers for a single
211
+ request; this effectively ignores the headers
212
+ in the spec for a single request.
213
+ :type _headers: dict, optional
214
+ :param _host_index: set to override the host_index for a single
215
+ request; this effectively ignores the host_index
216
+ in the spec for a single request.
217
+ :type _host_index: int, optional
218
+ :return: Returns the result object.
219
+ """ # noqa: E501
220
+
221
+ _param = self._search_widget_serialize(
222
+ q=q,
223
+ _request_auth=_request_auth,
224
+ _content_type=_content_type,
225
+ _headers=_headers,
226
+ _host_index=_host_index
227
+ )
228
+
229
+ _response_types_map: Dict[str, Optional[str]] = {
230
+ '200': "WidgetSearchResult",
231
+ '422': "InlineObject",
232
+ }
233
+ response_data = self.api_client.call_api(
234
+ *_param,
235
+ _request_timeout=_request_timeout
236
+ )
237
+ return response_data.response
238
+
239
+
240
+ def _search_widget_serialize(
241
+ self,
242
+ q,
243
+ _request_auth,
244
+ _content_type,
245
+ _headers,
246
+ _host_index,
247
+ ) -> RequestSerialized:
248
+
249
+ _host = None
250
+
251
+ _collection_formats: Dict[str, str] = {
252
+ }
253
+
254
+ _path_params: Dict[str, str] = {}
255
+ _query_params: List[Tuple[str, str]] = []
256
+ _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
257
+ _form_params: List[Tuple[str, str]] = []
258
+ _files: Dict[
259
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
260
+ ] = {}
261
+ _body_params: Optional[bytes] = None
262
+
263
+ # process the path parameters
264
+ # process the query parameters
265
+ if q is not None:
266
+
267
+ _query_params.append(('q', q))
268
+
269
+ # process the header parameters
270
+ # process the form parameters
271
+ # process the body parameter
272
+
273
+
274
+ # set the HTTP header `Accept`
275
+ if not any(key.lower() == 'accept' for key in _header_params):
276
+ _header_params['Accept'] = self.api_client.select_header_accept(
277
+ [
278
+ 'application/json'
279
+ ]
280
+ )
281
+
282
+
283
+ # authentication setting
284
+ _auth_settings: List[str] = [
285
+ 'ApiKey'
286
+ ]
287
+
288
+ return self.api_client.param_serialize(
289
+ method='GET',
290
+ resource_path='/v3/widget/search',
291
+ path_params=_path_params,
292
+ query_params=_query_params,
293
+ header_params=_header_params,
294
+ body=_body_params,
295
+ post_params=_form_params,
296
+ files=_files,
297
+ auth_settings=_auth_settings,
298
+ collection_formats=_collection_formats,
299
+ _host=_host,
300
+ _request_auth=_request_auth
301
+ )
302
+
303
+