daytona_api_client 0.21.3a0__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 daytona_api_client might be problematic. Click here for more details.
- daytona_api_client/__init__.py +129 -0
- daytona_api_client/api/__init__.py +15 -0
- daytona_api_client/api/api_keys_api.py +1234 -0
- daytona_api_client/api/docker_registry_api.py +1741 -0
- daytona_api_client/api/object_storage_api.py +268 -0
- daytona_api_client/api/organizations_api.py +5792 -0
- daytona_api_client/api/preview_api.py +715 -0
- daytona_api_client/api/runners_api.py +664 -0
- daytona_api_client/api/sandbox_api.py +3584 -0
- daytona_api_client/api/snapshots_api.py +1830 -0
- daytona_api_client/api/toolbox_api.py +10545 -0
- daytona_api_client/api/users_api.py +1733 -0
- daytona_api_client/api/volumes_api.py +1267 -0
- daytona_api_client/api/workspace_api.py +3626 -0
- daytona_api_client/api_client.py +696 -0
- daytona_api_client/api_response.py +20 -0
- daytona_api_client/configuration.py +586 -0
- daytona_api_client/exceptions.py +216 -0
- daytona_api_client/models/__init__.py +101 -0
- daytona_api_client/models/account_provider.py +101 -0
- daytona_api_client/models/account_provider_dto.py +101 -0
- daytona_api_client/models/api_key_list.py +149 -0
- daytona_api_client/models/api_key_response.py +142 -0
- daytona_api_client/models/build_info.py +115 -0
- daytona_api_client/models/build_snapshot.py +118 -0
- daytona_api_client/models/command.py +104 -0
- daytona_api_client/models/completion_context.py +103 -0
- daytona_api_client/models/completion_item.py +124 -0
- daytona_api_client/models/completion_list.py +116 -0
- daytona_api_client/models/create_api_key.py +134 -0
- daytona_api_client/models/create_build_info.py +107 -0
- daytona_api_client/models/create_docker_registry.py +123 -0
- daytona_api_client/models/create_linked_account.py +101 -0
- daytona_api_client/models/create_organization.py +100 -0
- daytona_api_client/models/create_organization_invitation.py +122 -0
- daytona_api_client/models/create_organization_quota.py +130 -0
- daytona_api_client/models/create_organization_role.py +126 -0
- daytona_api_client/models/create_runner.py +150 -0
- daytona_api_client/models/create_sandbox.py +198 -0
- daytona_api_client/models/create_session_request.py +100 -0
- daytona_api_client/models/create_snapshot.py +138 -0
- daytona_api_client/models/create_user.py +132 -0
- daytona_api_client/models/create_volume.py +100 -0
- daytona_api_client/models/create_workspace.py +196 -0
- daytona_api_client/models/docker_registry.py +135 -0
- daytona_api_client/models/execute_request.py +104 -0
- daytona_api_client/models/execute_response.py +101 -0
- daytona_api_client/models/file_info.py +118 -0
- daytona_api_client/models/file_status.py +110 -0
- daytona_api_client/models/get_build_logs400_response.py +101 -0
- daytona_api_client/models/git_add_request.py +101 -0
- daytona_api_client/models/git_branch_request.py +101 -0
- daytona_api_client/models/git_checkout_request.py +101 -0
- daytona_api_client/models/git_clone_request.py +114 -0
- daytona_api_client/models/git_commit_info.py +112 -0
- daytona_api_client/models/git_commit_request.py +110 -0
- daytona_api_client/models/git_commit_response.py +100 -0
- daytona_api_client/models/git_delete_branch_request.py +101 -0
- daytona_api_client/models/git_repo_request.py +104 -0
- daytona_api_client/models/git_status.py +122 -0
- daytona_api_client/models/list_branch_response.py +100 -0
- daytona_api_client/models/lsp_completion_params.py +120 -0
- daytona_api_client/models/lsp_document_request.py +104 -0
- daytona_api_client/models/lsp_location.py +107 -0
- daytona_api_client/models/lsp_server_request.py +101 -0
- daytona_api_client/models/lsp_symbol.py +112 -0
- daytona_api_client/models/match.py +102 -0
- daytona_api_client/models/organization.py +134 -0
- daytona_api_client/models/organization_invitation.py +161 -0
- daytona_api_client/models/organization_role.py +147 -0
- daytona_api_client/models/organization_suspension.py +102 -0
- daytona_api_client/models/organization_user.py +145 -0
- daytona_api_client/models/paginated_snapshots_dto.py +120 -0
- daytona_api_client/models/port_preview_url.py +101 -0
- daytona_api_client/models/position.py +101 -0
- daytona_api_client/models/project_dir_response.py +100 -0
- daytona_api_client/models/range.py +113 -0
- daytona_api_client/models/registry_push_access_dto.py +114 -0
- daytona_api_client/models/replace_request.py +104 -0
- daytona_api_client/models/replace_result.py +102 -0
- daytona_api_client/models/sandbox.py +226 -0
- daytona_api_client/models/sandbox_info.py +110 -0
- daytona_api_client/models/sandbox_labels.py +100 -0
- daytona_api_client/models/sandbox_state.py +50 -0
- daytona_api_client/models/sandbox_volume.py +101 -0
- daytona_api_client/models/search_files_response.py +100 -0
- daytona_api_client/models/session.py +121 -0
- daytona_api_client/models/session_execute_request.py +110 -0
- daytona_api_client/models/session_execute_response.py +106 -0
- daytona_api_client/models/set_snapshot_general_status_dto.py +100 -0
- daytona_api_client/models/snapshot_dto.py +185 -0
- daytona_api_client/models/snapshot_state.py +44 -0
- daytona_api_client/models/storage_access_dto.py +121 -0
- daytona_api_client/models/toggle_state.py +100 -0
- daytona_api_client/models/update_assigned_organization_roles.py +100 -0
- daytona_api_client/models/update_docker_registry.py +104 -0
- daytona_api_client/models/update_organization_invitation.py +114 -0
- daytona_api_client/models/update_organization_member_role.py +107 -0
- daytona_api_client/models/update_organization_quota.py +175 -0
- daytona_api_client/models/update_organization_role.py +126 -0
- daytona_api_client/models/upload_file.py +101 -0
- daytona_api_client/models/upload_file_dto.py +101 -0
- daytona_api_client/models/upload_file_request_file.py +159 -0
- daytona_api_client/models/upload_files_multi_request_files_inner.py +101 -0
- daytona_api_client/models/usage_overview.py +124 -0
- daytona_api_client/models/user.py +120 -0
- daytona_api_client/models/user_public_key.py +101 -0
- daytona_api_client/models/volume.py +133 -0
- daytona_api_client/models/volume_dto.py +138 -0
- daytona_api_client/models/volume_state.py +41 -0
- daytona_api_client/models/workspace.py +259 -0
- daytona_api_client/py.typed +0 -0
- daytona_api_client/rest.py +208 -0
- daytona_api_client-0.21.3a0.dist-info/METADATA +23 -0
- daytona_api_client-0.21.3a0.dist-info/RECORD +117 -0
- daytona_api_client-0.21.3a0.dist-info/WHEEL +5 -0
- daytona_api_client-0.21.3a0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1733 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import StrictStr
|
|
21
|
+
from typing import List
|
|
22
|
+
from daytona_api_client.models.account_provider import AccountProvider
|
|
23
|
+
from daytona_api_client.models.create_linked_account import CreateLinkedAccount
|
|
24
|
+
from daytona_api_client.models.create_user import CreateUser
|
|
25
|
+
from daytona_api_client.models.user import User
|
|
26
|
+
|
|
27
|
+
from daytona_api_client.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from daytona_api_client.api_response import ApiResponse
|
|
29
|
+
from daytona_api_client.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class UsersApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def create_user(
|
|
46
|
+
self,
|
|
47
|
+
create_user: CreateUser,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
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
|
+
) -> None:
|
|
58
|
+
"""Create user
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
:param create_user: (required)
|
|
62
|
+
:type create_user: CreateUser
|
|
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._create_user_serialize(
|
|
86
|
+
create_user=create_user,
|
|
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
|
+
"201": None,
|
|
95
|
+
}
|
|
96
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
97
|
+
response_data.read()
|
|
98
|
+
return self.api_client.response_deserialize(
|
|
99
|
+
response_data=response_data,
|
|
100
|
+
response_types_map=_response_types_map,
|
|
101
|
+
).data
|
|
102
|
+
|
|
103
|
+
@validate_call
|
|
104
|
+
def create_user_with_http_info(
|
|
105
|
+
self,
|
|
106
|
+
create_user: CreateUser,
|
|
107
|
+
_request_timeout: Union[
|
|
108
|
+
None,
|
|
109
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
110
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
111
|
+
] = None,
|
|
112
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
113
|
+
_content_type: Optional[StrictStr] = None,
|
|
114
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
115
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
116
|
+
) -> ApiResponse[None]:
|
|
117
|
+
"""Create user
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
:param create_user: (required)
|
|
121
|
+
:type create_user: CreateUser
|
|
122
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
123
|
+
number provided, it will be total request
|
|
124
|
+
timeout. It can also be a pair (tuple) of
|
|
125
|
+
(connection, read) timeouts.
|
|
126
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
127
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
128
|
+
request; this effectively ignores the
|
|
129
|
+
authentication in the spec for a single request.
|
|
130
|
+
:type _request_auth: dict, optional
|
|
131
|
+
:param _content_type: force content-type for the request.
|
|
132
|
+
:type _content_type: str, Optional
|
|
133
|
+
:param _headers: set to override the headers for a single
|
|
134
|
+
request; this effectively ignores the headers
|
|
135
|
+
in the spec for a single request.
|
|
136
|
+
:type _headers: dict, optional
|
|
137
|
+
:param _host_index: set to override the host_index for a single
|
|
138
|
+
request; this effectively ignores the host_index
|
|
139
|
+
in the spec for a single request.
|
|
140
|
+
:type _host_index: int, optional
|
|
141
|
+
:return: Returns the result object.
|
|
142
|
+
""" # noqa: E501
|
|
143
|
+
|
|
144
|
+
_param = self._create_user_serialize(
|
|
145
|
+
create_user=create_user,
|
|
146
|
+
_request_auth=_request_auth,
|
|
147
|
+
_content_type=_content_type,
|
|
148
|
+
_headers=_headers,
|
|
149
|
+
_host_index=_host_index,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
153
|
+
"201": None,
|
|
154
|
+
}
|
|
155
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
156
|
+
response_data.read()
|
|
157
|
+
return self.api_client.response_deserialize(
|
|
158
|
+
response_data=response_data,
|
|
159
|
+
response_types_map=_response_types_map,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
@validate_call
|
|
163
|
+
def create_user_without_preload_content(
|
|
164
|
+
self,
|
|
165
|
+
create_user: CreateUser,
|
|
166
|
+
_request_timeout: Union[
|
|
167
|
+
None,
|
|
168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
169
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
170
|
+
] = None,
|
|
171
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
172
|
+
_content_type: Optional[StrictStr] = None,
|
|
173
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
174
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
175
|
+
) -> RESTResponseType:
|
|
176
|
+
"""Create user
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
:param create_user: (required)
|
|
180
|
+
:type create_user: CreateUser
|
|
181
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
182
|
+
number provided, it will be total request
|
|
183
|
+
timeout. It can also be a pair (tuple) of
|
|
184
|
+
(connection, read) timeouts.
|
|
185
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
186
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
187
|
+
request; this effectively ignores the
|
|
188
|
+
authentication in the spec for a single request.
|
|
189
|
+
:type _request_auth: dict, optional
|
|
190
|
+
:param _content_type: force content-type for the request.
|
|
191
|
+
:type _content_type: str, Optional
|
|
192
|
+
:param _headers: set to override the headers for a single
|
|
193
|
+
request; this effectively ignores the headers
|
|
194
|
+
in the spec for a single request.
|
|
195
|
+
:type _headers: dict, optional
|
|
196
|
+
:param _host_index: set to override the host_index for a single
|
|
197
|
+
request; this effectively ignores the host_index
|
|
198
|
+
in the spec for a single request.
|
|
199
|
+
:type _host_index: int, optional
|
|
200
|
+
:return: Returns the result object.
|
|
201
|
+
""" # noqa: E501
|
|
202
|
+
|
|
203
|
+
_param = self._create_user_serialize(
|
|
204
|
+
create_user=create_user,
|
|
205
|
+
_request_auth=_request_auth,
|
|
206
|
+
_content_type=_content_type,
|
|
207
|
+
_headers=_headers,
|
|
208
|
+
_host_index=_host_index,
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
212
|
+
"201": None,
|
|
213
|
+
}
|
|
214
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
215
|
+
return response_data.response
|
|
216
|
+
|
|
217
|
+
def _create_user_serialize(
|
|
218
|
+
self,
|
|
219
|
+
create_user,
|
|
220
|
+
_request_auth,
|
|
221
|
+
_content_type,
|
|
222
|
+
_headers,
|
|
223
|
+
_host_index,
|
|
224
|
+
) -> RequestSerialized:
|
|
225
|
+
_host = None
|
|
226
|
+
|
|
227
|
+
_collection_formats: Dict[str, str] = {}
|
|
228
|
+
|
|
229
|
+
_path_params: Dict[str, str] = {}
|
|
230
|
+
_query_params: List[Tuple[str, str]] = []
|
|
231
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
232
|
+
_form_params: List[Tuple[str, str]] = []
|
|
233
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
234
|
+
_body_params: Optional[bytes] = None
|
|
235
|
+
|
|
236
|
+
# process the path parameters
|
|
237
|
+
# process the query parameters
|
|
238
|
+
# process the header parameters
|
|
239
|
+
# process the form parameters
|
|
240
|
+
# process the body parameter
|
|
241
|
+
if create_user is not None:
|
|
242
|
+
_body_params = create_user
|
|
243
|
+
|
|
244
|
+
# set the HTTP header `Content-Type`
|
|
245
|
+
if _content_type:
|
|
246
|
+
_header_params["Content-Type"] = _content_type
|
|
247
|
+
else:
|
|
248
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
249
|
+
if _default_content_type is not None:
|
|
250
|
+
_header_params["Content-Type"] = _default_content_type
|
|
251
|
+
|
|
252
|
+
# authentication setting
|
|
253
|
+
_auth_settings: List[str] = ["bearer", "oauth2"]
|
|
254
|
+
|
|
255
|
+
return self.api_client.param_serialize(
|
|
256
|
+
method="POST",
|
|
257
|
+
resource_path="/users",
|
|
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
|
+
@validate_call
|
|
271
|
+
def get_authenticated_user(
|
|
272
|
+
self,
|
|
273
|
+
_request_timeout: Union[
|
|
274
|
+
None,
|
|
275
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
276
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
277
|
+
] = None,
|
|
278
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
279
|
+
_content_type: Optional[StrictStr] = None,
|
|
280
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
281
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
282
|
+
) -> User:
|
|
283
|
+
"""Get authenticated user
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
287
|
+
number provided, it will be total request
|
|
288
|
+
timeout. It can also be a pair (tuple) of
|
|
289
|
+
(connection, read) timeouts.
|
|
290
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
291
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
292
|
+
request; this effectively ignores the
|
|
293
|
+
authentication in the spec for a single request.
|
|
294
|
+
:type _request_auth: dict, optional
|
|
295
|
+
:param _content_type: force content-type for the request.
|
|
296
|
+
:type _content_type: str, Optional
|
|
297
|
+
:param _headers: set to override the headers for a single
|
|
298
|
+
request; this effectively ignores the headers
|
|
299
|
+
in the spec for a single request.
|
|
300
|
+
:type _headers: dict, optional
|
|
301
|
+
:param _host_index: set to override the host_index for a single
|
|
302
|
+
request; this effectively ignores the host_index
|
|
303
|
+
in the spec for a single request.
|
|
304
|
+
:type _host_index: int, optional
|
|
305
|
+
:return: Returns the result object.
|
|
306
|
+
""" # noqa: E501
|
|
307
|
+
|
|
308
|
+
_param = self._get_authenticated_user_serialize(
|
|
309
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
313
|
+
"200": "User",
|
|
314
|
+
}
|
|
315
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
316
|
+
response_data.read()
|
|
317
|
+
return self.api_client.response_deserialize(
|
|
318
|
+
response_data=response_data,
|
|
319
|
+
response_types_map=_response_types_map,
|
|
320
|
+
).data
|
|
321
|
+
|
|
322
|
+
@validate_call
|
|
323
|
+
def get_authenticated_user_with_http_info(
|
|
324
|
+
self,
|
|
325
|
+
_request_timeout: Union[
|
|
326
|
+
None,
|
|
327
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
328
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
329
|
+
] = None,
|
|
330
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
331
|
+
_content_type: Optional[StrictStr] = None,
|
|
332
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
333
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
334
|
+
) -> ApiResponse[User]:
|
|
335
|
+
"""Get authenticated user
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
339
|
+
number provided, it will be total request
|
|
340
|
+
timeout. It can also be a pair (tuple) of
|
|
341
|
+
(connection, read) timeouts.
|
|
342
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
343
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
344
|
+
request; this effectively ignores the
|
|
345
|
+
authentication in the spec for a single request.
|
|
346
|
+
:type _request_auth: dict, optional
|
|
347
|
+
:param _content_type: force content-type for the request.
|
|
348
|
+
:type _content_type: str, Optional
|
|
349
|
+
:param _headers: set to override the headers for a single
|
|
350
|
+
request; this effectively ignores the headers
|
|
351
|
+
in the spec for a single request.
|
|
352
|
+
:type _headers: dict, optional
|
|
353
|
+
:param _host_index: set to override the host_index for a single
|
|
354
|
+
request; this effectively ignores the host_index
|
|
355
|
+
in the spec for a single request.
|
|
356
|
+
:type _host_index: int, optional
|
|
357
|
+
:return: Returns the result object.
|
|
358
|
+
""" # noqa: E501
|
|
359
|
+
|
|
360
|
+
_param = self._get_authenticated_user_serialize(
|
|
361
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
365
|
+
"200": "User",
|
|
366
|
+
}
|
|
367
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
368
|
+
response_data.read()
|
|
369
|
+
return self.api_client.response_deserialize(
|
|
370
|
+
response_data=response_data,
|
|
371
|
+
response_types_map=_response_types_map,
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
@validate_call
|
|
375
|
+
def get_authenticated_user_without_preload_content(
|
|
376
|
+
self,
|
|
377
|
+
_request_timeout: Union[
|
|
378
|
+
None,
|
|
379
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
380
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
381
|
+
] = None,
|
|
382
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
383
|
+
_content_type: Optional[StrictStr] = None,
|
|
384
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
385
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
386
|
+
) -> RESTResponseType:
|
|
387
|
+
"""Get authenticated user
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
391
|
+
number provided, it will be total request
|
|
392
|
+
timeout. It can also be a pair (tuple) of
|
|
393
|
+
(connection, read) timeouts.
|
|
394
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
395
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
396
|
+
request; this effectively ignores the
|
|
397
|
+
authentication in the spec for a single request.
|
|
398
|
+
:type _request_auth: dict, optional
|
|
399
|
+
:param _content_type: force content-type for the request.
|
|
400
|
+
:type _content_type: str, Optional
|
|
401
|
+
:param _headers: set to override the headers for a single
|
|
402
|
+
request; this effectively ignores the headers
|
|
403
|
+
in the spec for a single request.
|
|
404
|
+
:type _headers: dict, optional
|
|
405
|
+
:param _host_index: set to override the host_index for a single
|
|
406
|
+
request; this effectively ignores the host_index
|
|
407
|
+
in the spec for a single request.
|
|
408
|
+
:type _host_index: int, optional
|
|
409
|
+
:return: Returns the result object.
|
|
410
|
+
""" # noqa: E501
|
|
411
|
+
|
|
412
|
+
_param = self._get_authenticated_user_serialize(
|
|
413
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
417
|
+
"200": "User",
|
|
418
|
+
}
|
|
419
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
420
|
+
return response_data.response
|
|
421
|
+
|
|
422
|
+
def _get_authenticated_user_serialize(
|
|
423
|
+
self,
|
|
424
|
+
_request_auth,
|
|
425
|
+
_content_type,
|
|
426
|
+
_headers,
|
|
427
|
+
_host_index,
|
|
428
|
+
) -> RequestSerialized:
|
|
429
|
+
_host = None
|
|
430
|
+
|
|
431
|
+
_collection_formats: Dict[str, str] = {}
|
|
432
|
+
|
|
433
|
+
_path_params: Dict[str, str] = {}
|
|
434
|
+
_query_params: List[Tuple[str, str]] = []
|
|
435
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
436
|
+
_form_params: List[Tuple[str, str]] = []
|
|
437
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
438
|
+
_body_params: Optional[bytes] = None
|
|
439
|
+
|
|
440
|
+
# process the path parameters
|
|
441
|
+
# process the query parameters
|
|
442
|
+
# process the header parameters
|
|
443
|
+
# process the form parameters
|
|
444
|
+
# process the body parameter
|
|
445
|
+
|
|
446
|
+
# set the HTTP header `Accept`
|
|
447
|
+
if "Accept" not in _header_params:
|
|
448
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
449
|
+
|
|
450
|
+
# authentication setting
|
|
451
|
+
_auth_settings: List[str] = ["bearer", "oauth2"]
|
|
452
|
+
|
|
453
|
+
return self.api_client.param_serialize(
|
|
454
|
+
method="GET",
|
|
455
|
+
resource_path="/users/me",
|
|
456
|
+
path_params=_path_params,
|
|
457
|
+
query_params=_query_params,
|
|
458
|
+
header_params=_header_params,
|
|
459
|
+
body=_body_params,
|
|
460
|
+
post_params=_form_params,
|
|
461
|
+
files=_files,
|
|
462
|
+
auth_settings=_auth_settings,
|
|
463
|
+
collection_formats=_collection_formats,
|
|
464
|
+
_host=_host,
|
|
465
|
+
_request_auth=_request_auth,
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
@validate_call
|
|
469
|
+
def get_available_account_providers(
|
|
470
|
+
self,
|
|
471
|
+
_request_timeout: Union[
|
|
472
|
+
None,
|
|
473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
474
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
475
|
+
] = None,
|
|
476
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
477
|
+
_content_type: Optional[StrictStr] = None,
|
|
478
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
479
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
480
|
+
) -> List[AccountProvider]:
|
|
481
|
+
"""Get available account providers
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
485
|
+
number provided, it will be total request
|
|
486
|
+
timeout. It can also be a pair (tuple) of
|
|
487
|
+
(connection, read) timeouts.
|
|
488
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
489
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
490
|
+
request; this effectively ignores the
|
|
491
|
+
authentication in the spec for a single request.
|
|
492
|
+
:type _request_auth: dict, optional
|
|
493
|
+
:param _content_type: force content-type for the request.
|
|
494
|
+
:type _content_type: str, Optional
|
|
495
|
+
:param _headers: set to override the headers for a single
|
|
496
|
+
request; this effectively ignores the headers
|
|
497
|
+
in the spec for a single request.
|
|
498
|
+
:type _headers: dict, optional
|
|
499
|
+
:param _host_index: set to override the host_index for a single
|
|
500
|
+
request; this effectively ignores the host_index
|
|
501
|
+
in the spec for a single request.
|
|
502
|
+
:type _host_index: int, optional
|
|
503
|
+
:return: Returns the result object.
|
|
504
|
+
""" # noqa: E501
|
|
505
|
+
|
|
506
|
+
_param = self._get_available_account_providers_serialize(
|
|
507
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
511
|
+
"200": "List[AccountProvider]",
|
|
512
|
+
}
|
|
513
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
514
|
+
response_data.read()
|
|
515
|
+
return self.api_client.response_deserialize(
|
|
516
|
+
response_data=response_data,
|
|
517
|
+
response_types_map=_response_types_map,
|
|
518
|
+
).data
|
|
519
|
+
|
|
520
|
+
@validate_call
|
|
521
|
+
def get_available_account_providers_with_http_info(
|
|
522
|
+
self,
|
|
523
|
+
_request_timeout: Union[
|
|
524
|
+
None,
|
|
525
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
526
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
527
|
+
] = None,
|
|
528
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
529
|
+
_content_type: Optional[StrictStr] = None,
|
|
530
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
531
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
532
|
+
) -> ApiResponse[List[AccountProvider]]:
|
|
533
|
+
"""Get available account providers
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
537
|
+
number provided, it will be total request
|
|
538
|
+
timeout. It can also be a pair (tuple) of
|
|
539
|
+
(connection, read) timeouts.
|
|
540
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
541
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
542
|
+
request; this effectively ignores the
|
|
543
|
+
authentication in the spec for a single request.
|
|
544
|
+
:type _request_auth: dict, optional
|
|
545
|
+
:param _content_type: force content-type for the request.
|
|
546
|
+
:type _content_type: str, Optional
|
|
547
|
+
:param _headers: set to override the headers for a single
|
|
548
|
+
request; this effectively ignores the headers
|
|
549
|
+
in the spec for a single request.
|
|
550
|
+
:type _headers: dict, optional
|
|
551
|
+
:param _host_index: set to override the host_index for a single
|
|
552
|
+
request; this effectively ignores the host_index
|
|
553
|
+
in the spec for a single request.
|
|
554
|
+
:type _host_index: int, optional
|
|
555
|
+
:return: Returns the result object.
|
|
556
|
+
""" # noqa: E501
|
|
557
|
+
|
|
558
|
+
_param = self._get_available_account_providers_serialize(
|
|
559
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
563
|
+
"200": "List[AccountProvider]",
|
|
564
|
+
}
|
|
565
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
566
|
+
response_data.read()
|
|
567
|
+
return self.api_client.response_deserialize(
|
|
568
|
+
response_data=response_data,
|
|
569
|
+
response_types_map=_response_types_map,
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
@validate_call
|
|
573
|
+
def get_available_account_providers_without_preload_content(
|
|
574
|
+
self,
|
|
575
|
+
_request_timeout: Union[
|
|
576
|
+
None,
|
|
577
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
578
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
579
|
+
] = None,
|
|
580
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
581
|
+
_content_type: Optional[StrictStr] = None,
|
|
582
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
583
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
584
|
+
) -> RESTResponseType:
|
|
585
|
+
"""Get available account providers
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
589
|
+
number provided, it will be total request
|
|
590
|
+
timeout. It can also be a pair (tuple) of
|
|
591
|
+
(connection, read) timeouts.
|
|
592
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
593
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
594
|
+
request; this effectively ignores the
|
|
595
|
+
authentication in the spec for a single request.
|
|
596
|
+
:type _request_auth: dict, optional
|
|
597
|
+
:param _content_type: force content-type for the request.
|
|
598
|
+
:type _content_type: str, Optional
|
|
599
|
+
:param _headers: set to override the headers for a single
|
|
600
|
+
request; this effectively ignores the headers
|
|
601
|
+
in the spec for a single request.
|
|
602
|
+
:type _headers: dict, optional
|
|
603
|
+
:param _host_index: set to override the host_index for a single
|
|
604
|
+
request; this effectively ignores the host_index
|
|
605
|
+
in the spec for a single request.
|
|
606
|
+
:type _host_index: int, optional
|
|
607
|
+
:return: Returns the result object.
|
|
608
|
+
""" # noqa: E501
|
|
609
|
+
|
|
610
|
+
_param = self._get_available_account_providers_serialize(
|
|
611
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
612
|
+
)
|
|
613
|
+
|
|
614
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
615
|
+
"200": "List[AccountProvider]",
|
|
616
|
+
}
|
|
617
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
618
|
+
return response_data.response
|
|
619
|
+
|
|
620
|
+
def _get_available_account_providers_serialize(
|
|
621
|
+
self,
|
|
622
|
+
_request_auth,
|
|
623
|
+
_content_type,
|
|
624
|
+
_headers,
|
|
625
|
+
_host_index,
|
|
626
|
+
) -> RequestSerialized:
|
|
627
|
+
_host = None
|
|
628
|
+
|
|
629
|
+
_collection_formats: Dict[str, str] = {}
|
|
630
|
+
|
|
631
|
+
_path_params: Dict[str, str] = {}
|
|
632
|
+
_query_params: List[Tuple[str, str]] = []
|
|
633
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
634
|
+
_form_params: List[Tuple[str, str]] = []
|
|
635
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
636
|
+
_body_params: Optional[bytes] = None
|
|
637
|
+
|
|
638
|
+
# process the path parameters
|
|
639
|
+
# process the query parameters
|
|
640
|
+
# process the header parameters
|
|
641
|
+
# process the form parameters
|
|
642
|
+
# process the body parameter
|
|
643
|
+
|
|
644
|
+
# set the HTTP header `Accept`
|
|
645
|
+
if "Accept" not in _header_params:
|
|
646
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
647
|
+
|
|
648
|
+
# authentication setting
|
|
649
|
+
_auth_settings: List[str] = ["bearer", "oauth2"]
|
|
650
|
+
|
|
651
|
+
return self.api_client.param_serialize(
|
|
652
|
+
method="GET",
|
|
653
|
+
resource_path="/users/account-providers",
|
|
654
|
+
path_params=_path_params,
|
|
655
|
+
query_params=_query_params,
|
|
656
|
+
header_params=_header_params,
|
|
657
|
+
body=_body_params,
|
|
658
|
+
post_params=_form_params,
|
|
659
|
+
files=_files,
|
|
660
|
+
auth_settings=_auth_settings,
|
|
661
|
+
collection_formats=_collection_formats,
|
|
662
|
+
_host=_host,
|
|
663
|
+
_request_auth=_request_auth,
|
|
664
|
+
)
|
|
665
|
+
|
|
666
|
+
@validate_call
|
|
667
|
+
def get_user(
|
|
668
|
+
self,
|
|
669
|
+
id: StrictStr,
|
|
670
|
+
_request_timeout: Union[
|
|
671
|
+
None,
|
|
672
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
673
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
674
|
+
] = None,
|
|
675
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
676
|
+
_content_type: Optional[StrictStr] = None,
|
|
677
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
678
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
679
|
+
) -> User:
|
|
680
|
+
"""Get user by ID
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
:param id: (required)
|
|
684
|
+
:type id: str
|
|
685
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
686
|
+
number provided, it will be total request
|
|
687
|
+
timeout. It can also be a pair (tuple) of
|
|
688
|
+
(connection, read) timeouts.
|
|
689
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
690
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
691
|
+
request; this effectively ignores the
|
|
692
|
+
authentication in the spec for a single request.
|
|
693
|
+
:type _request_auth: dict, optional
|
|
694
|
+
:param _content_type: force content-type for the request.
|
|
695
|
+
:type _content_type: str, Optional
|
|
696
|
+
:param _headers: set to override the headers for a single
|
|
697
|
+
request; this effectively ignores the headers
|
|
698
|
+
in the spec for a single request.
|
|
699
|
+
:type _headers: dict, optional
|
|
700
|
+
:param _host_index: set to override the host_index for a single
|
|
701
|
+
request; this effectively ignores the host_index
|
|
702
|
+
in the spec for a single request.
|
|
703
|
+
:type _host_index: int, optional
|
|
704
|
+
:return: Returns the result object.
|
|
705
|
+
""" # noqa: E501
|
|
706
|
+
|
|
707
|
+
_param = self._get_user_serialize(
|
|
708
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
709
|
+
)
|
|
710
|
+
|
|
711
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
712
|
+
"200": "User",
|
|
713
|
+
}
|
|
714
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
715
|
+
response_data.read()
|
|
716
|
+
return self.api_client.response_deserialize(
|
|
717
|
+
response_data=response_data,
|
|
718
|
+
response_types_map=_response_types_map,
|
|
719
|
+
).data
|
|
720
|
+
|
|
721
|
+
@validate_call
|
|
722
|
+
def get_user_with_http_info(
|
|
723
|
+
self,
|
|
724
|
+
id: StrictStr,
|
|
725
|
+
_request_timeout: Union[
|
|
726
|
+
None,
|
|
727
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
728
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
729
|
+
] = None,
|
|
730
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
731
|
+
_content_type: Optional[StrictStr] = None,
|
|
732
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
733
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
734
|
+
) -> ApiResponse[User]:
|
|
735
|
+
"""Get user by ID
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
:param id: (required)
|
|
739
|
+
:type id: str
|
|
740
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
741
|
+
number provided, it will be total request
|
|
742
|
+
timeout. It can also be a pair (tuple) of
|
|
743
|
+
(connection, read) timeouts.
|
|
744
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
745
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
746
|
+
request; this effectively ignores the
|
|
747
|
+
authentication in the spec for a single request.
|
|
748
|
+
:type _request_auth: dict, optional
|
|
749
|
+
:param _content_type: force content-type for the request.
|
|
750
|
+
:type _content_type: str, Optional
|
|
751
|
+
:param _headers: set to override the headers for a single
|
|
752
|
+
request; this effectively ignores the headers
|
|
753
|
+
in the spec for a single request.
|
|
754
|
+
:type _headers: dict, optional
|
|
755
|
+
:param _host_index: set to override the host_index for a single
|
|
756
|
+
request; this effectively ignores the host_index
|
|
757
|
+
in the spec for a single request.
|
|
758
|
+
:type _host_index: int, optional
|
|
759
|
+
:return: Returns the result object.
|
|
760
|
+
""" # noqa: E501
|
|
761
|
+
|
|
762
|
+
_param = self._get_user_serialize(
|
|
763
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
767
|
+
"200": "User",
|
|
768
|
+
}
|
|
769
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
770
|
+
response_data.read()
|
|
771
|
+
return self.api_client.response_deserialize(
|
|
772
|
+
response_data=response_data,
|
|
773
|
+
response_types_map=_response_types_map,
|
|
774
|
+
)
|
|
775
|
+
|
|
776
|
+
@validate_call
|
|
777
|
+
def get_user_without_preload_content(
|
|
778
|
+
self,
|
|
779
|
+
id: StrictStr,
|
|
780
|
+
_request_timeout: Union[
|
|
781
|
+
None,
|
|
782
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
783
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
784
|
+
] = None,
|
|
785
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
786
|
+
_content_type: Optional[StrictStr] = None,
|
|
787
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
788
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
789
|
+
) -> RESTResponseType:
|
|
790
|
+
"""Get user by ID
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
:param id: (required)
|
|
794
|
+
:type id: str
|
|
795
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
796
|
+
number provided, it will be total request
|
|
797
|
+
timeout. It can also be a pair (tuple) of
|
|
798
|
+
(connection, read) timeouts.
|
|
799
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
800
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
801
|
+
request; this effectively ignores the
|
|
802
|
+
authentication in the spec for a single request.
|
|
803
|
+
:type _request_auth: dict, optional
|
|
804
|
+
:param _content_type: force content-type for the request.
|
|
805
|
+
:type _content_type: str, Optional
|
|
806
|
+
:param _headers: set to override the headers for a single
|
|
807
|
+
request; this effectively ignores the headers
|
|
808
|
+
in the spec for a single request.
|
|
809
|
+
:type _headers: dict, optional
|
|
810
|
+
:param _host_index: set to override the host_index for a single
|
|
811
|
+
request; this effectively ignores the host_index
|
|
812
|
+
in the spec for a single request.
|
|
813
|
+
:type _host_index: int, optional
|
|
814
|
+
:return: Returns the result object.
|
|
815
|
+
""" # noqa: E501
|
|
816
|
+
|
|
817
|
+
_param = self._get_user_serialize(
|
|
818
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
819
|
+
)
|
|
820
|
+
|
|
821
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
822
|
+
"200": "User",
|
|
823
|
+
}
|
|
824
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
825
|
+
return response_data.response
|
|
826
|
+
|
|
827
|
+
def _get_user_serialize(
|
|
828
|
+
self,
|
|
829
|
+
id,
|
|
830
|
+
_request_auth,
|
|
831
|
+
_content_type,
|
|
832
|
+
_headers,
|
|
833
|
+
_host_index,
|
|
834
|
+
) -> RequestSerialized:
|
|
835
|
+
_host = None
|
|
836
|
+
|
|
837
|
+
_collection_formats: Dict[str, str] = {}
|
|
838
|
+
|
|
839
|
+
_path_params: Dict[str, str] = {}
|
|
840
|
+
_query_params: List[Tuple[str, str]] = []
|
|
841
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
842
|
+
_form_params: List[Tuple[str, str]] = []
|
|
843
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
844
|
+
_body_params: Optional[bytes] = None
|
|
845
|
+
|
|
846
|
+
# process the path parameters
|
|
847
|
+
if id is not None:
|
|
848
|
+
_path_params["id"] = id
|
|
849
|
+
# process the query parameters
|
|
850
|
+
# process the header parameters
|
|
851
|
+
# process the form parameters
|
|
852
|
+
# process the body parameter
|
|
853
|
+
|
|
854
|
+
# set the HTTP header `Accept`
|
|
855
|
+
if "Accept" not in _header_params:
|
|
856
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
857
|
+
|
|
858
|
+
# authentication setting
|
|
859
|
+
_auth_settings: List[str] = ["bearer", "oauth2"]
|
|
860
|
+
|
|
861
|
+
return self.api_client.param_serialize(
|
|
862
|
+
method="GET",
|
|
863
|
+
resource_path="/users/{id}",
|
|
864
|
+
path_params=_path_params,
|
|
865
|
+
query_params=_query_params,
|
|
866
|
+
header_params=_header_params,
|
|
867
|
+
body=_body_params,
|
|
868
|
+
post_params=_form_params,
|
|
869
|
+
files=_files,
|
|
870
|
+
auth_settings=_auth_settings,
|
|
871
|
+
collection_formats=_collection_formats,
|
|
872
|
+
_host=_host,
|
|
873
|
+
_request_auth=_request_auth,
|
|
874
|
+
)
|
|
875
|
+
|
|
876
|
+
@validate_call
|
|
877
|
+
def link_account(
|
|
878
|
+
self,
|
|
879
|
+
create_linked_account: CreateLinkedAccount,
|
|
880
|
+
_request_timeout: Union[
|
|
881
|
+
None,
|
|
882
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
883
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
884
|
+
] = None,
|
|
885
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
886
|
+
_content_type: Optional[StrictStr] = None,
|
|
887
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
888
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
889
|
+
) -> None:
|
|
890
|
+
"""Link account
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
:param create_linked_account: (required)
|
|
894
|
+
:type create_linked_account: CreateLinkedAccount
|
|
895
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
896
|
+
number provided, it will be total request
|
|
897
|
+
timeout. It can also be a pair (tuple) of
|
|
898
|
+
(connection, read) timeouts.
|
|
899
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
900
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
901
|
+
request; this effectively ignores the
|
|
902
|
+
authentication in the spec for a single request.
|
|
903
|
+
:type _request_auth: dict, optional
|
|
904
|
+
:param _content_type: force content-type for the request.
|
|
905
|
+
:type _content_type: str, Optional
|
|
906
|
+
:param _headers: set to override the headers for a single
|
|
907
|
+
request; this effectively ignores the headers
|
|
908
|
+
in the spec for a single request.
|
|
909
|
+
:type _headers: dict, optional
|
|
910
|
+
:param _host_index: set to override the host_index for a single
|
|
911
|
+
request; this effectively ignores the host_index
|
|
912
|
+
in the spec for a single request.
|
|
913
|
+
:type _host_index: int, optional
|
|
914
|
+
:return: Returns the result object.
|
|
915
|
+
""" # noqa: E501
|
|
916
|
+
|
|
917
|
+
_param = self._link_account_serialize(
|
|
918
|
+
create_linked_account=create_linked_account,
|
|
919
|
+
_request_auth=_request_auth,
|
|
920
|
+
_content_type=_content_type,
|
|
921
|
+
_headers=_headers,
|
|
922
|
+
_host_index=_host_index,
|
|
923
|
+
)
|
|
924
|
+
|
|
925
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
926
|
+
"204": None,
|
|
927
|
+
}
|
|
928
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
929
|
+
response_data.read()
|
|
930
|
+
return self.api_client.response_deserialize(
|
|
931
|
+
response_data=response_data,
|
|
932
|
+
response_types_map=_response_types_map,
|
|
933
|
+
).data
|
|
934
|
+
|
|
935
|
+
@validate_call
|
|
936
|
+
def link_account_with_http_info(
|
|
937
|
+
self,
|
|
938
|
+
create_linked_account: CreateLinkedAccount,
|
|
939
|
+
_request_timeout: Union[
|
|
940
|
+
None,
|
|
941
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
942
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
943
|
+
] = None,
|
|
944
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
945
|
+
_content_type: Optional[StrictStr] = None,
|
|
946
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
947
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
948
|
+
) -> ApiResponse[None]:
|
|
949
|
+
"""Link account
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
:param create_linked_account: (required)
|
|
953
|
+
:type create_linked_account: CreateLinkedAccount
|
|
954
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
955
|
+
number provided, it will be total request
|
|
956
|
+
timeout. It can also be a pair (tuple) of
|
|
957
|
+
(connection, read) timeouts.
|
|
958
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
959
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
960
|
+
request; this effectively ignores the
|
|
961
|
+
authentication in the spec for a single request.
|
|
962
|
+
:type _request_auth: dict, optional
|
|
963
|
+
:param _content_type: force content-type for the request.
|
|
964
|
+
:type _content_type: str, Optional
|
|
965
|
+
:param _headers: set to override the headers for a single
|
|
966
|
+
request; this effectively ignores the headers
|
|
967
|
+
in the spec for a single request.
|
|
968
|
+
:type _headers: dict, optional
|
|
969
|
+
:param _host_index: set to override the host_index for a single
|
|
970
|
+
request; this effectively ignores the host_index
|
|
971
|
+
in the spec for a single request.
|
|
972
|
+
:type _host_index: int, optional
|
|
973
|
+
:return: Returns the result object.
|
|
974
|
+
""" # noqa: E501
|
|
975
|
+
|
|
976
|
+
_param = self._link_account_serialize(
|
|
977
|
+
create_linked_account=create_linked_account,
|
|
978
|
+
_request_auth=_request_auth,
|
|
979
|
+
_content_type=_content_type,
|
|
980
|
+
_headers=_headers,
|
|
981
|
+
_host_index=_host_index,
|
|
982
|
+
)
|
|
983
|
+
|
|
984
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
985
|
+
"204": None,
|
|
986
|
+
}
|
|
987
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
988
|
+
response_data.read()
|
|
989
|
+
return self.api_client.response_deserialize(
|
|
990
|
+
response_data=response_data,
|
|
991
|
+
response_types_map=_response_types_map,
|
|
992
|
+
)
|
|
993
|
+
|
|
994
|
+
@validate_call
|
|
995
|
+
def link_account_without_preload_content(
|
|
996
|
+
self,
|
|
997
|
+
create_linked_account: CreateLinkedAccount,
|
|
998
|
+
_request_timeout: Union[
|
|
999
|
+
None,
|
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1001
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1002
|
+
] = None,
|
|
1003
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1004
|
+
_content_type: Optional[StrictStr] = None,
|
|
1005
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1006
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1007
|
+
) -> RESTResponseType:
|
|
1008
|
+
"""Link account
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
:param create_linked_account: (required)
|
|
1012
|
+
:type create_linked_account: CreateLinkedAccount
|
|
1013
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1014
|
+
number provided, it will be total request
|
|
1015
|
+
timeout. It can also be a pair (tuple) of
|
|
1016
|
+
(connection, read) timeouts.
|
|
1017
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1018
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1019
|
+
request; this effectively ignores the
|
|
1020
|
+
authentication in the spec for a single request.
|
|
1021
|
+
:type _request_auth: dict, optional
|
|
1022
|
+
:param _content_type: force content-type for the request.
|
|
1023
|
+
:type _content_type: str, Optional
|
|
1024
|
+
:param _headers: set to override the headers for a single
|
|
1025
|
+
request; this effectively ignores the headers
|
|
1026
|
+
in the spec for a single request.
|
|
1027
|
+
:type _headers: dict, optional
|
|
1028
|
+
:param _host_index: set to override the host_index for a single
|
|
1029
|
+
request; this effectively ignores the host_index
|
|
1030
|
+
in the spec for a single request.
|
|
1031
|
+
:type _host_index: int, optional
|
|
1032
|
+
:return: Returns the result object.
|
|
1033
|
+
""" # noqa: E501
|
|
1034
|
+
|
|
1035
|
+
_param = self._link_account_serialize(
|
|
1036
|
+
create_linked_account=create_linked_account,
|
|
1037
|
+
_request_auth=_request_auth,
|
|
1038
|
+
_content_type=_content_type,
|
|
1039
|
+
_headers=_headers,
|
|
1040
|
+
_host_index=_host_index,
|
|
1041
|
+
)
|
|
1042
|
+
|
|
1043
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1044
|
+
"204": None,
|
|
1045
|
+
}
|
|
1046
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1047
|
+
return response_data.response
|
|
1048
|
+
|
|
1049
|
+
def _link_account_serialize(
|
|
1050
|
+
self,
|
|
1051
|
+
create_linked_account,
|
|
1052
|
+
_request_auth,
|
|
1053
|
+
_content_type,
|
|
1054
|
+
_headers,
|
|
1055
|
+
_host_index,
|
|
1056
|
+
) -> RequestSerialized:
|
|
1057
|
+
_host = None
|
|
1058
|
+
|
|
1059
|
+
_collection_formats: Dict[str, str] = {}
|
|
1060
|
+
|
|
1061
|
+
_path_params: Dict[str, str] = {}
|
|
1062
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1063
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1064
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1065
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1066
|
+
_body_params: Optional[bytes] = None
|
|
1067
|
+
|
|
1068
|
+
# process the path parameters
|
|
1069
|
+
# process the query parameters
|
|
1070
|
+
# process the header parameters
|
|
1071
|
+
# process the form parameters
|
|
1072
|
+
# process the body parameter
|
|
1073
|
+
if create_linked_account is not None:
|
|
1074
|
+
_body_params = create_linked_account
|
|
1075
|
+
|
|
1076
|
+
# set the HTTP header `Content-Type`
|
|
1077
|
+
if _content_type:
|
|
1078
|
+
_header_params["Content-Type"] = _content_type
|
|
1079
|
+
else:
|
|
1080
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
1081
|
+
if _default_content_type is not None:
|
|
1082
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1083
|
+
|
|
1084
|
+
# authentication setting
|
|
1085
|
+
_auth_settings: List[str] = ["bearer", "oauth2"]
|
|
1086
|
+
|
|
1087
|
+
return self.api_client.param_serialize(
|
|
1088
|
+
method="POST",
|
|
1089
|
+
resource_path="/users/linked-accounts",
|
|
1090
|
+
path_params=_path_params,
|
|
1091
|
+
query_params=_query_params,
|
|
1092
|
+
header_params=_header_params,
|
|
1093
|
+
body=_body_params,
|
|
1094
|
+
post_params=_form_params,
|
|
1095
|
+
files=_files,
|
|
1096
|
+
auth_settings=_auth_settings,
|
|
1097
|
+
collection_formats=_collection_formats,
|
|
1098
|
+
_host=_host,
|
|
1099
|
+
_request_auth=_request_auth,
|
|
1100
|
+
)
|
|
1101
|
+
|
|
1102
|
+
@validate_call
|
|
1103
|
+
def list_users(
|
|
1104
|
+
self,
|
|
1105
|
+
_request_timeout: Union[
|
|
1106
|
+
None,
|
|
1107
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1108
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1109
|
+
] = None,
|
|
1110
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1111
|
+
_content_type: Optional[StrictStr] = None,
|
|
1112
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1113
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1114
|
+
) -> None:
|
|
1115
|
+
"""List all users
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1119
|
+
number provided, it will be total request
|
|
1120
|
+
timeout. It can also be a pair (tuple) of
|
|
1121
|
+
(connection, read) timeouts.
|
|
1122
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1123
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1124
|
+
request; this effectively ignores the
|
|
1125
|
+
authentication in the spec for a single request.
|
|
1126
|
+
:type _request_auth: dict, optional
|
|
1127
|
+
:param _content_type: force content-type for the request.
|
|
1128
|
+
:type _content_type: str, Optional
|
|
1129
|
+
:param _headers: set to override the headers for a single
|
|
1130
|
+
request; this effectively ignores the headers
|
|
1131
|
+
in the spec for a single request.
|
|
1132
|
+
:type _headers: dict, optional
|
|
1133
|
+
:param _host_index: set to override the host_index for a single
|
|
1134
|
+
request; this effectively ignores the host_index
|
|
1135
|
+
in the spec for a single request.
|
|
1136
|
+
:type _host_index: int, optional
|
|
1137
|
+
:return: Returns the result object.
|
|
1138
|
+
""" # noqa: E501
|
|
1139
|
+
|
|
1140
|
+
_param = self._list_users_serialize(
|
|
1141
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1142
|
+
)
|
|
1143
|
+
|
|
1144
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1145
|
+
"200": None,
|
|
1146
|
+
}
|
|
1147
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1148
|
+
response_data.read()
|
|
1149
|
+
return self.api_client.response_deserialize(
|
|
1150
|
+
response_data=response_data,
|
|
1151
|
+
response_types_map=_response_types_map,
|
|
1152
|
+
).data
|
|
1153
|
+
|
|
1154
|
+
@validate_call
|
|
1155
|
+
def list_users_with_http_info(
|
|
1156
|
+
self,
|
|
1157
|
+
_request_timeout: Union[
|
|
1158
|
+
None,
|
|
1159
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1160
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1161
|
+
] = None,
|
|
1162
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1163
|
+
_content_type: Optional[StrictStr] = None,
|
|
1164
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1165
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1166
|
+
) -> ApiResponse[None]:
|
|
1167
|
+
"""List all users
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1171
|
+
number provided, it will be total request
|
|
1172
|
+
timeout. It can also be a pair (tuple) of
|
|
1173
|
+
(connection, read) timeouts.
|
|
1174
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1175
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1176
|
+
request; this effectively ignores the
|
|
1177
|
+
authentication in the spec for a single request.
|
|
1178
|
+
:type _request_auth: dict, optional
|
|
1179
|
+
:param _content_type: force content-type for the request.
|
|
1180
|
+
:type _content_type: str, Optional
|
|
1181
|
+
:param _headers: set to override the headers for a single
|
|
1182
|
+
request; this effectively ignores the headers
|
|
1183
|
+
in the spec for a single request.
|
|
1184
|
+
:type _headers: dict, optional
|
|
1185
|
+
:param _host_index: set to override the host_index for a single
|
|
1186
|
+
request; this effectively ignores the host_index
|
|
1187
|
+
in the spec for a single request.
|
|
1188
|
+
:type _host_index: int, optional
|
|
1189
|
+
:return: Returns the result object.
|
|
1190
|
+
""" # noqa: E501
|
|
1191
|
+
|
|
1192
|
+
_param = self._list_users_serialize(
|
|
1193
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1194
|
+
)
|
|
1195
|
+
|
|
1196
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1197
|
+
"200": None,
|
|
1198
|
+
}
|
|
1199
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1200
|
+
response_data.read()
|
|
1201
|
+
return self.api_client.response_deserialize(
|
|
1202
|
+
response_data=response_data,
|
|
1203
|
+
response_types_map=_response_types_map,
|
|
1204
|
+
)
|
|
1205
|
+
|
|
1206
|
+
@validate_call
|
|
1207
|
+
def list_users_without_preload_content(
|
|
1208
|
+
self,
|
|
1209
|
+
_request_timeout: Union[
|
|
1210
|
+
None,
|
|
1211
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1212
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1213
|
+
] = None,
|
|
1214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1215
|
+
_content_type: Optional[StrictStr] = None,
|
|
1216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1218
|
+
) -> RESTResponseType:
|
|
1219
|
+
"""List all users
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1223
|
+
number provided, it will be total request
|
|
1224
|
+
timeout. It can also be a pair (tuple) of
|
|
1225
|
+
(connection, read) timeouts.
|
|
1226
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1227
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1228
|
+
request; this effectively ignores the
|
|
1229
|
+
authentication in the spec for a single request.
|
|
1230
|
+
:type _request_auth: dict, optional
|
|
1231
|
+
:param _content_type: force content-type for the request.
|
|
1232
|
+
:type _content_type: str, Optional
|
|
1233
|
+
:param _headers: set to override the headers for a single
|
|
1234
|
+
request; this effectively ignores the headers
|
|
1235
|
+
in the spec for a single request.
|
|
1236
|
+
:type _headers: dict, optional
|
|
1237
|
+
:param _host_index: set to override the host_index for a single
|
|
1238
|
+
request; this effectively ignores the host_index
|
|
1239
|
+
in the spec for a single request.
|
|
1240
|
+
:type _host_index: int, optional
|
|
1241
|
+
:return: Returns the result object.
|
|
1242
|
+
""" # noqa: E501
|
|
1243
|
+
|
|
1244
|
+
_param = self._list_users_serialize(
|
|
1245
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1246
|
+
)
|
|
1247
|
+
|
|
1248
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1249
|
+
"200": None,
|
|
1250
|
+
}
|
|
1251
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1252
|
+
return response_data.response
|
|
1253
|
+
|
|
1254
|
+
def _list_users_serialize(
|
|
1255
|
+
self,
|
|
1256
|
+
_request_auth,
|
|
1257
|
+
_content_type,
|
|
1258
|
+
_headers,
|
|
1259
|
+
_host_index,
|
|
1260
|
+
) -> RequestSerialized:
|
|
1261
|
+
_host = None
|
|
1262
|
+
|
|
1263
|
+
_collection_formats: Dict[str, str] = {}
|
|
1264
|
+
|
|
1265
|
+
_path_params: Dict[str, str] = {}
|
|
1266
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1267
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1268
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1269
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1270
|
+
_body_params: Optional[bytes] = None
|
|
1271
|
+
|
|
1272
|
+
# process the path parameters
|
|
1273
|
+
# process the query parameters
|
|
1274
|
+
# process the header parameters
|
|
1275
|
+
# process the form parameters
|
|
1276
|
+
# process the body parameter
|
|
1277
|
+
|
|
1278
|
+
# authentication setting
|
|
1279
|
+
_auth_settings: List[str] = ["bearer", "oauth2"]
|
|
1280
|
+
|
|
1281
|
+
return self.api_client.param_serialize(
|
|
1282
|
+
method="GET",
|
|
1283
|
+
resource_path="/users",
|
|
1284
|
+
path_params=_path_params,
|
|
1285
|
+
query_params=_query_params,
|
|
1286
|
+
header_params=_header_params,
|
|
1287
|
+
body=_body_params,
|
|
1288
|
+
post_params=_form_params,
|
|
1289
|
+
files=_files,
|
|
1290
|
+
auth_settings=_auth_settings,
|
|
1291
|
+
collection_formats=_collection_formats,
|
|
1292
|
+
_host=_host,
|
|
1293
|
+
_request_auth=_request_auth,
|
|
1294
|
+
)
|
|
1295
|
+
|
|
1296
|
+
@validate_call
|
|
1297
|
+
def regenerate_key_pair(
|
|
1298
|
+
self,
|
|
1299
|
+
id: StrictStr,
|
|
1300
|
+
_request_timeout: Union[
|
|
1301
|
+
None,
|
|
1302
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1303
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1304
|
+
] = None,
|
|
1305
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1306
|
+
_content_type: Optional[StrictStr] = None,
|
|
1307
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1308
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1309
|
+
) -> None:
|
|
1310
|
+
"""Regenerate user key pair
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
:param id: (required)
|
|
1314
|
+
:type id: str
|
|
1315
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1316
|
+
number provided, it will be total request
|
|
1317
|
+
timeout. It can also be a pair (tuple) of
|
|
1318
|
+
(connection, read) timeouts.
|
|
1319
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1320
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1321
|
+
request; this effectively ignores the
|
|
1322
|
+
authentication in the spec for a single request.
|
|
1323
|
+
:type _request_auth: dict, optional
|
|
1324
|
+
:param _content_type: force content-type for the request.
|
|
1325
|
+
:type _content_type: str, Optional
|
|
1326
|
+
:param _headers: set to override the headers for a single
|
|
1327
|
+
request; this effectively ignores the headers
|
|
1328
|
+
in the spec for a single request.
|
|
1329
|
+
:type _headers: dict, optional
|
|
1330
|
+
:param _host_index: set to override the host_index for a single
|
|
1331
|
+
request; this effectively ignores the host_index
|
|
1332
|
+
in the spec for a single request.
|
|
1333
|
+
:type _host_index: int, optional
|
|
1334
|
+
:return: Returns the result object.
|
|
1335
|
+
""" # noqa: E501
|
|
1336
|
+
|
|
1337
|
+
_param = self._regenerate_key_pair_serialize(
|
|
1338
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1339
|
+
)
|
|
1340
|
+
|
|
1341
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1342
|
+
"201": None,
|
|
1343
|
+
}
|
|
1344
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1345
|
+
response_data.read()
|
|
1346
|
+
return self.api_client.response_deserialize(
|
|
1347
|
+
response_data=response_data,
|
|
1348
|
+
response_types_map=_response_types_map,
|
|
1349
|
+
).data
|
|
1350
|
+
|
|
1351
|
+
@validate_call
|
|
1352
|
+
def regenerate_key_pair_with_http_info(
|
|
1353
|
+
self,
|
|
1354
|
+
id: StrictStr,
|
|
1355
|
+
_request_timeout: Union[
|
|
1356
|
+
None,
|
|
1357
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1358
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1359
|
+
] = None,
|
|
1360
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1361
|
+
_content_type: Optional[StrictStr] = None,
|
|
1362
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1363
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1364
|
+
) -> ApiResponse[None]:
|
|
1365
|
+
"""Regenerate user key pair
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
:param id: (required)
|
|
1369
|
+
:type id: str
|
|
1370
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1371
|
+
number provided, it will be total request
|
|
1372
|
+
timeout. It can also be a pair (tuple) of
|
|
1373
|
+
(connection, read) timeouts.
|
|
1374
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1375
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1376
|
+
request; this effectively ignores the
|
|
1377
|
+
authentication in the spec for a single request.
|
|
1378
|
+
:type _request_auth: dict, optional
|
|
1379
|
+
:param _content_type: force content-type for the request.
|
|
1380
|
+
:type _content_type: str, Optional
|
|
1381
|
+
:param _headers: set to override the headers for a single
|
|
1382
|
+
request; this effectively ignores the headers
|
|
1383
|
+
in the spec for a single request.
|
|
1384
|
+
:type _headers: dict, optional
|
|
1385
|
+
:param _host_index: set to override the host_index for a single
|
|
1386
|
+
request; this effectively ignores the host_index
|
|
1387
|
+
in the spec for a single request.
|
|
1388
|
+
:type _host_index: int, optional
|
|
1389
|
+
:return: Returns the result object.
|
|
1390
|
+
""" # noqa: E501
|
|
1391
|
+
|
|
1392
|
+
_param = self._regenerate_key_pair_serialize(
|
|
1393
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1394
|
+
)
|
|
1395
|
+
|
|
1396
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1397
|
+
"201": None,
|
|
1398
|
+
}
|
|
1399
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1400
|
+
response_data.read()
|
|
1401
|
+
return self.api_client.response_deserialize(
|
|
1402
|
+
response_data=response_data,
|
|
1403
|
+
response_types_map=_response_types_map,
|
|
1404
|
+
)
|
|
1405
|
+
|
|
1406
|
+
@validate_call
|
|
1407
|
+
def regenerate_key_pair_without_preload_content(
|
|
1408
|
+
self,
|
|
1409
|
+
id: StrictStr,
|
|
1410
|
+
_request_timeout: Union[
|
|
1411
|
+
None,
|
|
1412
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1413
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1414
|
+
] = None,
|
|
1415
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1416
|
+
_content_type: Optional[StrictStr] = None,
|
|
1417
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1418
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1419
|
+
) -> RESTResponseType:
|
|
1420
|
+
"""Regenerate user key pair
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
:param id: (required)
|
|
1424
|
+
:type id: str
|
|
1425
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1426
|
+
number provided, it will be total request
|
|
1427
|
+
timeout. It can also be a pair (tuple) of
|
|
1428
|
+
(connection, read) timeouts.
|
|
1429
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1430
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1431
|
+
request; this effectively ignores the
|
|
1432
|
+
authentication in the spec for a single request.
|
|
1433
|
+
:type _request_auth: dict, optional
|
|
1434
|
+
:param _content_type: force content-type for the request.
|
|
1435
|
+
:type _content_type: str, Optional
|
|
1436
|
+
:param _headers: set to override the headers for a single
|
|
1437
|
+
request; this effectively ignores the headers
|
|
1438
|
+
in the spec for a single request.
|
|
1439
|
+
:type _headers: dict, optional
|
|
1440
|
+
:param _host_index: set to override the host_index for a single
|
|
1441
|
+
request; this effectively ignores the host_index
|
|
1442
|
+
in the spec for a single request.
|
|
1443
|
+
:type _host_index: int, optional
|
|
1444
|
+
:return: Returns the result object.
|
|
1445
|
+
""" # noqa: E501
|
|
1446
|
+
|
|
1447
|
+
_param = self._regenerate_key_pair_serialize(
|
|
1448
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1449
|
+
)
|
|
1450
|
+
|
|
1451
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1452
|
+
"201": None,
|
|
1453
|
+
}
|
|
1454
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1455
|
+
return response_data.response
|
|
1456
|
+
|
|
1457
|
+
def _regenerate_key_pair_serialize(
|
|
1458
|
+
self,
|
|
1459
|
+
id,
|
|
1460
|
+
_request_auth,
|
|
1461
|
+
_content_type,
|
|
1462
|
+
_headers,
|
|
1463
|
+
_host_index,
|
|
1464
|
+
) -> RequestSerialized:
|
|
1465
|
+
_host = None
|
|
1466
|
+
|
|
1467
|
+
_collection_formats: Dict[str, str] = {}
|
|
1468
|
+
|
|
1469
|
+
_path_params: Dict[str, str] = {}
|
|
1470
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1471
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1472
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1473
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1474
|
+
_body_params: Optional[bytes] = None
|
|
1475
|
+
|
|
1476
|
+
# process the path parameters
|
|
1477
|
+
if id is not None:
|
|
1478
|
+
_path_params["id"] = id
|
|
1479
|
+
# process the query parameters
|
|
1480
|
+
# process the header parameters
|
|
1481
|
+
# process the form parameters
|
|
1482
|
+
# process the body parameter
|
|
1483
|
+
|
|
1484
|
+
# authentication setting
|
|
1485
|
+
_auth_settings: List[str] = ["bearer", "oauth2"]
|
|
1486
|
+
|
|
1487
|
+
return self.api_client.param_serialize(
|
|
1488
|
+
method="POST",
|
|
1489
|
+
resource_path="/users/{id}/regenerate-key-pair",
|
|
1490
|
+
path_params=_path_params,
|
|
1491
|
+
query_params=_query_params,
|
|
1492
|
+
header_params=_header_params,
|
|
1493
|
+
body=_body_params,
|
|
1494
|
+
post_params=_form_params,
|
|
1495
|
+
files=_files,
|
|
1496
|
+
auth_settings=_auth_settings,
|
|
1497
|
+
collection_formats=_collection_formats,
|
|
1498
|
+
_host=_host,
|
|
1499
|
+
_request_auth=_request_auth,
|
|
1500
|
+
)
|
|
1501
|
+
|
|
1502
|
+
@validate_call
|
|
1503
|
+
def unlink_account(
|
|
1504
|
+
self,
|
|
1505
|
+
provider: StrictStr,
|
|
1506
|
+
provider_user_id: StrictStr,
|
|
1507
|
+
_request_timeout: Union[
|
|
1508
|
+
None,
|
|
1509
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1510
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1511
|
+
] = None,
|
|
1512
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1513
|
+
_content_type: Optional[StrictStr] = None,
|
|
1514
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1515
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1516
|
+
) -> None:
|
|
1517
|
+
"""Unlink account
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
:param provider: (required)
|
|
1521
|
+
:type provider: str
|
|
1522
|
+
:param provider_user_id: (required)
|
|
1523
|
+
:type provider_user_id: str
|
|
1524
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1525
|
+
number provided, it will be total request
|
|
1526
|
+
timeout. It can also be a pair (tuple) of
|
|
1527
|
+
(connection, read) timeouts.
|
|
1528
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1529
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1530
|
+
request; this effectively ignores the
|
|
1531
|
+
authentication in the spec for a single request.
|
|
1532
|
+
:type _request_auth: dict, optional
|
|
1533
|
+
:param _content_type: force content-type for the request.
|
|
1534
|
+
:type _content_type: str, Optional
|
|
1535
|
+
:param _headers: set to override the headers for a single
|
|
1536
|
+
request; this effectively ignores the headers
|
|
1537
|
+
in the spec for a single request.
|
|
1538
|
+
:type _headers: dict, optional
|
|
1539
|
+
:param _host_index: set to override the host_index for a single
|
|
1540
|
+
request; this effectively ignores the host_index
|
|
1541
|
+
in the spec for a single request.
|
|
1542
|
+
:type _host_index: int, optional
|
|
1543
|
+
:return: Returns the result object.
|
|
1544
|
+
""" # noqa: E501
|
|
1545
|
+
|
|
1546
|
+
_param = self._unlink_account_serialize(
|
|
1547
|
+
provider=provider,
|
|
1548
|
+
provider_user_id=provider_user_id,
|
|
1549
|
+
_request_auth=_request_auth,
|
|
1550
|
+
_content_type=_content_type,
|
|
1551
|
+
_headers=_headers,
|
|
1552
|
+
_host_index=_host_index,
|
|
1553
|
+
)
|
|
1554
|
+
|
|
1555
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1556
|
+
"204": None,
|
|
1557
|
+
}
|
|
1558
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1559
|
+
response_data.read()
|
|
1560
|
+
return self.api_client.response_deserialize(
|
|
1561
|
+
response_data=response_data,
|
|
1562
|
+
response_types_map=_response_types_map,
|
|
1563
|
+
).data
|
|
1564
|
+
|
|
1565
|
+
@validate_call
|
|
1566
|
+
def unlink_account_with_http_info(
|
|
1567
|
+
self,
|
|
1568
|
+
provider: StrictStr,
|
|
1569
|
+
provider_user_id: StrictStr,
|
|
1570
|
+
_request_timeout: Union[
|
|
1571
|
+
None,
|
|
1572
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1573
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1574
|
+
] = None,
|
|
1575
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1576
|
+
_content_type: Optional[StrictStr] = None,
|
|
1577
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1578
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1579
|
+
) -> ApiResponse[None]:
|
|
1580
|
+
"""Unlink account
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
:param provider: (required)
|
|
1584
|
+
:type provider: str
|
|
1585
|
+
:param provider_user_id: (required)
|
|
1586
|
+
:type provider_user_id: str
|
|
1587
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1588
|
+
number provided, it will be total request
|
|
1589
|
+
timeout. It can also be a pair (tuple) of
|
|
1590
|
+
(connection, read) timeouts.
|
|
1591
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1592
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1593
|
+
request; this effectively ignores the
|
|
1594
|
+
authentication in the spec for a single request.
|
|
1595
|
+
:type _request_auth: dict, optional
|
|
1596
|
+
:param _content_type: force content-type for the request.
|
|
1597
|
+
:type _content_type: str, Optional
|
|
1598
|
+
:param _headers: set to override the headers for a single
|
|
1599
|
+
request; this effectively ignores the headers
|
|
1600
|
+
in the spec for a single request.
|
|
1601
|
+
:type _headers: dict, optional
|
|
1602
|
+
:param _host_index: set to override the host_index for a single
|
|
1603
|
+
request; this effectively ignores the host_index
|
|
1604
|
+
in the spec for a single request.
|
|
1605
|
+
:type _host_index: int, optional
|
|
1606
|
+
:return: Returns the result object.
|
|
1607
|
+
""" # noqa: E501
|
|
1608
|
+
|
|
1609
|
+
_param = self._unlink_account_serialize(
|
|
1610
|
+
provider=provider,
|
|
1611
|
+
provider_user_id=provider_user_id,
|
|
1612
|
+
_request_auth=_request_auth,
|
|
1613
|
+
_content_type=_content_type,
|
|
1614
|
+
_headers=_headers,
|
|
1615
|
+
_host_index=_host_index,
|
|
1616
|
+
)
|
|
1617
|
+
|
|
1618
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1619
|
+
"204": None,
|
|
1620
|
+
}
|
|
1621
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1622
|
+
response_data.read()
|
|
1623
|
+
return self.api_client.response_deserialize(
|
|
1624
|
+
response_data=response_data,
|
|
1625
|
+
response_types_map=_response_types_map,
|
|
1626
|
+
)
|
|
1627
|
+
|
|
1628
|
+
@validate_call
|
|
1629
|
+
def unlink_account_without_preload_content(
|
|
1630
|
+
self,
|
|
1631
|
+
provider: StrictStr,
|
|
1632
|
+
provider_user_id: StrictStr,
|
|
1633
|
+
_request_timeout: Union[
|
|
1634
|
+
None,
|
|
1635
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1636
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1637
|
+
] = None,
|
|
1638
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1639
|
+
_content_type: Optional[StrictStr] = None,
|
|
1640
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1641
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1642
|
+
) -> RESTResponseType:
|
|
1643
|
+
"""Unlink account
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
:param provider: (required)
|
|
1647
|
+
:type provider: str
|
|
1648
|
+
:param provider_user_id: (required)
|
|
1649
|
+
:type provider_user_id: str
|
|
1650
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1651
|
+
number provided, it will be total request
|
|
1652
|
+
timeout. It can also be a pair (tuple) of
|
|
1653
|
+
(connection, read) timeouts.
|
|
1654
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1655
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1656
|
+
request; this effectively ignores the
|
|
1657
|
+
authentication in the spec for a single request.
|
|
1658
|
+
:type _request_auth: dict, optional
|
|
1659
|
+
:param _content_type: force content-type for the request.
|
|
1660
|
+
:type _content_type: str, Optional
|
|
1661
|
+
:param _headers: set to override the headers for a single
|
|
1662
|
+
request; this effectively ignores the headers
|
|
1663
|
+
in the spec for a single request.
|
|
1664
|
+
:type _headers: dict, optional
|
|
1665
|
+
:param _host_index: set to override the host_index for a single
|
|
1666
|
+
request; this effectively ignores the host_index
|
|
1667
|
+
in the spec for a single request.
|
|
1668
|
+
:type _host_index: int, optional
|
|
1669
|
+
:return: Returns the result object.
|
|
1670
|
+
""" # noqa: E501
|
|
1671
|
+
|
|
1672
|
+
_param = self._unlink_account_serialize(
|
|
1673
|
+
provider=provider,
|
|
1674
|
+
provider_user_id=provider_user_id,
|
|
1675
|
+
_request_auth=_request_auth,
|
|
1676
|
+
_content_type=_content_type,
|
|
1677
|
+
_headers=_headers,
|
|
1678
|
+
_host_index=_host_index,
|
|
1679
|
+
)
|
|
1680
|
+
|
|
1681
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1682
|
+
"204": None,
|
|
1683
|
+
}
|
|
1684
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1685
|
+
return response_data.response
|
|
1686
|
+
|
|
1687
|
+
def _unlink_account_serialize(
|
|
1688
|
+
self,
|
|
1689
|
+
provider,
|
|
1690
|
+
provider_user_id,
|
|
1691
|
+
_request_auth,
|
|
1692
|
+
_content_type,
|
|
1693
|
+
_headers,
|
|
1694
|
+
_host_index,
|
|
1695
|
+
) -> RequestSerialized:
|
|
1696
|
+
_host = None
|
|
1697
|
+
|
|
1698
|
+
_collection_formats: Dict[str, str] = {}
|
|
1699
|
+
|
|
1700
|
+
_path_params: Dict[str, str] = {}
|
|
1701
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1702
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1703
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1704
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1705
|
+
_body_params: Optional[bytes] = None
|
|
1706
|
+
|
|
1707
|
+
# process the path parameters
|
|
1708
|
+
if provider is not None:
|
|
1709
|
+
_path_params["provider"] = provider
|
|
1710
|
+
if provider_user_id is not None:
|
|
1711
|
+
_path_params["providerUserId"] = provider_user_id
|
|
1712
|
+
# process the query parameters
|
|
1713
|
+
# process the header parameters
|
|
1714
|
+
# process the form parameters
|
|
1715
|
+
# process the body parameter
|
|
1716
|
+
|
|
1717
|
+
# authentication setting
|
|
1718
|
+
_auth_settings: List[str] = ["bearer", "oauth2"]
|
|
1719
|
+
|
|
1720
|
+
return self.api_client.param_serialize(
|
|
1721
|
+
method="DELETE",
|
|
1722
|
+
resource_path="/users/linked-accounts/{provider}/{providerUserId}",
|
|
1723
|
+
path_params=_path_params,
|
|
1724
|
+
query_params=_query_params,
|
|
1725
|
+
header_params=_header_params,
|
|
1726
|
+
body=_body_params,
|
|
1727
|
+
post_params=_form_params,
|
|
1728
|
+
files=_files,
|
|
1729
|
+
auth_settings=_auth_settings,
|
|
1730
|
+
collection_formats=_collection_formats,
|
|
1731
|
+
_host=_host,
|
|
1732
|
+
_request_auth=_request_auth,
|
|
1733
|
+
)
|