beetkeeper-api-client 0.12.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.
- beetkeeper_api_client/__init__.py +112 -0
- beetkeeper_api_client/_scm_version.py +1 -0
- beetkeeper_api_client/api/__init__.py +9 -0
- beetkeeper_api_client/api/authentication_api.py +758 -0
- beetkeeper_api_client/api/events_api.py +1663 -0
- beetkeeper_api_client/api/imports_api.py +3134 -0
- beetkeeper_api_client/api/monitoring_api.py +377 -0
- beetkeeper_api_client/api/query_api.py +1250 -0
- beetkeeper_api_client/api_client.py +845 -0
- beetkeeper_api_client/api_response.py +21 -0
- beetkeeper_api_client/configuration.py +604 -0
- beetkeeper_api_client/exceptions.py +218 -0
- beetkeeper_api_client/models/__init__.py +44 -0
- beetkeeper_api_client/models/api_album.py +285 -0
- beetkeeper_api_client/models/api_track.py +528 -0
- beetkeeper_api_client/models/beets_event_type.py +40 -0
- beetkeeper_api_client/models/clean_slate_preview.py +147 -0
- beetkeeper_api_client/models/clean_slate_submit_request.py +116 -0
- beetkeeper_api_client/models/current_beets_subject_state.py +140 -0
- beetkeeper_api_client/models/decision_request.py +104 -0
- beetkeeper_api_client/models/event_search_response.py +97 -0
- beetkeeper_api_client/models/event_search_result.py +107 -0
- beetkeeper_api_client/models/event_subject_summary.py +100 -0
- beetkeeper_api_client/models/events_list_response.py +95 -0
- beetkeeper_api_client/models/find_missing_source_path_request.py +100 -0
- beetkeeper_api_client/models/find_missing_source_path_response.py +108 -0
- beetkeeper_api_client/models/health_info.py +101 -0
- beetkeeper_api_client/models/http_validation_error.py +95 -0
- beetkeeper_api_client/models/import_action.py +38 -0
- beetkeeper_api_client/models/import_candidate.py +171 -0
- beetkeeper_api_client/models/import_decision.py +96 -0
- beetkeeper_api_client/models/import_job.py +162 -0
- beetkeeper_api_client/models/import_job_status.py +41 -0
- beetkeeper_api_client/models/import_submit_request.py +104 -0
- beetkeeper_api_client/models/listener_event_details.py +121 -0
- beetkeeper_api_client/models/location_inner.py +138 -0
- beetkeeper_api_client/models/login_request_body.py +90 -0
- beetkeeper_api_client/models/login_response_body.py +100 -0
- beetkeeper_api_client/models/logout_response_body.py +88 -0
- beetkeeper_api_client/models/search_missing_source_path_result.py +106 -0
- beetkeeper_api_client/models/validation_error.py +108 -0
- beetkeeper_api_client/py.typed +0 -0
- beetkeeper_api_client/rest.py +201 -0
- beetkeeper_api_client/sync_helper.py +57 -0
- beetkeeper_api_client-0.12.0.dist-info/METADATA +34 -0
- beetkeeper_api_client-0.12.0.dist-info/RECORD +48 -0
- beetkeeper_api_client-0.12.0.dist-info/WHEEL +5 -0
- beetkeeper_api_client-0.12.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
"""
|
|
2
|
+
beetkeeper
|
|
3
|
+
|
|
4
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document:
|
|
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 beetkeeper_api_client.models.login_request_body import LoginRequestBody
|
|
19
|
+
from beetkeeper_api_client.models.login_response_body import LoginResponseBody
|
|
20
|
+
from beetkeeper_api_client.models.logout_response_body import LogoutResponseBody
|
|
21
|
+
|
|
22
|
+
from beetkeeper_api_client.api_client import ApiClient, RequestSerialized
|
|
23
|
+
from beetkeeper_api_client.api_response import ApiResponse
|
|
24
|
+
from beetkeeper_api_client.rest import RESTResponseType
|
|
25
|
+
from beetkeeper_api_client.sync_helper import run_sync
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class AuthenticationApi:
|
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
30
|
+
Ref: https://openapi-generator.tech
|
|
31
|
+
|
|
32
|
+
Do not edit the class manually.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, api_client=None) -> None:
|
|
36
|
+
if api_client is None:
|
|
37
|
+
api_client = ApiClient.get_default()
|
|
38
|
+
self.api_client = api_client
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@validate_call
|
|
42
|
+
async def login_api_auth_login_post(
|
|
43
|
+
self,
|
|
44
|
+
login_request_body: LoginRequestBody,
|
|
45
|
+
_request_timeout: Union[
|
|
46
|
+
None,
|
|
47
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
48
|
+
Tuple[
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
51
|
+
]
|
|
52
|
+
] = None,
|
|
53
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
54
|
+
_content_type: Optional[StrictStr] = None,
|
|
55
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
57
|
+
) -> LoginResponseBody:
|
|
58
|
+
"""Login
|
|
59
|
+
|
|
60
|
+
Exchange the configured `beetkeeper.auth` credentials for a bearer token.
|
|
61
|
+
|
|
62
|
+
:param login_request_body: (required)
|
|
63
|
+
:type login_request_body: LoginRequestBody
|
|
64
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
65
|
+
number provided, it will be total request
|
|
66
|
+
timeout. It can also be a pair (tuple) of
|
|
67
|
+
(connection, read) timeouts.
|
|
68
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
69
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
70
|
+
request; this effectively ignores the
|
|
71
|
+
authentication in the spec for a single request.
|
|
72
|
+
:type _request_auth: dict, optional
|
|
73
|
+
:param _content_type: force content-type for the request.
|
|
74
|
+
:type _content_type: str, Optional
|
|
75
|
+
:param _headers: set to override the headers for a single
|
|
76
|
+
request; this effectively ignores the headers
|
|
77
|
+
in the spec for a single request.
|
|
78
|
+
:type _headers: dict, optional
|
|
79
|
+
:param _host_index: set to override the host_index for a single
|
|
80
|
+
request; this effectively ignores the host_index
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _host_index: int, optional
|
|
83
|
+
:return: Returns the result object.
|
|
84
|
+
""" # noqa: E501
|
|
85
|
+
|
|
86
|
+
_param = self._login_api_auth_login_post_serialize(
|
|
87
|
+
login_request_body=login_request_body,
|
|
88
|
+
_request_auth=_request_auth,
|
|
89
|
+
_content_type=_content_type,
|
|
90
|
+
_headers=_headers,
|
|
91
|
+
_host_index=_host_index
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
95
|
+
'200': "LoginResponseBody",
|
|
96
|
+
'422': "HTTPValidationError",
|
|
97
|
+
}
|
|
98
|
+
response_data = await self.api_client.call_api(
|
|
99
|
+
*_param,
|
|
100
|
+
_request_timeout=_request_timeout
|
|
101
|
+
)
|
|
102
|
+
await response_data.read()
|
|
103
|
+
return self.api_client.response_deserialize(
|
|
104
|
+
response_data=response_data,
|
|
105
|
+
response_types_map=_response_types_map,
|
|
106
|
+
).data
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@validate_call
|
|
110
|
+
async def login_api_auth_login_post_with_http_info(
|
|
111
|
+
self,
|
|
112
|
+
login_request_body: LoginRequestBody,
|
|
113
|
+
_request_timeout: Union[
|
|
114
|
+
None,
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Tuple[
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
119
|
+
]
|
|
120
|
+
] = None,
|
|
121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
122
|
+
_content_type: Optional[StrictStr] = None,
|
|
123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
125
|
+
) -> ApiResponse[LoginResponseBody]:
|
|
126
|
+
"""Login
|
|
127
|
+
|
|
128
|
+
Exchange the configured `beetkeeper.auth` credentials for a bearer token.
|
|
129
|
+
|
|
130
|
+
:param login_request_body: (required)
|
|
131
|
+
:type login_request_body: LoginRequestBody
|
|
132
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
133
|
+
number provided, it will be total request
|
|
134
|
+
timeout. It can also be a pair (tuple) of
|
|
135
|
+
(connection, read) timeouts.
|
|
136
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
137
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
138
|
+
request; this effectively ignores the
|
|
139
|
+
authentication in the spec for a single request.
|
|
140
|
+
:type _request_auth: dict, optional
|
|
141
|
+
:param _content_type: force content-type for the request.
|
|
142
|
+
:type _content_type: str, Optional
|
|
143
|
+
:param _headers: set to override the headers for a single
|
|
144
|
+
request; this effectively ignores the headers
|
|
145
|
+
in the spec for a single request.
|
|
146
|
+
:type _headers: dict, optional
|
|
147
|
+
:param _host_index: set to override the host_index for a single
|
|
148
|
+
request; this effectively ignores the host_index
|
|
149
|
+
in the spec for a single request.
|
|
150
|
+
:type _host_index: int, optional
|
|
151
|
+
:return: Returns the result object.
|
|
152
|
+
""" # noqa: E501
|
|
153
|
+
|
|
154
|
+
_param = self._login_api_auth_login_post_serialize(
|
|
155
|
+
login_request_body=login_request_body,
|
|
156
|
+
_request_auth=_request_auth,
|
|
157
|
+
_content_type=_content_type,
|
|
158
|
+
_headers=_headers,
|
|
159
|
+
_host_index=_host_index
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
163
|
+
'200': "LoginResponseBody",
|
|
164
|
+
'422': "HTTPValidationError",
|
|
165
|
+
}
|
|
166
|
+
response_data = await self.api_client.call_api(
|
|
167
|
+
*_param,
|
|
168
|
+
_request_timeout=_request_timeout
|
|
169
|
+
)
|
|
170
|
+
await response_data.read()
|
|
171
|
+
return self.api_client.response_deserialize(
|
|
172
|
+
response_data=response_data,
|
|
173
|
+
response_types_map=_response_types_map,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@validate_call
|
|
178
|
+
async def login_api_auth_login_post_without_preload_content(
|
|
179
|
+
self,
|
|
180
|
+
login_request_body: LoginRequestBody,
|
|
181
|
+
_request_timeout: Union[
|
|
182
|
+
None,
|
|
183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
184
|
+
Tuple[
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
187
|
+
]
|
|
188
|
+
] = None,
|
|
189
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
190
|
+
_content_type: Optional[StrictStr] = None,
|
|
191
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
192
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
193
|
+
) -> RESTResponseType:
|
|
194
|
+
"""Login
|
|
195
|
+
|
|
196
|
+
Exchange the configured `beetkeeper.auth` credentials for a bearer token.
|
|
197
|
+
|
|
198
|
+
:param login_request_body: (required)
|
|
199
|
+
:type login_request_body: LoginRequestBody
|
|
200
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
201
|
+
number provided, it will be total request
|
|
202
|
+
timeout. It can also be a pair (tuple) of
|
|
203
|
+
(connection, read) timeouts.
|
|
204
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
205
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
206
|
+
request; this effectively ignores the
|
|
207
|
+
authentication in the spec for a single request.
|
|
208
|
+
:type _request_auth: dict, optional
|
|
209
|
+
:param _content_type: force content-type for the request.
|
|
210
|
+
:type _content_type: str, Optional
|
|
211
|
+
:param _headers: set to override the headers for a single
|
|
212
|
+
request; this effectively ignores the headers
|
|
213
|
+
in the spec for a single request.
|
|
214
|
+
:type _headers: dict, optional
|
|
215
|
+
:param _host_index: set to override the host_index for a single
|
|
216
|
+
request; this effectively ignores the host_index
|
|
217
|
+
in the spec for a single request.
|
|
218
|
+
:type _host_index: int, optional
|
|
219
|
+
:return: Returns the result object.
|
|
220
|
+
""" # noqa: E501
|
|
221
|
+
|
|
222
|
+
_param = self._login_api_auth_login_post_serialize(
|
|
223
|
+
login_request_body=login_request_body,
|
|
224
|
+
_request_auth=_request_auth,
|
|
225
|
+
_content_type=_content_type,
|
|
226
|
+
_headers=_headers,
|
|
227
|
+
_host_index=_host_index
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
231
|
+
'200': "LoginResponseBody",
|
|
232
|
+
'422': "HTTPValidationError",
|
|
233
|
+
}
|
|
234
|
+
response_data = await self.api_client.call_api(
|
|
235
|
+
*_param,
|
|
236
|
+
_request_timeout=_request_timeout
|
|
237
|
+
)
|
|
238
|
+
return response_data.response
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
@validate_call
|
|
242
|
+
def login_api_auth_login_post_sync(
|
|
243
|
+
self,
|
|
244
|
+
login_request_body: LoginRequestBody,
|
|
245
|
+
_request_timeout: Union[
|
|
246
|
+
None,
|
|
247
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
248
|
+
Tuple[
|
|
249
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
250
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
251
|
+
]
|
|
252
|
+
] = None,
|
|
253
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
254
|
+
_content_type: Optional[StrictStr] = None,
|
|
255
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
256
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
257
|
+
) -> LoginResponseBody:
|
|
258
|
+
"""Login (synchronous)
|
|
259
|
+
|
|
260
|
+
Synchronous variant of :meth:`login_api_auth_login_post`. It calls the asynchronous
|
|
261
|
+
method and blocks until it completes.
|
|
262
|
+
""" # noqa: E501
|
|
263
|
+
return run_sync(
|
|
264
|
+
self.login_api_auth_login_post(
|
|
265
|
+
login_request_body=login_request_body,
|
|
266
|
+
_request_timeout=_request_timeout,
|
|
267
|
+
_request_auth=_request_auth,
|
|
268
|
+
_content_type=_content_type,
|
|
269
|
+
_headers=_headers,
|
|
270
|
+
_host_index=_host_index,
|
|
271
|
+
)
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
@validate_call
|
|
276
|
+
def login_api_auth_login_post_sync_with_http_info(
|
|
277
|
+
self,
|
|
278
|
+
login_request_body: LoginRequestBody,
|
|
279
|
+
_request_timeout: Union[
|
|
280
|
+
None,
|
|
281
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
282
|
+
Tuple[
|
|
283
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
284
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
285
|
+
]
|
|
286
|
+
] = None,
|
|
287
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
288
|
+
_content_type: Optional[StrictStr] = None,
|
|
289
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
290
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
291
|
+
) -> ApiResponse[LoginResponseBody]:
|
|
292
|
+
"""Login (synchronous)
|
|
293
|
+
|
|
294
|
+
Synchronous variant of :meth:`login_api_auth_login_post_with_http_info`. It calls the
|
|
295
|
+
asynchronous method and blocks until it completes.
|
|
296
|
+
""" # noqa: E501
|
|
297
|
+
return run_sync(
|
|
298
|
+
self.login_api_auth_login_post_with_http_info(
|
|
299
|
+
login_request_body=login_request_body,
|
|
300
|
+
_request_timeout=_request_timeout,
|
|
301
|
+
_request_auth=_request_auth,
|
|
302
|
+
_content_type=_content_type,
|
|
303
|
+
_headers=_headers,
|
|
304
|
+
_host_index=_host_index,
|
|
305
|
+
)
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
@validate_call
|
|
310
|
+
def login_api_auth_login_post_sync_without_preload_content(
|
|
311
|
+
self,
|
|
312
|
+
login_request_body: LoginRequestBody,
|
|
313
|
+
_request_timeout: Union[
|
|
314
|
+
None,
|
|
315
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
316
|
+
Tuple[
|
|
317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
318
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
319
|
+
]
|
|
320
|
+
] = None,
|
|
321
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
322
|
+
_content_type: Optional[StrictStr] = None,
|
|
323
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
324
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
325
|
+
) -> RESTResponseType:
|
|
326
|
+
"""Login (synchronous)
|
|
327
|
+
|
|
328
|
+
Synchronous variant of :meth:`login_api_auth_login_post_without_preload_content`. It calls
|
|
329
|
+
the asynchronous method and blocks until it completes.
|
|
330
|
+
""" # noqa: E501
|
|
331
|
+
return run_sync(
|
|
332
|
+
self.login_api_auth_login_post_without_preload_content(
|
|
333
|
+
login_request_body=login_request_body,
|
|
334
|
+
_request_timeout=_request_timeout,
|
|
335
|
+
_request_auth=_request_auth,
|
|
336
|
+
_content_type=_content_type,
|
|
337
|
+
_headers=_headers,
|
|
338
|
+
_host_index=_host_index,
|
|
339
|
+
)
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
def _login_api_auth_login_post_serialize(
|
|
344
|
+
self,
|
|
345
|
+
login_request_body,
|
|
346
|
+
_request_auth,
|
|
347
|
+
_content_type,
|
|
348
|
+
_headers,
|
|
349
|
+
_host_index,
|
|
350
|
+
) -> RequestSerialized:
|
|
351
|
+
|
|
352
|
+
_host = None
|
|
353
|
+
|
|
354
|
+
_collection_formats: Dict[str, str] = {
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
_path_params: Dict[str, str] = {}
|
|
358
|
+
_query_params: List[Tuple[str, str]] = []
|
|
359
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
360
|
+
_form_params: List[Tuple[str, str]] = []
|
|
361
|
+
_files: Dict[
|
|
362
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
363
|
+
] = {}
|
|
364
|
+
_body_params: Optional[bytes] = None
|
|
365
|
+
|
|
366
|
+
# process the path parameters
|
|
367
|
+
# process the query parameters
|
|
368
|
+
# process the header parameters
|
|
369
|
+
# process the form parameters
|
|
370
|
+
# process the body parameter
|
|
371
|
+
if login_request_body is not None:
|
|
372
|
+
_body_params = login_request_body
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
# set the HTTP header `Accept`
|
|
376
|
+
if 'Accept' not in _header_params:
|
|
377
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
378
|
+
[
|
|
379
|
+
'application/json'
|
|
380
|
+
]
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
# set the HTTP header `Content-Type`
|
|
384
|
+
if _content_type:
|
|
385
|
+
_header_params['Content-Type'] = _content_type
|
|
386
|
+
else:
|
|
387
|
+
_default_content_type = (
|
|
388
|
+
self.api_client.select_header_content_type(
|
|
389
|
+
[
|
|
390
|
+
'application/json'
|
|
391
|
+
]
|
|
392
|
+
)
|
|
393
|
+
)
|
|
394
|
+
if _default_content_type is not None:
|
|
395
|
+
_header_params['Content-Type'] = _default_content_type
|
|
396
|
+
|
|
397
|
+
# authentication setting
|
|
398
|
+
_auth_settings: List[str] = [
|
|
399
|
+
]
|
|
400
|
+
|
|
401
|
+
return self.api_client.param_serialize(
|
|
402
|
+
method='POST',
|
|
403
|
+
resource_path='/api/auth/login',
|
|
404
|
+
path_params=_path_params,
|
|
405
|
+
query_params=_query_params,
|
|
406
|
+
header_params=_header_params,
|
|
407
|
+
body=_body_params,
|
|
408
|
+
post_params=_form_params,
|
|
409
|
+
files=_files,
|
|
410
|
+
auth_settings=_auth_settings,
|
|
411
|
+
collection_formats=_collection_formats,
|
|
412
|
+
_host=_host,
|
|
413
|
+
_request_auth=_request_auth
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
@validate_call
|
|
420
|
+
async def logout_api_auth_logout_post(
|
|
421
|
+
self,
|
|
422
|
+
_request_timeout: Union[
|
|
423
|
+
None,
|
|
424
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
425
|
+
Tuple[
|
|
426
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
427
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
428
|
+
]
|
|
429
|
+
] = None,
|
|
430
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
431
|
+
_content_type: Optional[StrictStr] = None,
|
|
432
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
433
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
434
|
+
) -> LogoutResponseBody:
|
|
435
|
+
"""Logout
|
|
436
|
+
|
|
437
|
+
Revoke the bearer token this request authenticated with (identified by the `Authorization` header).
|
|
438
|
+
|
|
439
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
440
|
+
number provided, it will be total request
|
|
441
|
+
timeout. It can also be a pair (tuple) of
|
|
442
|
+
(connection, read) timeouts.
|
|
443
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
444
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
445
|
+
request; this effectively ignores the
|
|
446
|
+
authentication in the spec for a single request.
|
|
447
|
+
:type _request_auth: dict, optional
|
|
448
|
+
:param _content_type: force content-type for the request.
|
|
449
|
+
:type _content_type: str, Optional
|
|
450
|
+
:param _headers: set to override the headers for a single
|
|
451
|
+
request; this effectively ignores the headers
|
|
452
|
+
in the spec for a single request.
|
|
453
|
+
:type _headers: dict, optional
|
|
454
|
+
:param _host_index: set to override the host_index for a single
|
|
455
|
+
request; this effectively ignores the host_index
|
|
456
|
+
in the spec for a single request.
|
|
457
|
+
:type _host_index: int, optional
|
|
458
|
+
:return: Returns the result object.
|
|
459
|
+
""" # noqa: E501
|
|
460
|
+
|
|
461
|
+
_param = self._logout_api_auth_logout_post_serialize(
|
|
462
|
+
_request_auth=_request_auth,
|
|
463
|
+
_content_type=_content_type,
|
|
464
|
+
_headers=_headers,
|
|
465
|
+
_host_index=_host_index
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
469
|
+
'200': "LogoutResponseBody",
|
|
470
|
+
}
|
|
471
|
+
response_data = await self.api_client.call_api(
|
|
472
|
+
*_param,
|
|
473
|
+
_request_timeout=_request_timeout
|
|
474
|
+
)
|
|
475
|
+
await response_data.read()
|
|
476
|
+
return self.api_client.response_deserialize(
|
|
477
|
+
response_data=response_data,
|
|
478
|
+
response_types_map=_response_types_map,
|
|
479
|
+
).data
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
@validate_call
|
|
483
|
+
async def logout_api_auth_logout_post_with_http_info(
|
|
484
|
+
self,
|
|
485
|
+
_request_timeout: Union[
|
|
486
|
+
None,
|
|
487
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
488
|
+
Tuple[
|
|
489
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
490
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
491
|
+
]
|
|
492
|
+
] = None,
|
|
493
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
494
|
+
_content_type: Optional[StrictStr] = None,
|
|
495
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
496
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
497
|
+
) -> ApiResponse[LogoutResponseBody]:
|
|
498
|
+
"""Logout
|
|
499
|
+
|
|
500
|
+
Revoke the bearer token this request authenticated with (identified by the `Authorization` header).
|
|
501
|
+
|
|
502
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
503
|
+
number provided, it will be total request
|
|
504
|
+
timeout. It can also be a pair (tuple) of
|
|
505
|
+
(connection, read) timeouts.
|
|
506
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
507
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
508
|
+
request; this effectively ignores the
|
|
509
|
+
authentication in the spec for a single request.
|
|
510
|
+
:type _request_auth: dict, optional
|
|
511
|
+
:param _content_type: force content-type for the request.
|
|
512
|
+
:type _content_type: str, Optional
|
|
513
|
+
:param _headers: set to override the headers for a single
|
|
514
|
+
request; this effectively ignores the headers
|
|
515
|
+
in the spec for a single request.
|
|
516
|
+
:type _headers: dict, optional
|
|
517
|
+
:param _host_index: set to override the host_index for a single
|
|
518
|
+
request; this effectively ignores the host_index
|
|
519
|
+
in the spec for a single request.
|
|
520
|
+
:type _host_index: int, optional
|
|
521
|
+
:return: Returns the result object.
|
|
522
|
+
""" # noqa: E501
|
|
523
|
+
|
|
524
|
+
_param = self._logout_api_auth_logout_post_serialize(
|
|
525
|
+
_request_auth=_request_auth,
|
|
526
|
+
_content_type=_content_type,
|
|
527
|
+
_headers=_headers,
|
|
528
|
+
_host_index=_host_index
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
532
|
+
'200': "LogoutResponseBody",
|
|
533
|
+
}
|
|
534
|
+
response_data = await self.api_client.call_api(
|
|
535
|
+
*_param,
|
|
536
|
+
_request_timeout=_request_timeout
|
|
537
|
+
)
|
|
538
|
+
await response_data.read()
|
|
539
|
+
return self.api_client.response_deserialize(
|
|
540
|
+
response_data=response_data,
|
|
541
|
+
response_types_map=_response_types_map,
|
|
542
|
+
)
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
@validate_call
|
|
546
|
+
async def logout_api_auth_logout_post_without_preload_content(
|
|
547
|
+
self,
|
|
548
|
+
_request_timeout: Union[
|
|
549
|
+
None,
|
|
550
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
551
|
+
Tuple[
|
|
552
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
553
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
554
|
+
]
|
|
555
|
+
] = None,
|
|
556
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
557
|
+
_content_type: Optional[StrictStr] = None,
|
|
558
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
559
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
560
|
+
) -> RESTResponseType:
|
|
561
|
+
"""Logout
|
|
562
|
+
|
|
563
|
+
Revoke the bearer token this request authenticated with (identified by the `Authorization` header).
|
|
564
|
+
|
|
565
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
566
|
+
number provided, it will be total request
|
|
567
|
+
timeout. It can also be a pair (tuple) of
|
|
568
|
+
(connection, read) timeouts.
|
|
569
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
570
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
571
|
+
request; this effectively ignores the
|
|
572
|
+
authentication in the spec for a single request.
|
|
573
|
+
:type _request_auth: dict, optional
|
|
574
|
+
:param _content_type: force content-type for the request.
|
|
575
|
+
:type _content_type: str, Optional
|
|
576
|
+
:param _headers: set to override the headers for a single
|
|
577
|
+
request; this effectively ignores the headers
|
|
578
|
+
in the spec for a single request.
|
|
579
|
+
:type _headers: dict, optional
|
|
580
|
+
:param _host_index: set to override the host_index for a single
|
|
581
|
+
request; this effectively ignores the host_index
|
|
582
|
+
in the spec for a single request.
|
|
583
|
+
:type _host_index: int, optional
|
|
584
|
+
:return: Returns the result object.
|
|
585
|
+
""" # noqa: E501
|
|
586
|
+
|
|
587
|
+
_param = self._logout_api_auth_logout_post_serialize(
|
|
588
|
+
_request_auth=_request_auth,
|
|
589
|
+
_content_type=_content_type,
|
|
590
|
+
_headers=_headers,
|
|
591
|
+
_host_index=_host_index
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
595
|
+
'200': "LogoutResponseBody",
|
|
596
|
+
}
|
|
597
|
+
response_data = await self.api_client.call_api(
|
|
598
|
+
*_param,
|
|
599
|
+
_request_timeout=_request_timeout
|
|
600
|
+
)
|
|
601
|
+
return response_data.response
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
@validate_call
|
|
605
|
+
def logout_api_auth_logout_post_sync(
|
|
606
|
+
self,
|
|
607
|
+
_request_timeout: Union[
|
|
608
|
+
None,
|
|
609
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
610
|
+
Tuple[
|
|
611
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
612
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
613
|
+
]
|
|
614
|
+
] = None,
|
|
615
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
616
|
+
_content_type: Optional[StrictStr] = None,
|
|
617
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
618
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
619
|
+
) -> LogoutResponseBody:
|
|
620
|
+
"""Logout (synchronous)
|
|
621
|
+
|
|
622
|
+
Synchronous variant of :meth:`logout_api_auth_logout_post`. It calls the asynchronous
|
|
623
|
+
method and blocks until it completes.
|
|
624
|
+
""" # noqa: E501
|
|
625
|
+
return run_sync(
|
|
626
|
+
self.logout_api_auth_logout_post(
|
|
627
|
+
_request_timeout=_request_timeout,
|
|
628
|
+
_request_auth=_request_auth,
|
|
629
|
+
_content_type=_content_type,
|
|
630
|
+
_headers=_headers,
|
|
631
|
+
_host_index=_host_index,
|
|
632
|
+
)
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
@validate_call
|
|
637
|
+
def logout_api_auth_logout_post_sync_with_http_info(
|
|
638
|
+
self,
|
|
639
|
+
_request_timeout: Union[
|
|
640
|
+
None,
|
|
641
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
642
|
+
Tuple[
|
|
643
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
644
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
645
|
+
]
|
|
646
|
+
] = None,
|
|
647
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
648
|
+
_content_type: Optional[StrictStr] = None,
|
|
649
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
650
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
651
|
+
) -> ApiResponse[LogoutResponseBody]:
|
|
652
|
+
"""Logout (synchronous)
|
|
653
|
+
|
|
654
|
+
Synchronous variant of :meth:`logout_api_auth_logout_post_with_http_info`. It calls the
|
|
655
|
+
asynchronous method and blocks until it completes.
|
|
656
|
+
""" # noqa: E501
|
|
657
|
+
return run_sync(
|
|
658
|
+
self.logout_api_auth_logout_post_with_http_info(
|
|
659
|
+
_request_timeout=_request_timeout,
|
|
660
|
+
_request_auth=_request_auth,
|
|
661
|
+
_content_type=_content_type,
|
|
662
|
+
_headers=_headers,
|
|
663
|
+
_host_index=_host_index,
|
|
664
|
+
)
|
|
665
|
+
)
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
@validate_call
|
|
669
|
+
def logout_api_auth_logout_post_sync_without_preload_content(
|
|
670
|
+
self,
|
|
671
|
+
_request_timeout: Union[
|
|
672
|
+
None,
|
|
673
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
674
|
+
Tuple[
|
|
675
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
676
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
677
|
+
]
|
|
678
|
+
] = None,
|
|
679
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
680
|
+
_content_type: Optional[StrictStr] = None,
|
|
681
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
682
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
683
|
+
) -> RESTResponseType:
|
|
684
|
+
"""Logout (synchronous)
|
|
685
|
+
|
|
686
|
+
Synchronous variant of :meth:`logout_api_auth_logout_post_without_preload_content`. It calls
|
|
687
|
+
the asynchronous method and blocks until it completes.
|
|
688
|
+
""" # noqa: E501
|
|
689
|
+
return run_sync(
|
|
690
|
+
self.logout_api_auth_logout_post_without_preload_content(
|
|
691
|
+
_request_timeout=_request_timeout,
|
|
692
|
+
_request_auth=_request_auth,
|
|
693
|
+
_content_type=_content_type,
|
|
694
|
+
_headers=_headers,
|
|
695
|
+
_host_index=_host_index,
|
|
696
|
+
)
|
|
697
|
+
)
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
def _logout_api_auth_logout_post_serialize(
|
|
701
|
+
self,
|
|
702
|
+
_request_auth,
|
|
703
|
+
_content_type,
|
|
704
|
+
_headers,
|
|
705
|
+
_host_index,
|
|
706
|
+
) -> RequestSerialized:
|
|
707
|
+
|
|
708
|
+
_host = None
|
|
709
|
+
|
|
710
|
+
_collection_formats: Dict[str, str] = {
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
_path_params: Dict[str, str] = {}
|
|
714
|
+
_query_params: List[Tuple[str, str]] = []
|
|
715
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
716
|
+
_form_params: List[Tuple[str, str]] = []
|
|
717
|
+
_files: Dict[
|
|
718
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
719
|
+
] = {}
|
|
720
|
+
_body_params: Optional[bytes] = None
|
|
721
|
+
|
|
722
|
+
# process the path parameters
|
|
723
|
+
# process the query parameters
|
|
724
|
+
# process the header parameters
|
|
725
|
+
# process the form parameters
|
|
726
|
+
# process the body parameter
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
# set the HTTP header `Accept`
|
|
730
|
+
if 'Accept' not in _header_params:
|
|
731
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
732
|
+
[
|
|
733
|
+
'application/json'
|
|
734
|
+
]
|
|
735
|
+
)
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
# authentication setting
|
|
739
|
+
_auth_settings: List[str] = [
|
|
740
|
+
'HTTPBearer'
|
|
741
|
+
]
|
|
742
|
+
|
|
743
|
+
return self.api_client.param_serialize(
|
|
744
|
+
method='POST',
|
|
745
|
+
resource_path='/api/auth/logout',
|
|
746
|
+
path_params=_path_params,
|
|
747
|
+
query_params=_query_params,
|
|
748
|
+
header_params=_header_params,
|
|
749
|
+
body=_body_params,
|
|
750
|
+
post_params=_form_params,
|
|
751
|
+
files=_files,
|
|
752
|
+
auth_settings=_auth_settings,
|
|
753
|
+
collection_formats=_collection_formats,
|
|
754
|
+
_host=_host,
|
|
755
|
+
_request_auth=_request_auth
|
|
756
|
+
)
|
|
757
|
+
|
|
758
|
+
|