daytona_api_client_async 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_async might be problematic. Click here for more details.

Files changed (123) hide show
  1. daytona_api_client_async/__init__.py +129 -0
  2. daytona_api_client_async/api/__init__.py +16 -0
  3. daytona_api_client_async/api/api_keys_api.py +1391 -0
  4. daytona_api_client_async/api/docker_registry_api.py +1965 -0
  5. daytona_api_client_async/api/images_api.py +2350 -0
  6. daytona_api_client_async/api/nodes_api.py +792 -0
  7. daytona_api_client_async/api/object_storage_api.py +298 -0
  8. daytona_api_client_async/api/organizations_api.py +6762 -0
  9. daytona_api_client_async/api/preview_api.py +819 -0
  10. daytona_api_client_async/api/runners_api.py +792 -0
  11. daytona_api_client_async/api/sandbox_api.py +3994 -0
  12. daytona_api_client_async/api/snapshots_api.py +2059 -0
  13. daytona_api_client_async/api/toolbox_api.py +11819 -0
  14. daytona_api_client_async/api/users_api.py +2075 -0
  15. daytona_api_client_async/api/volumes_api.py +1419 -0
  16. daytona_api_client_async/api/workspace_api.py +4036 -0
  17. daytona_api_client_async/api_client.py +801 -0
  18. daytona_api_client_async/api_response.py +21 -0
  19. daytona_api_client_async/configuration.py +579 -0
  20. daytona_api_client_async/exceptions.py +217 -0
  21. daytona_api_client_async/models/__init__.py +101 -0
  22. daytona_api_client_async/models/account_provider.py +103 -0
  23. daytona_api_client_async/models/api_key_list.py +130 -0
  24. daytona_api_client_async/models/api_key_response.py +123 -0
  25. daytona_api_client_async/models/build_image.py +107 -0
  26. daytona_api_client_async/models/build_info.py +108 -0
  27. daytona_api_client_async/models/build_snapshot.py +115 -0
  28. daytona_api_client_async/models/command.py +105 -0
  29. daytona_api_client_async/models/completion_context.py +103 -0
  30. daytona_api_client_async/models/completion_item.py +113 -0
  31. daytona_api_client_async/models/completion_list.py +111 -0
  32. daytona_api_client_async/models/create_api_key.py +119 -0
  33. daytona_api_client_async/models/create_build_info.py +103 -0
  34. daytona_api_client_async/models/create_docker_registry.py +120 -0
  35. daytona_api_client_async/models/create_image.py +105 -0
  36. daytona_api_client_async/models/create_linked_account.py +103 -0
  37. daytona_api_client_async/models/create_node.py +135 -0
  38. daytona_api_client_async/models/create_organization.py +101 -0
  39. daytona_api_client_async/models/create_organization_invitation.py +115 -0
  40. daytona_api_client_async/models/create_organization_quota.py +117 -0
  41. daytona_api_client_async/models/create_organization_role.py +113 -0
  42. daytona_api_client_async/models/create_runner.py +135 -0
  43. daytona_api_client_async/models/create_sandbox.py +161 -0
  44. daytona_api_client_async/models/create_session_request.py +101 -0
  45. daytona_api_client_async/models/create_snapshot.py +121 -0
  46. daytona_api_client_async/models/create_user.py +125 -0
  47. daytona_api_client_async/models/create_volume.py +101 -0
  48. daytona_api_client_async/models/create_workspace.py +161 -0
  49. daytona_api_client_async/models/docker_registry.py +123 -0
  50. daytona_api_client_async/models/execute_request.py +105 -0
  51. daytona_api_client_async/models/execute_response.py +103 -0
  52. daytona_api_client_async/models/file_info.py +115 -0
  53. daytona_api_client_async/models/file_status.py +107 -0
  54. daytona_api_client_async/models/git_add_request.py +103 -0
  55. daytona_api_client_async/models/git_branch_request.py +103 -0
  56. daytona_api_client_async/models/git_checkout_request.py +103 -0
  57. daytona_api_client_async/models/git_clone_request.py +111 -0
  58. daytona_api_client_async/models/git_commit_info.py +109 -0
  59. daytona_api_client_async/models/git_commit_request.py +107 -0
  60. daytona_api_client_async/models/git_commit_response.py +101 -0
  61. daytona_api_client_async/models/git_delete_branch_request.py +103 -0
  62. daytona_api_client_async/models/git_repo_request.py +105 -0
  63. daytona_api_client_async/models/git_status.py +117 -0
  64. daytona_api_client_async/models/image_dto.py +145 -0
  65. daytona_api_client_async/models/image_state.py +45 -0
  66. daytona_api_client_async/models/list_branch_response.py +101 -0
  67. daytona_api_client_async/models/lsp_completion_params.py +117 -0
  68. daytona_api_client_async/models/lsp_document_request.py +105 -0
  69. daytona_api_client_async/models/lsp_location.py +107 -0
  70. daytona_api_client_async/models/lsp_server_request.py +103 -0
  71. daytona_api_client_async/models/lsp_symbol.py +109 -0
  72. daytona_api_client_async/models/match.py +105 -0
  73. daytona_api_client_async/models/organization.py +120 -0
  74. daytona_api_client_async/models/organization_invitation.py +144 -0
  75. daytona_api_client_async/models/organization_role.py +122 -0
  76. daytona_api_client_async/models/organization_suspension.py +104 -0
  77. daytona_api_client_async/models/organization_user.py +131 -0
  78. daytona_api_client_async/models/paginated_images_dto.py +115 -0
  79. daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
  80. daytona_api_client_async/models/port_preview_url.py +103 -0
  81. daytona_api_client_async/models/position.py +103 -0
  82. daytona_api_client_async/models/project_dir_response.py +101 -0
  83. daytona_api_client_async/models/range.py +110 -0
  84. daytona_api_client_async/models/registry_push_access_dto.py +111 -0
  85. daytona_api_client_async/models/replace_request.py +105 -0
  86. daytona_api_client_async/models/replace_result.py +105 -0
  87. daytona_api_client_async/models/sandbox.py +180 -0
  88. daytona_api_client_async/models/sandbox_info.py +105 -0
  89. daytona_api_client_async/models/sandbox_labels.py +101 -0
  90. daytona_api_client_async/models/sandbox_state.py +52 -0
  91. daytona_api_client_async/models/sandbox_volume.py +103 -0
  92. daytona_api_client_async/models/search_files_response.py +101 -0
  93. daytona_api_client_async/models/session.py +116 -0
  94. daytona_api_client_async/models/session_execute_request.py +105 -0
  95. daytona_api_client_async/models/session_execute_response.py +105 -0
  96. daytona_api_client_async/models/set_image_general_status.py +101 -0
  97. daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
  98. daytona_api_client_async/models/snapshot_dto.py +161 -0
  99. daytona_api_client_async/models/snapshot_state.py +46 -0
  100. daytona_api_client_async/models/storage_access_dto.py +111 -0
  101. daytona_api_client_async/models/toggle_state.py +101 -0
  102. daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
  103. daytona_api_client_async/models/update_docker_registry.py +105 -0
  104. daytona_api_client_async/models/update_organization_invitation.py +113 -0
  105. daytona_api_client_async/models/update_organization_member_role.py +108 -0
  106. daytona_api_client_async/models/update_organization_quota.py +162 -0
  107. daytona_api_client_async/models/update_organization_role.py +113 -0
  108. daytona_api_client_async/models/usage_overview.py +113 -0
  109. daytona_api_client_async/models/user.py +115 -0
  110. daytona_api_client_async/models/user_public_key.py +103 -0
  111. daytona_api_client_async/models/volume_dto.py +126 -0
  112. daytona_api_client_async/models/volume_state.py +43 -0
  113. daytona_api_client_async/models/workspace.py +204 -0
  114. daytona_api_client_async/models/workspace_info.py +105 -0
  115. daytona_api_client_async/models/workspace_labels.py +101 -0
  116. daytona_api_client_async/models/workspace_state.py +51 -0
  117. daytona_api_client_async/models/workspace_volume.py +103 -0
  118. daytona_api_client_async/py.typed +0 -0
  119. daytona_api_client_async/rest.py +214 -0
  120. daytona_api_client_async-0.21.3a0.dist-info/METADATA +25 -0
  121. daytona_api_client_async-0.21.3a0.dist-info/RECORD +123 -0
  122. daytona_api_client_async-0.21.3a0.dist-info/WHEEL +5 -0
  123. daytona_api_client_async-0.21.3a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2075 @@
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_async.models.account_provider import AccountProvider
23
+ from daytona_api_client_async.models.create_linked_account import CreateLinkedAccount
24
+ from daytona_api_client_async.models.create_user import CreateUser
25
+ from daytona_api_client_async.models.user import User
26
+
27
+ from daytona_api_client_async.api_client import ApiClient, RequestSerialized
28
+ from daytona_api_client_async.api_response import ApiResponse
29
+ from daytona_api_client_async.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
+
45
+ @validate_call
46
+ async def create_user(
47
+ self,
48
+ create_user: CreateUser,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> None:
62
+ """Create user
63
+
64
+
65
+ :param create_user: (required)
66
+ :type create_user: CreateUser
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :type _request_timeout: int, tuple(int, int), optional
72
+ :param _request_auth: set to override the auth_settings for an a single
73
+ request; this effectively ignores the
74
+ authentication in the spec for a single request.
75
+ :type _request_auth: dict, optional
76
+ :param _content_type: force content-type for the request.
77
+ :type _content_type: str, Optional
78
+ :param _headers: set to override the headers for a single
79
+ request; this effectively ignores the headers
80
+ in the spec for a single request.
81
+ :type _headers: dict, optional
82
+ :param _host_index: set to override the host_index for a single
83
+ request; this effectively ignores the host_index
84
+ in the spec for a single request.
85
+ :type _host_index: int, optional
86
+ :return: Returns the result object.
87
+ """ # noqa: E501
88
+
89
+ _param = self._create_user_serialize(
90
+ create_user=create_user,
91
+ _request_auth=_request_auth,
92
+ _content_type=_content_type,
93
+ _headers=_headers,
94
+ _host_index=_host_index
95
+ )
96
+
97
+ _response_types_map: Dict[str, Optional[str]] = {
98
+ '201': None,
99
+ }
100
+ response_data = await self.api_client.call_api(
101
+ *_param,
102
+ _request_timeout=_request_timeout
103
+ )
104
+ await response_data.read()
105
+ return self.api_client.response_deserialize(
106
+ response_data=response_data,
107
+ response_types_map=_response_types_map,
108
+ ).data
109
+
110
+
111
+ @validate_call
112
+ async def create_user_with_http_info(
113
+ self,
114
+ create_user: CreateUser,
115
+ _request_timeout: Union[
116
+ None,
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Tuple[
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Annotated[StrictFloat, Field(gt=0)]
121
+ ]
122
+ ] = None,
123
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
124
+ _content_type: Optional[StrictStr] = None,
125
+ _headers: Optional[Dict[StrictStr, Any]] = None,
126
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
127
+ ) -> ApiResponse[None]:
128
+ """Create user
129
+
130
+
131
+ :param create_user: (required)
132
+ :type create_user: CreateUser
133
+ :param _request_timeout: timeout setting for this request. If one
134
+ number provided, it will be total request
135
+ timeout. It can also be a pair (tuple) of
136
+ (connection, read) timeouts.
137
+ :type _request_timeout: int, tuple(int, int), optional
138
+ :param _request_auth: set to override the auth_settings for an a single
139
+ request; this effectively ignores the
140
+ authentication in the spec for a single request.
141
+ :type _request_auth: dict, optional
142
+ :param _content_type: force content-type for the request.
143
+ :type _content_type: str, Optional
144
+ :param _headers: set to override the headers for a single
145
+ request; this effectively ignores the headers
146
+ in the spec for a single request.
147
+ :type _headers: dict, optional
148
+ :param _host_index: set to override the host_index for a single
149
+ request; this effectively ignores the host_index
150
+ in the spec for a single request.
151
+ :type _host_index: int, optional
152
+ :return: Returns the result object.
153
+ """ # noqa: E501
154
+
155
+ _param = self._create_user_serialize(
156
+ create_user=create_user,
157
+ _request_auth=_request_auth,
158
+ _content_type=_content_type,
159
+ _headers=_headers,
160
+ _host_index=_host_index
161
+ )
162
+
163
+ _response_types_map: Dict[str, Optional[str]] = {
164
+ '201': None,
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 create_user_without_preload_content(
179
+ self,
180
+ create_user: CreateUser,
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
+ """Create user
195
+
196
+
197
+ :param create_user: (required)
198
+ :type create_user: CreateUser
199
+ :param _request_timeout: timeout setting for this request. If one
200
+ number provided, it will be total request
201
+ timeout. It can also be a pair (tuple) of
202
+ (connection, read) timeouts.
203
+ :type _request_timeout: int, tuple(int, int), optional
204
+ :param _request_auth: set to override the auth_settings for an a single
205
+ request; this effectively ignores the
206
+ authentication in the spec for a single request.
207
+ :type _request_auth: dict, optional
208
+ :param _content_type: force content-type for the request.
209
+ :type _content_type: str, Optional
210
+ :param _headers: set to override the headers for a single
211
+ request; this effectively ignores the headers
212
+ in the spec for a single request.
213
+ :type _headers: dict, optional
214
+ :param _host_index: set to override the host_index for a single
215
+ request; this effectively ignores the host_index
216
+ in the spec for a single request.
217
+ :type _host_index: int, optional
218
+ :return: Returns the result object.
219
+ """ # noqa: E501
220
+
221
+ _param = self._create_user_serialize(
222
+ create_user=create_user,
223
+ _request_auth=_request_auth,
224
+ _content_type=_content_type,
225
+ _headers=_headers,
226
+ _host_index=_host_index
227
+ )
228
+
229
+ _response_types_map: Dict[str, Optional[str]] = {
230
+ '201': None,
231
+ }
232
+ response_data = await self.api_client.call_api(
233
+ *_param,
234
+ _request_timeout=_request_timeout
235
+ )
236
+ return response_data.response
237
+
238
+
239
+ def _create_user_serialize(
240
+ self,
241
+ create_user,
242
+ _request_auth,
243
+ _content_type,
244
+ _headers,
245
+ _host_index,
246
+ ) -> RequestSerialized:
247
+
248
+ _host = None
249
+
250
+ _collection_formats: Dict[str, str] = {
251
+ }
252
+
253
+ _path_params: Dict[str, str] = {}
254
+ _query_params: List[Tuple[str, str]] = []
255
+ _header_params: Dict[str, Optional[str]] = _headers or {}
256
+ _form_params: List[Tuple[str, str]] = []
257
+ _files: Dict[
258
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
259
+ ] = {}
260
+ _body_params: Optional[bytes] = None
261
+
262
+ # process the path parameters
263
+ # process the query parameters
264
+ # process the header parameters
265
+ # process the form parameters
266
+ # process the body parameter
267
+ if create_user is not None:
268
+ _body_params = create_user
269
+
270
+
271
+
272
+ # set the HTTP header `Content-Type`
273
+ if _content_type:
274
+ _header_params['Content-Type'] = _content_type
275
+ else:
276
+ _default_content_type = (
277
+ self.api_client.select_header_content_type(
278
+ [
279
+ 'application/json'
280
+ ]
281
+ )
282
+ )
283
+ if _default_content_type is not None:
284
+ _header_params['Content-Type'] = _default_content_type
285
+
286
+ # authentication setting
287
+ _auth_settings: List[str] = [
288
+ 'bearer',
289
+ 'oauth2'
290
+ ]
291
+
292
+ return self.api_client.param_serialize(
293
+ method='POST',
294
+ resource_path='/users',
295
+ path_params=_path_params,
296
+ query_params=_query_params,
297
+ header_params=_header_params,
298
+ body=_body_params,
299
+ post_params=_form_params,
300
+ files=_files,
301
+ auth_settings=_auth_settings,
302
+ collection_formats=_collection_formats,
303
+ _host=_host,
304
+ _request_auth=_request_auth
305
+ )
306
+
307
+
308
+
309
+
310
+ @validate_call
311
+ async def get_authenticated_user(
312
+ self,
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
+ ) -> User:
326
+ """Get authenticated user
327
+
328
+
329
+ :param _request_timeout: timeout setting for this request. If one
330
+ number provided, it will be total request
331
+ timeout. It can also be a pair (tuple) of
332
+ (connection, read) timeouts.
333
+ :type _request_timeout: int, tuple(int, int), optional
334
+ :param _request_auth: set to override the auth_settings for an a single
335
+ request; this effectively ignores the
336
+ authentication in the spec for a single request.
337
+ :type _request_auth: dict, optional
338
+ :param _content_type: force content-type for the request.
339
+ :type _content_type: str, Optional
340
+ :param _headers: set to override the headers for a single
341
+ request; this effectively ignores the headers
342
+ in the spec for a single request.
343
+ :type _headers: dict, optional
344
+ :param _host_index: set to override the host_index for a single
345
+ request; this effectively ignores the host_index
346
+ in the spec for a single request.
347
+ :type _host_index: int, optional
348
+ :return: Returns the result object.
349
+ """ # noqa: E501
350
+
351
+ _param = self._get_authenticated_user_serialize(
352
+ _request_auth=_request_auth,
353
+ _content_type=_content_type,
354
+ _headers=_headers,
355
+ _host_index=_host_index
356
+ )
357
+
358
+ _response_types_map: Dict[str, Optional[str]] = {
359
+ '200': "User",
360
+ }
361
+ response_data = await self.api_client.call_api(
362
+ *_param,
363
+ _request_timeout=_request_timeout
364
+ )
365
+ await response_data.read()
366
+ return self.api_client.response_deserialize(
367
+ response_data=response_data,
368
+ response_types_map=_response_types_map,
369
+ ).data
370
+
371
+
372
+ @validate_call
373
+ async def get_authenticated_user_with_http_info(
374
+ self,
375
+ _request_timeout: Union[
376
+ None,
377
+ Annotated[StrictFloat, Field(gt=0)],
378
+ Tuple[
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Annotated[StrictFloat, Field(gt=0)]
381
+ ]
382
+ ] = None,
383
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
384
+ _content_type: Optional[StrictStr] = None,
385
+ _headers: Optional[Dict[StrictStr, Any]] = None,
386
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
387
+ ) -> ApiResponse[User]:
388
+ """Get authenticated user
389
+
390
+
391
+ :param _request_timeout: timeout setting for this request. If one
392
+ number provided, it will be total request
393
+ timeout. It can also be a pair (tuple) of
394
+ (connection, read) timeouts.
395
+ :type _request_timeout: int, tuple(int, int), optional
396
+ :param _request_auth: set to override the auth_settings for an a single
397
+ request; this effectively ignores the
398
+ authentication in the spec for a single request.
399
+ :type _request_auth: dict, optional
400
+ :param _content_type: force content-type for the request.
401
+ :type _content_type: str, Optional
402
+ :param _headers: set to override the headers for a single
403
+ request; this effectively ignores the headers
404
+ in the spec for a single request.
405
+ :type _headers: dict, optional
406
+ :param _host_index: set to override the host_index for a single
407
+ request; this effectively ignores the host_index
408
+ in the spec for a single request.
409
+ :type _host_index: int, optional
410
+ :return: Returns the result object.
411
+ """ # noqa: E501
412
+
413
+ _param = self._get_authenticated_user_serialize(
414
+ _request_auth=_request_auth,
415
+ _content_type=_content_type,
416
+ _headers=_headers,
417
+ _host_index=_host_index
418
+ )
419
+
420
+ _response_types_map: Dict[str, Optional[str]] = {
421
+ '200': "User",
422
+ }
423
+ response_data = await self.api_client.call_api(
424
+ *_param,
425
+ _request_timeout=_request_timeout
426
+ )
427
+ await response_data.read()
428
+ return self.api_client.response_deserialize(
429
+ response_data=response_data,
430
+ response_types_map=_response_types_map,
431
+ )
432
+
433
+
434
+ @validate_call
435
+ async def get_authenticated_user_without_preload_content(
436
+ self,
437
+ _request_timeout: Union[
438
+ None,
439
+ Annotated[StrictFloat, Field(gt=0)],
440
+ Tuple[
441
+ Annotated[StrictFloat, Field(gt=0)],
442
+ Annotated[StrictFloat, Field(gt=0)]
443
+ ]
444
+ ] = None,
445
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
446
+ _content_type: Optional[StrictStr] = None,
447
+ _headers: Optional[Dict[StrictStr, Any]] = None,
448
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
449
+ ) -> RESTResponseType:
450
+ """Get authenticated user
451
+
452
+
453
+ :param _request_timeout: timeout setting for this request. If one
454
+ number provided, it will be total request
455
+ timeout. It can also be a pair (tuple) of
456
+ (connection, read) timeouts.
457
+ :type _request_timeout: int, tuple(int, int), optional
458
+ :param _request_auth: set to override the auth_settings for an a single
459
+ request; this effectively ignores the
460
+ authentication in the spec for a single request.
461
+ :type _request_auth: dict, optional
462
+ :param _content_type: force content-type for the request.
463
+ :type _content_type: str, Optional
464
+ :param _headers: set to override the headers for a single
465
+ request; this effectively ignores the headers
466
+ in the spec for a single request.
467
+ :type _headers: dict, optional
468
+ :param _host_index: set to override the host_index for a single
469
+ request; this effectively ignores the host_index
470
+ in the spec for a single request.
471
+ :type _host_index: int, optional
472
+ :return: Returns the result object.
473
+ """ # noqa: E501
474
+
475
+ _param = self._get_authenticated_user_serialize(
476
+ _request_auth=_request_auth,
477
+ _content_type=_content_type,
478
+ _headers=_headers,
479
+ _host_index=_host_index
480
+ )
481
+
482
+ _response_types_map: Dict[str, Optional[str]] = {
483
+ '200': "User",
484
+ }
485
+ response_data = await self.api_client.call_api(
486
+ *_param,
487
+ _request_timeout=_request_timeout
488
+ )
489
+ return response_data.response
490
+
491
+
492
+ def _get_authenticated_user_serialize(
493
+ self,
494
+ _request_auth,
495
+ _content_type,
496
+ _headers,
497
+ _host_index,
498
+ ) -> RequestSerialized:
499
+
500
+ _host = None
501
+
502
+ _collection_formats: Dict[str, str] = {
503
+ }
504
+
505
+ _path_params: Dict[str, str] = {}
506
+ _query_params: List[Tuple[str, str]] = []
507
+ _header_params: Dict[str, Optional[str]] = _headers or {}
508
+ _form_params: List[Tuple[str, str]] = []
509
+ _files: Dict[
510
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
511
+ ] = {}
512
+ _body_params: Optional[bytes] = None
513
+
514
+ # process the path parameters
515
+ # process the query parameters
516
+ # process the header parameters
517
+ # process the form parameters
518
+ # process the body parameter
519
+
520
+
521
+ # set the HTTP header `Accept`
522
+ if 'Accept' not in _header_params:
523
+ _header_params['Accept'] = self.api_client.select_header_accept(
524
+ [
525
+ 'application/json'
526
+ ]
527
+ )
528
+
529
+
530
+ # authentication setting
531
+ _auth_settings: List[str] = [
532
+ 'bearer',
533
+ 'oauth2'
534
+ ]
535
+
536
+ return self.api_client.param_serialize(
537
+ method='GET',
538
+ resource_path='/users/me',
539
+ path_params=_path_params,
540
+ query_params=_query_params,
541
+ header_params=_header_params,
542
+ body=_body_params,
543
+ post_params=_form_params,
544
+ files=_files,
545
+ auth_settings=_auth_settings,
546
+ collection_formats=_collection_formats,
547
+ _host=_host,
548
+ _request_auth=_request_auth
549
+ )
550
+
551
+
552
+
553
+
554
+ @validate_call
555
+ async def get_available_account_providers(
556
+ self,
557
+ _request_timeout: Union[
558
+ None,
559
+ Annotated[StrictFloat, Field(gt=0)],
560
+ Tuple[
561
+ Annotated[StrictFloat, Field(gt=0)],
562
+ Annotated[StrictFloat, Field(gt=0)]
563
+ ]
564
+ ] = None,
565
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
566
+ _content_type: Optional[StrictStr] = None,
567
+ _headers: Optional[Dict[StrictStr, Any]] = None,
568
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
569
+ ) -> List[AccountProvider]:
570
+ """Get available account providers
571
+
572
+
573
+ :param _request_timeout: timeout setting for this request. If one
574
+ number provided, it will be total request
575
+ timeout. It can also be a pair (tuple) of
576
+ (connection, read) timeouts.
577
+ :type _request_timeout: int, tuple(int, int), optional
578
+ :param _request_auth: set to override the auth_settings for an a single
579
+ request; this effectively ignores the
580
+ authentication in the spec for a single request.
581
+ :type _request_auth: dict, optional
582
+ :param _content_type: force content-type for the request.
583
+ :type _content_type: str, Optional
584
+ :param _headers: set to override the headers for a single
585
+ request; this effectively ignores the headers
586
+ in the spec for a single request.
587
+ :type _headers: dict, optional
588
+ :param _host_index: set to override the host_index for a single
589
+ request; this effectively ignores the host_index
590
+ in the spec for a single request.
591
+ :type _host_index: int, optional
592
+ :return: Returns the result object.
593
+ """ # noqa: E501
594
+
595
+ _param = self._get_available_account_providers_serialize(
596
+ _request_auth=_request_auth,
597
+ _content_type=_content_type,
598
+ _headers=_headers,
599
+ _host_index=_host_index
600
+ )
601
+
602
+ _response_types_map: Dict[str, Optional[str]] = {
603
+ '200': "List[AccountProvider]",
604
+ }
605
+ response_data = await self.api_client.call_api(
606
+ *_param,
607
+ _request_timeout=_request_timeout
608
+ )
609
+ await response_data.read()
610
+ return self.api_client.response_deserialize(
611
+ response_data=response_data,
612
+ response_types_map=_response_types_map,
613
+ ).data
614
+
615
+
616
+ @validate_call
617
+ async def get_available_account_providers_with_http_info(
618
+ self,
619
+ _request_timeout: Union[
620
+ None,
621
+ Annotated[StrictFloat, Field(gt=0)],
622
+ Tuple[
623
+ Annotated[StrictFloat, Field(gt=0)],
624
+ Annotated[StrictFloat, Field(gt=0)]
625
+ ]
626
+ ] = None,
627
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
628
+ _content_type: Optional[StrictStr] = None,
629
+ _headers: Optional[Dict[StrictStr, Any]] = None,
630
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
631
+ ) -> ApiResponse[List[AccountProvider]]:
632
+ """Get available account providers
633
+
634
+
635
+ :param _request_timeout: timeout setting for this request. If one
636
+ number provided, it will be total request
637
+ timeout. It can also be a pair (tuple) of
638
+ (connection, read) timeouts.
639
+ :type _request_timeout: int, tuple(int, int), optional
640
+ :param _request_auth: set to override the auth_settings for an a single
641
+ request; this effectively ignores the
642
+ authentication in the spec for a single request.
643
+ :type _request_auth: dict, optional
644
+ :param _content_type: force content-type for the request.
645
+ :type _content_type: str, Optional
646
+ :param _headers: set to override the headers for a single
647
+ request; this effectively ignores the headers
648
+ in the spec for a single request.
649
+ :type _headers: dict, optional
650
+ :param _host_index: set to override the host_index for a single
651
+ request; this effectively ignores the host_index
652
+ in the spec for a single request.
653
+ :type _host_index: int, optional
654
+ :return: Returns the result object.
655
+ """ # noqa: E501
656
+
657
+ _param = self._get_available_account_providers_serialize(
658
+ _request_auth=_request_auth,
659
+ _content_type=_content_type,
660
+ _headers=_headers,
661
+ _host_index=_host_index
662
+ )
663
+
664
+ _response_types_map: Dict[str, Optional[str]] = {
665
+ '200': "List[AccountProvider]",
666
+ }
667
+ response_data = await self.api_client.call_api(
668
+ *_param,
669
+ _request_timeout=_request_timeout
670
+ )
671
+ await response_data.read()
672
+ return self.api_client.response_deserialize(
673
+ response_data=response_data,
674
+ response_types_map=_response_types_map,
675
+ )
676
+
677
+
678
+ @validate_call
679
+ async def get_available_account_providers_without_preload_content(
680
+ self,
681
+ _request_timeout: Union[
682
+ None,
683
+ Annotated[StrictFloat, Field(gt=0)],
684
+ Tuple[
685
+ Annotated[StrictFloat, Field(gt=0)],
686
+ Annotated[StrictFloat, Field(gt=0)]
687
+ ]
688
+ ] = None,
689
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
690
+ _content_type: Optional[StrictStr] = None,
691
+ _headers: Optional[Dict[StrictStr, Any]] = None,
692
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
693
+ ) -> RESTResponseType:
694
+ """Get available account providers
695
+
696
+
697
+ :param _request_timeout: timeout setting for this request. If one
698
+ number provided, it will be total request
699
+ timeout. It can also be a pair (tuple) of
700
+ (connection, read) timeouts.
701
+ :type _request_timeout: int, tuple(int, int), optional
702
+ :param _request_auth: set to override the auth_settings for an a single
703
+ request; this effectively ignores the
704
+ authentication in the spec for a single request.
705
+ :type _request_auth: dict, optional
706
+ :param _content_type: force content-type for the request.
707
+ :type _content_type: str, Optional
708
+ :param _headers: set to override the headers for a single
709
+ request; this effectively ignores the headers
710
+ in the spec for a single request.
711
+ :type _headers: dict, optional
712
+ :param _host_index: set to override the host_index for a single
713
+ request; this effectively ignores the host_index
714
+ in the spec for a single request.
715
+ :type _host_index: int, optional
716
+ :return: Returns the result object.
717
+ """ # noqa: E501
718
+
719
+ _param = self._get_available_account_providers_serialize(
720
+ _request_auth=_request_auth,
721
+ _content_type=_content_type,
722
+ _headers=_headers,
723
+ _host_index=_host_index
724
+ )
725
+
726
+ _response_types_map: Dict[str, Optional[str]] = {
727
+ '200': "List[AccountProvider]",
728
+ }
729
+ response_data = await self.api_client.call_api(
730
+ *_param,
731
+ _request_timeout=_request_timeout
732
+ )
733
+ return response_data.response
734
+
735
+
736
+ def _get_available_account_providers_serialize(
737
+ self,
738
+ _request_auth,
739
+ _content_type,
740
+ _headers,
741
+ _host_index,
742
+ ) -> RequestSerialized:
743
+
744
+ _host = None
745
+
746
+ _collection_formats: Dict[str, str] = {
747
+ }
748
+
749
+ _path_params: Dict[str, str] = {}
750
+ _query_params: List[Tuple[str, str]] = []
751
+ _header_params: Dict[str, Optional[str]] = _headers or {}
752
+ _form_params: List[Tuple[str, str]] = []
753
+ _files: Dict[
754
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
755
+ ] = {}
756
+ _body_params: Optional[bytes] = None
757
+
758
+ # process the path parameters
759
+ # process the query parameters
760
+ # process the header parameters
761
+ # process the form parameters
762
+ # process the body parameter
763
+
764
+
765
+ # set the HTTP header `Accept`
766
+ if 'Accept' not in _header_params:
767
+ _header_params['Accept'] = self.api_client.select_header_accept(
768
+ [
769
+ 'application/json'
770
+ ]
771
+ )
772
+
773
+
774
+ # authentication setting
775
+ _auth_settings: List[str] = [
776
+ 'bearer',
777
+ 'oauth2'
778
+ ]
779
+
780
+ return self.api_client.param_serialize(
781
+ method='GET',
782
+ resource_path='/users/account-providers',
783
+ path_params=_path_params,
784
+ query_params=_query_params,
785
+ header_params=_header_params,
786
+ body=_body_params,
787
+ post_params=_form_params,
788
+ files=_files,
789
+ auth_settings=_auth_settings,
790
+ collection_formats=_collection_formats,
791
+ _host=_host,
792
+ _request_auth=_request_auth
793
+ )
794
+
795
+
796
+
797
+
798
+ @validate_call
799
+ async def get_user(
800
+ self,
801
+ id: StrictStr,
802
+ _request_timeout: Union[
803
+ None,
804
+ Annotated[StrictFloat, Field(gt=0)],
805
+ Tuple[
806
+ Annotated[StrictFloat, Field(gt=0)],
807
+ Annotated[StrictFloat, Field(gt=0)]
808
+ ]
809
+ ] = None,
810
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
811
+ _content_type: Optional[StrictStr] = None,
812
+ _headers: Optional[Dict[StrictStr, Any]] = None,
813
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
814
+ ) -> User:
815
+ """Get user by ID
816
+
817
+
818
+ :param id: (required)
819
+ :type id: str
820
+ :param _request_timeout: timeout setting for this request. If one
821
+ number provided, it will be total request
822
+ timeout. It can also be a pair (tuple) of
823
+ (connection, read) timeouts.
824
+ :type _request_timeout: int, tuple(int, int), optional
825
+ :param _request_auth: set to override the auth_settings for an a single
826
+ request; this effectively ignores the
827
+ authentication in the spec for a single request.
828
+ :type _request_auth: dict, optional
829
+ :param _content_type: force content-type for the request.
830
+ :type _content_type: str, Optional
831
+ :param _headers: set to override the headers for a single
832
+ request; this effectively ignores the headers
833
+ in the spec for a single request.
834
+ :type _headers: dict, optional
835
+ :param _host_index: set to override the host_index for a single
836
+ request; this effectively ignores the host_index
837
+ in the spec for a single request.
838
+ :type _host_index: int, optional
839
+ :return: Returns the result object.
840
+ """ # noqa: E501
841
+
842
+ _param = self._get_user_serialize(
843
+ id=id,
844
+ _request_auth=_request_auth,
845
+ _content_type=_content_type,
846
+ _headers=_headers,
847
+ _host_index=_host_index
848
+ )
849
+
850
+ _response_types_map: Dict[str, Optional[str]] = {
851
+ '200': "User",
852
+ }
853
+ response_data = await self.api_client.call_api(
854
+ *_param,
855
+ _request_timeout=_request_timeout
856
+ )
857
+ await response_data.read()
858
+ return self.api_client.response_deserialize(
859
+ response_data=response_data,
860
+ response_types_map=_response_types_map,
861
+ ).data
862
+
863
+
864
+ @validate_call
865
+ async def get_user_with_http_info(
866
+ self,
867
+ id: StrictStr,
868
+ _request_timeout: Union[
869
+ None,
870
+ Annotated[StrictFloat, Field(gt=0)],
871
+ Tuple[
872
+ Annotated[StrictFloat, Field(gt=0)],
873
+ Annotated[StrictFloat, Field(gt=0)]
874
+ ]
875
+ ] = None,
876
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
877
+ _content_type: Optional[StrictStr] = None,
878
+ _headers: Optional[Dict[StrictStr, Any]] = None,
879
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
880
+ ) -> ApiResponse[User]:
881
+ """Get user by ID
882
+
883
+
884
+ :param id: (required)
885
+ :type id: str
886
+ :param _request_timeout: timeout setting for this request. If one
887
+ number provided, it will be total request
888
+ timeout. It can also be a pair (tuple) of
889
+ (connection, read) timeouts.
890
+ :type _request_timeout: int, tuple(int, int), optional
891
+ :param _request_auth: set to override the auth_settings for an a single
892
+ request; this effectively ignores the
893
+ authentication in the spec for a single request.
894
+ :type _request_auth: dict, optional
895
+ :param _content_type: force content-type for the request.
896
+ :type _content_type: str, Optional
897
+ :param _headers: set to override the headers for a single
898
+ request; this effectively ignores the headers
899
+ in the spec for a single request.
900
+ :type _headers: dict, optional
901
+ :param _host_index: set to override the host_index for a single
902
+ request; this effectively ignores the host_index
903
+ in the spec for a single request.
904
+ :type _host_index: int, optional
905
+ :return: Returns the result object.
906
+ """ # noqa: E501
907
+
908
+ _param = self._get_user_serialize(
909
+ id=id,
910
+ _request_auth=_request_auth,
911
+ _content_type=_content_type,
912
+ _headers=_headers,
913
+ _host_index=_host_index
914
+ )
915
+
916
+ _response_types_map: Dict[str, Optional[str]] = {
917
+ '200': "User",
918
+ }
919
+ response_data = await self.api_client.call_api(
920
+ *_param,
921
+ _request_timeout=_request_timeout
922
+ )
923
+ await response_data.read()
924
+ return self.api_client.response_deserialize(
925
+ response_data=response_data,
926
+ response_types_map=_response_types_map,
927
+ )
928
+
929
+
930
+ @validate_call
931
+ async def get_user_without_preload_content(
932
+ self,
933
+ id: StrictStr,
934
+ _request_timeout: Union[
935
+ None,
936
+ Annotated[StrictFloat, Field(gt=0)],
937
+ Tuple[
938
+ Annotated[StrictFloat, Field(gt=0)],
939
+ Annotated[StrictFloat, Field(gt=0)]
940
+ ]
941
+ ] = None,
942
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
943
+ _content_type: Optional[StrictStr] = None,
944
+ _headers: Optional[Dict[StrictStr, Any]] = None,
945
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
946
+ ) -> RESTResponseType:
947
+ """Get user by ID
948
+
949
+
950
+ :param id: (required)
951
+ :type id: str
952
+ :param _request_timeout: timeout setting for this request. If one
953
+ number provided, it will be total request
954
+ timeout. It can also be a pair (tuple) of
955
+ (connection, read) timeouts.
956
+ :type _request_timeout: int, tuple(int, int), optional
957
+ :param _request_auth: set to override the auth_settings for an a single
958
+ request; this effectively ignores the
959
+ authentication in the spec for a single request.
960
+ :type _request_auth: dict, optional
961
+ :param _content_type: force content-type for the request.
962
+ :type _content_type: str, Optional
963
+ :param _headers: set to override the headers for a single
964
+ request; this effectively ignores the headers
965
+ in the spec for a single request.
966
+ :type _headers: dict, optional
967
+ :param _host_index: set to override the host_index for a single
968
+ request; this effectively ignores the host_index
969
+ in the spec for a single request.
970
+ :type _host_index: int, optional
971
+ :return: Returns the result object.
972
+ """ # noqa: E501
973
+
974
+ _param = self._get_user_serialize(
975
+ id=id,
976
+ _request_auth=_request_auth,
977
+ _content_type=_content_type,
978
+ _headers=_headers,
979
+ _host_index=_host_index
980
+ )
981
+
982
+ _response_types_map: Dict[str, Optional[str]] = {
983
+ '200': "User",
984
+ }
985
+ response_data = await self.api_client.call_api(
986
+ *_param,
987
+ _request_timeout=_request_timeout
988
+ )
989
+ return response_data.response
990
+
991
+
992
+ def _get_user_serialize(
993
+ self,
994
+ id,
995
+ _request_auth,
996
+ _content_type,
997
+ _headers,
998
+ _host_index,
999
+ ) -> RequestSerialized:
1000
+
1001
+ _host = None
1002
+
1003
+ _collection_formats: Dict[str, str] = {
1004
+ }
1005
+
1006
+ _path_params: Dict[str, str] = {}
1007
+ _query_params: List[Tuple[str, str]] = []
1008
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1009
+ _form_params: List[Tuple[str, str]] = []
1010
+ _files: Dict[
1011
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1012
+ ] = {}
1013
+ _body_params: Optional[bytes] = None
1014
+
1015
+ # process the path parameters
1016
+ if id is not None:
1017
+ _path_params['id'] = id
1018
+ # process the query parameters
1019
+ # process the header parameters
1020
+ # process the form parameters
1021
+ # process the body parameter
1022
+
1023
+
1024
+ # set the HTTP header `Accept`
1025
+ if 'Accept' not in _header_params:
1026
+ _header_params['Accept'] = self.api_client.select_header_accept(
1027
+ [
1028
+ 'application/json'
1029
+ ]
1030
+ )
1031
+
1032
+
1033
+ # authentication setting
1034
+ _auth_settings: List[str] = [
1035
+ 'bearer',
1036
+ 'oauth2'
1037
+ ]
1038
+
1039
+ return self.api_client.param_serialize(
1040
+ method='GET',
1041
+ resource_path='/users/{id}',
1042
+ path_params=_path_params,
1043
+ query_params=_query_params,
1044
+ header_params=_header_params,
1045
+ body=_body_params,
1046
+ post_params=_form_params,
1047
+ files=_files,
1048
+ auth_settings=_auth_settings,
1049
+ collection_formats=_collection_formats,
1050
+ _host=_host,
1051
+ _request_auth=_request_auth
1052
+ )
1053
+
1054
+
1055
+
1056
+
1057
+ @validate_call
1058
+ async def link_account(
1059
+ self,
1060
+ create_linked_account: CreateLinkedAccount,
1061
+ _request_timeout: Union[
1062
+ None,
1063
+ Annotated[StrictFloat, Field(gt=0)],
1064
+ Tuple[
1065
+ Annotated[StrictFloat, Field(gt=0)],
1066
+ Annotated[StrictFloat, Field(gt=0)]
1067
+ ]
1068
+ ] = None,
1069
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1070
+ _content_type: Optional[StrictStr] = None,
1071
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1072
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1073
+ ) -> None:
1074
+ """Link account
1075
+
1076
+
1077
+ :param create_linked_account: (required)
1078
+ :type create_linked_account: CreateLinkedAccount
1079
+ :param _request_timeout: timeout setting for this request. If one
1080
+ number provided, it will be total request
1081
+ timeout. It can also be a pair (tuple) of
1082
+ (connection, read) timeouts.
1083
+ :type _request_timeout: int, tuple(int, int), optional
1084
+ :param _request_auth: set to override the auth_settings for an a single
1085
+ request; this effectively ignores the
1086
+ authentication in the spec for a single request.
1087
+ :type _request_auth: dict, optional
1088
+ :param _content_type: force content-type for the request.
1089
+ :type _content_type: str, Optional
1090
+ :param _headers: set to override the headers for a single
1091
+ request; this effectively ignores the headers
1092
+ in the spec for a single request.
1093
+ :type _headers: dict, optional
1094
+ :param _host_index: set to override the host_index for a single
1095
+ request; this effectively ignores the host_index
1096
+ in the spec for a single request.
1097
+ :type _host_index: int, optional
1098
+ :return: Returns the result object.
1099
+ """ # noqa: E501
1100
+
1101
+ _param = self._link_account_serialize(
1102
+ create_linked_account=create_linked_account,
1103
+ _request_auth=_request_auth,
1104
+ _content_type=_content_type,
1105
+ _headers=_headers,
1106
+ _host_index=_host_index
1107
+ )
1108
+
1109
+ _response_types_map: Dict[str, Optional[str]] = {
1110
+ '204': None,
1111
+ }
1112
+ response_data = await self.api_client.call_api(
1113
+ *_param,
1114
+ _request_timeout=_request_timeout
1115
+ )
1116
+ await response_data.read()
1117
+ return self.api_client.response_deserialize(
1118
+ response_data=response_data,
1119
+ response_types_map=_response_types_map,
1120
+ ).data
1121
+
1122
+
1123
+ @validate_call
1124
+ async def link_account_with_http_info(
1125
+ self,
1126
+ create_linked_account: CreateLinkedAccount,
1127
+ _request_timeout: Union[
1128
+ None,
1129
+ Annotated[StrictFloat, Field(gt=0)],
1130
+ Tuple[
1131
+ Annotated[StrictFloat, Field(gt=0)],
1132
+ Annotated[StrictFloat, Field(gt=0)]
1133
+ ]
1134
+ ] = None,
1135
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1136
+ _content_type: Optional[StrictStr] = None,
1137
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1138
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1139
+ ) -> ApiResponse[None]:
1140
+ """Link account
1141
+
1142
+
1143
+ :param create_linked_account: (required)
1144
+ :type create_linked_account: CreateLinkedAccount
1145
+ :param _request_timeout: timeout setting for this request. If one
1146
+ number provided, it will be total request
1147
+ timeout. It can also be a pair (tuple) of
1148
+ (connection, read) timeouts.
1149
+ :type _request_timeout: int, tuple(int, int), optional
1150
+ :param _request_auth: set to override the auth_settings for an a single
1151
+ request; this effectively ignores the
1152
+ authentication in the spec for a single request.
1153
+ :type _request_auth: dict, optional
1154
+ :param _content_type: force content-type for the request.
1155
+ :type _content_type: str, Optional
1156
+ :param _headers: set to override the headers for a single
1157
+ request; this effectively ignores the headers
1158
+ in the spec for a single request.
1159
+ :type _headers: dict, optional
1160
+ :param _host_index: set to override the host_index for a single
1161
+ request; this effectively ignores the host_index
1162
+ in the spec for a single request.
1163
+ :type _host_index: int, optional
1164
+ :return: Returns the result object.
1165
+ """ # noqa: E501
1166
+
1167
+ _param = self._link_account_serialize(
1168
+ create_linked_account=create_linked_account,
1169
+ _request_auth=_request_auth,
1170
+ _content_type=_content_type,
1171
+ _headers=_headers,
1172
+ _host_index=_host_index
1173
+ )
1174
+
1175
+ _response_types_map: Dict[str, Optional[str]] = {
1176
+ '204': None,
1177
+ }
1178
+ response_data = await self.api_client.call_api(
1179
+ *_param,
1180
+ _request_timeout=_request_timeout
1181
+ )
1182
+ await response_data.read()
1183
+ return self.api_client.response_deserialize(
1184
+ response_data=response_data,
1185
+ response_types_map=_response_types_map,
1186
+ )
1187
+
1188
+
1189
+ @validate_call
1190
+ async def link_account_without_preload_content(
1191
+ self,
1192
+ create_linked_account: CreateLinkedAccount,
1193
+ _request_timeout: Union[
1194
+ None,
1195
+ Annotated[StrictFloat, Field(gt=0)],
1196
+ Tuple[
1197
+ Annotated[StrictFloat, Field(gt=0)],
1198
+ Annotated[StrictFloat, Field(gt=0)]
1199
+ ]
1200
+ ] = None,
1201
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1202
+ _content_type: Optional[StrictStr] = None,
1203
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1204
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1205
+ ) -> RESTResponseType:
1206
+ """Link account
1207
+
1208
+
1209
+ :param create_linked_account: (required)
1210
+ :type create_linked_account: CreateLinkedAccount
1211
+ :param _request_timeout: timeout setting for this request. If one
1212
+ number provided, it will be total request
1213
+ timeout. It can also be a pair (tuple) of
1214
+ (connection, read) timeouts.
1215
+ :type _request_timeout: int, tuple(int, int), optional
1216
+ :param _request_auth: set to override the auth_settings for an a single
1217
+ request; this effectively ignores the
1218
+ authentication in the spec for a single request.
1219
+ :type _request_auth: dict, optional
1220
+ :param _content_type: force content-type for the request.
1221
+ :type _content_type: str, Optional
1222
+ :param _headers: set to override the headers for a single
1223
+ request; this effectively ignores the headers
1224
+ in the spec for a single request.
1225
+ :type _headers: dict, optional
1226
+ :param _host_index: set to override the host_index for a single
1227
+ request; this effectively ignores the host_index
1228
+ in the spec for a single request.
1229
+ :type _host_index: int, optional
1230
+ :return: Returns the result object.
1231
+ """ # noqa: E501
1232
+
1233
+ _param = self._link_account_serialize(
1234
+ create_linked_account=create_linked_account,
1235
+ _request_auth=_request_auth,
1236
+ _content_type=_content_type,
1237
+ _headers=_headers,
1238
+ _host_index=_host_index
1239
+ )
1240
+
1241
+ _response_types_map: Dict[str, Optional[str]] = {
1242
+ '204': None,
1243
+ }
1244
+ response_data = await self.api_client.call_api(
1245
+ *_param,
1246
+ _request_timeout=_request_timeout
1247
+ )
1248
+ return response_data.response
1249
+
1250
+
1251
+ def _link_account_serialize(
1252
+ self,
1253
+ create_linked_account,
1254
+ _request_auth,
1255
+ _content_type,
1256
+ _headers,
1257
+ _host_index,
1258
+ ) -> RequestSerialized:
1259
+
1260
+ _host = None
1261
+
1262
+ _collection_formats: Dict[str, str] = {
1263
+ }
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[
1270
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1271
+ ] = {}
1272
+ _body_params: Optional[bytes] = None
1273
+
1274
+ # process the path parameters
1275
+ # process the query parameters
1276
+ # process the header parameters
1277
+ # process the form parameters
1278
+ # process the body parameter
1279
+ if create_linked_account is not None:
1280
+ _body_params = create_linked_account
1281
+
1282
+
1283
+
1284
+ # set the HTTP header `Content-Type`
1285
+ if _content_type:
1286
+ _header_params['Content-Type'] = _content_type
1287
+ else:
1288
+ _default_content_type = (
1289
+ self.api_client.select_header_content_type(
1290
+ [
1291
+ 'application/json'
1292
+ ]
1293
+ )
1294
+ )
1295
+ if _default_content_type is not None:
1296
+ _header_params['Content-Type'] = _default_content_type
1297
+
1298
+ # authentication setting
1299
+ _auth_settings: List[str] = [
1300
+ 'bearer',
1301
+ 'oauth2'
1302
+ ]
1303
+
1304
+ return self.api_client.param_serialize(
1305
+ method='POST',
1306
+ resource_path='/users/linked-accounts',
1307
+ path_params=_path_params,
1308
+ query_params=_query_params,
1309
+ header_params=_header_params,
1310
+ body=_body_params,
1311
+ post_params=_form_params,
1312
+ files=_files,
1313
+ auth_settings=_auth_settings,
1314
+ collection_formats=_collection_formats,
1315
+ _host=_host,
1316
+ _request_auth=_request_auth
1317
+ )
1318
+
1319
+
1320
+
1321
+
1322
+ @validate_call
1323
+ async def list_users(
1324
+ self,
1325
+ _request_timeout: Union[
1326
+ None,
1327
+ Annotated[StrictFloat, Field(gt=0)],
1328
+ Tuple[
1329
+ Annotated[StrictFloat, Field(gt=0)],
1330
+ Annotated[StrictFloat, Field(gt=0)]
1331
+ ]
1332
+ ] = None,
1333
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1334
+ _content_type: Optional[StrictStr] = None,
1335
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1336
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1337
+ ) -> None:
1338
+ """List all users
1339
+
1340
+
1341
+ :param _request_timeout: timeout setting for this request. If one
1342
+ number provided, it will be total request
1343
+ timeout. It can also be a pair (tuple) of
1344
+ (connection, read) timeouts.
1345
+ :type _request_timeout: int, tuple(int, int), optional
1346
+ :param _request_auth: set to override the auth_settings for an a single
1347
+ request; this effectively ignores the
1348
+ authentication in the spec for a single request.
1349
+ :type _request_auth: dict, optional
1350
+ :param _content_type: force content-type for the request.
1351
+ :type _content_type: str, Optional
1352
+ :param _headers: set to override the headers for a single
1353
+ request; this effectively ignores the headers
1354
+ in the spec for a single request.
1355
+ :type _headers: dict, optional
1356
+ :param _host_index: set to override the host_index for a single
1357
+ request; this effectively ignores the host_index
1358
+ in the spec for a single request.
1359
+ :type _host_index: int, optional
1360
+ :return: Returns the result object.
1361
+ """ # noqa: E501
1362
+
1363
+ _param = self._list_users_serialize(
1364
+ _request_auth=_request_auth,
1365
+ _content_type=_content_type,
1366
+ _headers=_headers,
1367
+ _host_index=_host_index
1368
+ )
1369
+
1370
+ _response_types_map: Dict[str, Optional[str]] = {
1371
+ '200': None,
1372
+ }
1373
+ response_data = await self.api_client.call_api(
1374
+ *_param,
1375
+ _request_timeout=_request_timeout
1376
+ )
1377
+ await response_data.read()
1378
+ return self.api_client.response_deserialize(
1379
+ response_data=response_data,
1380
+ response_types_map=_response_types_map,
1381
+ ).data
1382
+
1383
+
1384
+ @validate_call
1385
+ async def list_users_with_http_info(
1386
+ self,
1387
+ _request_timeout: Union[
1388
+ None,
1389
+ Annotated[StrictFloat, Field(gt=0)],
1390
+ Tuple[
1391
+ Annotated[StrictFloat, Field(gt=0)],
1392
+ Annotated[StrictFloat, Field(gt=0)]
1393
+ ]
1394
+ ] = None,
1395
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1396
+ _content_type: Optional[StrictStr] = None,
1397
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1398
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1399
+ ) -> ApiResponse[None]:
1400
+ """List all users
1401
+
1402
+
1403
+ :param _request_timeout: timeout setting for this request. If one
1404
+ number provided, it will be total request
1405
+ timeout. It can also be a pair (tuple) of
1406
+ (connection, read) timeouts.
1407
+ :type _request_timeout: int, tuple(int, int), optional
1408
+ :param _request_auth: set to override the auth_settings for an a single
1409
+ request; this effectively ignores the
1410
+ authentication in the spec for a single request.
1411
+ :type _request_auth: dict, optional
1412
+ :param _content_type: force content-type for the request.
1413
+ :type _content_type: str, Optional
1414
+ :param _headers: set to override the headers for a single
1415
+ request; this effectively ignores the headers
1416
+ in the spec for a single request.
1417
+ :type _headers: dict, optional
1418
+ :param _host_index: set to override the host_index for a single
1419
+ request; this effectively ignores the host_index
1420
+ in the spec for a single request.
1421
+ :type _host_index: int, optional
1422
+ :return: Returns the result object.
1423
+ """ # noqa: E501
1424
+
1425
+ _param = self._list_users_serialize(
1426
+ _request_auth=_request_auth,
1427
+ _content_type=_content_type,
1428
+ _headers=_headers,
1429
+ _host_index=_host_index
1430
+ )
1431
+
1432
+ _response_types_map: Dict[str, Optional[str]] = {
1433
+ '200': None,
1434
+ }
1435
+ response_data = await self.api_client.call_api(
1436
+ *_param,
1437
+ _request_timeout=_request_timeout
1438
+ )
1439
+ await response_data.read()
1440
+ return self.api_client.response_deserialize(
1441
+ response_data=response_data,
1442
+ response_types_map=_response_types_map,
1443
+ )
1444
+
1445
+
1446
+ @validate_call
1447
+ async def list_users_without_preload_content(
1448
+ self,
1449
+ _request_timeout: Union[
1450
+ None,
1451
+ Annotated[StrictFloat, Field(gt=0)],
1452
+ Tuple[
1453
+ Annotated[StrictFloat, Field(gt=0)],
1454
+ Annotated[StrictFloat, Field(gt=0)]
1455
+ ]
1456
+ ] = None,
1457
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1458
+ _content_type: Optional[StrictStr] = None,
1459
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1460
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1461
+ ) -> RESTResponseType:
1462
+ """List all users
1463
+
1464
+
1465
+ :param _request_timeout: timeout setting for this request. If one
1466
+ number provided, it will be total request
1467
+ timeout. It can also be a pair (tuple) of
1468
+ (connection, read) timeouts.
1469
+ :type _request_timeout: int, tuple(int, int), optional
1470
+ :param _request_auth: set to override the auth_settings for an a single
1471
+ request; this effectively ignores the
1472
+ authentication in the spec for a single request.
1473
+ :type _request_auth: dict, optional
1474
+ :param _content_type: force content-type for the request.
1475
+ :type _content_type: str, Optional
1476
+ :param _headers: set to override the headers for a single
1477
+ request; this effectively ignores the headers
1478
+ in the spec for a single request.
1479
+ :type _headers: dict, optional
1480
+ :param _host_index: set to override the host_index for a single
1481
+ request; this effectively ignores the host_index
1482
+ in the spec for a single request.
1483
+ :type _host_index: int, optional
1484
+ :return: Returns the result object.
1485
+ """ # noqa: E501
1486
+
1487
+ _param = self._list_users_serialize(
1488
+ _request_auth=_request_auth,
1489
+ _content_type=_content_type,
1490
+ _headers=_headers,
1491
+ _host_index=_host_index
1492
+ )
1493
+
1494
+ _response_types_map: Dict[str, Optional[str]] = {
1495
+ '200': None,
1496
+ }
1497
+ response_data = await self.api_client.call_api(
1498
+ *_param,
1499
+ _request_timeout=_request_timeout
1500
+ )
1501
+ return response_data.response
1502
+
1503
+
1504
+ def _list_users_serialize(
1505
+ self,
1506
+ _request_auth,
1507
+ _content_type,
1508
+ _headers,
1509
+ _host_index,
1510
+ ) -> RequestSerialized:
1511
+
1512
+ _host = None
1513
+
1514
+ _collection_formats: Dict[str, str] = {
1515
+ }
1516
+
1517
+ _path_params: Dict[str, str] = {}
1518
+ _query_params: List[Tuple[str, str]] = []
1519
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1520
+ _form_params: List[Tuple[str, str]] = []
1521
+ _files: Dict[
1522
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1523
+ ] = {}
1524
+ _body_params: Optional[bytes] = None
1525
+
1526
+ # process the path parameters
1527
+ # process the query parameters
1528
+ # process the header parameters
1529
+ # process the form parameters
1530
+ # process the body parameter
1531
+
1532
+
1533
+
1534
+
1535
+ # authentication setting
1536
+ _auth_settings: List[str] = [
1537
+ 'bearer',
1538
+ 'oauth2'
1539
+ ]
1540
+
1541
+ return self.api_client.param_serialize(
1542
+ method='GET',
1543
+ resource_path='/users',
1544
+ path_params=_path_params,
1545
+ query_params=_query_params,
1546
+ header_params=_header_params,
1547
+ body=_body_params,
1548
+ post_params=_form_params,
1549
+ files=_files,
1550
+ auth_settings=_auth_settings,
1551
+ collection_formats=_collection_formats,
1552
+ _host=_host,
1553
+ _request_auth=_request_auth
1554
+ )
1555
+
1556
+
1557
+
1558
+
1559
+ @validate_call
1560
+ async def regenerate_key_pair(
1561
+ self,
1562
+ id: StrictStr,
1563
+ _request_timeout: Union[
1564
+ None,
1565
+ Annotated[StrictFloat, Field(gt=0)],
1566
+ Tuple[
1567
+ Annotated[StrictFloat, Field(gt=0)],
1568
+ Annotated[StrictFloat, Field(gt=0)]
1569
+ ]
1570
+ ] = None,
1571
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1572
+ _content_type: Optional[StrictStr] = None,
1573
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1574
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1575
+ ) -> None:
1576
+ """Regenerate user key pair
1577
+
1578
+
1579
+ :param id: (required)
1580
+ :type id: str
1581
+ :param _request_timeout: timeout setting for this request. If one
1582
+ number provided, it will be total request
1583
+ timeout. It can also be a pair (tuple) of
1584
+ (connection, read) timeouts.
1585
+ :type _request_timeout: int, tuple(int, int), optional
1586
+ :param _request_auth: set to override the auth_settings for an a single
1587
+ request; this effectively ignores the
1588
+ authentication in the spec for a single request.
1589
+ :type _request_auth: dict, optional
1590
+ :param _content_type: force content-type for the request.
1591
+ :type _content_type: str, Optional
1592
+ :param _headers: set to override the headers for a single
1593
+ request; this effectively ignores the headers
1594
+ in the spec for a single request.
1595
+ :type _headers: dict, optional
1596
+ :param _host_index: set to override the host_index for a single
1597
+ request; this effectively ignores the host_index
1598
+ in the spec for a single request.
1599
+ :type _host_index: int, optional
1600
+ :return: Returns the result object.
1601
+ """ # noqa: E501
1602
+
1603
+ _param = self._regenerate_key_pair_serialize(
1604
+ id=id,
1605
+ _request_auth=_request_auth,
1606
+ _content_type=_content_type,
1607
+ _headers=_headers,
1608
+ _host_index=_host_index
1609
+ )
1610
+
1611
+ _response_types_map: Dict[str, Optional[str]] = {
1612
+ '201': None,
1613
+ }
1614
+ response_data = await self.api_client.call_api(
1615
+ *_param,
1616
+ _request_timeout=_request_timeout
1617
+ )
1618
+ await response_data.read()
1619
+ return self.api_client.response_deserialize(
1620
+ response_data=response_data,
1621
+ response_types_map=_response_types_map,
1622
+ ).data
1623
+
1624
+
1625
+ @validate_call
1626
+ async def regenerate_key_pair_with_http_info(
1627
+ self,
1628
+ id: StrictStr,
1629
+ _request_timeout: Union[
1630
+ None,
1631
+ Annotated[StrictFloat, Field(gt=0)],
1632
+ Tuple[
1633
+ Annotated[StrictFloat, Field(gt=0)],
1634
+ Annotated[StrictFloat, Field(gt=0)]
1635
+ ]
1636
+ ] = None,
1637
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1638
+ _content_type: Optional[StrictStr] = None,
1639
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1640
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1641
+ ) -> ApiResponse[None]:
1642
+ """Regenerate user key pair
1643
+
1644
+
1645
+ :param id: (required)
1646
+ :type id: str
1647
+ :param _request_timeout: timeout setting for this request. If one
1648
+ number provided, it will be total request
1649
+ timeout. It can also be a pair (tuple) of
1650
+ (connection, read) timeouts.
1651
+ :type _request_timeout: int, tuple(int, int), optional
1652
+ :param _request_auth: set to override the auth_settings for an a single
1653
+ request; this effectively ignores the
1654
+ authentication in the spec for a single request.
1655
+ :type _request_auth: dict, optional
1656
+ :param _content_type: force content-type for the request.
1657
+ :type _content_type: str, Optional
1658
+ :param _headers: set to override the headers for a single
1659
+ request; this effectively ignores the headers
1660
+ in the spec for a single request.
1661
+ :type _headers: dict, optional
1662
+ :param _host_index: set to override the host_index for a single
1663
+ request; this effectively ignores the host_index
1664
+ in the spec for a single request.
1665
+ :type _host_index: int, optional
1666
+ :return: Returns the result object.
1667
+ """ # noqa: E501
1668
+
1669
+ _param = self._regenerate_key_pair_serialize(
1670
+ id=id,
1671
+ _request_auth=_request_auth,
1672
+ _content_type=_content_type,
1673
+ _headers=_headers,
1674
+ _host_index=_host_index
1675
+ )
1676
+
1677
+ _response_types_map: Dict[str, Optional[str]] = {
1678
+ '201': None,
1679
+ }
1680
+ response_data = await self.api_client.call_api(
1681
+ *_param,
1682
+ _request_timeout=_request_timeout
1683
+ )
1684
+ await response_data.read()
1685
+ return self.api_client.response_deserialize(
1686
+ response_data=response_data,
1687
+ response_types_map=_response_types_map,
1688
+ )
1689
+
1690
+
1691
+ @validate_call
1692
+ async def regenerate_key_pair_without_preload_content(
1693
+ self,
1694
+ id: StrictStr,
1695
+ _request_timeout: Union[
1696
+ None,
1697
+ Annotated[StrictFloat, Field(gt=0)],
1698
+ Tuple[
1699
+ Annotated[StrictFloat, Field(gt=0)],
1700
+ Annotated[StrictFloat, Field(gt=0)]
1701
+ ]
1702
+ ] = None,
1703
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1704
+ _content_type: Optional[StrictStr] = None,
1705
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1706
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1707
+ ) -> RESTResponseType:
1708
+ """Regenerate user key pair
1709
+
1710
+
1711
+ :param id: (required)
1712
+ :type id: str
1713
+ :param _request_timeout: timeout setting for this request. If one
1714
+ number provided, it will be total request
1715
+ timeout. It can also be a pair (tuple) of
1716
+ (connection, read) timeouts.
1717
+ :type _request_timeout: int, tuple(int, int), optional
1718
+ :param _request_auth: set to override the auth_settings for an a single
1719
+ request; this effectively ignores the
1720
+ authentication in the spec for a single request.
1721
+ :type _request_auth: dict, optional
1722
+ :param _content_type: force content-type for the request.
1723
+ :type _content_type: str, Optional
1724
+ :param _headers: set to override the headers for a single
1725
+ request; this effectively ignores the headers
1726
+ in the spec for a single request.
1727
+ :type _headers: dict, optional
1728
+ :param _host_index: set to override the host_index for a single
1729
+ request; this effectively ignores the host_index
1730
+ in the spec for a single request.
1731
+ :type _host_index: int, optional
1732
+ :return: Returns the result object.
1733
+ """ # noqa: E501
1734
+
1735
+ _param = self._regenerate_key_pair_serialize(
1736
+ id=id,
1737
+ _request_auth=_request_auth,
1738
+ _content_type=_content_type,
1739
+ _headers=_headers,
1740
+ _host_index=_host_index
1741
+ )
1742
+
1743
+ _response_types_map: Dict[str, Optional[str]] = {
1744
+ '201': None,
1745
+ }
1746
+ response_data = await self.api_client.call_api(
1747
+ *_param,
1748
+ _request_timeout=_request_timeout
1749
+ )
1750
+ return response_data.response
1751
+
1752
+
1753
+ def _regenerate_key_pair_serialize(
1754
+ self,
1755
+ id,
1756
+ _request_auth,
1757
+ _content_type,
1758
+ _headers,
1759
+ _host_index,
1760
+ ) -> RequestSerialized:
1761
+
1762
+ _host = None
1763
+
1764
+ _collection_formats: Dict[str, str] = {
1765
+ }
1766
+
1767
+ _path_params: Dict[str, str] = {}
1768
+ _query_params: List[Tuple[str, str]] = []
1769
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1770
+ _form_params: List[Tuple[str, str]] = []
1771
+ _files: Dict[
1772
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1773
+ ] = {}
1774
+ _body_params: Optional[bytes] = None
1775
+
1776
+ # process the path parameters
1777
+ if id is not None:
1778
+ _path_params['id'] = id
1779
+ # process the query parameters
1780
+ # process the header parameters
1781
+ # process the form parameters
1782
+ # process the body parameter
1783
+
1784
+
1785
+
1786
+
1787
+ # authentication setting
1788
+ _auth_settings: List[str] = [
1789
+ 'bearer',
1790
+ 'oauth2'
1791
+ ]
1792
+
1793
+ return self.api_client.param_serialize(
1794
+ method='POST',
1795
+ resource_path='/users/{id}/regenerate-key-pair',
1796
+ path_params=_path_params,
1797
+ query_params=_query_params,
1798
+ header_params=_header_params,
1799
+ body=_body_params,
1800
+ post_params=_form_params,
1801
+ files=_files,
1802
+ auth_settings=_auth_settings,
1803
+ collection_formats=_collection_formats,
1804
+ _host=_host,
1805
+ _request_auth=_request_auth
1806
+ )
1807
+
1808
+
1809
+
1810
+
1811
+ @validate_call
1812
+ async def unlink_account(
1813
+ self,
1814
+ provider: StrictStr,
1815
+ provider_user_id: StrictStr,
1816
+ _request_timeout: Union[
1817
+ None,
1818
+ Annotated[StrictFloat, Field(gt=0)],
1819
+ Tuple[
1820
+ Annotated[StrictFloat, Field(gt=0)],
1821
+ Annotated[StrictFloat, Field(gt=0)]
1822
+ ]
1823
+ ] = None,
1824
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1825
+ _content_type: Optional[StrictStr] = None,
1826
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1827
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1828
+ ) -> None:
1829
+ """Unlink account
1830
+
1831
+
1832
+ :param provider: (required)
1833
+ :type provider: str
1834
+ :param provider_user_id: (required)
1835
+ :type provider_user_id: str
1836
+ :param _request_timeout: timeout setting for this request. If one
1837
+ number provided, it will be total request
1838
+ timeout. It can also be a pair (tuple) of
1839
+ (connection, read) timeouts.
1840
+ :type _request_timeout: int, tuple(int, int), optional
1841
+ :param _request_auth: set to override the auth_settings for an a single
1842
+ request; this effectively ignores the
1843
+ authentication in the spec for a single request.
1844
+ :type _request_auth: dict, optional
1845
+ :param _content_type: force content-type for the request.
1846
+ :type _content_type: str, Optional
1847
+ :param _headers: set to override the headers for a single
1848
+ request; this effectively ignores the headers
1849
+ in the spec for a single request.
1850
+ :type _headers: dict, optional
1851
+ :param _host_index: set to override the host_index for a single
1852
+ request; this effectively ignores the host_index
1853
+ in the spec for a single request.
1854
+ :type _host_index: int, optional
1855
+ :return: Returns the result object.
1856
+ """ # noqa: E501
1857
+
1858
+ _param = self._unlink_account_serialize(
1859
+ provider=provider,
1860
+ provider_user_id=provider_user_id,
1861
+ _request_auth=_request_auth,
1862
+ _content_type=_content_type,
1863
+ _headers=_headers,
1864
+ _host_index=_host_index
1865
+ )
1866
+
1867
+ _response_types_map: Dict[str, Optional[str]] = {
1868
+ '204': None,
1869
+ }
1870
+ response_data = await self.api_client.call_api(
1871
+ *_param,
1872
+ _request_timeout=_request_timeout
1873
+ )
1874
+ await response_data.read()
1875
+ return self.api_client.response_deserialize(
1876
+ response_data=response_data,
1877
+ response_types_map=_response_types_map,
1878
+ ).data
1879
+
1880
+
1881
+ @validate_call
1882
+ async def unlink_account_with_http_info(
1883
+ self,
1884
+ provider: StrictStr,
1885
+ provider_user_id: StrictStr,
1886
+ _request_timeout: Union[
1887
+ None,
1888
+ Annotated[StrictFloat, Field(gt=0)],
1889
+ Tuple[
1890
+ Annotated[StrictFloat, Field(gt=0)],
1891
+ Annotated[StrictFloat, Field(gt=0)]
1892
+ ]
1893
+ ] = None,
1894
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1895
+ _content_type: Optional[StrictStr] = None,
1896
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1897
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1898
+ ) -> ApiResponse[None]:
1899
+ """Unlink account
1900
+
1901
+
1902
+ :param provider: (required)
1903
+ :type provider: str
1904
+ :param provider_user_id: (required)
1905
+ :type provider_user_id: str
1906
+ :param _request_timeout: timeout setting for this request. If one
1907
+ number provided, it will be total request
1908
+ timeout. It can also be a pair (tuple) of
1909
+ (connection, read) timeouts.
1910
+ :type _request_timeout: int, tuple(int, int), optional
1911
+ :param _request_auth: set to override the auth_settings for an a single
1912
+ request; this effectively ignores the
1913
+ authentication in the spec for a single request.
1914
+ :type _request_auth: dict, optional
1915
+ :param _content_type: force content-type for the request.
1916
+ :type _content_type: str, Optional
1917
+ :param _headers: set to override the headers for a single
1918
+ request; this effectively ignores the headers
1919
+ in the spec for a single request.
1920
+ :type _headers: dict, optional
1921
+ :param _host_index: set to override the host_index for a single
1922
+ request; this effectively ignores the host_index
1923
+ in the spec for a single request.
1924
+ :type _host_index: int, optional
1925
+ :return: Returns the result object.
1926
+ """ # noqa: E501
1927
+
1928
+ _param = self._unlink_account_serialize(
1929
+ provider=provider,
1930
+ provider_user_id=provider_user_id,
1931
+ _request_auth=_request_auth,
1932
+ _content_type=_content_type,
1933
+ _headers=_headers,
1934
+ _host_index=_host_index
1935
+ )
1936
+
1937
+ _response_types_map: Dict[str, Optional[str]] = {
1938
+ '204': None,
1939
+ }
1940
+ response_data = await self.api_client.call_api(
1941
+ *_param,
1942
+ _request_timeout=_request_timeout
1943
+ )
1944
+ await response_data.read()
1945
+ return self.api_client.response_deserialize(
1946
+ response_data=response_data,
1947
+ response_types_map=_response_types_map,
1948
+ )
1949
+
1950
+
1951
+ @validate_call
1952
+ async def unlink_account_without_preload_content(
1953
+ self,
1954
+ provider: StrictStr,
1955
+ provider_user_id: StrictStr,
1956
+ _request_timeout: Union[
1957
+ None,
1958
+ Annotated[StrictFloat, Field(gt=0)],
1959
+ Tuple[
1960
+ Annotated[StrictFloat, Field(gt=0)],
1961
+ Annotated[StrictFloat, Field(gt=0)]
1962
+ ]
1963
+ ] = None,
1964
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1965
+ _content_type: Optional[StrictStr] = None,
1966
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1967
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1968
+ ) -> RESTResponseType:
1969
+ """Unlink account
1970
+
1971
+
1972
+ :param provider: (required)
1973
+ :type provider: str
1974
+ :param provider_user_id: (required)
1975
+ :type provider_user_id: str
1976
+ :param _request_timeout: timeout setting for this request. If one
1977
+ number provided, it will be total request
1978
+ timeout. It can also be a pair (tuple) of
1979
+ (connection, read) timeouts.
1980
+ :type _request_timeout: int, tuple(int, int), optional
1981
+ :param _request_auth: set to override the auth_settings for an a single
1982
+ request; this effectively ignores the
1983
+ authentication in the spec for a single request.
1984
+ :type _request_auth: dict, optional
1985
+ :param _content_type: force content-type for the request.
1986
+ :type _content_type: str, Optional
1987
+ :param _headers: set to override the headers for a single
1988
+ request; this effectively ignores the headers
1989
+ in the spec for a single request.
1990
+ :type _headers: dict, optional
1991
+ :param _host_index: set to override the host_index for a single
1992
+ request; this effectively ignores the host_index
1993
+ in the spec for a single request.
1994
+ :type _host_index: int, optional
1995
+ :return: Returns the result object.
1996
+ """ # noqa: E501
1997
+
1998
+ _param = self._unlink_account_serialize(
1999
+ provider=provider,
2000
+ provider_user_id=provider_user_id,
2001
+ _request_auth=_request_auth,
2002
+ _content_type=_content_type,
2003
+ _headers=_headers,
2004
+ _host_index=_host_index
2005
+ )
2006
+
2007
+ _response_types_map: Dict[str, Optional[str]] = {
2008
+ '204': None,
2009
+ }
2010
+ response_data = await self.api_client.call_api(
2011
+ *_param,
2012
+ _request_timeout=_request_timeout
2013
+ )
2014
+ return response_data.response
2015
+
2016
+
2017
+ def _unlink_account_serialize(
2018
+ self,
2019
+ provider,
2020
+ provider_user_id,
2021
+ _request_auth,
2022
+ _content_type,
2023
+ _headers,
2024
+ _host_index,
2025
+ ) -> RequestSerialized:
2026
+
2027
+ _host = None
2028
+
2029
+ _collection_formats: Dict[str, str] = {
2030
+ }
2031
+
2032
+ _path_params: Dict[str, str] = {}
2033
+ _query_params: List[Tuple[str, str]] = []
2034
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2035
+ _form_params: List[Tuple[str, str]] = []
2036
+ _files: Dict[
2037
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2038
+ ] = {}
2039
+ _body_params: Optional[bytes] = None
2040
+
2041
+ # process the path parameters
2042
+ if provider is not None:
2043
+ _path_params['provider'] = provider
2044
+ if provider_user_id is not None:
2045
+ _path_params['providerUserId'] = provider_user_id
2046
+ # process the query parameters
2047
+ # process the header parameters
2048
+ # process the form parameters
2049
+ # process the body parameter
2050
+
2051
+
2052
+
2053
+
2054
+ # authentication setting
2055
+ _auth_settings: List[str] = [
2056
+ 'bearer',
2057
+ 'oauth2'
2058
+ ]
2059
+
2060
+ return self.api_client.param_serialize(
2061
+ method='DELETE',
2062
+ resource_path='/users/linked-accounts/{provider}/{providerUserId}',
2063
+ path_params=_path_params,
2064
+ query_params=_query_params,
2065
+ header_params=_header_params,
2066
+ body=_body_params,
2067
+ post_params=_form_params,
2068
+ files=_files,
2069
+ auth_settings=_auth_settings,
2070
+ collection_formats=_collection_formats,
2071
+ _host=_host,
2072
+ _request_auth=_request_auth
2073
+ )
2074
+
2075
+