robosystems-client 0.1.15__py3-none-any.whl → 0.1.17__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.
- robosystems_client/api/agent/auto_select_agent.py +246 -0
- robosystems_client/api/agent/batch_process_queries.py +261 -0
- robosystems_client/api/agent/execute_specific_agent.py +258 -0
- robosystems_client/api/agent/get_agent_metadata.py +238 -0
- robosystems_client/api/agent/list_agents.py +246 -0
- robosystems_client/api/agent/recommend_agent.py +255 -0
- robosystems_client/api/auth/forgot_password.py +191 -0
- robosystems_client/api/auth/generate_sso_token.py +18 -0
- robosystems_client/api/auth/get_current_auth_user.py +4 -22
- robosystems_client/api/auth/logout_user.py +17 -17
- robosystems_client/api/auth/{refresh_session.py → refresh_auth_session.py} +21 -21
- robosystems_client/api/auth/resend_verification_email.py +222 -0
- robosystems_client/api/auth/reset_password.py +177 -0
- robosystems_client/api/auth/validate_reset_token.py +171 -0
- robosystems_client/api/auth/verify_email.py +177 -0
- robosystems_client/api/backup/create_backup.py +0 -18
- robosystems_client/api/backup/export_backup.py +0 -18
- robosystems_client/api/backup/get_backup_download_url.py +0 -18
- robosystems_client/api/backup/get_backup_stats.py +0 -18
- robosystems_client/api/backup/list_backups.py +0 -18
- robosystems_client/api/backup/restore_backup.py +0 -18
- robosystems_client/api/connections/create_connection.py +0 -18
- robosystems_client/api/connections/create_link_token.py +0 -18
- robosystems_client/api/connections/delete_connection.py +0 -18
- robosystems_client/api/connections/exchange_link_token.py +0 -18
- robosystems_client/api/connections/get_connection.py +0 -18
- robosystems_client/api/connections/get_connection_options.py +0 -18
- robosystems_client/api/connections/init_o_auth.py +0 -18
- robosystems_client/api/connections/list_connections.py +0 -18
- robosystems_client/api/connections/oauth_callback.py +4 -22
- robosystems_client/api/connections/sync_connection.py +0 -18
- robosystems_client/api/copy/copy_data_to_graph.py +0 -18
- robosystems_client/api/create/create_graph.py +0 -18
- robosystems_client/api/graph_analytics/get_graph_metrics.py +0 -18
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -18
- robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -18
- robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -18
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -18
- robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -18
- robosystems_client/api/graph_credits/check_credit_balance.py +14 -28
- robosystems_client/api/graph_credits/check_storage_limits.py +0 -18
- robosystems_client/api/graph_credits/get_credit_summary.py +0 -18
- robosystems_client/api/graph_credits/get_storage_usage.py +0 -18
- robosystems_client/api/graph_credits/list_credit_transactions.py +0 -18
- robosystems_client/api/graph_health/get_database_health.py +0 -18
- robosystems_client/api/graph_info/get_database_info.py +0 -18
- robosystems_client/api/graph_limits/get_graph_limits.py +0 -18
- robosystems_client/api/mcp/call_mcp_tool.py +0 -18
- robosystems_client/api/mcp/list_mcp_tools.py +0 -18
- robosystems_client/api/operations/cancel_operation.py +0 -18
- robosystems_client/api/operations/get_operation_status.py +0 -18
- robosystems_client/api/operations/stream_operation_events.py +0 -18
- robosystems_client/api/query/execute_cypher_query.py +0 -18
- robosystems_client/api/schema/export_graph_schema.py +0 -18
- robosystems_client/api/schema/get_graph_schema_info.py +0 -18
- robosystems_client/api/schema/list_schema_extensions.py +0 -18
- robosystems_client/api/schema/validate_schema.py +0 -18
- robosystems_client/api/subgraphs/create_subgraph.py +0 -18
- robosystems_client/api/subgraphs/delete_subgraph.py +0 -18
- robosystems_client/api/subgraphs/get_subgraph_info.py +0 -18
- robosystems_client/api/subgraphs/get_subgraph_quota.py +0 -18
- robosystems_client/api/subgraphs/list_subgraphs.py +0 -18
- robosystems_client/api/user/create_user_api_key.py +0 -18
- robosystems_client/api/user/get_all_credit_summaries.py +0 -18
- robosystems_client/api/user/get_current_user.py +0 -18
- robosystems_client/api/user/get_user_graphs.py +0 -18
- robosystems_client/api/user/list_user_api_keys.py +0 -18
- robosystems_client/api/user/revoke_user_api_key.py +0 -18
- robosystems_client/api/user/select_user_graph.py +0 -18
- robosystems_client/api/user/update_user.py +0 -18
- robosystems_client/api/user/update_user_api_key.py +0 -18
- robosystems_client/api/user/update_user_password.py +0 -18
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -18
- robosystems_client/api/user_analytics/get_user_usage_overview.py +0 -18
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +0 -18
- robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -18
- robosystems_client/api/user_limits/get_user_limits.py +0 -18
- robosystems_client/api/user_limits/get_user_usage.py +0 -18
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +0 -18
- robosystems_client/api/user_subscriptions/get_repository_credits.py +0 -18
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +0 -18
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -18
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +0 -18
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +0 -18
- robosystems_client/models/__init__.py +51 -3
- robosystems_client/models/agent_list_response.py +74 -0
- robosystems_client/models/agent_list_response_agents.py +67 -0
- robosystems_client/models/{credits_summary_response_credits_by_addon_item.py → agent_list_response_agents_additional_property.py} +5 -5
- robosystems_client/models/agent_message.py +35 -1
- robosystems_client/models/agent_metadata_response.py +133 -0
- robosystems_client/models/agent_mode.py +11 -0
- robosystems_client/models/agent_recommendation.py +106 -0
- robosystems_client/models/agent_recommendation_request.py +108 -0
- robosystems_client/models/agent_recommendation_request_context_type_0.py +44 -0
- robosystems_client/models/agent_recommendation_response.py +82 -0
- robosystems_client/models/agent_request.py +110 -6
- robosystems_client/models/agent_response.py +161 -11
- robosystems_client/models/agent_response_error_details_type_0.py +44 -0
- robosystems_client/models/agent_response_tokens_used_type_0.py +44 -0
- robosystems_client/models/auth_response.py +20 -6
- robosystems_client/models/batch_agent_request.py +85 -0
- robosystems_client/models/batch_agent_response.py +90 -0
- robosystems_client/models/credit_summary.py +35 -9
- robosystems_client/models/credits_summary_response.py +47 -21
- robosystems_client/models/credits_summary_response_credits_by_addon_type_0_item.py +44 -0
- robosystems_client/models/custom_schema_definition.py +7 -14
- robosystems_client/models/custom_schema_definition_metadata.py +1 -6
- robosystems_client/models/database_health_response.py +11 -11
- robosystems_client/models/database_info_response.py +13 -14
- robosystems_client/models/email_verification_request.py +60 -0
- robosystems_client/models/error_response.py +4 -8
- robosystems_client/models/forgot_password_request.py +60 -0
- robosystems_client/models/forgot_password_response_forgotpassword.py +44 -0
- robosystems_client/models/graph_metadata.py +4 -5
- robosystems_client/models/health_status.py +2 -2
- robosystems_client/models/repository_credits_response.py +43 -16
- robosystems_client/models/resend_verification_email_response_resendverificationemail.py +44 -0
- robosystems_client/models/reset_password_request.py +68 -0
- robosystems_client/models/reset_password_validate_response.py +82 -0
- robosystems_client/models/schema_export_response.py +5 -8
- robosystems_client/models/schema_validation_request.py +3 -5
- robosystems_client/models/schema_validation_response.py +5 -5
- robosystems_client/models/selection_criteria.py +122 -0
- robosystems_client/models/success_response.py +1 -1
- robosystems_client-0.1.17.dist-info/METADATA +89 -0
- {robosystems_client-0.1.15.dist-info → robosystems_client-0.1.17.dist-info}/RECORD +128 -97
- robosystems_client-0.1.17.dist-info/licenses/LICENSE +21 -0
- robosystems_client/api/agent/query_financial_agent.py +0 -423
- robosystems_client-0.1.15.dist-info/METADATA +0 -302
- {robosystems_client-0.1.15.dist-info → robosystems_client-0.1.17.dist-info}/WHEEL +0 -0
|
@@ -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
|
|
@@ -0,0 +1,177 @@
|
|
|
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.auth_response import AuthResponse
|
|
9
|
+
from ...models.error_response import ErrorResponse
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.reset_password_request import ResetPasswordRequest
|
|
12
|
+
from ...types import Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
*,
|
|
17
|
+
body: ResetPasswordRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": "/v1/auth/password/reset",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_kwargs["json"] = body.to_dict()
|
|
27
|
+
|
|
28
|
+
headers["Content-Type"] = "application/json"
|
|
29
|
+
|
|
30
|
+
_kwargs["headers"] = headers
|
|
31
|
+
return _kwargs
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _parse_response(
|
|
35
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
+
) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
|
|
37
|
+
if response.status_code == 200:
|
|
38
|
+
response_200 = AuthResponse.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_200
|
|
41
|
+
if response.status_code == 400:
|
|
42
|
+
response_400 = ErrorResponse.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_400
|
|
45
|
+
if response.status_code == 422:
|
|
46
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_422
|
|
49
|
+
if client.raise_on_unexpected_status:
|
|
50
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
51
|
+
else:
|
|
52
|
+
return None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _build_response(
|
|
56
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
57
|
+
) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
|
|
58
|
+
return Response(
|
|
59
|
+
status_code=HTTPStatus(response.status_code),
|
|
60
|
+
content=response.content,
|
|
61
|
+
headers=response.headers,
|
|
62
|
+
parsed=_parse_response(client=client, response=response),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def sync_detailed(
|
|
67
|
+
*,
|
|
68
|
+
client: Union[AuthenticatedClient, Client],
|
|
69
|
+
body: ResetPasswordRequest,
|
|
70
|
+
) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
|
|
71
|
+
"""Reset Password
|
|
72
|
+
|
|
73
|
+
Reset password with token from email. Returns JWT for auto-login.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
body (ResetPasswordRequest): Reset password request model.
|
|
77
|
+
|
|
78
|
+
Raises:
|
|
79
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
80
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
kwargs = _get_kwargs(
|
|
87
|
+
body=body,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
response = client.get_httpx_client().request(
|
|
91
|
+
**kwargs,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
return _build_response(client=client, response=response)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def sync(
|
|
98
|
+
*,
|
|
99
|
+
client: Union[AuthenticatedClient, Client],
|
|
100
|
+
body: ResetPasswordRequest,
|
|
101
|
+
) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
|
|
102
|
+
"""Reset Password
|
|
103
|
+
|
|
104
|
+
Reset password with token from email. Returns JWT for auto-login.
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
body (ResetPasswordRequest): Reset password request model.
|
|
108
|
+
|
|
109
|
+
Raises:
|
|
110
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
111
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
112
|
+
|
|
113
|
+
Returns:
|
|
114
|
+
Union[AuthResponse, ErrorResponse, HTTPValidationError]
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
return sync_detailed(
|
|
118
|
+
client=client,
|
|
119
|
+
body=body,
|
|
120
|
+
).parsed
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
async def asyncio_detailed(
|
|
124
|
+
*,
|
|
125
|
+
client: Union[AuthenticatedClient, Client],
|
|
126
|
+
body: ResetPasswordRequest,
|
|
127
|
+
) -> Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
|
|
128
|
+
"""Reset Password
|
|
129
|
+
|
|
130
|
+
Reset password with token from email. Returns JWT for auto-login.
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
body (ResetPasswordRequest): Reset password request model.
|
|
134
|
+
|
|
135
|
+
Raises:
|
|
136
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
137
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
138
|
+
|
|
139
|
+
Returns:
|
|
140
|
+
Response[Union[AuthResponse, ErrorResponse, HTTPValidationError]]
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
kwargs = _get_kwargs(
|
|
144
|
+
body=body,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
148
|
+
|
|
149
|
+
return _build_response(client=client, response=response)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
async def asyncio(
|
|
153
|
+
*,
|
|
154
|
+
client: Union[AuthenticatedClient, Client],
|
|
155
|
+
body: ResetPasswordRequest,
|
|
156
|
+
) -> Optional[Union[AuthResponse, ErrorResponse, HTTPValidationError]]:
|
|
157
|
+
"""Reset Password
|
|
158
|
+
|
|
159
|
+
Reset password with token from email. Returns JWT for auto-login.
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
body (ResetPasswordRequest): Reset password request model.
|
|
163
|
+
|
|
164
|
+
Raises:
|
|
165
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
166
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
167
|
+
|
|
168
|
+
Returns:
|
|
169
|
+
Union[AuthResponse, ErrorResponse, HTTPValidationError]
|
|
170
|
+
"""
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
await asyncio_detailed(
|
|
174
|
+
client=client,
|
|
175
|
+
body=body,
|
|
176
|
+
)
|
|
177
|
+
).parsed
|
|
@@ -0,0 +1,171 @@
|
|
|
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.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.reset_password_validate_response import ResetPasswordValidateResponse
|
|
10
|
+
from ...types import UNSET, Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
token: str,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
params: dict[str, Any] = {}
|
|
18
|
+
|
|
19
|
+
params["token"] = token
|
|
20
|
+
|
|
21
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
22
|
+
|
|
23
|
+
_kwargs: dict[str, Any] = {
|
|
24
|
+
"method": "get",
|
|
25
|
+
"url": "/v1/auth/password/reset/validate",
|
|
26
|
+
"params": params,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return _kwargs
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _parse_response(
|
|
33
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
34
|
+
) -> Optional[Union[HTTPValidationError, ResetPasswordValidateResponse]]:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = ResetPasswordValidateResponse.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_200
|
|
39
|
+
if response.status_code == 422:
|
|
40
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_422
|
|
43
|
+
if client.raise_on_unexpected_status:
|
|
44
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
45
|
+
else:
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _build_response(
|
|
50
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
51
|
+
) -> Response[Union[HTTPValidationError, ResetPasswordValidateResponse]]:
|
|
52
|
+
return Response(
|
|
53
|
+
status_code=HTTPStatus(response.status_code),
|
|
54
|
+
content=response.content,
|
|
55
|
+
headers=response.headers,
|
|
56
|
+
parsed=_parse_response(client=client, response=response),
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def sync_detailed(
|
|
61
|
+
*,
|
|
62
|
+
client: Union[AuthenticatedClient, Client],
|
|
63
|
+
token: str,
|
|
64
|
+
) -> Response[Union[HTTPValidationError, ResetPasswordValidateResponse]]:
|
|
65
|
+
"""Validate Reset Token
|
|
66
|
+
|
|
67
|
+
Check if a password reset token is valid without consuming it.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
token (str): Password reset token
|
|
71
|
+
|
|
72
|
+
Raises:
|
|
73
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
74
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
75
|
+
|
|
76
|
+
Returns:
|
|
77
|
+
Response[Union[HTTPValidationError, ResetPasswordValidateResponse]]
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
kwargs = _get_kwargs(
|
|
81
|
+
token=token,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
response = client.get_httpx_client().request(
|
|
85
|
+
**kwargs,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
return _build_response(client=client, response=response)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def sync(
|
|
92
|
+
*,
|
|
93
|
+
client: Union[AuthenticatedClient, Client],
|
|
94
|
+
token: str,
|
|
95
|
+
) -> Optional[Union[HTTPValidationError, ResetPasswordValidateResponse]]:
|
|
96
|
+
"""Validate Reset Token
|
|
97
|
+
|
|
98
|
+
Check if a password reset token is valid without consuming it.
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
token (str): Password reset token
|
|
102
|
+
|
|
103
|
+
Raises:
|
|
104
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
105
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
106
|
+
|
|
107
|
+
Returns:
|
|
108
|
+
Union[HTTPValidationError, ResetPasswordValidateResponse]
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
return sync_detailed(
|
|
112
|
+
client=client,
|
|
113
|
+
token=token,
|
|
114
|
+
).parsed
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
async def asyncio_detailed(
|
|
118
|
+
*,
|
|
119
|
+
client: Union[AuthenticatedClient, Client],
|
|
120
|
+
token: str,
|
|
121
|
+
) -> Response[Union[HTTPValidationError, ResetPasswordValidateResponse]]:
|
|
122
|
+
"""Validate Reset Token
|
|
123
|
+
|
|
124
|
+
Check if a password reset token is valid without consuming it.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
token (str): Password reset token
|
|
128
|
+
|
|
129
|
+
Raises:
|
|
130
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
131
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
Response[Union[HTTPValidationError, ResetPasswordValidateResponse]]
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
kwargs = _get_kwargs(
|
|
138
|
+
token=token,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
142
|
+
|
|
143
|
+
return _build_response(client=client, response=response)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
async def asyncio(
|
|
147
|
+
*,
|
|
148
|
+
client: Union[AuthenticatedClient, Client],
|
|
149
|
+
token: str,
|
|
150
|
+
) -> Optional[Union[HTTPValidationError, ResetPasswordValidateResponse]]:
|
|
151
|
+
"""Validate Reset Token
|
|
152
|
+
|
|
153
|
+
Check if a password reset token is valid without consuming it.
|
|
154
|
+
|
|
155
|
+
Args:
|
|
156
|
+
token (str): Password reset token
|
|
157
|
+
|
|
158
|
+
Raises:
|
|
159
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
160
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
161
|
+
|
|
162
|
+
Returns:
|
|
163
|
+
Union[HTTPValidationError, ResetPasswordValidateResponse]
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
return (
|
|
167
|
+
await asyncio_detailed(
|
|
168
|
+
client=client,
|
|
169
|
+
token=token,
|
|
170
|
+
)
|
|
171
|
+
).parsed
|