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