robosystems-client 0.1.16__py3-none-any.whl → 0.1.18__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of robosystems-client might be problematic. Click here for more details.

Files changed (109) hide show
  1. robosystems_client/__init__.py +15 -4
  2. robosystems_client/api/agent/auto_select_agent.py +24 -17
  3. robosystems_client/api/agent/batch_process_queries.py +24 -17
  4. robosystems_client/api/agent/execute_specific_agent.py +24 -17
  5. robosystems_client/api/agent/get_agent_metadata.py +24 -17
  6. robosystems_client/api/agent/list_agents.py +20 -18
  7. robosystems_client/api/agent/recommend_agent.py +24 -17
  8. robosystems_client/api/auth/forgot_password.py +191 -0
  9. robosystems_client/api/auth/generate_sso_token.py +18 -0
  10. robosystems_client/api/auth/get_current_auth_user.py +4 -22
  11. robosystems_client/api/auth/logout_user.py +17 -17
  12. robosystems_client/api/auth/{refresh_session.py → refresh_auth_session.py} +21 -21
  13. robosystems_client/api/auth/resend_verification_email.py +222 -0
  14. robosystems_client/api/auth/reset_password.py +177 -0
  15. robosystems_client/api/auth/validate_reset_token.py +171 -0
  16. robosystems_client/api/auth/verify_email.py +177 -0
  17. robosystems_client/api/backup/create_backup.py +24 -17
  18. robosystems_client/api/backup/export_backup.py +24 -17
  19. robosystems_client/api/backup/get_backup_download_url.py +20 -18
  20. robosystems_client/api/backup/get_backup_stats.py +24 -17
  21. robosystems_client/api/backup/list_backups.py +20 -18
  22. robosystems_client/api/backup/restore_backup.py +24 -17
  23. robosystems_client/api/connections/create_connection.py +24 -17
  24. robosystems_client/api/connections/create_link_token.py +24 -17
  25. robosystems_client/api/connections/delete_connection.py +24 -17
  26. robosystems_client/api/connections/exchange_link_token.py +24 -17
  27. robosystems_client/api/connections/get_connection.py +24 -17
  28. robosystems_client/api/connections/get_connection_options.py +24 -17
  29. robosystems_client/api/connections/init_o_auth.py +24 -17
  30. robosystems_client/api/connections/list_connections.py +20 -18
  31. robosystems_client/api/connections/oauth_callback.py +28 -21
  32. robosystems_client/api/connections/sync_connection.py +24 -17
  33. robosystems_client/api/copy/copy_data_to_graph.py +24 -17
  34. robosystems_client/api/create/create_graph.py +24 -17
  35. robosystems_client/api/graph_analytics/get_graph_metrics.py +24 -17
  36. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +20 -18
  37. robosystems_client/api/graph_billing/get_current_graph_bill.py +24 -17
  38. robosystems_client/api/graph_billing/get_graph_billing_history.py +20 -18
  39. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +24 -17
  40. robosystems_client/api/graph_billing/get_graph_usage_details.py +20 -18
  41. robosystems_client/api/graph_credits/check_credit_balance.py +20 -18
  42. robosystems_client/api/graph_credits/check_storage_limits.py +24 -17
  43. robosystems_client/api/graph_credits/get_credit_summary.py +24 -17
  44. robosystems_client/api/graph_credits/get_storage_usage.py +20 -18
  45. robosystems_client/api/graph_credits/list_credit_transactions.py +20 -18
  46. robosystems_client/api/graph_health/get_database_health.py +24 -17
  47. robosystems_client/api/graph_info/get_database_info.py +24 -17
  48. robosystems_client/api/graph_limits/get_graph_limits.py +24 -17
  49. robosystems_client/api/mcp/call_mcp_tool.py +20 -18
  50. robosystems_client/api/mcp/list_mcp_tools.py +24 -17
  51. robosystems_client/api/operations/cancel_operation.py +24 -17
  52. robosystems_client/api/operations/get_operation_status.py +24 -17
  53. robosystems_client/api/operations/stream_operation_events.py +20 -18
  54. robosystems_client/api/query/execute_cypher_query.py +20 -18
  55. robosystems_client/api/schema/export_graph_schema.py +20 -18
  56. robosystems_client/api/schema/get_graph_schema_info.py +24 -17
  57. robosystems_client/api/schema/list_schema_extensions.py +24 -17
  58. robosystems_client/api/schema/validate_schema.py +24 -17
  59. robosystems_client/api/subgraphs/create_subgraph.py +24 -17
  60. robosystems_client/api/subgraphs/delete_subgraph.py +24 -17
  61. robosystems_client/api/subgraphs/get_subgraph_info.py +24 -17
  62. robosystems_client/api/subgraphs/get_subgraph_quota.py +24 -17
  63. robosystems_client/api/subgraphs/list_subgraphs.py +24 -17
  64. robosystems_client/api/user/create_user_api_key.py +24 -17
  65. robosystems_client/api/user/get_all_credit_summaries.py +24 -17
  66. robosystems_client/api/user/get_current_user.py +24 -17
  67. robosystems_client/api/user/get_user_graphs.py +24 -17
  68. robosystems_client/api/user/list_user_api_keys.py +24 -17
  69. robosystems_client/api/user/revoke_user_api_key.py +24 -17
  70. robosystems_client/api/user/select_user_graph.py +24 -17
  71. robosystems_client/api/user/update_user.py +24 -17
  72. robosystems_client/api/user/update_user_api_key.py +24 -17
  73. robosystems_client/api/user/update_user_password.py +24 -17
  74. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +20 -18
  75. robosystems_client/api/user_analytics/get_user_usage_overview.py +24 -17
  76. robosystems_client/api/user_limits/get_all_shared_repository_limits.py +24 -17
  77. robosystems_client/api/user_limits/get_shared_repository_limits.py +24 -17
  78. robosystems_client/api/user_limits/get_user_limits.py +24 -17
  79. robosystems_client/api/user_limits/get_user_usage.py +24 -17
  80. robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +24 -17
  81. robosystems_client/api/user_subscriptions/get_repository_credits.py +24 -17
  82. robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +24 -17
  83. robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +20 -18
  84. robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +24 -17
  85. robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +24 -17
  86. robosystems_client/extensions/__init__.py +70 -0
  87. robosystems_client/extensions/auth_integration.py +14 -1
  88. robosystems_client/extensions/copy_client.py +32 -22
  89. robosystems_client/extensions/dataframe_utils.py +455 -0
  90. robosystems_client/extensions/extensions.py +16 -0
  91. robosystems_client/extensions/operation_client.py +43 -21
  92. robosystems_client/extensions/query_client.py +109 -12
  93. robosystems_client/extensions/tests/test_dataframe_utils.py +334 -0
  94. robosystems_client/extensions/tests/test_integration.py +1 -1
  95. robosystems_client/extensions/tests/test_token_utils.py +274 -0
  96. robosystems_client/extensions/token_utils.py +417 -0
  97. robosystems_client/extensions/utils.py +32 -2
  98. robosystems_client/models/__init__.py +16 -0
  99. robosystems_client/models/email_verification_request.py +60 -0
  100. robosystems_client/models/forgot_password_request.py +60 -0
  101. robosystems_client/models/forgot_password_response_forgotpassword.py +44 -0
  102. robosystems_client/models/resend_verification_email_response_resendverificationemail.py +44 -0
  103. robosystems_client/models/reset_password_request.py +68 -0
  104. robosystems_client/models/reset_password_validate_response.py +82 -0
  105. robosystems_client-0.1.18.dist-info/METADATA +89 -0
  106. {robosystems_client-0.1.16.dist-info → robosystems_client-0.1.18.dist-info}/RECORD +108 -92
  107. robosystems_client-0.1.18.dist-info/licenses/LICENSE +21 -0
  108. robosystems_client-0.1.16.dist-info/METADATA +0 -302
  109. {robosystems_client-0.1.16.dist-info → robosystems_client-0.1.18.dist-info}/WHEEL +0 -0
@@ -16,20 +16,14 @@ from ...types import UNSET, Response, Unset
16
16
  def _get_kwargs(
17
17
  *,
18
18
  authorization: Union[None, Unset, str] = UNSET,
19
- auth_token: Union[None, Unset, str] = UNSET,
20
19
  ) -> dict[str, Any]:
21
20
  headers: dict[str, Any] = {}
22
21
  if not isinstance(authorization, Unset):
23
22
  headers["authorization"] = authorization
24
23
 
25
- cookies = {}
26
- if auth_token is not UNSET:
27
- cookies["auth-token"] = auth_token
28
-
29
24
  _kwargs: dict[str, Any] = {
30
25
  "method": "get",
31
26
  "url": "/v1/auth/me",
32
- "cookies": cookies,
33
27
  }
34
28
 
35
29
  _kwargs["headers"] = headers
@@ -82,7 +76,6 @@ def sync_detailed(
82
76
  *,
83
77
  client: Union[AuthenticatedClient, Client],
84
78
  authorization: Union[None, Unset, str] = UNSET,
85
- auth_token: Union[None, Unset, str] = UNSET,
86
79
  ) -> Response[
87
80
  Union[
88
81
  ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError
@@ -90,11 +83,10 @@ def sync_detailed(
90
83
  ]:
91
84
  """Get Current User
92
85
 
93
- Get current authenticated user from session.
86
+ Get the currently authenticated user.
94
87
 
95
88
  Args:
96
89
  authorization (Union[None, Unset, str]):
97
- auth_token (Union[None, Unset, str]):
98
90
 
99
91
  Raises:
100
92
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -106,7 +98,6 @@ def sync_detailed(
106
98
 
107
99
  kwargs = _get_kwargs(
108
100
  authorization=authorization,
109
- auth_token=auth_token,
110
101
  )
111
102
 
112
103
  response = client.get_httpx_client().request(
@@ -120,7 +111,6 @@ def sync(
120
111
  *,
121
112
  client: Union[AuthenticatedClient, Client],
122
113
  authorization: Union[None, Unset, str] = UNSET,
123
- auth_token: Union[None, Unset, str] = UNSET,
124
114
  ) -> Optional[
125
115
  Union[
126
116
  ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError
@@ -128,11 +118,10 @@ def sync(
128
118
  ]:
129
119
  """Get Current User
130
120
 
131
- Get current authenticated user from session.
121
+ Get the currently authenticated user.
132
122
 
133
123
  Args:
134
124
  authorization (Union[None, Unset, str]):
135
- auth_token (Union[None, Unset, str]):
136
125
 
137
126
  Raises:
138
127
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -145,7 +134,6 @@ def sync(
145
134
  return sync_detailed(
146
135
  client=client,
147
136
  authorization=authorization,
148
- auth_token=auth_token,
149
137
  ).parsed
150
138
 
151
139
 
@@ -153,7 +141,6 @@ async def asyncio_detailed(
153
141
  *,
154
142
  client: Union[AuthenticatedClient, Client],
155
143
  authorization: Union[None, Unset, str] = UNSET,
156
- auth_token: Union[None, Unset, str] = UNSET,
157
144
  ) -> Response[
158
145
  Union[
159
146
  ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError
@@ -161,11 +148,10 @@ async def asyncio_detailed(
161
148
  ]:
162
149
  """Get Current User
163
150
 
164
- Get current authenticated user from session.
151
+ Get the currently authenticated user.
165
152
 
166
153
  Args:
167
154
  authorization (Union[None, Unset, str]):
168
- auth_token (Union[None, Unset, str]):
169
155
 
170
156
  Raises:
171
157
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -177,7 +163,6 @@ async def asyncio_detailed(
177
163
 
178
164
  kwargs = _get_kwargs(
179
165
  authorization=authorization,
180
- auth_token=auth_token,
181
166
  )
182
167
 
183
168
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -189,7 +174,6 @@ async def asyncio(
189
174
  *,
190
175
  client: Union[AuthenticatedClient, Client],
191
176
  authorization: Union[None, Unset, str] = UNSET,
192
- auth_token: Union[None, Unset, str] = UNSET,
193
177
  ) -> Optional[
194
178
  Union[
195
179
  ErrorResponse, GetCurrentAuthUserResponseGetcurrentauthuser, HTTPValidationError
@@ -197,11 +181,10 @@ async def asyncio(
197
181
  ]:
198
182
  """Get Current User
199
183
 
200
- Get current authenticated user from session.
184
+ Get the currently authenticated user.
201
185
 
202
186
  Args:
203
187
  authorization (Union[None, Unset, str]):
204
- auth_token (Union[None, Unset, str]):
205
188
 
206
189
  Raises:
207
190
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -215,6 +198,5 @@ async def asyncio(
215
198
  await asyncio_detailed(
216
199
  client=client,
217
200
  authorization=authorization,
218
- auth_token=auth_token,
219
201
  )
220
202
  ).parsed
@@ -12,18 +12,18 @@ from ...types import UNSET, Response, Unset
12
12
 
13
13
  def _get_kwargs(
14
14
  *,
15
- auth_token: Union[None, Unset, str] = UNSET,
15
+ authorization: Union[None, Unset, str] = UNSET,
16
16
  ) -> dict[str, Any]:
17
- cookies = {}
18
- if auth_token is not UNSET:
19
- cookies["auth-token"] = auth_token
17
+ headers: dict[str, Any] = {}
18
+ if not isinstance(authorization, Unset):
19
+ headers["authorization"] = authorization
20
20
 
21
21
  _kwargs: dict[str, Any] = {
22
22
  "method": "post",
23
23
  "url": "/v1/auth/logout",
24
- "cookies": cookies,
25
24
  }
26
25
 
26
+ _kwargs["headers"] = headers
27
27
  return _kwargs
28
28
 
29
29
 
@@ -58,14 +58,14 @@ def _build_response(
58
58
  def sync_detailed(
59
59
  *,
60
60
  client: Union[AuthenticatedClient, Client],
61
- auth_token: Union[None, Unset, str] = UNSET,
61
+ authorization: Union[None, Unset, str] = UNSET,
62
62
  ) -> Response[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]:
63
63
  """User Logout
64
64
 
65
65
  Logout user and invalidate session.
66
66
 
67
67
  Args:
68
- auth_token (Union[None, Unset, str]):
68
+ authorization (Union[None, Unset, str]):
69
69
 
70
70
  Raises:
71
71
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -76,7 +76,7 @@ def sync_detailed(
76
76
  """
77
77
 
78
78
  kwargs = _get_kwargs(
79
- auth_token=auth_token,
79
+ authorization=authorization,
80
80
  )
81
81
 
82
82
  response = client.get_httpx_client().request(
@@ -89,14 +89,14 @@ def sync_detailed(
89
89
  def sync(
90
90
  *,
91
91
  client: Union[AuthenticatedClient, Client],
92
- auth_token: Union[None, Unset, str] = UNSET,
92
+ authorization: Union[None, Unset, str] = UNSET,
93
93
  ) -> Optional[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]:
94
94
  """User Logout
95
95
 
96
96
  Logout user and invalidate session.
97
97
 
98
98
  Args:
99
- auth_token (Union[None, Unset, str]):
99
+ authorization (Union[None, Unset, str]):
100
100
 
101
101
  Raises:
102
102
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -108,21 +108,21 @@ def sync(
108
108
 
109
109
  return sync_detailed(
110
110
  client=client,
111
- auth_token=auth_token,
111
+ authorization=authorization,
112
112
  ).parsed
113
113
 
114
114
 
115
115
  async def asyncio_detailed(
116
116
  *,
117
117
  client: Union[AuthenticatedClient, Client],
118
- auth_token: Union[None, Unset, str] = UNSET,
118
+ authorization: Union[None, Unset, str] = UNSET,
119
119
  ) -> Response[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]:
120
120
  """User Logout
121
121
 
122
122
  Logout user and invalidate session.
123
123
 
124
124
  Args:
125
- auth_token (Union[None, Unset, str]):
125
+ authorization (Union[None, Unset, str]):
126
126
 
127
127
  Raises:
128
128
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -133,7 +133,7 @@ async def asyncio_detailed(
133
133
  """
134
134
 
135
135
  kwargs = _get_kwargs(
136
- auth_token=auth_token,
136
+ authorization=authorization,
137
137
  )
138
138
 
139
139
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -144,14 +144,14 @@ async def asyncio_detailed(
144
144
  async def asyncio(
145
145
  *,
146
146
  client: Union[AuthenticatedClient, Client],
147
- auth_token: Union[None, Unset, str] = UNSET,
147
+ authorization: Union[None, Unset, str] = UNSET,
148
148
  ) -> Optional[Union[HTTPValidationError, LogoutUserResponseLogoutuser]]:
149
149
  """User Logout
150
150
 
151
151
  Logout user and invalidate session.
152
152
 
153
153
  Args:
154
- auth_token (Union[None, Unset, str]):
154
+ authorization (Union[None, Unset, str]):
155
155
 
156
156
  Raises:
157
157
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -164,6 +164,6 @@ async def asyncio(
164
164
  return (
165
165
  await asyncio_detailed(
166
166
  client=client,
167
- auth_token=auth_token,
167
+ authorization=authorization,
168
168
  )
169
169
  ).parsed
@@ -13,18 +13,18 @@ from ...types import UNSET, Response, Unset
13
13
 
14
14
  def _get_kwargs(
15
15
  *,
16
- auth_token: Union[None, Unset, str] = UNSET,
16
+ authorization: Union[None, Unset, str] = UNSET,
17
17
  ) -> dict[str, Any]:
18
- cookies = {}
19
- if auth_token is not UNSET:
20
- cookies["auth-token"] = auth_token
18
+ headers: dict[str, Any] = {}
19
+ if not isinstance(authorization, Unset):
20
+ headers["authorization"] = authorization
21
21
 
22
22
  _kwargs: dict[str, Any] = {
23
23
  "method": "post",
24
24
  "url": "/v1/auth/refresh",
25
- "cookies": cookies,
26
25
  }
27
26
 
27
+ _kwargs["headers"] = headers
28
28
  return _kwargs
29
29
 
30
30
 
@@ -63,14 +63,14 @@ def _build_response(
63
63
  def sync_detailed(
64
64
  *,
65
65
  client: Union[AuthenticatedClient, Client],
66
- auth_token: Union[None, Unset, str] = UNSET,
66
+ authorization: Union[None, Unset, str] = UNSET,
67
67
  ) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
68
68
  """Refresh Session
69
69
 
70
- Refresh user session and extend authentication token.
70
+ Refresh authentication session with a new JWT token.
71
71
 
72
72
  Args:
73
- auth_token (Union[None, Unset, str]):
73
+ authorization (Union[None, Unset, str]):
74
74
 
75
75
  Raises:
76
76
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -81,7 +81,7 @@ def sync_detailed(
81
81
  """
82
82
 
83
83
  kwargs = _get_kwargs(
84
- auth_token=auth_token,
84
+ authorization=authorization,
85
85
  )
86
86
 
87
87
  response = client.get_httpx_client().request(
@@ -94,14 +94,14 @@ def sync_detailed(
94
94
  def sync(
95
95
  *,
96
96
  client: Union[AuthenticatedClient, Client],
97
- auth_token: Union[None, Unset, str] = UNSET,
97
+ authorization: Union[None, Unset, str] = UNSET,
98
98
  ) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
99
99
  """Refresh Session
100
100
 
101
- Refresh user session and extend authentication token.
101
+ Refresh authentication session with a new JWT token.
102
102
 
103
103
  Args:
104
- auth_token (Union[None, Unset, str]):
104
+ authorization (Union[None, Unset, str]):
105
105
 
106
106
  Raises:
107
107
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -113,21 +113,21 @@ def sync(
113
113
 
114
114
  return sync_detailed(
115
115
  client=client,
116
- auth_token=auth_token,
116
+ authorization=authorization,
117
117
  ).parsed
118
118
 
119
119
 
120
120
  async def asyncio_detailed(
121
121
  *,
122
122
  client: Union[AuthenticatedClient, Client],
123
- auth_token: Union[None, Unset, str] = UNSET,
123
+ authorization: Union[None, Unset, str] = UNSET,
124
124
  ) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
125
125
  """Refresh Session
126
126
 
127
- Refresh user session and extend authentication token.
127
+ Refresh authentication session with a new JWT token.
128
128
 
129
129
  Args:
130
- auth_token (Union[None, Unset, str]):
130
+ authorization (Union[None, Unset, str]):
131
131
 
132
132
  Raises:
133
133
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -138,7 +138,7 @@ async def asyncio_detailed(
138
138
  """
139
139
 
140
140
  kwargs = _get_kwargs(
141
- auth_token=auth_token,
141
+ authorization=authorization,
142
142
  )
143
143
 
144
144
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -149,14 +149,14 @@ async def asyncio_detailed(
149
149
  async def asyncio(
150
150
  *,
151
151
  client: Union[AuthenticatedClient, Client],
152
- auth_token: Union[None, Unset, str] = UNSET,
152
+ authorization: Union[None, Unset, str] = UNSET,
153
153
  ) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
154
154
  """Refresh Session
155
155
 
156
- Refresh user session and extend authentication token.
156
+ Refresh authentication session with a new JWT token.
157
157
 
158
158
  Args:
159
- auth_token (Union[None, Unset, str]):
159
+ authorization (Union[None, Unset, str]):
160
160
 
161
161
  Raises:
162
162
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -169,6 +169,6 @@ async def asyncio(
169
169
  return (
170
170
  await asyncio_detailed(
171
171
  client=client,
172
- auth_token=auth_token,
172
+ authorization=authorization,
173
173
  )
174
174
  ).parsed
@@ -0,0 +1,222 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.error_response import ErrorResponse
9
+ from ...models.http_validation_error import HTTPValidationError
10
+ from ...models.resend_verification_email_response_resendverificationemail import (
11
+ ResendVerificationEmailResponseResendverificationemail,
12
+ )
13
+ from ...types import UNSET, Response, Unset
14
+
15
+
16
+ def _get_kwargs(
17
+ *,
18
+ authorization: Union[None, Unset, str] = UNSET,
19
+ ) -> dict[str, Any]:
20
+ headers: dict[str, Any] = {}
21
+ if not isinstance(authorization, Unset):
22
+ headers["authorization"] = authorization
23
+
24
+ _kwargs: dict[str, Any] = {
25
+ "method": "post",
26
+ "url": "/v1/auth/email/resend",
27
+ }
28
+
29
+ _kwargs["headers"] = headers
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(
34
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
35
+ ) -> Optional[
36
+ Union[
37
+ ErrorResponse,
38
+ HTTPValidationError,
39
+ ResendVerificationEmailResponseResendverificationemail,
40
+ ]
41
+ ]:
42
+ if response.status_code == 200:
43
+ response_200 = ResendVerificationEmailResponseResendverificationemail.from_dict(
44
+ response.json()
45
+ )
46
+
47
+ return response_200
48
+ if response.status_code == 400:
49
+ response_400 = ErrorResponse.from_dict(response.json())
50
+
51
+ return response_400
52
+ if response.status_code == 429:
53
+ response_429 = ErrorResponse.from_dict(response.json())
54
+
55
+ return response_429
56
+ if response.status_code == 503:
57
+ response_503 = ErrorResponse.from_dict(response.json())
58
+
59
+ return response_503
60
+ if response.status_code == 422:
61
+ response_422 = HTTPValidationError.from_dict(response.json())
62
+
63
+ return response_422
64
+ if client.raise_on_unexpected_status:
65
+ raise errors.UnexpectedStatus(response.status_code, response.content)
66
+ else:
67
+ return None
68
+
69
+
70
+ def _build_response(
71
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
72
+ ) -> Response[
73
+ Union[
74
+ ErrorResponse,
75
+ HTTPValidationError,
76
+ ResendVerificationEmailResponseResendverificationemail,
77
+ ]
78
+ ]:
79
+ return Response(
80
+ status_code=HTTPStatus(response.status_code),
81
+ content=response.content,
82
+ headers=response.headers,
83
+ parsed=_parse_response(client=client, response=response),
84
+ )
85
+
86
+
87
+ def sync_detailed(
88
+ *,
89
+ client: Union[AuthenticatedClient, Client],
90
+ authorization: Union[None, Unset, str] = UNSET,
91
+ ) -> Response[
92
+ Union[
93
+ ErrorResponse,
94
+ HTTPValidationError,
95
+ ResendVerificationEmailResponseResendverificationemail,
96
+ ]
97
+ ]:
98
+ """Resend Email Verification
99
+
100
+ Resend verification email to the authenticated user. Rate limited to 3 per hour.
101
+
102
+ Args:
103
+ authorization (Union[None, Unset, str]):
104
+
105
+ Raises:
106
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
107
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
108
+
109
+ Returns:
110
+ Response[Union[ErrorResponse, HTTPValidationError, ResendVerificationEmailResponseResendverificationemail]]
111
+ """
112
+
113
+ kwargs = _get_kwargs(
114
+ authorization=authorization,
115
+ )
116
+
117
+ response = client.get_httpx_client().request(
118
+ **kwargs,
119
+ )
120
+
121
+ return _build_response(client=client, response=response)
122
+
123
+
124
+ def sync(
125
+ *,
126
+ client: Union[AuthenticatedClient, Client],
127
+ authorization: Union[None, Unset, str] = UNSET,
128
+ ) -> Optional[
129
+ Union[
130
+ ErrorResponse,
131
+ HTTPValidationError,
132
+ ResendVerificationEmailResponseResendverificationemail,
133
+ ]
134
+ ]:
135
+ """Resend Email Verification
136
+
137
+ Resend verification email to the authenticated user. Rate limited to 3 per hour.
138
+
139
+ Args:
140
+ authorization (Union[None, Unset, str]):
141
+
142
+ Raises:
143
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
144
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
145
+
146
+ Returns:
147
+ Union[ErrorResponse, HTTPValidationError, ResendVerificationEmailResponseResendverificationemail]
148
+ """
149
+
150
+ return sync_detailed(
151
+ client=client,
152
+ authorization=authorization,
153
+ ).parsed
154
+
155
+
156
+ async def asyncio_detailed(
157
+ *,
158
+ client: Union[AuthenticatedClient, Client],
159
+ authorization: Union[None, Unset, str] = UNSET,
160
+ ) -> Response[
161
+ Union[
162
+ ErrorResponse,
163
+ HTTPValidationError,
164
+ ResendVerificationEmailResponseResendverificationemail,
165
+ ]
166
+ ]:
167
+ """Resend Email Verification
168
+
169
+ Resend verification email to the authenticated user. Rate limited to 3 per hour.
170
+
171
+ Args:
172
+ authorization (Union[None, Unset, str]):
173
+
174
+ Raises:
175
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
176
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
177
+
178
+ Returns:
179
+ Response[Union[ErrorResponse, HTTPValidationError, ResendVerificationEmailResponseResendverificationemail]]
180
+ """
181
+
182
+ kwargs = _get_kwargs(
183
+ authorization=authorization,
184
+ )
185
+
186
+ response = await client.get_async_httpx_client().request(**kwargs)
187
+
188
+ return _build_response(client=client, response=response)
189
+
190
+
191
+ async def asyncio(
192
+ *,
193
+ client: Union[AuthenticatedClient, Client],
194
+ authorization: Union[None, Unset, str] = UNSET,
195
+ ) -> Optional[
196
+ Union[
197
+ ErrorResponse,
198
+ HTTPValidationError,
199
+ ResendVerificationEmailResponseResendverificationemail,
200
+ ]
201
+ ]:
202
+ """Resend Email Verification
203
+
204
+ Resend verification email to the authenticated user. Rate limited to 3 per hour.
205
+
206
+ Args:
207
+ authorization (Union[None, Unset, str]):
208
+
209
+ Raises:
210
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
211
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
212
+
213
+ Returns:
214
+ Union[ErrorResponse, HTTPValidationError, ResendVerificationEmailResponseResendverificationemail]
215
+ """
216
+
217
+ return (
218
+ await asyncio_detailed(
219
+ client=client,
220
+ authorization=authorization,
221
+ )
222
+ ).parsed