crypticorn 1.0.2rc3__py3-none-any.whl → 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. crypticorn/__init__.py +3 -3
  2. crypticorn/auth/__init__.py +2 -0
  3. crypticorn/auth/client/__init__.py +112 -0
  4. crypticorn/auth/client/api/__init__.py +8 -0
  5. crypticorn/auth/client/api/admin_api.py +522 -0
  6. crypticorn/auth/client/api/auth_api.py +2089 -0
  7. crypticorn/auth/client/api/service_api.py +309 -0
  8. crypticorn/auth/client/api/user_api.py +2540 -0
  9. crypticorn/auth/client/api/wallet_api.py +1698 -0
  10. crypticorn/auth/client/api_client.py +758 -0
  11. crypticorn/auth/client/api_response.py +20 -0
  12. crypticorn/auth/client/configuration.py +584 -0
  13. crypticorn/auth/client/exceptions.py +220 -0
  14. crypticorn/auth/client/models/__init__.py +91 -0
  15. crypticorn/auth/client/models/add_wallet200_response.py +86 -0
  16. crypticorn/auth/client/models/add_wallet_request.py +107 -0
  17. crypticorn/auth/client/models/authorize_user200_response.py +107 -0
  18. crypticorn/auth/client/models/authorize_user200_response_auth.py +101 -0
  19. crypticorn/auth/client/models/authorize_user_request.py +96 -0
  20. crypticorn/auth/client/models/create_user_request.py +114 -0
  21. crypticorn/auth/client/models/list_wallets200_response.py +137 -0
  22. crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +115 -0
  23. crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +115 -0
  24. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +168 -0
  25. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +191 -0
  26. crypticorn/auth/client/models/list_wallets200_response_data_inner.py +102 -0
  27. crypticorn/auth/client/models/list_wallets200_response_user_value.py +118 -0
  28. crypticorn/auth/client/models/logout_default_response.py +108 -0
  29. crypticorn/auth/client/models/logout_default_response_issues_inner.py +83 -0
  30. crypticorn/auth/client/models/refresh_token_info200_response.py +97 -0
  31. crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +105 -0
  32. crypticorn/auth/client/models/resend_verification_email_request.py +84 -0
  33. crypticorn/auth/client/models/revoke_user_tokens_request.py +83 -0
  34. crypticorn/auth/client/models/rotate_tokens200_response.py +110 -0
  35. crypticorn/auth/client/models/token_info200_response.py +97 -0
  36. crypticorn/auth/client/models/unlink_wallet_request.py +83 -0
  37. crypticorn/auth/client/models/update_user_request.py +93 -0
  38. crypticorn/auth/client/models/user_reset_password_request.py +87 -0
  39. crypticorn/auth/client/models/user_set_password_request.py +89 -0
  40. crypticorn/auth/client/models/verify200_response.py +110 -0
  41. crypticorn/auth/client/models/verify_email200_response.py +107 -0
  42. crypticorn/auth/client/models/verify_email200_response_auth.py +101 -0
  43. crypticorn/auth/client/models/verify_email200_response_auth_auth.py +110 -0
  44. crypticorn/auth/client/models/verify_email_request.py +83 -0
  45. crypticorn/auth/client/models/verify_wallet_request.py +91 -0
  46. crypticorn/auth/client/models/wallet_verified200_response.py +83 -0
  47. crypticorn/auth/client/models/whoami200_response.py +104 -0
  48. crypticorn/auth/client/rest.py +195 -0
  49. crypticorn/auth/main.py +45 -0
  50. crypticorn/client.py +46 -8
  51. crypticorn/common/__init__.py +5 -0
  52. crypticorn/common/auth.py +43 -0
  53. crypticorn/common/auth_client.py +163 -0
  54. crypticorn/common/errors.py +432 -0
  55. crypticorn/common/scopes.py +29 -0
  56. crypticorn/common/urls.py +25 -0
  57. crypticorn/hive/__init__.py +2 -1
  58. crypticorn/hive/client/__init__.py +57 -0
  59. crypticorn/hive/client/api/__init__.py +6 -0
  60. crypticorn/hive/client/api/data_api.py +594 -0
  61. crypticorn/hive/client/api/models_api.py +1680 -0
  62. crypticorn/hive/client/api/status_api.py +263 -0
  63. crypticorn/hive/client/api_client.py +758 -0
  64. crypticorn/hive/client/api_response.py +20 -0
  65. crypticorn/hive/client/configuration.py +612 -0
  66. crypticorn/hive/client/exceptions.py +220 -0
  67. crypticorn/hive/client/models/__init__.py +38 -0
  68. crypticorn/hive/client/models/coins.py +44 -0
  69. crypticorn/hive/client/models/data_download_response.py +113 -0
  70. crypticorn/hive/client/models/data_info.py +115 -0
  71. crypticorn/hive/client/models/data_value_value_value_inner.py +154 -0
  72. crypticorn/hive/client/models/data_version.py +35 -0
  73. crypticorn/hive/client/models/download_links.py +91 -0
  74. crypticorn/hive/client/models/evaluation.py +86 -0
  75. crypticorn/hive/client/models/evaluation_response.py +85 -0
  76. crypticorn/hive/client/models/feature_size.py +36 -0
  77. crypticorn/hive/client/models/http_validation_error.py +99 -0
  78. crypticorn/hive/client/models/model.py +133 -0
  79. crypticorn/hive/client/models/model_create.py +93 -0
  80. crypticorn/hive/client/models/model_status.py +35 -0
  81. crypticorn/hive/client/models/model_update.py +83 -0
  82. crypticorn/hive/client/models/target.py +36 -0
  83. crypticorn/hive/client/models/target_type.py +35 -0
  84. crypticorn/hive/client/models/validation_error.py +105 -0
  85. crypticorn/hive/client/models/validation_error_loc_inner.py +159 -0
  86. crypticorn/hive/client/py.typed +0 -0
  87. crypticorn/hive/client/rest.py +195 -0
  88. crypticorn/hive/main.py +27 -100
  89. crypticorn/klines/client/__init__.py +21 -7
  90. crypticorn/klines/client/api/__init__.py +0 -1
  91. crypticorn/klines/client/api/funding_rates_api.py +90 -79
  92. crypticorn/klines/client/api/health_check_api.py +29 -45
  93. crypticorn/klines/client/api/ohlcv_data_api.py +104 -87
  94. crypticorn/klines/client/api/symbols_api.py +36 -54
  95. crypticorn/klines/client/api/udf_api.py +228 -352
  96. crypticorn/klines/client/api_client.py +106 -148
  97. crypticorn/klines/client/api_response.py +2 -3
  98. crypticorn/klines/client/configuration.py +64 -50
  99. crypticorn/klines/client/exceptions.py +20 -16
  100. crypticorn/klines/client/models/__init__.py +21 -7
  101. crypticorn/klines/client/models/base_response_health_check_response.py +21 -15
  102. crypticorn/klines/client/models/base_response_list_funding_rate_response.py +21 -15
  103. crypticorn/klines/client/models/base_response_list_str.py +16 -14
  104. crypticorn/klines/client/models/base_response_ohlcv_response.py +21 -15
  105. crypticorn/klines/client/models/error_response.py +23 -15
  106. crypticorn/klines/client/models/exchange.py +11 -11
  107. crypticorn/klines/client/models/funding_rate_response.py +11 -11
  108. crypticorn/klines/client/models/health_check_response.py +14 -12
  109. crypticorn/klines/client/models/history_error_response.py +11 -11
  110. crypticorn/klines/client/models/history_no_data_response.py +16 -16
  111. crypticorn/klines/client/models/history_success_response.py +16 -16
  112. crypticorn/klines/client/models/http_validation_error.py +14 -10
  113. crypticorn/klines/client/models/market.py +2 -4
  114. crypticorn/klines/client/models/ohlcv_response.py +22 -15
  115. crypticorn/klines/client/models/resolution.py +5 -7
  116. crypticorn/klines/client/models/response_get_history_udf_history_get.py +71 -22
  117. crypticorn/klines/client/models/search_symbol_response.py +22 -15
  118. crypticorn/klines/client/models/sort_direction.py +2 -4
  119. crypticorn/klines/client/models/symbol_group_response.py +5 -9
  120. crypticorn/klines/client/models/symbol_info_response.py +40 -24
  121. crypticorn/klines/client/models/symbol_type.py +5 -10
  122. crypticorn/klines/client/models/timeframe.py +5 -7
  123. crypticorn/klines/client/models/udf_config_response.py +60 -21
  124. crypticorn/klines/client/models/validation_error.py +19 -13
  125. crypticorn/klines/client/models/validation_error_loc_inner.py +32 -11
  126. crypticorn/klines/client/rest.py +30 -41
  127. crypticorn/klines/main.py +52 -15
  128. crypticorn/pay/__init__.py +2 -0
  129. crypticorn/pay/client/__init__.py +52 -0
  130. crypticorn/pay/client/api/__init__.py +7 -0
  131. crypticorn/pay/client/api/now_payments_api.py +813 -0
  132. crypticorn/pay/client/api/payments_api.py +799 -0
  133. crypticorn/pay/client/api/products_api.py +891 -0
  134. crypticorn/pay/client/api/status_api.py +260 -0
  135. crypticorn/pay/client/api_client.py +758 -0
  136. crypticorn/pay/client/api_response.py +20 -0
  137. crypticorn/pay/client/configuration.py +612 -0
  138. crypticorn/pay/client/exceptions.py +220 -0
  139. crypticorn/pay/client/models/__init__.py +32 -0
  140. crypticorn/pay/client/models/api_status_res.py +83 -0
  141. crypticorn/pay/client/models/combined_payment_history.py +101 -0
  142. crypticorn/pay/client/models/create_invoice_req.py +188 -0
  143. crypticorn/pay/client/models/create_invoice_res.py +188 -0
  144. crypticorn/pay/client/models/currency.py +165 -0
  145. crypticorn/pay/client/models/estimate_price_req.py +91 -0
  146. crypticorn/pay/client/models/estimate_price_res.py +102 -0
  147. crypticorn/pay/client/models/get_currencies_res.py +99 -0
  148. crypticorn/pay/client/models/get_payment_status_res.py +222 -0
  149. crypticorn/pay/client/models/get_payments_list_res.py +109 -0
  150. crypticorn/pay/client/models/http_validation_error.py +99 -0
  151. crypticorn/pay/client/models/min_amount_req.py +124 -0
  152. crypticorn/pay/client/models/min_amount_res.py +105 -0
  153. crypticorn/pay/client/models/now_api_status_res.py +83 -0
  154. crypticorn/pay/client/models/now_create_invoice_req.py +188 -0
  155. crypticorn/pay/client/models/now_create_invoice_res.py +188 -0
  156. crypticorn/pay/client/models/now_fee_structure.py +104 -0
  157. crypticorn/pay/client/models/now_payment_model.py +124 -0
  158. crypticorn/pay/client/models/now_payment_status.py +42 -0
  159. crypticorn/pay/client/models/now_webhook_payload.py +181 -0
  160. crypticorn/pay/client/models/payment.py +231 -0
  161. crypticorn/pay/client/models/payment_status.py +40 -0
  162. crypticorn/pay/client/models/product.py +87 -0
  163. crypticorn/pay/client/models/product_model.py +119 -0
  164. crypticorn/pay/client/models/product_subs_model.py +108 -0
  165. crypticorn/pay/client/models/services.py +34 -0
  166. crypticorn/pay/client/models/unified_payment_model.py +112 -0
  167. crypticorn/pay/client/models/validation_error.py +105 -0
  168. crypticorn/pay/client/models/validation_error_loc_inner.py +159 -0
  169. crypticorn/pay/client/py.typed +0 -0
  170. crypticorn/pay/client/rest.py +195 -0
  171. crypticorn/pay/main.py +35 -0
  172. crypticorn/trade/client/__init__.py +9 -4
  173. crypticorn/trade/client/api/__init__.py +0 -1
  174. crypticorn/trade/client/api/api_keys_api.py +203 -304
  175. crypticorn/trade/client/api/bots_api.py +177 -250
  176. crypticorn/trade/client/api/exchanges_api.py +38 -57
  177. crypticorn/trade/client/api/futures_trading_panel_api.py +223 -321
  178. crypticorn/trade/client/api/notifications_api.py +247 -364
  179. crypticorn/trade/client/api/orders_api.py +44 -63
  180. crypticorn/trade/client/api/status_api.py +35 -53
  181. crypticorn/trade/client/api/strategies_api.py +852 -64
  182. crypticorn/trade/client/api/trading_actions_api.py +126 -203
  183. crypticorn/trade/client/api_client.py +115 -154
  184. crypticorn/trade/client/api_response.py +2 -3
  185. crypticorn/trade/client/configuration.py +128 -90
  186. crypticorn/trade/client/exceptions.py +21 -17
  187. crypticorn/trade/client/models/__init__.py +9 -4
  188. crypticorn/trade/client/models/action_model.py +114 -50
  189. crypticorn/trade/client/models/api_error_identifier.py +60 -51
  190. crypticorn/trade/client/models/api_error_level.py +37 -0
  191. crypticorn/trade/client/models/api_error_type.py +37 -0
  192. crypticorn/trade/client/models/api_key_model.py +49 -28
  193. crypticorn/trade/client/models/bot_model.py +76 -31
  194. crypticorn/trade/client/models/bot_status.py +37 -0
  195. crypticorn/trade/client/models/exchange.py +3 -5
  196. crypticorn/trade/client/models/execution_ids.py +14 -14
  197. crypticorn/trade/client/models/futures_balance.py +39 -23
  198. crypticorn/trade/client/models/futures_trading_action.py +98 -46
  199. crypticorn/trade/client/models/http_validation_error.py +15 -11
  200. crypticorn/trade/client/models/margin_mode.py +3 -5
  201. crypticorn/trade/client/models/market_type.py +3 -5
  202. crypticorn/trade/client/models/notification_model.py +60 -27
  203. crypticorn/trade/client/models/notification_type.py +4 -6
  204. crypticorn/trade/client/models/order_model.py +125 -65
  205. crypticorn/trade/client/models/order_status.py +6 -8
  206. crypticorn/trade/client/models/post_futures_action.py +16 -12
  207. crypticorn/trade/client/models/strategy_exchange_info.py +11 -12
  208. crypticorn/trade/client/models/strategy_model.py +66 -27
  209. crypticorn/trade/client/models/strategy_model_input.py +160 -0
  210. crypticorn/trade/client/models/strategy_model_output.py +160 -0
  211. crypticorn/trade/client/models/tpsl.py +35 -21
  212. crypticorn/trade/client/models/trading_action_type.py +5 -7
  213. crypticorn/trade/client/models/update_notification.py +17 -13
  214. crypticorn/trade/client/models/validation_error.py +20 -14
  215. crypticorn/trade/client/models/validation_error_loc_inner.py +33 -12
  216. crypticorn/trade/client/rest.py +108 -170
  217. crypticorn/trade/main.py +26 -19
  218. crypticorn-2.0.0.dist-info/METADATA +74 -0
  219. crypticorn-2.0.0.dist-info/RECORD +226 -0
  220. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/WHEEL +1 -1
  221. crypticorn/hive/requirements.txt +0 -4
  222. crypticorn/hive/utils.py +0 -109
  223. crypticorn/klines/requirements.txt +0 -4
  224. crypticorn/klines/test/test_base_response_health_check_response.py +0 -56
  225. crypticorn/klines/test/test_base_response_list_funding_rate_response.py +0 -59
  226. crypticorn/klines/test/test_base_response_list_str.py +0 -56
  227. crypticorn/klines/test/test_base_response_ohlcv_response.py +0 -72
  228. crypticorn/klines/test/test_error_response.py +0 -57
  229. crypticorn/klines/test/test_exchange.py +0 -56
  230. crypticorn/klines/test/test_funding_rate_response.py +0 -56
  231. crypticorn/klines/test/test_funding_rates_api.py +0 -38
  232. crypticorn/klines/test/test_health_check_api.py +0 -38
  233. crypticorn/klines/test/test_health_check_response.py +0 -52
  234. crypticorn/klines/test/test_history_error_response.py +0 -53
  235. crypticorn/klines/test/test_history_no_data_response.py +0 -69
  236. crypticorn/klines/test/test_history_success_response.py +0 -87
  237. crypticorn/klines/test/test_http_validation_error.py +0 -58
  238. crypticorn/klines/test/test_market.py +0 -33
  239. crypticorn/klines/test/test_ohlcv_data_api.py +0 -38
  240. crypticorn/klines/test/test_ohlcv_response.py +0 -86
  241. crypticorn/klines/test/test_resolution.py +0 -33
  242. crypticorn/klines/test/test_response_get_history_udf_history_get.py +0 -89
  243. crypticorn/klines/test/test_search_symbol_response.py +0 -62
  244. crypticorn/klines/test/test_sort_direction.py +0 -33
  245. crypticorn/klines/test/test_symbol_group_response.py +0 -53
  246. crypticorn/klines/test/test_symbol_info_response.py +0 -84
  247. crypticorn/klines/test/test_symbol_type.py +0 -54
  248. crypticorn/klines/test/test_symbols_api.py +0 -38
  249. crypticorn/klines/test/test_timeframe.py +0 -33
  250. crypticorn/klines/test/test_udf_api.py +0 -80
  251. crypticorn/klines/test/test_udf_config_response.py +0 -95
  252. crypticorn/klines/test/test_validation_error.py +0 -60
  253. crypticorn/klines/test/test_validation_error_loc_inner.py +0 -50
  254. crypticorn/trade/requirements.txt +0 -4
  255. crypticorn-1.0.2rc3.dist-info/LICENSE.md +0 -19
  256. crypticorn-1.0.2rc3.dist-info/METADATA +0 -47
  257. crypticorn-1.0.2rc3.dist-info/RECORD +0 -128
  258. /crypticorn/{klines/test/__init__.py → auth/client/py.typed} +0 -0
  259. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2540 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Crypticorn Auth API
5
+
6
+ OpenAPI compliant REST API built using tRPC with Express
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Any, Optional
21
+ from typing_extensions import Annotated
22
+ from crypticorn.auth.client.models.create_user_request import CreateUserRequest
23
+ from crypticorn.auth.client.models.resend_verification_email_request import (
24
+ ResendVerificationEmailRequest,
25
+ )
26
+ from crypticorn.auth.client.models.update_user_request import UpdateUserRequest
27
+ from crypticorn.auth.client.models.user_reset_password_request import (
28
+ UserResetPasswordRequest,
29
+ )
30
+ from crypticorn.auth.client.models.user_set_password_request import (
31
+ UserSetPasswordRequest,
32
+ )
33
+ from crypticorn.auth.client.models.verify_email200_response import (
34
+ VerifyEmail200Response,
35
+ )
36
+ from crypticorn.auth.client.models.verify_email_request import VerifyEmailRequest
37
+ from crypticorn.auth.client.models.whoami200_response import Whoami200Response
38
+
39
+ from crypticorn.auth.client.api_client import ApiClient, RequestSerialized
40
+ from crypticorn.auth.client.api_response import ApiResponse
41
+ from crypticorn.auth.client.rest import RESTResponseType
42
+
43
+
44
+ class UserApi:
45
+ """NOTE: This class is auto generated by OpenAPI Generator
46
+ Ref: https://openapi-generator.tech
47
+
48
+ Do not edit the class manually.
49
+ """
50
+
51
+ def __init__(self, api_client=None) -> None:
52
+ if api_client is None:
53
+ api_client = ApiClient.get_default()
54
+ self.api_client = api_client
55
+
56
+ @validate_call
57
+ async def create_user(
58
+ self,
59
+ create_user_request: CreateUserRequest,
60
+ _request_timeout: Union[
61
+ None,
62
+ Annotated[StrictFloat, Field(gt=0)],
63
+ Tuple[
64
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
65
+ ],
66
+ ] = None,
67
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
68
+ _content_type: Optional[StrictStr] = None,
69
+ _headers: Optional[Dict[StrictStr, Any]] = None,
70
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
71
+ ) -> object:
72
+ """Create User
73
+
74
+ Creates a new user.
75
+
76
+ :param create_user_request: (required)
77
+ :type create_user_request: CreateUserRequest
78
+ :param _request_timeout: timeout setting for this request. If one
79
+ number provided, it will be total request
80
+ timeout. It can also be a pair (tuple) of
81
+ (connection, read) timeouts.
82
+ :type _request_timeout: int, tuple(int, int), optional
83
+ :param _request_auth: set to override the auth_settings for an a single
84
+ request; this effectively ignores the
85
+ authentication in the spec for a single request.
86
+ :type _request_auth: dict, optional
87
+ :param _content_type: force content-type for the request.
88
+ :type _content_type: str, Optional
89
+ :param _headers: set to override the headers for a single
90
+ request; this effectively ignores the headers
91
+ in the spec for a single request.
92
+ :type _headers: dict, optional
93
+ :param _host_index: set to override the host_index for a single
94
+ request; this effectively ignores the host_index
95
+ in the spec for a single request.
96
+ :type _host_index: int, optional
97
+ :return: Returns the result object.
98
+ """ # noqa: E501
99
+
100
+ _param = self._create_user_serialize(
101
+ create_user_request=create_user_request,
102
+ _request_auth=_request_auth,
103
+ _content_type=_content_type,
104
+ _headers=_headers,
105
+ _host_index=_host_index,
106
+ )
107
+
108
+ _response_types_map: Dict[str, Optional[str]] = {
109
+ "200": "object",
110
+ }
111
+ response_data = await self.api_client.call_api(
112
+ *_param, _request_timeout=_request_timeout
113
+ )
114
+ await response_data.read()
115
+ return self.api_client.response_deserialize(
116
+ response_data=response_data,
117
+ response_types_map=_response_types_map,
118
+ ).data
119
+
120
+ @validate_call
121
+ async def create_user_with_http_info(
122
+ self,
123
+ create_user_request: CreateUserRequest,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
129
+ ],
130
+ ] = None,
131
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
132
+ _content_type: Optional[StrictStr] = None,
133
+ _headers: Optional[Dict[StrictStr, Any]] = None,
134
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
135
+ ) -> ApiResponse[object]:
136
+ """Create User
137
+
138
+ Creates a new user.
139
+
140
+ :param create_user_request: (required)
141
+ :type create_user_request: CreateUserRequest
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._create_user_serialize(
165
+ create_user_request=create_user_request,
166
+ _request_auth=_request_auth,
167
+ _content_type=_content_type,
168
+ _headers=_headers,
169
+ _host_index=_host_index,
170
+ )
171
+
172
+ _response_types_map: Dict[str, Optional[str]] = {
173
+ "200": "object",
174
+ }
175
+ response_data = await self.api_client.call_api(
176
+ *_param, _request_timeout=_request_timeout
177
+ )
178
+ await response_data.read()
179
+ return self.api_client.response_deserialize(
180
+ response_data=response_data,
181
+ response_types_map=_response_types_map,
182
+ )
183
+
184
+ @validate_call
185
+ async def create_user_without_preload_content(
186
+ self,
187
+ create_user_request: CreateUserRequest,
188
+ _request_timeout: Union[
189
+ None,
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Tuple[
192
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
193
+ ],
194
+ ] = None,
195
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
196
+ _content_type: Optional[StrictStr] = None,
197
+ _headers: Optional[Dict[StrictStr, Any]] = None,
198
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
+ ) -> RESTResponseType:
200
+ """Create User
201
+
202
+ Creates a new user.
203
+
204
+ :param create_user_request: (required)
205
+ :type create_user_request: CreateUserRequest
206
+ :param _request_timeout: timeout setting for this request. If one
207
+ number provided, it will be total request
208
+ timeout. It can also be a pair (tuple) of
209
+ (connection, read) timeouts.
210
+ :type _request_timeout: int, tuple(int, int), optional
211
+ :param _request_auth: set to override the auth_settings for an a single
212
+ request; this effectively ignores the
213
+ authentication in the spec for a single request.
214
+ :type _request_auth: dict, optional
215
+ :param _content_type: force content-type for the request.
216
+ :type _content_type: str, Optional
217
+ :param _headers: set to override the headers for a single
218
+ request; this effectively ignores the headers
219
+ in the spec for a single request.
220
+ :type _headers: dict, optional
221
+ :param _host_index: set to override the host_index for a single
222
+ request; this effectively ignores the host_index
223
+ in the spec for a single request.
224
+ :type _host_index: int, optional
225
+ :return: Returns the result object.
226
+ """ # noqa: E501
227
+
228
+ _param = self._create_user_serialize(
229
+ create_user_request=create_user_request,
230
+ _request_auth=_request_auth,
231
+ _content_type=_content_type,
232
+ _headers=_headers,
233
+ _host_index=_host_index,
234
+ )
235
+
236
+ _response_types_map: Dict[str, Optional[str]] = {
237
+ "200": "object",
238
+ }
239
+ response_data = await self.api_client.call_api(
240
+ *_param, _request_timeout=_request_timeout
241
+ )
242
+ return response_data.response
243
+
244
+ def _create_user_serialize(
245
+ self,
246
+ create_user_request,
247
+ _request_auth,
248
+ _content_type,
249
+ _headers,
250
+ _host_index,
251
+ ) -> RequestSerialized:
252
+
253
+ _host = None
254
+
255
+ _collection_formats: Dict[str, str] = {}
256
+
257
+ _path_params: Dict[str, str] = {}
258
+ _query_params: List[Tuple[str, str]] = []
259
+ _header_params: Dict[str, Optional[str]] = _headers or {}
260
+ _form_params: List[Tuple[str, str]] = []
261
+ _files: Dict[
262
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
263
+ ] = {}
264
+ _body_params: Optional[bytes] = None
265
+
266
+ # process the path parameters
267
+ # process the query parameters
268
+ # process the header parameters
269
+ # process the form parameters
270
+ # process the body parameter
271
+ if create_user_request is not None:
272
+ _body_params = create_user_request
273
+
274
+ # set the HTTP header `Accept`
275
+ if "Accept" not in _header_params:
276
+ _header_params["Accept"] = self.api_client.select_header_accept(
277
+ ["application/json"]
278
+ )
279
+
280
+ # set the HTTP header `Content-Type`
281
+ if _content_type:
282
+ _header_params["Content-Type"] = _content_type
283
+ else:
284
+ _default_content_type = self.api_client.select_header_content_type(
285
+ ["application/json"]
286
+ )
287
+ if _default_content_type is not None:
288
+ _header_params["Content-Type"] = _default_content_type
289
+
290
+ # authentication setting
291
+ _auth_settings: List[str] = []
292
+
293
+ return self.api_client.param_serialize(
294
+ method="POST",
295
+ resource_path="/create-user",
296
+ path_params=_path_params,
297
+ query_params=_query_params,
298
+ header_params=_header_params,
299
+ body=_body_params,
300
+ post_params=_form_params,
301
+ files=_files,
302
+ auth_settings=_auth_settings,
303
+ collection_formats=_collection_formats,
304
+ _host=_host,
305
+ _request_auth=_request_auth,
306
+ )
307
+
308
+ @validate_call
309
+ async def logout(
310
+ self,
311
+ _request_timeout: Union[
312
+ None,
313
+ Annotated[StrictFloat, Field(gt=0)],
314
+ Tuple[
315
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
316
+ ],
317
+ ] = None,
318
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
319
+ _content_type: Optional[StrictStr] = None,
320
+ _headers: Optional[Dict[StrictStr, Any]] = None,
321
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
322
+ ) -> object:
323
+ """Logout
324
+
325
+ Logs out the current user.
326
+
327
+ :param _request_timeout: timeout setting for this request. If one
328
+ number provided, it will be total request
329
+ timeout. It can also be a pair (tuple) of
330
+ (connection, read) timeouts.
331
+ :type _request_timeout: int, tuple(int, int), optional
332
+ :param _request_auth: set to override the auth_settings for an a single
333
+ request; this effectively ignores the
334
+ authentication in the spec for a single request.
335
+ :type _request_auth: dict, optional
336
+ :param _content_type: force content-type for the request.
337
+ :type _content_type: str, Optional
338
+ :param _headers: set to override the headers for a single
339
+ request; this effectively ignores the headers
340
+ in the spec for a single request.
341
+ :type _headers: dict, optional
342
+ :param _host_index: set to override the host_index for a single
343
+ request; this effectively ignores the host_index
344
+ in the spec for a single request.
345
+ :type _host_index: int, optional
346
+ :return: Returns the result object.
347
+ """ # noqa: E501
348
+
349
+ _param = self._logout_serialize(
350
+ _request_auth=_request_auth,
351
+ _content_type=_content_type,
352
+ _headers=_headers,
353
+ _host_index=_host_index,
354
+ )
355
+
356
+ _response_types_map: Dict[str, Optional[str]] = {
357
+ "200": "object",
358
+ }
359
+ response_data = await self.api_client.call_api(
360
+ *_param, _request_timeout=_request_timeout
361
+ )
362
+ await response_data.read()
363
+ return self.api_client.response_deserialize(
364
+ response_data=response_data,
365
+ response_types_map=_response_types_map,
366
+ ).data
367
+
368
+ @validate_call
369
+ async def logout_with_http_info(
370
+ self,
371
+ _request_timeout: Union[
372
+ None,
373
+ Annotated[StrictFloat, Field(gt=0)],
374
+ Tuple[
375
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
376
+ ],
377
+ ] = None,
378
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
379
+ _content_type: Optional[StrictStr] = None,
380
+ _headers: Optional[Dict[StrictStr, Any]] = None,
381
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
382
+ ) -> ApiResponse[object]:
383
+ """Logout
384
+
385
+ Logs out the current user.
386
+
387
+ :param _request_timeout: timeout setting for this request. If one
388
+ number provided, it will be total request
389
+ timeout. It can also be a pair (tuple) of
390
+ (connection, read) timeouts.
391
+ :type _request_timeout: int, tuple(int, int), optional
392
+ :param _request_auth: set to override the auth_settings for an a single
393
+ request; this effectively ignores the
394
+ authentication in the spec for a single request.
395
+ :type _request_auth: dict, optional
396
+ :param _content_type: force content-type for the request.
397
+ :type _content_type: str, Optional
398
+ :param _headers: set to override the headers for a single
399
+ request; this effectively ignores the headers
400
+ in the spec for a single request.
401
+ :type _headers: dict, optional
402
+ :param _host_index: set to override the host_index for a single
403
+ request; this effectively ignores the host_index
404
+ in the spec for a single request.
405
+ :type _host_index: int, optional
406
+ :return: Returns the result object.
407
+ """ # noqa: E501
408
+
409
+ _param = self._logout_serialize(
410
+ _request_auth=_request_auth,
411
+ _content_type=_content_type,
412
+ _headers=_headers,
413
+ _host_index=_host_index,
414
+ )
415
+
416
+ _response_types_map: Dict[str, Optional[str]] = {
417
+ "200": "object",
418
+ }
419
+ response_data = await self.api_client.call_api(
420
+ *_param, _request_timeout=_request_timeout
421
+ )
422
+ await response_data.read()
423
+ return self.api_client.response_deserialize(
424
+ response_data=response_data,
425
+ response_types_map=_response_types_map,
426
+ )
427
+
428
+ @validate_call
429
+ async def logout_without_preload_content(
430
+ self,
431
+ _request_timeout: Union[
432
+ None,
433
+ Annotated[StrictFloat, Field(gt=0)],
434
+ Tuple[
435
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
436
+ ],
437
+ ] = None,
438
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
439
+ _content_type: Optional[StrictStr] = None,
440
+ _headers: Optional[Dict[StrictStr, Any]] = None,
441
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
442
+ ) -> RESTResponseType:
443
+ """Logout
444
+
445
+ Logs out the current user.
446
+
447
+ :param _request_timeout: timeout setting for this request. If one
448
+ number provided, it will be total request
449
+ timeout. It can also be a pair (tuple) of
450
+ (connection, read) timeouts.
451
+ :type _request_timeout: int, tuple(int, int), optional
452
+ :param _request_auth: set to override the auth_settings for an a single
453
+ request; this effectively ignores the
454
+ authentication in the spec for a single request.
455
+ :type _request_auth: dict, optional
456
+ :param _content_type: force content-type for the request.
457
+ :type _content_type: str, Optional
458
+ :param _headers: set to override the headers for a single
459
+ request; this effectively ignores the headers
460
+ in the spec for a single request.
461
+ :type _headers: dict, optional
462
+ :param _host_index: set to override the host_index for a single
463
+ request; this effectively ignores the host_index
464
+ in the spec for a single request.
465
+ :type _host_index: int, optional
466
+ :return: Returns the result object.
467
+ """ # noqa: E501
468
+
469
+ _param = self._logout_serialize(
470
+ _request_auth=_request_auth,
471
+ _content_type=_content_type,
472
+ _headers=_headers,
473
+ _host_index=_host_index,
474
+ )
475
+
476
+ _response_types_map: Dict[str, Optional[str]] = {
477
+ "200": "object",
478
+ }
479
+ response_data = await self.api_client.call_api(
480
+ *_param, _request_timeout=_request_timeout
481
+ )
482
+ return response_data.response
483
+
484
+ def _logout_serialize(
485
+ self,
486
+ _request_auth,
487
+ _content_type,
488
+ _headers,
489
+ _host_index,
490
+ ) -> RequestSerialized:
491
+
492
+ _host = None
493
+
494
+ _collection_formats: Dict[str, str] = {}
495
+
496
+ _path_params: Dict[str, str] = {}
497
+ _query_params: List[Tuple[str, str]] = []
498
+ _header_params: Dict[str, Optional[str]] = _headers or {}
499
+ _form_params: List[Tuple[str, str]] = []
500
+ _files: Dict[
501
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
502
+ ] = {}
503
+ _body_params: Optional[bytes] = None
504
+
505
+ # process the path parameters
506
+ # process the query parameters
507
+ # process the header parameters
508
+ # process the form parameters
509
+ # process the body parameter
510
+
511
+ # set the HTTP header `Accept`
512
+ if "Accept" not in _header_params:
513
+ _header_params["Accept"] = self.api_client.select_header_accept(
514
+ ["application/json"]
515
+ )
516
+
517
+ # authentication setting
518
+ _auth_settings: List[str] = ["HTTPBearer"]
519
+
520
+ return self.api_client.param_serialize(
521
+ method="POST",
522
+ resource_path="/logout",
523
+ path_params=_path_params,
524
+ query_params=_query_params,
525
+ header_params=_header_params,
526
+ body=_body_params,
527
+ post_params=_form_params,
528
+ files=_files,
529
+ auth_settings=_auth_settings,
530
+ collection_formats=_collection_formats,
531
+ _host=_host,
532
+ _request_auth=_request_auth,
533
+ )
534
+
535
+ @validate_call
536
+ async def resend_verification_email(
537
+ self,
538
+ resend_verification_email_request: ResendVerificationEmailRequest,
539
+ _request_timeout: Union[
540
+ None,
541
+ Annotated[StrictFloat, Field(gt=0)],
542
+ Tuple[
543
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
544
+ ],
545
+ ] = None,
546
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
547
+ _content_type: Optional[StrictStr] = None,
548
+ _headers: Optional[Dict[StrictStr, Any]] = None,
549
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
550
+ ) -> object:
551
+ """Resend Verification Email
552
+
553
+ Resends the verification email to the user.
554
+
555
+ :param resend_verification_email_request: (required)
556
+ :type resend_verification_email_request: ResendVerificationEmailRequest
557
+ :param _request_timeout: timeout setting for this request. If one
558
+ number provided, it will be total request
559
+ timeout. It can also be a pair (tuple) of
560
+ (connection, read) timeouts.
561
+ :type _request_timeout: int, tuple(int, int), optional
562
+ :param _request_auth: set to override the auth_settings for an a single
563
+ request; this effectively ignores the
564
+ authentication in the spec for a single request.
565
+ :type _request_auth: dict, optional
566
+ :param _content_type: force content-type for the request.
567
+ :type _content_type: str, Optional
568
+ :param _headers: set to override the headers for a single
569
+ request; this effectively ignores the headers
570
+ in the spec for a single request.
571
+ :type _headers: dict, optional
572
+ :param _host_index: set to override the host_index for a single
573
+ request; this effectively ignores the host_index
574
+ in the spec for a single request.
575
+ :type _host_index: int, optional
576
+ :return: Returns the result object.
577
+ """ # noqa: E501
578
+
579
+ _param = self._resend_verification_email_serialize(
580
+ resend_verification_email_request=resend_verification_email_request,
581
+ _request_auth=_request_auth,
582
+ _content_type=_content_type,
583
+ _headers=_headers,
584
+ _host_index=_host_index,
585
+ )
586
+
587
+ _response_types_map: Dict[str, Optional[str]] = {
588
+ "200": "object",
589
+ }
590
+ response_data = await self.api_client.call_api(
591
+ *_param, _request_timeout=_request_timeout
592
+ )
593
+ await response_data.read()
594
+ return self.api_client.response_deserialize(
595
+ response_data=response_data,
596
+ response_types_map=_response_types_map,
597
+ ).data
598
+
599
+ @validate_call
600
+ async def resend_verification_email_with_http_info(
601
+ self,
602
+ resend_verification_email_request: ResendVerificationEmailRequest,
603
+ _request_timeout: Union[
604
+ None,
605
+ Annotated[StrictFloat, Field(gt=0)],
606
+ Tuple[
607
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
608
+ ],
609
+ ] = None,
610
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
611
+ _content_type: Optional[StrictStr] = None,
612
+ _headers: Optional[Dict[StrictStr, Any]] = None,
613
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
614
+ ) -> ApiResponse[object]:
615
+ """Resend Verification Email
616
+
617
+ Resends the verification email to the user.
618
+
619
+ :param resend_verification_email_request: (required)
620
+ :type resend_verification_email_request: ResendVerificationEmailRequest
621
+ :param _request_timeout: timeout setting for this request. If one
622
+ number provided, it will be total request
623
+ timeout. It can also be a pair (tuple) of
624
+ (connection, read) timeouts.
625
+ :type _request_timeout: int, tuple(int, int), optional
626
+ :param _request_auth: set to override the auth_settings for an a single
627
+ request; this effectively ignores the
628
+ authentication in the spec for a single request.
629
+ :type _request_auth: dict, optional
630
+ :param _content_type: force content-type for the request.
631
+ :type _content_type: str, Optional
632
+ :param _headers: set to override the headers for a single
633
+ request; this effectively ignores the headers
634
+ in the spec for a single request.
635
+ :type _headers: dict, optional
636
+ :param _host_index: set to override the host_index for a single
637
+ request; this effectively ignores the host_index
638
+ in the spec for a single request.
639
+ :type _host_index: int, optional
640
+ :return: Returns the result object.
641
+ """ # noqa: E501
642
+
643
+ _param = self._resend_verification_email_serialize(
644
+ resend_verification_email_request=resend_verification_email_request,
645
+ _request_auth=_request_auth,
646
+ _content_type=_content_type,
647
+ _headers=_headers,
648
+ _host_index=_host_index,
649
+ )
650
+
651
+ _response_types_map: Dict[str, Optional[str]] = {
652
+ "200": "object",
653
+ }
654
+ response_data = await self.api_client.call_api(
655
+ *_param, _request_timeout=_request_timeout
656
+ )
657
+ await response_data.read()
658
+ return self.api_client.response_deserialize(
659
+ response_data=response_data,
660
+ response_types_map=_response_types_map,
661
+ )
662
+
663
+ @validate_call
664
+ async def resend_verification_email_without_preload_content(
665
+ self,
666
+ resend_verification_email_request: ResendVerificationEmailRequest,
667
+ _request_timeout: Union[
668
+ None,
669
+ Annotated[StrictFloat, Field(gt=0)],
670
+ Tuple[
671
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
672
+ ],
673
+ ] = None,
674
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
675
+ _content_type: Optional[StrictStr] = None,
676
+ _headers: Optional[Dict[StrictStr, Any]] = None,
677
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
678
+ ) -> RESTResponseType:
679
+ """Resend Verification Email
680
+
681
+ Resends the verification email to the user.
682
+
683
+ :param resend_verification_email_request: (required)
684
+ :type resend_verification_email_request: ResendVerificationEmailRequest
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._resend_verification_email_serialize(
708
+ resend_verification_email_request=resend_verification_email_request,
709
+ _request_auth=_request_auth,
710
+ _content_type=_content_type,
711
+ _headers=_headers,
712
+ _host_index=_host_index,
713
+ )
714
+
715
+ _response_types_map: Dict[str, Optional[str]] = {
716
+ "200": "object",
717
+ }
718
+ response_data = await self.api_client.call_api(
719
+ *_param, _request_timeout=_request_timeout
720
+ )
721
+ return response_data.response
722
+
723
+ def _resend_verification_email_serialize(
724
+ self,
725
+ resend_verification_email_request,
726
+ _request_auth,
727
+ _content_type,
728
+ _headers,
729
+ _host_index,
730
+ ) -> RequestSerialized:
731
+
732
+ _host = None
733
+
734
+ _collection_formats: Dict[str, str] = {}
735
+
736
+ _path_params: Dict[str, str] = {}
737
+ _query_params: List[Tuple[str, str]] = []
738
+ _header_params: Dict[str, Optional[str]] = _headers or {}
739
+ _form_params: List[Tuple[str, str]] = []
740
+ _files: Dict[
741
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
742
+ ] = {}
743
+ _body_params: Optional[bytes] = None
744
+
745
+ # process the path parameters
746
+ # process the query parameters
747
+ # process the header parameters
748
+ # process the form parameters
749
+ # process the body parameter
750
+ if resend_verification_email_request is not None:
751
+ _body_params = resend_verification_email_request
752
+
753
+ # set the HTTP header `Accept`
754
+ if "Accept" not in _header_params:
755
+ _header_params["Accept"] = self.api_client.select_header_accept(
756
+ ["application/json"]
757
+ )
758
+
759
+ # set the HTTP header `Content-Type`
760
+ if _content_type:
761
+ _header_params["Content-Type"] = _content_type
762
+ else:
763
+ _default_content_type = self.api_client.select_header_content_type(
764
+ ["application/json"]
765
+ )
766
+ if _default_content_type is not None:
767
+ _header_params["Content-Type"] = _default_content_type
768
+
769
+ # authentication setting
770
+ _auth_settings: List[str] = []
771
+
772
+ return self.api_client.param_serialize(
773
+ method="POST",
774
+ resource_path="/resend-verification-email",
775
+ path_params=_path_params,
776
+ query_params=_query_params,
777
+ header_params=_header_params,
778
+ body=_body_params,
779
+ post_params=_form_params,
780
+ files=_files,
781
+ auth_settings=_auth_settings,
782
+ collection_formats=_collection_formats,
783
+ _host=_host,
784
+ _request_auth=_request_auth,
785
+ )
786
+
787
+ @validate_call
788
+ async def send_password_reset_email(
789
+ self,
790
+ resend_verification_email_request: ResendVerificationEmailRequest,
791
+ _request_timeout: Union[
792
+ None,
793
+ Annotated[StrictFloat, Field(gt=0)],
794
+ Tuple[
795
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
796
+ ],
797
+ ] = None,
798
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
799
+ _content_type: Optional[StrictStr] = None,
800
+ _headers: Optional[Dict[StrictStr, Any]] = None,
801
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
802
+ ) -> object:
803
+ """Send Password Reset Email
804
+
805
+ Sends a password reset email to the user.
806
+
807
+ :param resend_verification_email_request: (required)
808
+ :type resend_verification_email_request: ResendVerificationEmailRequest
809
+ :param _request_timeout: timeout setting for this request. If one
810
+ number provided, it will be total request
811
+ timeout. It can also be a pair (tuple) of
812
+ (connection, read) timeouts.
813
+ :type _request_timeout: int, tuple(int, int), optional
814
+ :param _request_auth: set to override the auth_settings for an a single
815
+ request; this effectively ignores the
816
+ authentication in the spec for a single request.
817
+ :type _request_auth: dict, optional
818
+ :param _content_type: force content-type for the request.
819
+ :type _content_type: str, Optional
820
+ :param _headers: set to override the headers for a single
821
+ request; this effectively ignores the headers
822
+ in the spec for a single request.
823
+ :type _headers: dict, optional
824
+ :param _host_index: set to override the host_index for a single
825
+ request; this effectively ignores the host_index
826
+ in the spec for a single request.
827
+ :type _host_index: int, optional
828
+ :return: Returns the result object.
829
+ """ # noqa: E501
830
+
831
+ _param = self._send_password_reset_email_serialize(
832
+ resend_verification_email_request=resend_verification_email_request,
833
+ _request_auth=_request_auth,
834
+ _content_type=_content_type,
835
+ _headers=_headers,
836
+ _host_index=_host_index,
837
+ )
838
+
839
+ _response_types_map: Dict[str, Optional[str]] = {
840
+ "200": "object",
841
+ }
842
+ response_data = await self.api_client.call_api(
843
+ *_param, _request_timeout=_request_timeout
844
+ )
845
+ await response_data.read()
846
+ return self.api_client.response_deserialize(
847
+ response_data=response_data,
848
+ response_types_map=_response_types_map,
849
+ ).data
850
+
851
+ @validate_call
852
+ async def send_password_reset_email_with_http_info(
853
+ self,
854
+ resend_verification_email_request: ResendVerificationEmailRequest,
855
+ _request_timeout: Union[
856
+ None,
857
+ Annotated[StrictFloat, Field(gt=0)],
858
+ Tuple[
859
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
860
+ ],
861
+ ] = None,
862
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
863
+ _content_type: Optional[StrictStr] = None,
864
+ _headers: Optional[Dict[StrictStr, Any]] = None,
865
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
866
+ ) -> ApiResponse[object]:
867
+ """Send Password Reset Email
868
+
869
+ Sends a password reset email to the user.
870
+
871
+ :param resend_verification_email_request: (required)
872
+ :type resend_verification_email_request: ResendVerificationEmailRequest
873
+ :param _request_timeout: timeout setting for this request. If one
874
+ number provided, it will be total request
875
+ timeout. It can also be a pair (tuple) of
876
+ (connection, read) timeouts.
877
+ :type _request_timeout: int, tuple(int, int), optional
878
+ :param _request_auth: set to override the auth_settings for an a single
879
+ request; this effectively ignores the
880
+ authentication in the spec for a single request.
881
+ :type _request_auth: dict, optional
882
+ :param _content_type: force content-type for the request.
883
+ :type _content_type: str, Optional
884
+ :param _headers: set to override the headers for a single
885
+ request; this effectively ignores the headers
886
+ in the spec for a single request.
887
+ :type _headers: dict, optional
888
+ :param _host_index: set to override the host_index for a single
889
+ request; this effectively ignores the host_index
890
+ in the spec for a single request.
891
+ :type _host_index: int, optional
892
+ :return: Returns the result object.
893
+ """ # noqa: E501
894
+
895
+ _param = self._send_password_reset_email_serialize(
896
+ resend_verification_email_request=resend_verification_email_request,
897
+ _request_auth=_request_auth,
898
+ _content_type=_content_type,
899
+ _headers=_headers,
900
+ _host_index=_host_index,
901
+ )
902
+
903
+ _response_types_map: Dict[str, Optional[str]] = {
904
+ "200": "object",
905
+ }
906
+ response_data = await self.api_client.call_api(
907
+ *_param, _request_timeout=_request_timeout
908
+ )
909
+ await response_data.read()
910
+ return self.api_client.response_deserialize(
911
+ response_data=response_data,
912
+ response_types_map=_response_types_map,
913
+ )
914
+
915
+ @validate_call
916
+ async def send_password_reset_email_without_preload_content(
917
+ self,
918
+ resend_verification_email_request: ResendVerificationEmailRequest,
919
+ _request_timeout: Union[
920
+ None,
921
+ Annotated[StrictFloat, Field(gt=0)],
922
+ Tuple[
923
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
924
+ ],
925
+ ] = None,
926
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
927
+ _content_type: Optional[StrictStr] = None,
928
+ _headers: Optional[Dict[StrictStr, Any]] = None,
929
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
930
+ ) -> RESTResponseType:
931
+ """Send Password Reset Email
932
+
933
+ Sends a password reset email to the user.
934
+
935
+ :param resend_verification_email_request: (required)
936
+ :type resend_verification_email_request: ResendVerificationEmailRequest
937
+ :param _request_timeout: timeout setting for this request. If one
938
+ number provided, it will be total request
939
+ timeout. It can also be a pair (tuple) of
940
+ (connection, read) timeouts.
941
+ :type _request_timeout: int, tuple(int, int), optional
942
+ :param _request_auth: set to override the auth_settings for an a single
943
+ request; this effectively ignores the
944
+ authentication in the spec for a single request.
945
+ :type _request_auth: dict, optional
946
+ :param _content_type: force content-type for the request.
947
+ :type _content_type: str, Optional
948
+ :param _headers: set to override the headers for a single
949
+ request; this effectively ignores the headers
950
+ in the spec for a single request.
951
+ :type _headers: dict, optional
952
+ :param _host_index: set to override the host_index for a single
953
+ request; this effectively ignores the host_index
954
+ in the spec for a single request.
955
+ :type _host_index: int, optional
956
+ :return: Returns the result object.
957
+ """ # noqa: E501
958
+
959
+ _param = self._send_password_reset_email_serialize(
960
+ resend_verification_email_request=resend_verification_email_request,
961
+ _request_auth=_request_auth,
962
+ _content_type=_content_type,
963
+ _headers=_headers,
964
+ _host_index=_host_index,
965
+ )
966
+
967
+ _response_types_map: Dict[str, Optional[str]] = {
968
+ "200": "object",
969
+ }
970
+ response_data = await self.api_client.call_api(
971
+ *_param, _request_timeout=_request_timeout
972
+ )
973
+ return response_data.response
974
+
975
+ def _send_password_reset_email_serialize(
976
+ self,
977
+ resend_verification_email_request,
978
+ _request_auth,
979
+ _content_type,
980
+ _headers,
981
+ _host_index,
982
+ ) -> RequestSerialized:
983
+
984
+ _host = None
985
+
986
+ _collection_formats: Dict[str, str] = {}
987
+
988
+ _path_params: Dict[str, str] = {}
989
+ _query_params: List[Tuple[str, str]] = []
990
+ _header_params: Dict[str, Optional[str]] = _headers or {}
991
+ _form_params: List[Tuple[str, str]] = []
992
+ _files: Dict[
993
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
994
+ ] = {}
995
+ _body_params: Optional[bytes] = None
996
+
997
+ # process the path parameters
998
+ # process the query parameters
999
+ # process the header parameters
1000
+ # process the form parameters
1001
+ # process the body parameter
1002
+ if resend_verification_email_request is not None:
1003
+ _body_params = resend_verification_email_request
1004
+
1005
+ # set the HTTP header `Accept`
1006
+ if "Accept" not in _header_params:
1007
+ _header_params["Accept"] = self.api_client.select_header_accept(
1008
+ ["application/json"]
1009
+ )
1010
+
1011
+ # set the HTTP header `Content-Type`
1012
+ if _content_type:
1013
+ _header_params["Content-Type"] = _content_type
1014
+ else:
1015
+ _default_content_type = self.api_client.select_header_content_type(
1016
+ ["application/json"]
1017
+ )
1018
+ if _default_content_type is not None:
1019
+ _header_params["Content-Type"] = _default_content_type
1020
+
1021
+ # authentication setting
1022
+ _auth_settings: List[str] = []
1023
+
1024
+ return self.api_client.param_serialize(
1025
+ method="POST",
1026
+ resource_path="/send-password-reset-email",
1027
+ path_params=_path_params,
1028
+ query_params=_query_params,
1029
+ header_params=_header_params,
1030
+ body=_body_params,
1031
+ post_params=_form_params,
1032
+ files=_files,
1033
+ auth_settings=_auth_settings,
1034
+ collection_formats=_collection_formats,
1035
+ _host=_host,
1036
+ _request_auth=_request_auth,
1037
+ )
1038
+
1039
+ @validate_call
1040
+ async def update_user(
1041
+ self,
1042
+ update_user_request: UpdateUserRequest,
1043
+ _request_timeout: Union[
1044
+ None,
1045
+ Annotated[StrictFloat, Field(gt=0)],
1046
+ Tuple[
1047
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1048
+ ],
1049
+ ] = None,
1050
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1051
+ _content_type: Optional[StrictStr] = None,
1052
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1053
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1054
+ ) -> object:
1055
+ """Update User
1056
+
1057
+ Updates the user.
1058
+
1059
+ :param update_user_request: (required)
1060
+ :type update_user_request: UpdateUserRequest
1061
+ :param _request_timeout: timeout setting for this request. If one
1062
+ number provided, it will be total request
1063
+ timeout. It can also be a pair (tuple) of
1064
+ (connection, read) timeouts.
1065
+ :type _request_timeout: int, tuple(int, int), optional
1066
+ :param _request_auth: set to override the auth_settings for an a single
1067
+ request; this effectively ignores the
1068
+ authentication in the spec for a single request.
1069
+ :type _request_auth: dict, optional
1070
+ :param _content_type: force content-type for the request.
1071
+ :type _content_type: str, Optional
1072
+ :param _headers: set to override the headers for a single
1073
+ request; this effectively ignores the headers
1074
+ in the spec for a single request.
1075
+ :type _headers: dict, optional
1076
+ :param _host_index: set to override the host_index for a single
1077
+ request; this effectively ignores the host_index
1078
+ in the spec for a single request.
1079
+ :type _host_index: int, optional
1080
+ :return: Returns the result object.
1081
+ """ # noqa: E501
1082
+
1083
+ _param = self._update_user_serialize(
1084
+ update_user_request=update_user_request,
1085
+ _request_auth=_request_auth,
1086
+ _content_type=_content_type,
1087
+ _headers=_headers,
1088
+ _host_index=_host_index,
1089
+ )
1090
+
1091
+ _response_types_map: Dict[str, Optional[str]] = {
1092
+ "200": "object",
1093
+ }
1094
+ response_data = await self.api_client.call_api(
1095
+ *_param, _request_timeout=_request_timeout
1096
+ )
1097
+ await response_data.read()
1098
+ return self.api_client.response_deserialize(
1099
+ response_data=response_data,
1100
+ response_types_map=_response_types_map,
1101
+ ).data
1102
+
1103
+ @validate_call
1104
+ async def update_user_with_http_info(
1105
+ self,
1106
+ update_user_request: UpdateUserRequest,
1107
+ _request_timeout: Union[
1108
+ None,
1109
+ Annotated[StrictFloat, Field(gt=0)],
1110
+ Tuple[
1111
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1112
+ ],
1113
+ ] = None,
1114
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1115
+ _content_type: Optional[StrictStr] = None,
1116
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1117
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1118
+ ) -> ApiResponse[object]:
1119
+ """Update User
1120
+
1121
+ Updates the user.
1122
+
1123
+ :param update_user_request: (required)
1124
+ :type update_user_request: UpdateUserRequest
1125
+ :param _request_timeout: timeout setting for this request. If one
1126
+ number provided, it will be total request
1127
+ timeout. It can also be a pair (tuple) of
1128
+ (connection, read) timeouts.
1129
+ :type _request_timeout: int, tuple(int, int), optional
1130
+ :param _request_auth: set to override the auth_settings for an a single
1131
+ request; this effectively ignores the
1132
+ authentication in the spec for a single request.
1133
+ :type _request_auth: dict, optional
1134
+ :param _content_type: force content-type for the request.
1135
+ :type _content_type: str, Optional
1136
+ :param _headers: set to override the headers for a single
1137
+ request; this effectively ignores the headers
1138
+ in the spec for a single request.
1139
+ :type _headers: dict, optional
1140
+ :param _host_index: set to override the host_index for a single
1141
+ request; this effectively ignores the host_index
1142
+ in the spec for a single request.
1143
+ :type _host_index: int, optional
1144
+ :return: Returns the result object.
1145
+ """ # noqa: E501
1146
+
1147
+ _param = self._update_user_serialize(
1148
+ update_user_request=update_user_request,
1149
+ _request_auth=_request_auth,
1150
+ _content_type=_content_type,
1151
+ _headers=_headers,
1152
+ _host_index=_host_index,
1153
+ )
1154
+
1155
+ _response_types_map: Dict[str, Optional[str]] = {
1156
+ "200": "object",
1157
+ }
1158
+ response_data = await self.api_client.call_api(
1159
+ *_param, _request_timeout=_request_timeout
1160
+ )
1161
+ await response_data.read()
1162
+ return self.api_client.response_deserialize(
1163
+ response_data=response_data,
1164
+ response_types_map=_response_types_map,
1165
+ )
1166
+
1167
+ @validate_call
1168
+ async def update_user_without_preload_content(
1169
+ self,
1170
+ update_user_request: UpdateUserRequest,
1171
+ _request_timeout: Union[
1172
+ None,
1173
+ Annotated[StrictFloat, Field(gt=0)],
1174
+ Tuple[
1175
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1176
+ ],
1177
+ ] = None,
1178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1179
+ _content_type: Optional[StrictStr] = None,
1180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1182
+ ) -> RESTResponseType:
1183
+ """Update User
1184
+
1185
+ Updates the user.
1186
+
1187
+ :param update_user_request: (required)
1188
+ :type update_user_request: UpdateUserRequest
1189
+ :param _request_timeout: timeout setting for this request. If one
1190
+ number provided, it will be total request
1191
+ timeout. It can also be a pair (tuple) of
1192
+ (connection, read) timeouts.
1193
+ :type _request_timeout: int, tuple(int, int), optional
1194
+ :param _request_auth: set to override the auth_settings for an a single
1195
+ request; this effectively ignores the
1196
+ authentication in the spec for a single request.
1197
+ :type _request_auth: dict, optional
1198
+ :param _content_type: force content-type for the request.
1199
+ :type _content_type: str, Optional
1200
+ :param _headers: set to override the headers for a single
1201
+ request; this effectively ignores the headers
1202
+ in the spec for a single request.
1203
+ :type _headers: dict, optional
1204
+ :param _host_index: set to override the host_index for a single
1205
+ request; this effectively ignores the host_index
1206
+ in the spec for a single request.
1207
+ :type _host_index: int, optional
1208
+ :return: Returns the result object.
1209
+ """ # noqa: E501
1210
+
1211
+ _param = self._update_user_serialize(
1212
+ update_user_request=update_user_request,
1213
+ _request_auth=_request_auth,
1214
+ _content_type=_content_type,
1215
+ _headers=_headers,
1216
+ _host_index=_host_index,
1217
+ )
1218
+
1219
+ _response_types_map: Dict[str, Optional[str]] = {
1220
+ "200": "object",
1221
+ }
1222
+ response_data = await self.api_client.call_api(
1223
+ *_param, _request_timeout=_request_timeout
1224
+ )
1225
+ return response_data.response
1226
+
1227
+ def _update_user_serialize(
1228
+ self,
1229
+ update_user_request,
1230
+ _request_auth,
1231
+ _content_type,
1232
+ _headers,
1233
+ _host_index,
1234
+ ) -> RequestSerialized:
1235
+
1236
+ _host = None
1237
+
1238
+ _collection_formats: Dict[str, str] = {}
1239
+
1240
+ _path_params: Dict[str, str] = {}
1241
+ _query_params: List[Tuple[str, str]] = []
1242
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1243
+ _form_params: List[Tuple[str, str]] = []
1244
+ _files: Dict[
1245
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1246
+ ] = {}
1247
+ _body_params: Optional[bytes] = None
1248
+
1249
+ # process the path parameters
1250
+ # process the query parameters
1251
+ # process the header parameters
1252
+ # process the form parameters
1253
+ # process the body parameter
1254
+ if update_user_request is not None:
1255
+ _body_params = update_user_request
1256
+
1257
+ # set the HTTP header `Accept`
1258
+ if "Accept" not in _header_params:
1259
+ _header_params["Accept"] = self.api_client.select_header_accept(
1260
+ ["application/json"]
1261
+ )
1262
+
1263
+ # set the HTTP header `Content-Type`
1264
+ if _content_type:
1265
+ _header_params["Content-Type"] = _content_type
1266
+ else:
1267
+ _default_content_type = self.api_client.select_header_content_type(
1268
+ ["application/json"]
1269
+ )
1270
+ if _default_content_type is not None:
1271
+ _header_params["Content-Type"] = _default_content_type
1272
+
1273
+ # authentication setting
1274
+ _auth_settings: List[str] = []
1275
+
1276
+ return self.api_client.param_serialize(
1277
+ method="POST",
1278
+ resource_path="/update-user",
1279
+ path_params=_path_params,
1280
+ query_params=_query_params,
1281
+ header_params=_header_params,
1282
+ body=_body_params,
1283
+ post_params=_form_params,
1284
+ files=_files,
1285
+ auth_settings=_auth_settings,
1286
+ collection_formats=_collection_formats,
1287
+ _host=_host,
1288
+ _request_auth=_request_auth,
1289
+ )
1290
+
1291
+ @validate_call
1292
+ async def user_by_id(
1293
+ self,
1294
+ id: StrictStr,
1295
+ _request_timeout: Union[
1296
+ None,
1297
+ Annotated[StrictFloat, Field(gt=0)],
1298
+ Tuple[
1299
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1300
+ ],
1301
+ ] = None,
1302
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1303
+ _content_type: Optional[StrictStr] = None,
1304
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1305
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1306
+ ) -> Whoami200Response:
1307
+ """User By Id
1308
+
1309
+ Returns the user by id.
1310
+
1311
+ :param id: (required)
1312
+ :type id: str
1313
+ :param _request_timeout: timeout setting for this request. If one
1314
+ number provided, it will be total request
1315
+ timeout. It can also be a pair (tuple) of
1316
+ (connection, read) timeouts.
1317
+ :type _request_timeout: int, tuple(int, int), optional
1318
+ :param _request_auth: set to override the auth_settings for an a single
1319
+ request; this effectively ignores the
1320
+ authentication in the spec for a single request.
1321
+ :type _request_auth: dict, optional
1322
+ :param _content_type: force content-type for the request.
1323
+ :type _content_type: str, Optional
1324
+ :param _headers: set to override the headers for a single
1325
+ request; this effectively ignores the headers
1326
+ in the spec for a single request.
1327
+ :type _headers: dict, optional
1328
+ :param _host_index: set to override the host_index for a single
1329
+ request; this effectively ignores the host_index
1330
+ in the spec for a single request.
1331
+ :type _host_index: int, optional
1332
+ :return: Returns the result object.
1333
+ """ # noqa: E501
1334
+
1335
+ _param = self._user_by_id_serialize(
1336
+ id=id,
1337
+ _request_auth=_request_auth,
1338
+ _content_type=_content_type,
1339
+ _headers=_headers,
1340
+ _host_index=_host_index,
1341
+ )
1342
+
1343
+ _response_types_map: Dict[str, Optional[str]] = {
1344
+ "200": "Whoami200Response",
1345
+ }
1346
+ response_data = await self.api_client.call_api(
1347
+ *_param, _request_timeout=_request_timeout
1348
+ )
1349
+ await response_data.read()
1350
+ return self.api_client.response_deserialize(
1351
+ response_data=response_data,
1352
+ response_types_map=_response_types_map,
1353
+ ).data
1354
+
1355
+ @validate_call
1356
+ async def user_by_id_with_http_info(
1357
+ self,
1358
+ id: StrictStr,
1359
+ _request_timeout: Union[
1360
+ None,
1361
+ Annotated[StrictFloat, Field(gt=0)],
1362
+ Tuple[
1363
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1364
+ ],
1365
+ ] = None,
1366
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1367
+ _content_type: Optional[StrictStr] = None,
1368
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1369
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1370
+ ) -> ApiResponse[Whoami200Response]:
1371
+ """User By Id
1372
+
1373
+ Returns the user by id.
1374
+
1375
+ :param id: (required)
1376
+ :type id: str
1377
+ :param _request_timeout: timeout setting for this request. If one
1378
+ number provided, it will be total request
1379
+ timeout. It can also be a pair (tuple) of
1380
+ (connection, read) timeouts.
1381
+ :type _request_timeout: int, tuple(int, int), optional
1382
+ :param _request_auth: set to override the auth_settings for an a single
1383
+ request; this effectively ignores the
1384
+ authentication in the spec for a single request.
1385
+ :type _request_auth: dict, optional
1386
+ :param _content_type: force content-type for the request.
1387
+ :type _content_type: str, Optional
1388
+ :param _headers: set to override the headers for a single
1389
+ request; this effectively ignores the headers
1390
+ in the spec for a single request.
1391
+ :type _headers: dict, optional
1392
+ :param _host_index: set to override the host_index for a single
1393
+ request; this effectively ignores the host_index
1394
+ in the spec for a single request.
1395
+ :type _host_index: int, optional
1396
+ :return: Returns the result object.
1397
+ """ # noqa: E501
1398
+
1399
+ _param = self._user_by_id_serialize(
1400
+ id=id,
1401
+ _request_auth=_request_auth,
1402
+ _content_type=_content_type,
1403
+ _headers=_headers,
1404
+ _host_index=_host_index,
1405
+ )
1406
+
1407
+ _response_types_map: Dict[str, Optional[str]] = {
1408
+ "200": "Whoami200Response",
1409
+ }
1410
+ response_data = await self.api_client.call_api(
1411
+ *_param, _request_timeout=_request_timeout
1412
+ )
1413
+ await response_data.read()
1414
+ return self.api_client.response_deserialize(
1415
+ response_data=response_data,
1416
+ response_types_map=_response_types_map,
1417
+ )
1418
+
1419
+ @validate_call
1420
+ async def user_by_id_without_preload_content(
1421
+ self,
1422
+ id: StrictStr,
1423
+ _request_timeout: Union[
1424
+ None,
1425
+ Annotated[StrictFloat, Field(gt=0)],
1426
+ Tuple[
1427
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1428
+ ],
1429
+ ] = None,
1430
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1431
+ _content_type: Optional[StrictStr] = None,
1432
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1433
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1434
+ ) -> RESTResponseType:
1435
+ """User By Id
1436
+
1437
+ Returns the user by id.
1438
+
1439
+ :param id: (required)
1440
+ :type id: str
1441
+ :param _request_timeout: timeout setting for this request. If one
1442
+ number provided, it will be total request
1443
+ timeout. It can also be a pair (tuple) of
1444
+ (connection, read) timeouts.
1445
+ :type _request_timeout: int, tuple(int, int), optional
1446
+ :param _request_auth: set to override the auth_settings for an a single
1447
+ request; this effectively ignores the
1448
+ authentication in the spec for a single request.
1449
+ :type _request_auth: dict, optional
1450
+ :param _content_type: force content-type for the request.
1451
+ :type _content_type: str, Optional
1452
+ :param _headers: set to override the headers for a single
1453
+ request; this effectively ignores the headers
1454
+ in the spec for a single request.
1455
+ :type _headers: dict, optional
1456
+ :param _host_index: set to override the host_index for a single
1457
+ request; this effectively ignores the host_index
1458
+ in the spec for a single request.
1459
+ :type _host_index: int, optional
1460
+ :return: Returns the result object.
1461
+ """ # noqa: E501
1462
+
1463
+ _param = self._user_by_id_serialize(
1464
+ id=id,
1465
+ _request_auth=_request_auth,
1466
+ _content_type=_content_type,
1467
+ _headers=_headers,
1468
+ _host_index=_host_index,
1469
+ )
1470
+
1471
+ _response_types_map: Dict[str, Optional[str]] = {
1472
+ "200": "Whoami200Response",
1473
+ }
1474
+ response_data = await self.api_client.call_api(
1475
+ *_param, _request_timeout=_request_timeout
1476
+ )
1477
+ return response_data.response
1478
+
1479
+ def _user_by_id_serialize(
1480
+ self,
1481
+ id,
1482
+ _request_auth,
1483
+ _content_type,
1484
+ _headers,
1485
+ _host_index,
1486
+ ) -> RequestSerialized:
1487
+
1488
+ _host = None
1489
+
1490
+ _collection_formats: Dict[str, str] = {}
1491
+
1492
+ _path_params: Dict[str, str] = {}
1493
+ _query_params: List[Tuple[str, str]] = []
1494
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1495
+ _form_params: List[Tuple[str, str]] = []
1496
+ _files: Dict[
1497
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1498
+ ] = {}
1499
+ _body_params: Optional[bytes] = None
1500
+
1501
+ # process the path parameters
1502
+ # process the query parameters
1503
+ if id is not None:
1504
+
1505
+ _query_params.append(("id", id))
1506
+
1507
+ # process the header parameters
1508
+ # process the form parameters
1509
+ # process the body parameter
1510
+
1511
+ # set the HTTP header `Accept`
1512
+ if "Accept" not in _header_params:
1513
+ _header_params["Accept"] = self.api_client.select_header_accept(
1514
+ ["application/json"]
1515
+ )
1516
+
1517
+ # authentication setting
1518
+ _auth_settings: List[str] = []
1519
+
1520
+ return self.api_client.param_serialize(
1521
+ method="GET",
1522
+ resource_path="/user-by-id",
1523
+ path_params=_path_params,
1524
+ query_params=_query_params,
1525
+ header_params=_header_params,
1526
+ body=_body_params,
1527
+ post_params=_form_params,
1528
+ files=_files,
1529
+ auth_settings=_auth_settings,
1530
+ collection_formats=_collection_formats,
1531
+ _host=_host,
1532
+ _request_auth=_request_auth,
1533
+ )
1534
+
1535
+ @validate_call
1536
+ async def user_reset_password(
1537
+ self,
1538
+ user_reset_password_request: UserResetPasswordRequest,
1539
+ _request_timeout: Union[
1540
+ None,
1541
+ Annotated[StrictFloat, Field(gt=0)],
1542
+ Tuple[
1543
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1544
+ ],
1545
+ ] = None,
1546
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1547
+ _content_type: Optional[StrictStr] = None,
1548
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1549
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1550
+ ) -> VerifyEmail200Response:
1551
+ """User Reset Password
1552
+
1553
+ Resets the password for the user.
1554
+
1555
+ :param user_reset_password_request: (required)
1556
+ :type user_reset_password_request: UserResetPasswordRequest
1557
+ :param _request_timeout: timeout setting for this request. If one
1558
+ number provided, it will be total request
1559
+ timeout. It can also be a pair (tuple) of
1560
+ (connection, read) timeouts.
1561
+ :type _request_timeout: int, tuple(int, int), optional
1562
+ :param _request_auth: set to override the auth_settings for an a single
1563
+ request; this effectively ignores the
1564
+ authentication in the spec for a single request.
1565
+ :type _request_auth: dict, optional
1566
+ :param _content_type: force content-type for the request.
1567
+ :type _content_type: str, Optional
1568
+ :param _headers: set to override the headers for a single
1569
+ request; this effectively ignores the headers
1570
+ in the spec for a single request.
1571
+ :type _headers: dict, optional
1572
+ :param _host_index: set to override the host_index for a single
1573
+ request; this effectively ignores the host_index
1574
+ in the spec for a single request.
1575
+ :type _host_index: int, optional
1576
+ :return: Returns the result object.
1577
+ """ # noqa: E501
1578
+
1579
+ _param = self._user_reset_password_serialize(
1580
+ user_reset_password_request=user_reset_password_request,
1581
+ _request_auth=_request_auth,
1582
+ _content_type=_content_type,
1583
+ _headers=_headers,
1584
+ _host_index=_host_index,
1585
+ )
1586
+
1587
+ _response_types_map: Dict[str, Optional[str]] = {
1588
+ "200": "VerifyEmail200Response",
1589
+ }
1590
+ response_data = await self.api_client.call_api(
1591
+ *_param, _request_timeout=_request_timeout
1592
+ )
1593
+ await response_data.read()
1594
+ return self.api_client.response_deserialize(
1595
+ response_data=response_data,
1596
+ response_types_map=_response_types_map,
1597
+ ).data
1598
+
1599
+ @validate_call
1600
+ async def user_reset_password_with_http_info(
1601
+ self,
1602
+ user_reset_password_request: UserResetPasswordRequest,
1603
+ _request_timeout: Union[
1604
+ None,
1605
+ Annotated[StrictFloat, Field(gt=0)],
1606
+ Tuple[
1607
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1608
+ ],
1609
+ ] = None,
1610
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1611
+ _content_type: Optional[StrictStr] = None,
1612
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1613
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1614
+ ) -> ApiResponse[VerifyEmail200Response]:
1615
+ """User Reset Password
1616
+
1617
+ Resets the password for the user.
1618
+
1619
+ :param user_reset_password_request: (required)
1620
+ :type user_reset_password_request: UserResetPasswordRequest
1621
+ :param _request_timeout: timeout setting for this request. If one
1622
+ number provided, it will be total request
1623
+ timeout. It can also be a pair (tuple) of
1624
+ (connection, read) timeouts.
1625
+ :type _request_timeout: int, tuple(int, int), optional
1626
+ :param _request_auth: set to override the auth_settings for an a single
1627
+ request; this effectively ignores the
1628
+ authentication in the spec for a single request.
1629
+ :type _request_auth: dict, optional
1630
+ :param _content_type: force content-type for the request.
1631
+ :type _content_type: str, Optional
1632
+ :param _headers: set to override the headers for a single
1633
+ request; this effectively ignores the headers
1634
+ in the spec for a single request.
1635
+ :type _headers: dict, optional
1636
+ :param _host_index: set to override the host_index for a single
1637
+ request; this effectively ignores the host_index
1638
+ in the spec for a single request.
1639
+ :type _host_index: int, optional
1640
+ :return: Returns the result object.
1641
+ """ # noqa: E501
1642
+
1643
+ _param = self._user_reset_password_serialize(
1644
+ user_reset_password_request=user_reset_password_request,
1645
+ _request_auth=_request_auth,
1646
+ _content_type=_content_type,
1647
+ _headers=_headers,
1648
+ _host_index=_host_index,
1649
+ )
1650
+
1651
+ _response_types_map: Dict[str, Optional[str]] = {
1652
+ "200": "VerifyEmail200Response",
1653
+ }
1654
+ response_data = await self.api_client.call_api(
1655
+ *_param, _request_timeout=_request_timeout
1656
+ )
1657
+ await response_data.read()
1658
+ return self.api_client.response_deserialize(
1659
+ response_data=response_data,
1660
+ response_types_map=_response_types_map,
1661
+ )
1662
+
1663
+ @validate_call
1664
+ async def user_reset_password_without_preload_content(
1665
+ self,
1666
+ user_reset_password_request: UserResetPasswordRequest,
1667
+ _request_timeout: Union[
1668
+ None,
1669
+ Annotated[StrictFloat, Field(gt=0)],
1670
+ Tuple[
1671
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1672
+ ],
1673
+ ] = None,
1674
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1675
+ _content_type: Optional[StrictStr] = None,
1676
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1677
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1678
+ ) -> RESTResponseType:
1679
+ """User Reset Password
1680
+
1681
+ Resets the password for the user.
1682
+
1683
+ :param user_reset_password_request: (required)
1684
+ :type user_reset_password_request: UserResetPasswordRequest
1685
+ :param _request_timeout: timeout setting for this request. If one
1686
+ number provided, it will be total request
1687
+ timeout. It can also be a pair (tuple) of
1688
+ (connection, read) timeouts.
1689
+ :type _request_timeout: int, tuple(int, int), optional
1690
+ :param _request_auth: set to override the auth_settings for an a single
1691
+ request; this effectively ignores the
1692
+ authentication in the spec for a single request.
1693
+ :type _request_auth: dict, optional
1694
+ :param _content_type: force content-type for the request.
1695
+ :type _content_type: str, Optional
1696
+ :param _headers: set to override the headers for a single
1697
+ request; this effectively ignores the headers
1698
+ in the spec for a single request.
1699
+ :type _headers: dict, optional
1700
+ :param _host_index: set to override the host_index for a single
1701
+ request; this effectively ignores the host_index
1702
+ in the spec for a single request.
1703
+ :type _host_index: int, optional
1704
+ :return: Returns the result object.
1705
+ """ # noqa: E501
1706
+
1707
+ _param = self._user_reset_password_serialize(
1708
+ user_reset_password_request=user_reset_password_request,
1709
+ _request_auth=_request_auth,
1710
+ _content_type=_content_type,
1711
+ _headers=_headers,
1712
+ _host_index=_host_index,
1713
+ )
1714
+
1715
+ _response_types_map: Dict[str, Optional[str]] = {
1716
+ "200": "VerifyEmail200Response",
1717
+ }
1718
+ response_data = await self.api_client.call_api(
1719
+ *_param, _request_timeout=_request_timeout
1720
+ )
1721
+ return response_data.response
1722
+
1723
+ def _user_reset_password_serialize(
1724
+ self,
1725
+ user_reset_password_request,
1726
+ _request_auth,
1727
+ _content_type,
1728
+ _headers,
1729
+ _host_index,
1730
+ ) -> RequestSerialized:
1731
+
1732
+ _host = None
1733
+
1734
+ _collection_formats: Dict[str, str] = {}
1735
+
1736
+ _path_params: Dict[str, str] = {}
1737
+ _query_params: List[Tuple[str, str]] = []
1738
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1739
+ _form_params: List[Tuple[str, str]] = []
1740
+ _files: Dict[
1741
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1742
+ ] = {}
1743
+ _body_params: Optional[bytes] = None
1744
+
1745
+ # process the path parameters
1746
+ # process the query parameters
1747
+ # process the header parameters
1748
+ # process the form parameters
1749
+ # process the body parameter
1750
+ if user_reset_password_request is not None:
1751
+ _body_params = user_reset_password_request
1752
+
1753
+ # set the HTTP header `Accept`
1754
+ if "Accept" not in _header_params:
1755
+ _header_params["Accept"] = self.api_client.select_header_accept(
1756
+ ["application/json"]
1757
+ )
1758
+
1759
+ # set the HTTP header `Content-Type`
1760
+ if _content_type:
1761
+ _header_params["Content-Type"] = _content_type
1762
+ else:
1763
+ _default_content_type = self.api_client.select_header_content_type(
1764
+ ["application/json"]
1765
+ )
1766
+ if _default_content_type is not None:
1767
+ _header_params["Content-Type"] = _default_content_type
1768
+
1769
+ # authentication setting
1770
+ _auth_settings: List[str] = []
1771
+
1772
+ return self.api_client.param_serialize(
1773
+ method="POST",
1774
+ resource_path="/user-reset-password",
1775
+ path_params=_path_params,
1776
+ query_params=_query_params,
1777
+ header_params=_header_params,
1778
+ body=_body_params,
1779
+ post_params=_form_params,
1780
+ files=_files,
1781
+ auth_settings=_auth_settings,
1782
+ collection_formats=_collection_formats,
1783
+ _host=_host,
1784
+ _request_auth=_request_auth,
1785
+ )
1786
+
1787
+ @validate_call
1788
+ async def user_set_password(
1789
+ self,
1790
+ user_set_password_request: UserSetPasswordRequest,
1791
+ _request_timeout: Union[
1792
+ None,
1793
+ Annotated[StrictFloat, Field(gt=0)],
1794
+ Tuple[
1795
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1796
+ ],
1797
+ ] = None,
1798
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1799
+ _content_type: Optional[StrictStr] = None,
1800
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1801
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1802
+ ) -> object:
1803
+ """User Set Password
1804
+
1805
+ Sets the password for the user.
1806
+
1807
+ :param user_set_password_request: (required)
1808
+ :type user_set_password_request: UserSetPasswordRequest
1809
+ :param _request_timeout: timeout setting for this request. If one
1810
+ number provided, it will be total request
1811
+ timeout. It can also be a pair (tuple) of
1812
+ (connection, read) timeouts.
1813
+ :type _request_timeout: int, tuple(int, int), optional
1814
+ :param _request_auth: set to override the auth_settings for an a single
1815
+ request; this effectively ignores the
1816
+ authentication in the spec for a single request.
1817
+ :type _request_auth: dict, optional
1818
+ :param _content_type: force content-type for the request.
1819
+ :type _content_type: str, Optional
1820
+ :param _headers: set to override the headers for a single
1821
+ request; this effectively ignores the headers
1822
+ in the spec for a single request.
1823
+ :type _headers: dict, optional
1824
+ :param _host_index: set to override the host_index for a single
1825
+ request; this effectively ignores the host_index
1826
+ in the spec for a single request.
1827
+ :type _host_index: int, optional
1828
+ :return: Returns the result object.
1829
+ """ # noqa: E501
1830
+
1831
+ _param = self._user_set_password_serialize(
1832
+ user_set_password_request=user_set_password_request,
1833
+ _request_auth=_request_auth,
1834
+ _content_type=_content_type,
1835
+ _headers=_headers,
1836
+ _host_index=_host_index,
1837
+ )
1838
+
1839
+ _response_types_map: Dict[str, Optional[str]] = {
1840
+ "200": "object",
1841
+ }
1842
+ response_data = await self.api_client.call_api(
1843
+ *_param, _request_timeout=_request_timeout
1844
+ )
1845
+ await response_data.read()
1846
+ return self.api_client.response_deserialize(
1847
+ response_data=response_data,
1848
+ response_types_map=_response_types_map,
1849
+ ).data
1850
+
1851
+ @validate_call
1852
+ async def user_set_password_with_http_info(
1853
+ self,
1854
+ user_set_password_request: UserSetPasswordRequest,
1855
+ _request_timeout: Union[
1856
+ None,
1857
+ Annotated[StrictFloat, Field(gt=0)],
1858
+ Tuple[
1859
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1860
+ ],
1861
+ ] = None,
1862
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1863
+ _content_type: Optional[StrictStr] = None,
1864
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1865
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1866
+ ) -> ApiResponse[object]:
1867
+ """User Set Password
1868
+
1869
+ Sets the password for the user.
1870
+
1871
+ :param user_set_password_request: (required)
1872
+ :type user_set_password_request: UserSetPasswordRequest
1873
+ :param _request_timeout: timeout setting for this request. If one
1874
+ number provided, it will be total request
1875
+ timeout. It can also be a pair (tuple) of
1876
+ (connection, read) timeouts.
1877
+ :type _request_timeout: int, tuple(int, int), optional
1878
+ :param _request_auth: set to override the auth_settings for an a single
1879
+ request; this effectively ignores the
1880
+ authentication in the spec for a single request.
1881
+ :type _request_auth: dict, optional
1882
+ :param _content_type: force content-type for the request.
1883
+ :type _content_type: str, Optional
1884
+ :param _headers: set to override the headers for a single
1885
+ request; this effectively ignores the headers
1886
+ in the spec for a single request.
1887
+ :type _headers: dict, optional
1888
+ :param _host_index: set to override the host_index for a single
1889
+ request; this effectively ignores the host_index
1890
+ in the spec for a single request.
1891
+ :type _host_index: int, optional
1892
+ :return: Returns the result object.
1893
+ """ # noqa: E501
1894
+
1895
+ _param = self._user_set_password_serialize(
1896
+ user_set_password_request=user_set_password_request,
1897
+ _request_auth=_request_auth,
1898
+ _content_type=_content_type,
1899
+ _headers=_headers,
1900
+ _host_index=_host_index,
1901
+ )
1902
+
1903
+ _response_types_map: Dict[str, Optional[str]] = {
1904
+ "200": "object",
1905
+ }
1906
+ response_data = await self.api_client.call_api(
1907
+ *_param, _request_timeout=_request_timeout
1908
+ )
1909
+ await response_data.read()
1910
+ return self.api_client.response_deserialize(
1911
+ response_data=response_data,
1912
+ response_types_map=_response_types_map,
1913
+ )
1914
+
1915
+ @validate_call
1916
+ async def user_set_password_without_preload_content(
1917
+ self,
1918
+ user_set_password_request: UserSetPasswordRequest,
1919
+ _request_timeout: Union[
1920
+ None,
1921
+ Annotated[StrictFloat, Field(gt=0)],
1922
+ Tuple[
1923
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1924
+ ],
1925
+ ] = None,
1926
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1927
+ _content_type: Optional[StrictStr] = None,
1928
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1929
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1930
+ ) -> RESTResponseType:
1931
+ """User Set Password
1932
+
1933
+ Sets the password for the user.
1934
+
1935
+ :param user_set_password_request: (required)
1936
+ :type user_set_password_request: UserSetPasswordRequest
1937
+ :param _request_timeout: timeout setting for this request. If one
1938
+ number provided, it will be total request
1939
+ timeout. It can also be a pair (tuple) of
1940
+ (connection, read) timeouts.
1941
+ :type _request_timeout: int, tuple(int, int), optional
1942
+ :param _request_auth: set to override the auth_settings for an a single
1943
+ request; this effectively ignores the
1944
+ authentication in the spec for a single request.
1945
+ :type _request_auth: dict, optional
1946
+ :param _content_type: force content-type for the request.
1947
+ :type _content_type: str, Optional
1948
+ :param _headers: set to override the headers for a single
1949
+ request; this effectively ignores the headers
1950
+ in the spec for a single request.
1951
+ :type _headers: dict, optional
1952
+ :param _host_index: set to override the host_index for a single
1953
+ request; this effectively ignores the host_index
1954
+ in the spec for a single request.
1955
+ :type _host_index: int, optional
1956
+ :return: Returns the result object.
1957
+ """ # noqa: E501
1958
+
1959
+ _param = self._user_set_password_serialize(
1960
+ user_set_password_request=user_set_password_request,
1961
+ _request_auth=_request_auth,
1962
+ _content_type=_content_type,
1963
+ _headers=_headers,
1964
+ _host_index=_host_index,
1965
+ )
1966
+
1967
+ _response_types_map: Dict[str, Optional[str]] = {
1968
+ "200": "object",
1969
+ }
1970
+ response_data = await self.api_client.call_api(
1971
+ *_param, _request_timeout=_request_timeout
1972
+ )
1973
+ return response_data.response
1974
+
1975
+ def _user_set_password_serialize(
1976
+ self,
1977
+ user_set_password_request,
1978
+ _request_auth,
1979
+ _content_type,
1980
+ _headers,
1981
+ _host_index,
1982
+ ) -> RequestSerialized:
1983
+
1984
+ _host = None
1985
+
1986
+ _collection_formats: Dict[str, str] = {}
1987
+
1988
+ _path_params: Dict[str, str] = {}
1989
+ _query_params: List[Tuple[str, str]] = []
1990
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1991
+ _form_params: List[Tuple[str, str]] = []
1992
+ _files: Dict[
1993
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1994
+ ] = {}
1995
+ _body_params: Optional[bytes] = None
1996
+
1997
+ # process the path parameters
1998
+ # process the query parameters
1999
+ # process the header parameters
2000
+ # process the form parameters
2001
+ # process the body parameter
2002
+ if user_set_password_request is not None:
2003
+ _body_params = user_set_password_request
2004
+
2005
+ # set the HTTP header `Accept`
2006
+ if "Accept" not in _header_params:
2007
+ _header_params["Accept"] = self.api_client.select_header_accept(
2008
+ ["application/json"]
2009
+ )
2010
+
2011
+ # set the HTTP header `Content-Type`
2012
+ if _content_type:
2013
+ _header_params["Content-Type"] = _content_type
2014
+ else:
2015
+ _default_content_type = self.api_client.select_header_content_type(
2016
+ ["application/json"]
2017
+ )
2018
+ if _default_content_type is not None:
2019
+ _header_params["Content-Type"] = _default_content_type
2020
+
2021
+ # authentication setting
2022
+ _auth_settings: List[str] = []
2023
+
2024
+ return self.api_client.param_serialize(
2025
+ method="POST",
2026
+ resource_path="/user-set-password",
2027
+ path_params=_path_params,
2028
+ query_params=_query_params,
2029
+ header_params=_header_params,
2030
+ body=_body_params,
2031
+ post_params=_form_params,
2032
+ files=_files,
2033
+ auth_settings=_auth_settings,
2034
+ collection_formats=_collection_formats,
2035
+ _host=_host,
2036
+ _request_auth=_request_auth,
2037
+ )
2038
+
2039
+ @validate_call
2040
+ async def verify_email(
2041
+ self,
2042
+ verify_email_request: VerifyEmailRequest,
2043
+ _request_timeout: Union[
2044
+ None,
2045
+ Annotated[StrictFloat, Field(gt=0)],
2046
+ Tuple[
2047
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2048
+ ],
2049
+ ] = None,
2050
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2051
+ _content_type: Optional[StrictStr] = None,
2052
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2053
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2054
+ ) -> VerifyEmail200Response:
2055
+ """Verify Email
2056
+
2057
+ Verifies the email of the user.
2058
+
2059
+ :param verify_email_request: (required)
2060
+ :type verify_email_request: VerifyEmailRequest
2061
+ :param _request_timeout: timeout setting for this request. If one
2062
+ number provided, it will be total request
2063
+ timeout. It can also be a pair (tuple) of
2064
+ (connection, read) timeouts.
2065
+ :type _request_timeout: int, tuple(int, int), optional
2066
+ :param _request_auth: set to override the auth_settings for an a single
2067
+ request; this effectively ignores the
2068
+ authentication in the spec for a single request.
2069
+ :type _request_auth: dict, optional
2070
+ :param _content_type: force content-type for the request.
2071
+ :type _content_type: str, Optional
2072
+ :param _headers: set to override the headers for a single
2073
+ request; this effectively ignores the headers
2074
+ in the spec for a single request.
2075
+ :type _headers: dict, optional
2076
+ :param _host_index: set to override the host_index for a single
2077
+ request; this effectively ignores the host_index
2078
+ in the spec for a single request.
2079
+ :type _host_index: int, optional
2080
+ :return: Returns the result object.
2081
+ """ # noqa: E501
2082
+
2083
+ _param = self._verify_email_serialize(
2084
+ verify_email_request=verify_email_request,
2085
+ _request_auth=_request_auth,
2086
+ _content_type=_content_type,
2087
+ _headers=_headers,
2088
+ _host_index=_host_index,
2089
+ )
2090
+
2091
+ _response_types_map: Dict[str, Optional[str]] = {
2092
+ "200": "VerifyEmail200Response",
2093
+ }
2094
+ response_data = await self.api_client.call_api(
2095
+ *_param, _request_timeout=_request_timeout
2096
+ )
2097
+ await response_data.read()
2098
+ return self.api_client.response_deserialize(
2099
+ response_data=response_data,
2100
+ response_types_map=_response_types_map,
2101
+ ).data
2102
+
2103
+ @validate_call
2104
+ async def verify_email_with_http_info(
2105
+ self,
2106
+ verify_email_request: VerifyEmailRequest,
2107
+ _request_timeout: Union[
2108
+ None,
2109
+ Annotated[StrictFloat, Field(gt=0)],
2110
+ Tuple[
2111
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2112
+ ],
2113
+ ] = None,
2114
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2115
+ _content_type: Optional[StrictStr] = None,
2116
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2117
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2118
+ ) -> ApiResponse[VerifyEmail200Response]:
2119
+ """Verify Email
2120
+
2121
+ Verifies the email of the user.
2122
+
2123
+ :param verify_email_request: (required)
2124
+ :type verify_email_request: VerifyEmailRequest
2125
+ :param _request_timeout: timeout setting for this request. If one
2126
+ number provided, it will be total request
2127
+ timeout. It can also be a pair (tuple) of
2128
+ (connection, read) timeouts.
2129
+ :type _request_timeout: int, tuple(int, int), optional
2130
+ :param _request_auth: set to override the auth_settings for an a single
2131
+ request; this effectively ignores the
2132
+ authentication in the spec for a single request.
2133
+ :type _request_auth: dict, optional
2134
+ :param _content_type: force content-type for the request.
2135
+ :type _content_type: str, Optional
2136
+ :param _headers: set to override the headers for a single
2137
+ request; this effectively ignores the headers
2138
+ in the spec for a single request.
2139
+ :type _headers: dict, optional
2140
+ :param _host_index: set to override the host_index for a single
2141
+ request; this effectively ignores the host_index
2142
+ in the spec for a single request.
2143
+ :type _host_index: int, optional
2144
+ :return: Returns the result object.
2145
+ """ # noqa: E501
2146
+
2147
+ _param = self._verify_email_serialize(
2148
+ verify_email_request=verify_email_request,
2149
+ _request_auth=_request_auth,
2150
+ _content_type=_content_type,
2151
+ _headers=_headers,
2152
+ _host_index=_host_index,
2153
+ )
2154
+
2155
+ _response_types_map: Dict[str, Optional[str]] = {
2156
+ "200": "VerifyEmail200Response",
2157
+ }
2158
+ response_data = await self.api_client.call_api(
2159
+ *_param, _request_timeout=_request_timeout
2160
+ )
2161
+ await response_data.read()
2162
+ return self.api_client.response_deserialize(
2163
+ response_data=response_data,
2164
+ response_types_map=_response_types_map,
2165
+ )
2166
+
2167
+ @validate_call
2168
+ async def verify_email_without_preload_content(
2169
+ self,
2170
+ verify_email_request: VerifyEmailRequest,
2171
+ _request_timeout: Union[
2172
+ None,
2173
+ Annotated[StrictFloat, Field(gt=0)],
2174
+ Tuple[
2175
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2176
+ ],
2177
+ ] = None,
2178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2179
+ _content_type: Optional[StrictStr] = None,
2180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2182
+ ) -> RESTResponseType:
2183
+ """Verify Email
2184
+
2185
+ Verifies the email of the user.
2186
+
2187
+ :param verify_email_request: (required)
2188
+ :type verify_email_request: VerifyEmailRequest
2189
+ :param _request_timeout: timeout setting for this request. If one
2190
+ number provided, it will be total request
2191
+ timeout. It can also be a pair (tuple) of
2192
+ (connection, read) timeouts.
2193
+ :type _request_timeout: int, tuple(int, int), optional
2194
+ :param _request_auth: set to override the auth_settings for an a single
2195
+ request; this effectively ignores the
2196
+ authentication in the spec for a single request.
2197
+ :type _request_auth: dict, optional
2198
+ :param _content_type: force content-type for the request.
2199
+ :type _content_type: str, Optional
2200
+ :param _headers: set to override the headers for a single
2201
+ request; this effectively ignores the headers
2202
+ in the spec for a single request.
2203
+ :type _headers: dict, optional
2204
+ :param _host_index: set to override the host_index for a single
2205
+ request; this effectively ignores the host_index
2206
+ in the spec for a single request.
2207
+ :type _host_index: int, optional
2208
+ :return: Returns the result object.
2209
+ """ # noqa: E501
2210
+
2211
+ _param = self._verify_email_serialize(
2212
+ verify_email_request=verify_email_request,
2213
+ _request_auth=_request_auth,
2214
+ _content_type=_content_type,
2215
+ _headers=_headers,
2216
+ _host_index=_host_index,
2217
+ )
2218
+
2219
+ _response_types_map: Dict[str, Optional[str]] = {
2220
+ "200": "VerifyEmail200Response",
2221
+ }
2222
+ response_data = await self.api_client.call_api(
2223
+ *_param, _request_timeout=_request_timeout
2224
+ )
2225
+ return response_data.response
2226
+
2227
+ def _verify_email_serialize(
2228
+ self,
2229
+ verify_email_request,
2230
+ _request_auth,
2231
+ _content_type,
2232
+ _headers,
2233
+ _host_index,
2234
+ ) -> RequestSerialized:
2235
+
2236
+ _host = None
2237
+
2238
+ _collection_formats: Dict[str, str] = {}
2239
+
2240
+ _path_params: Dict[str, str] = {}
2241
+ _query_params: List[Tuple[str, str]] = []
2242
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2243
+ _form_params: List[Tuple[str, str]] = []
2244
+ _files: Dict[
2245
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2246
+ ] = {}
2247
+ _body_params: Optional[bytes] = None
2248
+
2249
+ # process the path parameters
2250
+ # process the query parameters
2251
+ # process the header parameters
2252
+ # process the form parameters
2253
+ # process the body parameter
2254
+ if verify_email_request is not None:
2255
+ _body_params = verify_email_request
2256
+
2257
+ # set the HTTP header `Accept`
2258
+ if "Accept" not in _header_params:
2259
+ _header_params["Accept"] = self.api_client.select_header_accept(
2260
+ ["application/json"]
2261
+ )
2262
+
2263
+ # set the HTTP header `Content-Type`
2264
+ if _content_type:
2265
+ _header_params["Content-Type"] = _content_type
2266
+ else:
2267
+ _default_content_type = self.api_client.select_header_content_type(
2268
+ ["application/json"]
2269
+ )
2270
+ if _default_content_type is not None:
2271
+ _header_params["Content-Type"] = _default_content_type
2272
+
2273
+ # authentication setting
2274
+ _auth_settings: List[str] = []
2275
+
2276
+ return self.api_client.param_serialize(
2277
+ method="POST",
2278
+ resource_path="/verify-email",
2279
+ path_params=_path_params,
2280
+ query_params=_query_params,
2281
+ header_params=_header_params,
2282
+ body=_body_params,
2283
+ post_params=_form_params,
2284
+ files=_files,
2285
+ auth_settings=_auth_settings,
2286
+ collection_formats=_collection_formats,
2287
+ _host=_host,
2288
+ _request_auth=_request_auth,
2289
+ )
2290
+
2291
+ @validate_call
2292
+ async def whoami(
2293
+ self,
2294
+ x_refresh_token: Annotated[
2295
+ Optional[StrictStr],
2296
+ Field(description="The refresh token for rotating the access token."),
2297
+ ] = None,
2298
+ _request_timeout: Union[
2299
+ None,
2300
+ Annotated[StrictFloat, Field(gt=0)],
2301
+ Tuple[
2302
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2303
+ ],
2304
+ ] = None,
2305
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2306
+ _content_type: Optional[StrictStr] = None,
2307
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2308
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2309
+ ) -> Whoami200Response:
2310
+ """Whoami
2311
+
2312
+ Returns the current user.
2313
+
2314
+ :param x_refresh_token: The refresh token for rotating the access token.
2315
+ :type x_refresh_token: str
2316
+ :param _request_timeout: timeout setting for this request. If one
2317
+ number provided, it will be total request
2318
+ timeout. It can also be a pair (tuple) of
2319
+ (connection, read) timeouts.
2320
+ :type _request_timeout: int, tuple(int, int), optional
2321
+ :param _request_auth: set to override the auth_settings for an a single
2322
+ request; this effectively ignores the
2323
+ authentication in the spec for a single request.
2324
+ :type _request_auth: dict, optional
2325
+ :param _content_type: force content-type for the request.
2326
+ :type _content_type: str, Optional
2327
+ :param _headers: set to override the headers for a single
2328
+ request; this effectively ignores the headers
2329
+ in the spec for a single request.
2330
+ :type _headers: dict, optional
2331
+ :param _host_index: set to override the host_index for a single
2332
+ request; this effectively ignores the host_index
2333
+ in the spec for a single request.
2334
+ :type _host_index: int, optional
2335
+ :return: Returns the result object.
2336
+ """ # noqa: E501
2337
+
2338
+ _param = self._whoami_serialize(
2339
+ x_refresh_token=x_refresh_token,
2340
+ _request_auth=_request_auth,
2341
+ _content_type=_content_type,
2342
+ _headers=_headers,
2343
+ _host_index=_host_index,
2344
+ )
2345
+
2346
+ _response_types_map: Dict[str, Optional[str]] = {
2347
+ "200": "Whoami200Response",
2348
+ }
2349
+ response_data = await self.api_client.call_api(
2350
+ *_param, _request_timeout=_request_timeout
2351
+ )
2352
+ await response_data.read()
2353
+ return self.api_client.response_deserialize(
2354
+ response_data=response_data,
2355
+ response_types_map=_response_types_map,
2356
+ ).data
2357
+
2358
+ @validate_call
2359
+ async def whoami_with_http_info(
2360
+ self,
2361
+ x_refresh_token: Annotated[
2362
+ Optional[StrictStr],
2363
+ Field(description="The refresh token for rotating the access token."),
2364
+ ] = None,
2365
+ _request_timeout: Union[
2366
+ None,
2367
+ Annotated[StrictFloat, Field(gt=0)],
2368
+ Tuple[
2369
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2370
+ ],
2371
+ ] = None,
2372
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2373
+ _content_type: Optional[StrictStr] = None,
2374
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2375
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2376
+ ) -> ApiResponse[Whoami200Response]:
2377
+ """Whoami
2378
+
2379
+ Returns the current user.
2380
+
2381
+ :param x_refresh_token: The refresh token for rotating the access token.
2382
+ :type x_refresh_token: str
2383
+ :param _request_timeout: timeout setting for this request. If one
2384
+ number provided, it will be total request
2385
+ timeout. It can also be a pair (tuple) of
2386
+ (connection, read) timeouts.
2387
+ :type _request_timeout: int, tuple(int, int), optional
2388
+ :param _request_auth: set to override the auth_settings for an a single
2389
+ request; this effectively ignores the
2390
+ authentication in the spec for a single request.
2391
+ :type _request_auth: dict, optional
2392
+ :param _content_type: force content-type for the request.
2393
+ :type _content_type: str, Optional
2394
+ :param _headers: set to override the headers for a single
2395
+ request; this effectively ignores the headers
2396
+ in the spec for a single request.
2397
+ :type _headers: dict, optional
2398
+ :param _host_index: set to override the host_index for a single
2399
+ request; this effectively ignores the host_index
2400
+ in the spec for a single request.
2401
+ :type _host_index: int, optional
2402
+ :return: Returns the result object.
2403
+ """ # noqa: E501
2404
+
2405
+ _param = self._whoami_serialize(
2406
+ x_refresh_token=x_refresh_token,
2407
+ _request_auth=_request_auth,
2408
+ _content_type=_content_type,
2409
+ _headers=_headers,
2410
+ _host_index=_host_index,
2411
+ )
2412
+
2413
+ _response_types_map: Dict[str, Optional[str]] = {
2414
+ "200": "Whoami200Response",
2415
+ }
2416
+ response_data = await self.api_client.call_api(
2417
+ *_param, _request_timeout=_request_timeout
2418
+ )
2419
+ await response_data.read()
2420
+ return self.api_client.response_deserialize(
2421
+ response_data=response_data,
2422
+ response_types_map=_response_types_map,
2423
+ )
2424
+
2425
+ @validate_call
2426
+ async def whoami_without_preload_content(
2427
+ self,
2428
+ x_refresh_token: Annotated[
2429
+ Optional[StrictStr],
2430
+ Field(description="The refresh token for rotating the access token."),
2431
+ ] = None,
2432
+ _request_timeout: Union[
2433
+ None,
2434
+ Annotated[StrictFloat, Field(gt=0)],
2435
+ Tuple[
2436
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2437
+ ],
2438
+ ] = None,
2439
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2440
+ _content_type: Optional[StrictStr] = None,
2441
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2442
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2443
+ ) -> RESTResponseType:
2444
+ """Whoami
2445
+
2446
+ Returns the current user.
2447
+
2448
+ :param x_refresh_token: The refresh token for rotating the access token.
2449
+ :type x_refresh_token: str
2450
+ :param _request_timeout: timeout setting for this request. If one
2451
+ number provided, it will be total request
2452
+ timeout. It can also be a pair (tuple) of
2453
+ (connection, read) timeouts.
2454
+ :type _request_timeout: int, tuple(int, int), optional
2455
+ :param _request_auth: set to override the auth_settings for an a single
2456
+ request; this effectively ignores the
2457
+ authentication in the spec for a single request.
2458
+ :type _request_auth: dict, optional
2459
+ :param _content_type: force content-type for the request.
2460
+ :type _content_type: str, Optional
2461
+ :param _headers: set to override the headers for a single
2462
+ request; this effectively ignores the headers
2463
+ in the spec for a single request.
2464
+ :type _headers: dict, optional
2465
+ :param _host_index: set to override the host_index for a single
2466
+ request; this effectively ignores the host_index
2467
+ in the spec for a single request.
2468
+ :type _host_index: int, optional
2469
+ :return: Returns the result object.
2470
+ """ # noqa: E501
2471
+
2472
+ _param = self._whoami_serialize(
2473
+ x_refresh_token=x_refresh_token,
2474
+ _request_auth=_request_auth,
2475
+ _content_type=_content_type,
2476
+ _headers=_headers,
2477
+ _host_index=_host_index,
2478
+ )
2479
+
2480
+ _response_types_map: Dict[str, Optional[str]] = {
2481
+ "200": "Whoami200Response",
2482
+ }
2483
+ response_data = await self.api_client.call_api(
2484
+ *_param, _request_timeout=_request_timeout
2485
+ )
2486
+ return response_data.response
2487
+
2488
+ def _whoami_serialize(
2489
+ self,
2490
+ x_refresh_token,
2491
+ _request_auth,
2492
+ _content_type,
2493
+ _headers,
2494
+ _host_index,
2495
+ ) -> RequestSerialized:
2496
+
2497
+ _host = None
2498
+
2499
+ _collection_formats: Dict[str, str] = {}
2500
+
2501
+ _path_params: Dict[str, str] = {}
2502
+ _query_params: List[Tuple[str, str]] = []
2503
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2504
+ _form_params: List[Tuple[str, str]] = []
2505
+ _files: Dict[
2506
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2507
+ ] = {}
2508
+ _body_params: Optional[bytes] = None
2509
+
2510
+ # process the path parameters
2511
+ # process the query parameters
2512
+ # process the header parameters
2513
+ if x_refresh_token is not None:
2514
+ _header_params["X-Refresh-Token"] = x_refresh_token
2515
+ # process the form parameters
2516
+ # process the body parameter
2517
+
2518
+ # set the HTTP header `Accept`
2519
+ if "Accept" not in _header_params:
2520
+ _header_params["Accept"] = self.api_client.select_header_accept(
2521
+ ["application/json"]
2522
+ )
2523
+
2524
+ # authentication setting
2525
+ _auth_settings: List[str] = ["HTTPBearer"]
2526
+
2527
+ return self.api_client.param_serialize(
2528
+ method="GET",
2529
+ resource_path="/whoami",
2530
+ path_params=_path_params,
2531
+ query_params=_query_params,
2532
+ header_params=_header_params,
2533
+ body=_body_params,
2534
+ post_params=_form_params,
2535
+ files=_files,
2536
+ auth_settings=_auth_settings,
2537
+ collection_formats=_collection_formats,
2538
+ _host=_host,
2539
+ _request_auth=_request_auth,
2540
+ )