robosystems-client 0.1.9__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/__init__.py +14 -0
- robosystems_client/api/__init__.py +1 -0
- robosystems_client/api/agent/__init__.py +1 -0
- robosystems_client/api/agent/query_financial_agent.py +423 -0
- robosystems_client/api/auth/__init__.py +1 -0
- robosystems_client/api/auth/check_password_strength.py +172 -0
- robosystems_client/api/auth/complete_sso_auth.py +177 -0
- robosystems_client/api/auth/generate_sso_token.py +174 -0
- robosystems_client/api/auth/get_captcha_config.py +87 -0
- robosystems_client/api/auth/get_current_auth_user.py +220 -0
- robosystems_client/api/auth/get_password_policy.py +134 -0
- robosystems_client/api/auth/login_user.py +181 -0
- robosystems_client/api/auth/logout_user.py +169 -0
- robosystems_client/api/auth/refresh_session.py +174 -0
- robosystems_client/api/auth/register_user.py +189 -0
- robosystems_client/api/auth/sso_login.py +177 -0
- robosystems_client/api/auth/sso_token_exchange.py +181 -0
- robosystems_client/api/backup/__init__.py +1 -0
- robosystems_client/api/backup/create_backup.py +401 -0
- robosystems_client/api/backup/export_backup.py +225 -0
- robosystems_client/api/backup/get_backup_download_url.py +258 -0
- robosystems_client/api/backup/get_backup_stats.py +182 -0
- robosystems_client/api/backup/kuzu_backup_health.py +202 -0
- robosystems_client/api/backup/list_backups.py +217 -0
- robosystems_client/api/backup/restore_backup.py +401 -0
- robosystems_client/api/billing/__init__.py +1 -0
- robosystems_client/api/billing/get_available_subscription_plans_v1_graph_id_billing_available_plans_get.py +198 -0
- robosystems_client/api/billing/get_credit_billing_info_v1_graph_id_billing_credits_get.py +210 -0
- robosystems_client/api/billing/get_current_graph_bill.py +285 -0
- robosystems_client/api/billing/get_graph_billing_history.py +329 -0
- robosystems_client/api/billing/get_graph_monthly_bill.py +315 -0
- robosystems_client/api/billing/get_graph_pricing_info_v1_graph_id_billing_pricing_get.py +198 -0
- robosystems_client/api/billing/get_graph_subscription_v1_graph_id_billing_subscription_get.py +198 -0
- robosystems_client/api/billing/get_graph_usage_details.py +350 -0
- robosystems_client/api/billing/upgrade_graph_subscription_v1_graph_id_billing_subscription_upgrade_post.py +216 -0
- robosystems_client/api/connections/__init__.py +1 -0
- robosystems_client/api/connections/create_connection.py +327 -0
- robosystems_client/api/connections/create_link_token.py +281 -0
- robosystems_client/api/connections/delete_connection.py +278 -0
- robosystems_client/api/connections/exchange_link_token.py +301 -0
- robosystems_client/api/connections/get_connection.py +262 -0
- robosystems_client/api/connections/get_connection_options.py +285 -0
- robosystems_client/api/connections/init_o_auth.py +230 -0
- robosystems_client/api/connections/list_connections.py +314 -0
- robosystems_client/api/connections/oauth_callback.py +318 -0
- robosystems_client/api/connections/sync_connection.py +362 -0
- robosystems_client/api/create/__init__.py +1 -0
- robosystems_client/api/create/create_graph.py +375 -0
- robosystems_client/api/create/get_available_extensions.py +134 -0
- robosystems_client/api/credits_/__init__.py +1 -0
- robosystems_client/api/credits_/check_credit_balance.py +299 -0
- robosystems_client/api/credits_/check_storage_limits.py +249 -0
- robosystems_client/api/credits_/get_credit_summary.py +245 -0
- robosystems_client/api/credits_/get_storage_usage.py +279 -0
- robosystems_client/api/credits_/list_credit_transactions.py +392 -0
- robosystems_client/api/graph_analytics/__init__.py +1 -0
- robosystems_client/api/graph_analytics/get_graph_metrics.py +285 -0
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +329 -0
- robosystems_client/api/graph_status/__init__.py +1 -0
- robosystems_client/api/graph_status/get_database_health.py +273 -0
- robosystems_client/api/graph_status/get_database_info.py +277 -0
- robosystems_client/api/mcp/__init__.py +1 -0
- robosystems_client/api/mcp/call_mcp_tool.py +432 -0
- robosystems_client/api/mcp/list_mcp_tools.py +265 -0
- robosystems_client/api/operations/__init__.py +1 -0
- robosystems_client/api/operations/cancel_operation.py +246 -0
- robosystems_client/api/operations/get_operation_status.py +273 -0
- robosystems_client/api/operations/stream_operation_events.py +415 -0
- robosystems_client/api/query/__init__.py +1 -0
- robosystems_client/api/query/execute_cypher_query.py +482 -0
- robosystems_client/api/schema/__init__.py +1 -0
- robosystems_client/api/schema/export_graph_schema.py +239 -0
- robosystems_client/api/schema/get_graph_schema_info.py +277 -0
- robosystems_client/api/schema/list_schema_extensions.py +216 -0
- robosystems_client/api/schema/validate_schema.py +326 -0
- robosystems_client/api/service_offerings/__init__.py +1 -0
- robosystems_client/api/service_offerings/get_service_offerings.py +197 -0
- robosystems_client/api/status/__init__.py +1 -0
- robosystems_client/api/status/get_mcp_health.py +136 -0
- robosystems_client/api/status/get_service_status.py +134 -0
- robosystems_client/api/user/__init__.py +1 -0
- robosystems_client/api/user/create_user_api_key.py +205 -0
- robosystems_client/api/user/get_all_credit_summaries.py +256 -0
- robosystems_client/api/user/get_current_user.py +187 -0
- robosystems_client/api/user/get_user_graphs.py +187 -0
- robosystems_client/api/user/list_user_api_keys.py +187 -0
- robosystems_client/api/user/revoke_user_api_key.py +209 -0
- robosystems_client/api/user/select_user_graph.py +213 -0
- robosystems_client/api/user/update_user.py +205 -0
- robosystems_client/api/user/update_user_api_key.py +218 -0
- robosystems_client/api/user/update_user_password.py +218 -0
- robosystems_client/api/user_analytics/__init__.py +1 -0
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +222 -0
- robosystems_client/api/user_analytics/get_user_usage_overview.py +187 -0
- robosystems_client/api/user_limits/__init__.py +1 -0
- robosystems_client/api/user_limits/get_user_limits.py +190 -0
- robosystems_client/api/user_limits/get_user_usage.py +187 -0
- robosystems_client/api/user_subscriptions/__init__.py +1 -0
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +209 -0
- robosystems_client/api/user_subscriptions/get_repository_credits.py +206 -0
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +193 -0
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +213 -0
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +214 -0
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +228 -0
- robosystems_client/client.py +278 -0
- robosystems_client/errors.py +16 -0
- robosystems_client/extensions/README.md +611 -0
- robosystems_client/extensions/__init__.py +108 -0
- robosystems_client/extensions/auth_integration.py +210 -0
- robosystems_client/extensions/extensions.py +170 -0
- robosystems_client/extensions/operation_client.py +368 -0
- robosystems_client/extensions/query_client.py +375 -0
- robosystems_client/extensions/sse_client.py +520 -0
- robosystems_client/extensions/tests/__init__.py +1 -0
- robosystems_client/extensions/tests/test_integration.py +490 -0
- robosystems_client/extensions/tests/test_unit.py +560 -0
- robosystems_client/extensions/utils.py +526 -0
- robosystems_client/models/__init__.py +379 -0
- robosystems_client/models/account_info.py +79 -0
- robosystems_client/models/add_on_credit_info.py +119 -0
- robosystems_client/models/agent_message.py +68 -0
- robosystems_client/models/agent_request.py +132 -0
- robosystems_client/models/agent_request_context_type_0.py +44 -0
- robosystems_client/models/agent_response.py +132 -0
- robosystems_client/models/agent_response_metadata_type_0.py +44 -0
- robosystems_client/models/api_key_info.py +134 -0
- robosystems_client/models/api_keys_response.py +74 -0
- robosystems_client/models/auth_response.py +82 -0
- robosystems_client/models/auth_response_user.py +44 -0
- robosystems_client/models/available_extension.py +78 -0
- robosystems_client/models/available_extensions_response.py +73 -0
- robosystems_client/models/backup_create_request.py +117 -0
- robosystems_client/models/backup_export_request.py +72 -0
- robosystems_client/models/backup_list_response.py +90 -0
- robosystems_client/models/backup_response.py +200 -0
- robosystems_client/models/backup_restore_request.py +81 -0
- robosystems_client/models/backup_stats_response.py +156 -0
- robosystems_client/models/backup_stats_response_backup_formats.py +44 -0
- robosystems_client/models/cancel_operation_response_canceloperation.py +44 -0
- robosystems_client/models/cancellation_response.py +76 -0
- robosystems_client/models/check_credit_balance_response_checkcreditbalance.py +44 -0
- robosystems_client/models/connection_options_response.py +82 -0
- robosystems_client/models/connection_provider_info.py +203 -0
- robosystems_client/models/connection_provider_info_auth_type.py +11 -0
- robosystems_client/models/connection_provider_info_provider.py +10 -0
- robosystems_client/models/connection_response.py +149 -0
- robosystems_client/models/connection_response_metadata.py +44 -0
- robosystems_client/models/connection_response_provider.py +10 -0
- robosystems_client/models/create_api_key_request.py +82 -0
- robosystems_client/models/create_api_key_response.py +74 -0
- robosystems_client/models/create_connection_request.py +179 -0
- robosystems_client/models/create_connection_request_provider.py +10 -0
- robosystems_client/models/create_graph_request.py +183 -0
- robosystems_client/models/credit_check_request.py +82 -0
- robosystems_client/models/credit_summary.py +128 -0
- robosystems_client/models/credit_summary_response.py +140 -0
- robosystems_client/models/credits_summary_response.py +122 -0
- robosystems_client/models/credits_summary_response_credits_by_addon_item.py +44 -0
- robosystems_client/models/custom_schema_definition.py +194 -0
- robosystems_client/models/custom_schema_definition_metadata.py +49 -0
- robosystems_client/models/custom_schema_definition_nodes_item.py +44 -0
- robosystems_client/models/custom_schema_definition_relationships_item.py +44 -0
- robosystems_client/models/cypher_query_request.py +128 -0
- robosystems_client/models/cypher_query_request_parameters_type_0.py +44 -0
- robosystems_client/models/database_health_response.py +181 -0
- robosystems_client/models/database_info_response.py +191 -0
- robosystems_client/models/detailed_transactions_response.py +124 -0
- robosystems_client/models/detailed_transactions_response_date_range.py +44 -0
- robosystems_client/models/detailed_transactions_response_summary.py +59 -0
- robosystems_client/models/enhanced_credit_transaction_response.py +192 -0
- robosystems_client/models/enhanced_credit_transaction_response_metadata.py +44 -0
- robosystems_client/models/error_response.py +145 -0
- robosystems_client/models/exchange_token_request.py +116 -0
- robosystems_client/models/exchange_token_request_metadata_type_0.py +44 -0
- robosystems_client/models/get_all_credit_summaries_response_getallcreditsummaries.py +44 -0
- robosystems_client/models/get_backup_download_url_response_getbackupdownloadurl.py +44 -0
- robosystems_client/models/get_current_auth_user_response_getcurrentauthuser.py +44 -0
- robosystems_client/models/get_current_graph_bill_response_getcurrentgraphbill.py +44 -0
- robosystems_client/models/get_graph_billing_history_response_getgraphbillinghistory.py +44 -0
- robosystems_client/models/get_graph_monthly_bill_response_getgraphmonthlybill.py +44 -0
- robosystems_client/models/get_graph_schema_info_response_getgraphschemainfo.py +44 -0
- robosystems_client/models/get_graph_usage_details_response_getgraphusagedetails.py +44 -0
- robosystems_client/models/get_mcp_health_response_getmcphealth.py +44 -0
- robosystems_client/models/get_operation_status_response_getoperationstatus.py +44 -0
- robosystems_client/models/get_storage_usage_response_getstorageusage.py +44 -0
- robosystems_client/models/graph_info.py +92 -0
- robosystems_client/models/graph_metadata.py +105 -0
- robosystems_client/models/graph_metrics_response.py +188 -0
- robosystems_client/models/graph_metrics_response_estimated_size.py +44 -0
- robosystems_client/models/graph_metrics_response_health_status.py +44 -0
- robosystems_client/models/graph_metrics_response_node_counts.py +44 -0
- robosystems_client/models/graph_metrics_response_relationship_counts.py +44 -0
- robosystems_client/models/graph_usage_response.py +116 -0
- robosystems_client/models/graph_usage_response_query_statistics.py +44 -0
- robosystems_client/models/graph_usage_response_recent_activity.py +44 -0
- robosystems_client/models/graph_usage_response_storage_usage.py +44 -0
- robosystems_client/models/health_status.py +110 -0
- robosystems_client/models/health_status_details_type_0.py +44 -0
- robosystems_client/models/http_validation_error.py +75 -0
- robosystems_client/models/initial_entity_data.py +212 -0
- robosystems_client/models/kuzu_backup_health_response_kuzubackuphealth.py +44 -0
- robosystems_client/models/link_token_request.py +174 -0
- robosystems_client/models/link_token_request_options_type_0.py +44 -0
- robosystems_client/models/link_token_request_provider_type_0.py +10 -0
- robosystems_client/models/list_connections_provider_type_0.py +10 -0
- robosystems_client/models/list_schema_extensions_response_listschemaextensions.py +44 -0
- robosystems_client/models/login_request.py +68 -0
- robosystems_client/models/logout_user_response_logoutuser.py +44 -0
- robosystems_client/models/mcp_tool_call.py +84 -0
- robosystems_client/models/mcp_tool_call_arguments.py +44 -0
- robosystems_client/models/mcp_tools_response.py +74 -0
- robosystems_client/models/mcp_tools_response_tools_item.py +44 -0
- robosystems_client/models/o_auth_callback_request.py +130 -0
- robosystems_client/models/o_auth_init_request.py +128 -0
- robosystems_client/models/o_auth_init_request_additional_params_type_0.py +44 -0
- robosystems_client/models/o_auth_init_response.py +78 -0
- robosystems_client/models/password_check_request.py +82 -0
- robosystems_client/models/password_check_response.py +112 -0
- robosystems_client/models/password_check_response_character_types.py +44 -0
- robosystems_client/models/password_policy_response.py +66 -0
- robosystems_client/models/password_policy_response_policy.py +44 -0
- robosystems_client/models/plaid_connection_config.py +209 -0
- robosystems_client/models/plaid_connection_config_accounts_type_0_item.py +44 -0
- robosystems_client/models/plaid_connection_config_institution_type_0.py +44 -0
- robosystems_client/models/quick_books_connection_config.py +92 -0
- robosystems_client/models/register_request.py +98 -0
- robosystems_client/models/repository_credits_response.py +101 -0
- robosystems_client/models/repository_plan.py +10 -0
- robosystems_client/models/repository_type.py +10 -0
- robosystems_client/models/response_mode.py +11 -0
- robosystems_client/models/schema_export_response.py +163 -0
- robosystems_client/models/schema_export_response_data_stats_type_0.py +44 -0
- robosystems_client/models/schema_export_response_schema_definition_type_0.py +44 -0
- robosystems_client/models/schema_validation_request.py +142 -0
- robosystems_client/models/schema_validation_request_schema_definition_type_0.py +44 -0
- robosystems_client/models/schema_validation_response.py +227 -0
- robosystems_client/models/schema_validation_response_compatibility_type_0.py +44 -0
- robosystems_client/models/schema_validation_response_stats_type_0.py +44 -0
- robosystems_client/models/sec_connection_config.py +82 -0
- robosystems_client/models/sso_complete_request.py +60 -0
- robosystems_client/models/sso_exchange_request.py +90 -0
- robosystems_client/models/sso_exchange_response.py +78 -0
- robosystems_client/models/sso_login_request.py +60 -0
- robosystems_client/models/sso_token_response.py +78 -0
- robosystems_client/models/storage_limit_response.py +149 -0
- robosystems_client/models/subscription_info.py +180 -0
- robosystems_client/models/subscription_info_metadata.py +44 -0
- robosystems_client/models/subscription_request.py +89 -0
- robosystems_client/models/subscription_response.py +82 -0
- robosystems_client/models/success_response.py +112 -0
- robosystems_client/models/success_response_data_type_0.py +44 -0
- robosystems_client/models/sync_connection_request.py +106 -0
- robosystems_client/models/sync_connection_request_sync_options_type_0.py +44 -0
- robosystems_client/models/sync_connection_response_syncconnection.py +44 -0
- robosystems_client/models/tier_upgrade_request.py +62 -0
- robosystems_client/models/transaction_summary_response.py +126 -0
- robosystems_client/models/update_api_key_request.py +92 -0
- robosystems_client/models/update_password_request.py +76 -0
- robosystems_client/models/update_user_request.py +92 -0
- robosystems_client/models/upgrade_subscription_request.py +82 -0
- robosystems_client/models/user_analytics_response.py +132 -0
- robosystems_client/models/user_analytics_response_api_usage.py +44 -0
- robosystems_client/models/user_analytics_response_graph_usage.py +44 -0
- robosystems_client/models/user_analytics_response_limits.py +44 -0
- robosystems_client/models/user_analytics_response_recent_activity_item.py +44 -0
- robosystems_client/models/user_analytics_response_user_info.py +44 -0
- robosystems_client/models/user_graph_summary.py +134 -0
- robosystems_client/models/user_graphs_response.py +96 -0
- robosystems_client/models/user_limits_response.py +95 -0
- robosystems_client/models/user_response.py +132 -0
- robosystems_client/models/user_subscriptions_response.py +90 -0
- robosystems_client/models/user_usage_response.py +90 -0
- robosystems_client/models/user_usage_response_graphs.py +44 -0
- robosystems_client/models/user_usage_summary_response.py +130 -0
- robosystems_client/models/user_usage_summary_response_usage_vs_limits.py +44 -0
- robosystems_client/models/validation_error.py +88 -0
- robosystems_client/py.typed +1 -0
- robosystems_client/sdk-config.yaml +5 -0
- robosystems_client/types.py +54 -0
- robosystems_client-0.1.9.dist-info/METADATA +302 -0
- robosystems_client-0.1.9.dist-info/RECORD +282 -0
- robosystems_client-0.1.9.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,230 @@
|
|
|
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.o_auth_init_request import OAuthInitRequest
|
|
10
|
+
from ...models.o_auth_init_response import OAuthInitResponse
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
graph_id: str,
|
|
16
|
+
*,
|
|
17
|
+
body: OAuthInitRequest,
|
|
18
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
19
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
headers: dict[str, Any] = {}
|
|
22
|
+
if not isinstance(authorization, Unset):
|
|
23
|
+
headers["authorization"] = authorization
|
|
24
|
+
|
|
25
|
+
cookies = {}
|
|
26
|
+
if auth_token is not UNSET:
|
|
27
|
+
cookies["auth-token"] = auth_token
|
|
28
|
+
|
|
29
|
+
_kwargs: dict[str, Any] = {
|
|
30
|
+
"method": "post",
|
|
31
|
+
"url": f"/v1/{graph_id}/connections/oauth/init",
|
|
32
|
+
"cookies": cookies,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_kwargs["json"] = body.to_dict()
|
|
36
|
+
|
|
37
|
+
headers["Content-Type"] = "application/json"
|
|
38
|
+
|
|
39
|
+
_kwargs["headers"] = headers
|
|
40
|
+
return _kwargs
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _parse_response(
|
|
44
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
45
|
+
) -> Optional[Union[HTTPValidationError, OAuthInitResponse]]:
|
|
46
|
+
if response.status_code == 200:
|
|
47
|
+
response_200 = OAuthInitResponse.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_200
|
|
50
|
+
if response.status_code == 422:
|
|
51
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
52
|
+
|
|
53
|
+
return response_422
|
|
54
|
+
if client.raise_on_unexpected_status:
|
|
55
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
56
|
+
else:
|
|
57
|
+
return None
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _build_response(
|
|
61
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
62
|
+
) -> Response[Union[HTTPValidationError, OAuthInitResponse]]:
|
|
63
|
+
return Response(
|
|
64
|
+
status_code=HTTPStatus(response.status_code),
|
|
65
|
+
content=response.content,
|
|
66
|
+
headers=response.headers,
|
|
67
|
+
parsed=_parse_response(client=client, response=response),
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def sync_detailed(
|
|
72
|
+
graph_id: str,
|
|
73
|
+
*,
|
|
74
|
+
client: AuthenticatedClient,
|
|
75
|
+
body: OAuthInitRequest,
|
|
76
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
77
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
78
|
+
) -> Response[Union[HTTPValidationError, OAuthInitResponse]]:
|
|
79
|
+
"""Init Oauth
|
|
80
|
+
|
|
81
|
+
Initialize OAuth flow for a connection.
|
|
82
|
+
|
|
83
|
+
This generates an authorization URL that the frontend should redirect the user to.
|
|
84
|
+
Currently supports: QuickBooks
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
graph_id (str): Graph database identifier
|
|
88
|
+
authorization (Union[None, Unset, str]):
|
|
89
|
+
auth_token (Union[None, Unset, str]):
|
|
90
|
+
body (OAuthInitRequest): Request to initiate OAuth flow.
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
94
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
Response[Union[HTTPValidationError, OAuthInitResponse]]
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
kwargs = _get_kwargs(
|
|
101
|
+
graph_id=graph_id,
|
|
102
|
+
body=body,
|
|
103
|
+
authorization=authorization,
|
|
104
|
+
auth_token=auth_token,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
response = client.get_httpx_client().request(
|
|
108
|
+
**kwargs,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
return _build_response(client=client, response=response)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def sync(
|
|
115
|
+
graph_id: str,
|
|
116
|
+
*,
|
|
117
|
+
client: AuthenticatedClient,
|
|
118
|
+
body: OAuthInitRequest,
|
|
119
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
120
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
121
|
+
) -> Optional[Union[HTTPValidationError, OAuthInitResponse]]:
|
|
122
|
+
"""Init Oauth
|
|
123
|
+
|
|
124
|
+
Initialize OAuth flow for a connection.
|
|
125
|
+
|
|
126
|
+
This generates an authorization URL that the frontend should redirect the user to.
|
|
127
|
+
Currently supports: QuickBooks
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
graph_id (str): Graph database identifier
|
|
131
|
+
authorization (Union[None, Unset, str]):
|
|
132
|
+
auth_token (Union[None, Unset, str]):
|
|
133
|
+
body (OAuthInitRequest): Request to initiate OAuth flow.
|
|
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
|
+
Union[HTTPValidationError, OAuthInitResponse]
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
return sync_detailed(
|
|
144
|
+
graph_id=graph_id,
|
|
145
|
+
client=client,
|
|
146
|
+
body=body,
|
|
147
|
+
authorization=authorization,
|
|
148
|
+
auth_token=auth_token,
|
|
149
|
+
).parsed
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
async def asyncio_detailed(
|
|
153
|
+
graph_id: str,
|
|
154
|
+
*,
|
|
155
|
+
client: AuthenticatedClient,
|
|
156
|
+
body: OAuthInitRequest,
|
|
157
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
158
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
159
|
+
) -> Response[Union[HTTPValidationError, OAuthInitResponse]]:
|
|
160
|
+
"""Init Oauth
|
|
161
|
+
|
|
162
|
+
Initialize OAuth flow for a connection.
|
|
163
|
+
|
|
164
|
+
This generates an authorization URL that the frontend should redirect the user to.
|
|
165
|
+
Currently supports: QuickBooks
|
|
166
|
+
|
|
167
|
+
Args:
|
|
168
|
+
graph_id (str): Graph database identifier
|
|
169
|
+
authorization (Union[None, Unset, str]):
|
|
170
|
+
auth_token (Union[None, Unset, str]):
|
|
171
|
+
body (OAuthInitRequest): Request to initiate OAuth flow.
|
|
172
|
+
|
|
173
|
+
Raises:
|
|
174
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
175
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
176
|
+
|
|
177
|
+
Returns:
|
|
178
|
+
Response[Union[HTTPValidationError, OAuthInitResponse]]
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
kwargs = _get_kwargs(
|
|
182
|
+
graph_id=graph_id,
|
|
183
|
+
body=body,
|
|
184
|
+
authorization=authorization,
|
|
185
|
+
auth_token=auth_token,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
189
|
+
|
|
190
|
+
return _build_response(client=client, response=response)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
async def asyncio(
|
|
194
|
+
graph_id: str,
|
|
195
|
+
*,
|
|
196
|
+
client: AuthenticatedClient,
|
|
197
|
+
body: OAuthInitRequest,
|
|
198
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
199
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
200
|
+
) -> Optional[Union[HTTPValidationError, OAuthInitResponse]]:
|
|
201
|
+
"""Init Oauth
|
|
202
|
+
|
|
203
|
+
Initialize OAuth flow for a connection.
|
|
204
|
+
|
|
205
|
+
This generates an authorization URL that the frontend should redirect the user to.
|
|
206
|
+
Currently supports: QuickBooks
|
|
207
|
+
|
|
208
|
+
Args:
|
|
209
|
+
graph_id (str): Graph database identifier
|
|
210
|
+
authorization (Union[None, Unset, str]):
|
|
211
|
+
auth_token (Union[None, Unset, str]):
|
|
212
|
+
body (OAuthInitRequest): Request to initiate OAuth flow.
|
|
213
|
+
|
|
214
|
+
Raises:
|
|
215
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
216
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
217
|
+
|
|
218
|
+
Returns:
|
|
219
|
+
Union[HTTPValidationError, OAuthInitResponse]
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
return (
|
|
223
|
+
await asyncio_detailed(
|
|
224
|
+
graph_id=graph_id,
|
|
225
|
+
client=client,
|
|
226
|
+
body=body,
|
|
227
|
+
authorization=authorization,
|
|
228
|
+
auth_token=auth_token,
|
|
229
|
+
)
|
|
230
|
+
).parsed
|
|
@@ -0,0 +1,314 @@
|
|
|
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.connection_response import ConnectionResponse
|
|
9
|
+
from ...models.error_response import ErrorResponse
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.list_connections_provider_type_0 import ListConnectionsProviderType0
|
|
12
|
+
from ...types import UNSET, Response, Unset
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
graph_id: str,
|
|
17
|
+
*,
|
|
18
|
+
entity_id: Union[None, Unset, str] = UNSET,
|
|
19
|
+
provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET,
|
|
20
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
21
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
22
|
+
) -> dict[str, Any]:
|
|
23
|
+
headers: dict[str, Any] = {}
|
|
24
|
+
if not isinstance(authorization, Unset):
|
|
25
|
+
headers["authorization"] = authorization
|
|
26
|
+
|
|
27
|
+
cookies = {}
|
|
28
|
+
if auth_token is not UNSET:
|
|
29
|
+
cookies["auth-token"] = auth_token
|
|
30
|
+
|
|
31
|
+
params: dict[str, Any] = {}
|
|
32
|
+
|
|
33
|
+
json_entity_id: Union[None, Unset, str]
|
|
34
|
+
if isinstance(entity_id, Unset):
|
|
35
|
+
json_entity_id = UNSET
|
|
36
|
+
else:
|
|
37
|
+
json_entity_id = entity_id
|
|
38
|
+
params["entity_id"] = json_entity_id
|
|
39
|
+
|
|
40
|
+
json_provider: Union[None, Unset, str]
|
|
41
|
+
if isinstance(provider, Unset):
|
|
42
|
+
json_provider = UNSET
|
|
43
|
+
elif isinstance(provider, ListConnectionsProviderType0):
|
|
44
|
+
json_provider = provider.value
|
|
45
|
+
else:
|
|
46
|
+
json_provider = provider
|
|
47
|
+
params["provider"] = json_provider
|
|
48
|
+
|
|
49
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
50
|
+
|
|
51
|
+
_kwargs: dict[str, Any] = {
|
|
52
|
+
"method": "get",
|
|
53
|
+
"url": f"/v1/{graph_id}/connections",
|
|
54
|
+
"params": params,
|
|
55
|
+
"cookies": cookies,
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_kwargs["headers"] = headers
|
|
59
|
+
return _kwargs
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _parse_response(
|
|
63
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
64
|
+
) -> Optional[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]:
|
|
65
|
+
if response.status_code == 200:
|
|
66
|
+
response_200 = []
|
|
67
|
+
_response_200 = response.json()
|
|
68
|
+
for response_200_item_data in _response_200:
|
|
69
|
+
response_200_item = ConnectionResponse.from_dict(response_200_item_data)
|
|
70
|
+
|
|
71
|
+
response_200.append(response_200_item)
|
|
72
|
+
|
|
73
|
+
return response_200
|
|
74
|
+
if response.status_code == 403:
|
|
75
|
+
response_403 = ErrorResponse.from_dict(response.json())
|
|
76
|
+
|
|
77
|
+
return response_403
|
|
78
|
+
if response.status_code == 500:
|
|
79
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
80
|
+
|
|
81
|
+
return response_500
|
|
82
|
+
if response.status_code == 422:
|
|
83
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
84
|
+
|
|
85
|
+
return response_422
|
|
86
|
+
if client.raise_on_unexpected_status:
|
|
87
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
88
|
+
else:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def _build_response(
|
|
93
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
94
|
+
) -> Response[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]:
|
|
95
|
+
return Response(
|
|
96
|
+
status_code=HTTPStatus(response.status_code),
|
|
97
|
+
content=response.content,
|
|
98
|
+
headers=response.headers,
|
|
99
|
+
parsed=_parse_response(client=client, response=response),
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def sync_detailed(
|
|
104
|
+
graph_id: str,
|
|
105
|
+
*,
|
|
106
|
+
client: AuthenticatedClient,
|
|
107
|
+
entity_id: Union[None, Unset, str] = UNSET,
|
|
108
|
+
provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET,
|
|
109
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
110
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
111
|
+
) -> Response[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]:
|
|
112
|
+
"""List Connections
|
|
113
|
+
|
|
114
|
+
List all data connections in the graph.
|
|
115
|
+
|
|
116
|
+
Returns active and inactive connections with their current status.
|
|
117
|
+
Connections can be filtered by:
|
|
118
|
+
- **Entity**: Show connections for a specific entity
|
|
119
|
+
- **Provider**: Filter by connection type (sec, quickbooks, plaid)
|
|
120
|
+
|
|
121
|
+
Each connection shows:
|
|
122
|
+
- Current sync status and health
|
|
123
|
+
- Last successful sync timestamp
|
|
124
|
+
- Configuration metadata
|
|
125
|
+
- Error messages if any
|
|
126
|
+
|
|
127
|
+
No credits are consumed for listing connections.
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
graph_id (str): Graph database identifier
|
|
131
|
+
entity_id (Union[None, Unset, str]): Filter by entity ID
|
|
132
|
+
provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type
|
|
133
|
+
authorization (Union[None, Unset, str]):
|
|
134
|
+
auth_token (Union[None, Unset, str]):
|
|
135
|
+
|
|
136
|
+
Raises:
|
|
137
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
138
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
139
|
+
|
|
140
|
+
Returns:
|
|
141
|
+
Response[Union[ErrorResponse, HTTPValidationError, list['ConnectionResponse']]]
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
kwargs = _get_kwargs(
|
|
145
|
+
graph_id=graph_id,
|
|
146
|
+
entity_id=entity_id,
|
|
147
|
+
provider=provider,
|
|
148
|
+
authorization=authorization,
|
|
149
|
+
auth_token=auth_token,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
response = client.get_httpx_client().request(
|
|
153
|
+
**kwargs,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
return _build_response(client=client, response=response)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def sync(
|
|
160
|
+
graph_id: str,
|
|
161
|
+
*,
|
|
162
|
+
client: AuthenticatedClient,
|
|
163
|
+
entity_id: Union[None, Unset, str] = UNSET,
|
|
164
|
+
provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET,
|
|
165
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
166
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
167
|
+
) -> Optional[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]:
|
|
168
|
+
"""List Connections
|
|
169
|
+
|
|
170
|
+
List all data connections in the graph.
|
|
171
|
+
|
|
172
|
+
Returns active and inactive connections with their current status.
|
|
173
|
+
Connections can be filtered by:
|
|
174
|
+
- **Entity**: Show connections for a specific entity
|
|
175
|
+
- **Provider**: Filter by connection type (sec, quickbooks, plaid)
|
|
176
|
+
|
|
177
|
+
Each connection shows:
|
|
178
|
+
- Current sync status and health
|
|
179
|
+
- Last successful sync timestamp
|
|
180
|
+
- Configuration metadata
|
|
181
|
+
- Error messages if any
|
|
182
|
+
|
|
183
|
+
No credits are consumed for listing connections.
|
|
184
|
+
|
|
185
|
+
Args:
|
|
186
|
+
graph_id (str): Graph database identifier
|
|
187
|
+
entity_id (Union[None, Unset, str]): Filter by entity ID
|
|
188
|
+
provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type
|
|
189
|
+
authorization (Union[None, Unset, str]):
|
|
190
|
+
auth_token (Union[None, Unset, str]):
|
|
191
|
+
|
|
192
|
+
Raises:
|
|
193
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
194
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
195
|
+
|
|
196
|
+
Returns:
|
|
197
|
+
Union[ErrorResponse, HTTPValidationError, list['ConnectionResponse']]
|
|
198
|
+
"""
|
|
199
|
+
|
|
200
|
+
return sync_detailed(
|
|
201
|
+
graph_id=graph_id,
|
|
202
|
+
client=client,
|
|
203
|
+
entity_id=entity_id,
|
|
204
|
+
provider=provider,
|
|
205
|
+
authorization=authorization,
|
|
206
|
+
auth_token=auth_token,
|
|
207
|
+
).parsed
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
async def asyncio_detailed(
|
|
211
|
+
graph_id: str,
|
|
212
|
+
*,
|
|
213
|
+
client: AuthenticatedClient,
|
|
214
|
+
entity_id: Union[None, Unset, str] = UNSET,
|
|
215
|
+
provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET,
|
|
216
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
217
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
218
|
+
) -> Response[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]:
|
|
219
|
+
"""List Connections
|
|
220
|
+
|
|
221
|
+
List all data connections in the graph.
|
|
222
|
+
|
|
223
|
+
Returns active and inactive connections with their current status.
|
|
224
|
+
Connections can be filtered by:
|
|
225
|
+
- **Entity**: Show connections for a specific entity
|
|
226
|
+
- **Provider**: Filter by connection type (sec, quickbooks, plaid)
|
|
227
|
+
|
|
228
|
+
Each connection shows:
|
|
229
|
+
- Current sync status and health
|
|
230
|
+
- Last successful sync timestamp
|
|
231
|
+
- Configuration metadata
|
|
232
|
+
- Error messages if any
|
|
233
|
+
|
|
234
|
+
No credits are consumed for listing connections.
|
|
235
|
+
|
|
236
|
+
Args:
|
|
237
|
+
graph_id (str): Graph database identifier
|
|
238
|
+
entity_id (Union[None, Unset, str]): Filter by entity ID
|
|
239
|
+
provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type
|
|
240
|
+
authorization (Union[None, Unset, str]):
|
|
241
|
+
auth_token (Union[None, Unset, str]):
|
|
242
|
+
|
|
243
|
+
Raises:
|
|
244
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
245
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
246
|
+
|
|
247
|
+
Returns:
|
|
248
|
+
Response[Union[ErrorResponse, HTTPValidationError, list['ConnectionResponse']]]
|
|
249
|
+
"""
|
|
250
|
+
|
|
251
|
+
kwargs = _get_kwargs(
|
|
252
|
+
graph_id=graph_id,
|
|
253
|
+
entity_id=entity_id,
|
|
254
|
+
provider=provider,
|
|
255
|
+
authorization=authorization,
|
|
256
|
+
auth_token=auth_token,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
260
|
+
|
|
261
|
+
return _build_response(client=client, response=response)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
async def asyncio(
|
|
265
|
+
graph_id: str,
|
|
266
|
+
*,
|
|
267
|
+
client: AuthenticatedClient,
|
|
268
|
+
entity_id: Union[None, Unset, str] = UNSET,
|
|
269
|
+
provider: Union[ListConnectionsProviderType0, None, Unset] = UNSET,
|
|
270
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
271
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
272
|
+
) -> Optional[Union[ErrorResponse, HTTPValidationError, list["ConnectionResponse"]]]:
|
|
273
|
+
"""List Connections
|
|
274
|
+
|
|
275
|
+
List all data connections in the graph.
|
|
276
|
+
|
|
277
|
+
Returns active and inactive connections with their current status.
|
|
278
|
+
Connections can be filtered by:
|
|
279
|
+
- **Entity**: Show connections for a specific entity
|
|
280
|
+
- **Provider**: Filter by connection type (sec, quickbooks, plaid)
|
|
281
|
+
|
|
282
|
+
Each connection shows:
|
|
283
|
+
- Current sync status and health
|
|
284
|
+
- Last successful sync timestamp
|
|
285
|
+
- Configuration metadata
|
|
286
|
+
- Error messages if any
|
|
287
|
+
|
|
288
|
+
No credits are consumed for listing connections.
|
|
289
|
+
|
|
290
|
+
Args:
|
|
291
|
+
graph_id (str): Graph database identifier
|
|
292
|
+
entity_id (Union[None, Unset, str]): Filter by entity ID
|
|
293
|
+
provider (Union[ListConnectionsProviderType0, None, Unset]): Filter by provider type
|
|
294
|
+
authorization (Union[None, Unset, str]):
|
|
295
|
+
auth_token (Union[None, Unset, str]):
|
|
296
|
+
|
|
297
|
+
Raises:
|
|
298
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
299
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
300
|
+
|
|
301
|
+
Returns:
|
|
302
|
+
Union[ErrorResponse, HTTPValidationError, list['ConnectionResponse']]
|
|
303
|
+
"""
|
|
304
|
+
|
|
305
|
+
return (
|
|
306
|
+
await asyncio_detailed(
|
|
307
|
+
graph_id=graph_id,
|
|
308
|
+
client=client,
|
|
309
|
+
entity_id=entity_id,
|
|
310
|
+
provider=provider,
|
|
311
|
+
authorization=authorization,
|
|
312
|
+
auth_token=auth_token,
|
|
313
|
+
)
|
|
314
|
+
).parsed
|